コード例 #1
0
ファイル: SpatialTestUtils.cs プロジェクト: zhonli/odata.net
 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);
 }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
        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();
        }
コード例 #4
0
ファイル: SpatialTestUtils.cs プロジェクト: zhonli/odata.net
 public static void VerifyAsPoint(this Geography data, PositionData expected)
 {
     VerifyTypedInstance <GeographyPoint>(data, expected == null, (actual) => VerifyPosition(expected, actual));
 }
コード例 #5
0
 internal static void DrawPoint(TypeWashedPipeline pipeline, PositionData point)
 {
     pipeline.BeginFigure(point.X, point.Y, point.Z, point.M);
     pipeline.EndFigure();
 }
コード例 #6
0
 public static void DrawPoint(GeometryPipeline pipeline, PositionData point)
 {
     pipeline.BeginFigure(new GeometryPosition(point.X, point.Y, point.Z, point.M));
     pipeline.EndFigure();
 }
コード例 #7
0
 private void ReadPointTest(string input, PositionData expected, CoordinateSystem expectedCoordinateSystem = null)
 {
     ReadPointTest(this.d4Formatter, new StringReader(input), expected, expectedCoordinateSystem);
 }
コード例 #8
0
ファイル: PositionData.cs プロジェクト: rossjempson/odata.net
 internal static void DrawPoint(TypeWashedPipeline pipeline, PositionData point)
 {
     pipeline.BeginFigure(point.X, point.Y, point.Z, point.M);
     pipeline.EndFigure();
 }
コード例 #9
0
ファイル: PositionData.cs プロジェクト: rossjempson/odata.net
        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();
        }
コード例 #10
0
ファイル: PositionData.cs プロジェクト: rossjempson/odata.net
 public static void DrawPoint(GeometryPipeline pipeline, PositionData point)
 {
     pipeline.BeginFigure(new GeometryPosition(point.X, point.Y, point.Z, point.M));
     pipeline.EndFigure();
 }
コード例 #11
0
ファイル: PositionData.cs プロジェクト: rossjempson/odata.net
        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();
        }
コード例 #12
0
ファイル: PositionData.cs プロジェクト: rossjempson/odata.net
        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();
        }