private static void VerifyPosition(PositionData expected, GeographyPoint actual) { Assert.AreEqual(expected.Latitude, actual.Latitude); Assert.AreEqual(expected.Longitude, actual.Longitude); Assert.AreEqual(expected.Z, actual.Z); Assert.AreEqual(expected.M, actual.M); }
private static void ReadPointTest(SpatialFormatter<TextReader, TextWriter> formatter, TextReader input, PositionData expected, CoordinateSystem expectedCoordinateSystem = null) { var p = formatter.Read<Geography>(input); Assert.IsNotNull(p); p.VerifyAsPoint(expected); if (expectedCoordinateSystem != null) { Assert.AreEqual(p.CoordinateSystem, expectedCoordinateSystem); } }
public static void DrawLine(GeometryPipeline pipeline, PositionData[] line) { for (int i = 0; i < line.Length; ++i) { PositionData currentLine = line[i]; if (i == 0) { pipeline.BeginFigure(new GeometryPosition(currentLine.X, currentLine.Y, currentLine.Z, currentLine.M)); } else { pipeline.LineTo(new GeometryPosition(currentLine.X, currentLine.Y, currentLine.Z, currentLine.M)); } } pipeline.EndFigure(); }
public static void VerifyAsPoint(this Geography data, PositionData expected) { VerifyTypedInstance <GeographyPoint>(data, expected == null, (actual) => VerifyPosition(expected, actual)); }
internal static void DrawPoint(TypeWashedPipeline pipeline, PositionData point) { pipeline.BeginFigure(point.X, point.Y, point.Z, point.M); pipeline.EndFigure(); }
public static void DrawPoint(GeometryPipeline pipeline, PositionData point) { pipeline.BeginFigure(new GeometryPosition(point.X, point.Y, point.Z, point.M)); pipeline.EndFigure(); }
private void ReadPointTest(string input, PositionData expected, CoordinateSystem expectedCoordinateSystem = null) { ReadPointTest(this.d4Formatter, new StringReader(input), expected, expectedCoordinateSystem); }
internal static void DrawLine(TypeWashedPipeline pipeline, PositionData[] line) { for (int i = 0; i < line.Length; ++i) { if (i == 0) { pipeline.BeginFigure(line[i].X, line[i].Y, line[i].Z, line[i].M); } else { pipeline.LineTo(line[i].X, line[i].Y, line[i].Z, line[i].M); } } pipeline.EndFigure(); }
public static void DrawLine(GeographyPipeline pipeline, PositionData[] line) { for (int i = 0; i < line.Length; ++i) { if (i == 0) { pipeline.BeginFigure(new GeographyPosition(line[i].X, line[i].Y, line[i].Z, line[i].M)); } else { pipeline.LineTo(new GeographyPosition(line[i].X, line[i].Y, line[i].Z, line[i].M)); } } pipeline.EndFigure(); }