Пример #1
0
        private static void WriteGeoJsonTest(Action <TypeWashedPipeline> pipelineCalls, IDictionary <String, Object> expectedJsonObject, bool isGeometry, CoordinateSystem crs)
        {
            var w = new GeoJsonObjectWriter();
            TypeWashedPipeline p = isGeometry ?
                                   (TypeWashedPipeline) new TypeWashedToGeographyLongLatPipeline(new ForwardingSegment(w))
                : new TypeWashedToGeometryPipeline(new ForwardingSegment(w));

            p.SetCoordinateSystem(crs.EpsgId.Value);
            pipelineCalls(p);

            var actualObject = w.JsonObject;

            AddCoordinateSystem(expectedJsonObject, crs);
            AssertJsonObjectEquals(expectedJsonObject, actualObject);
        }
Пример #2
0
        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();
        }
Пример #3
0
 internal static void DrawPoint(TypeWashedPipeline pipeline, PositionData point)
 {
     pipeline.BeginFigure(point.X, point.Y, point.Z, point.M);
     pipeline.EndFigure();
 }