/// <summary> /// 获取几何对象的坐标点信息 /// </summary> /// <param name="feature"></param> /// <param name="type"></param> /// <returns></returns> internal static dynamic GetCoordinates(this IFeature feature, GeoJSONType type) { dynamic coords = null; switch (type) { case GeoJSONType.Point: Coord1 coord1 = new Coord1(); coords = coord1.GetCoords(feature); break; case GeoJSONType.MultiPoint: case GeoJSONType.LineString: Coord2 coord2 = new Coord2(); coords = coord2.GetCoords(feature); break; case GeoJSONType.MultiLineString: Coord3 coord31 = new Coord3(); coords = coord31.GetCoords(feature); break; case GeoJSONType.Polygon: Coord3 coord32 = new Coord3(); coords = coord32.GetClosedCoords(feature); break; default: return(null); } return(coords); }
private void LoadGraphics() { var bottomleft = new PolarGraphicCoordinate(Coord1.Target, Width, Coord1.PerpendicularNegative().AngleDegree); var topleft = new PolarGraphicCoordinate(Coord1.Target, Width, Coord1.PerpendicularPositive().AngleDegree); var topright = new PolarGraphicCoordinate(Coord2.Origin, Width, Coord2.PerpendicularPositive().AngleDegree); var bottomright = new PolarGraphicCoordinate(Coord2.Origin, Width, Coord2.PerpendicularNegative().AngleDegree); _square = new Square(bottomleft.Target, topleft.Target, topright.Target, bottomright.Target, Color); }
public static bool operator ==(Coordinates Coord1, Coordinates Coord2) { return(Coord1.Equals(Coord2)); }
public LineSegment Offset(Vector input) => new LineSegment(Coord1.Translate(input), Coord2.Translate(input));
public LineSegment RotateAbout(Coordinate rotationOrigin, Angle angle) => new LineSegment(Coord1.RotateAbout(rotationOrigin, angle), Coord2.RotateAbout(rotationOrigin, angle));