Ejemplo n.º 1
0
        public void MultiLineStringSinglePart()
        {
            var expected = MakeFeatureCollection("MULTILINESTRING((1.2 -2.1, 2.4 -4.8))");
            var actual   = GeoJsonConversions.ToGeoJson(GeoJsonConversions.FromGeoJson(expected));

            AssertJson(expected, actual);
        }
Ejemplo n.º 2
0
        public void LineString()
        {
            var expected = MakeFeatureCollection("LINESTRING(1.2 -2.1, 2.4 -4.8)");
            var actual   = GeoJsonConversions.ToGeoJson(GeoJsonConversions.FromGeoJson(expected));

            AssertJson(expected, actual);
        }
Ejemplo n.º 3
0
        public void MultiLineString()
        {
            var expected = MakeFeatureCollection("MULTILINESTRING((10 10, 20 20, 10 40), (40 40, 30 30, 40 20, 30 10), (50 50, 60 60, 50 90))");
            var actual   = GeoJsonConversions.ToGeoJson(GeoJsonConversions.FromGeoJson(expected));

            AssertJson(expected, actual);
        }
Ejemplo n.º 4
0
        public void MultiPoint()
        {
            var expected = MakeFeatureCollection("MULTIPOINT(10 40, 40 30, 20 20, 30 10)");
            var actual   = GeoJsonConversions.ToGeoJson(GeoJsonConversions.FromGeoJson(expected));

            AssertJson(expected, actual);
        }
Ejemplo n.º 5
0
        public void MultiPointAlternativeSyntax()
        {
            var expected = MakeFeatureCollection("MULTIPOINT((10 40), (40 30), (20 20), (30 10))");
            var actual   = GeoJsonConversions.ToGeoJson(GeoJsonConversions.FromGeoJson(expected));

            AssertJson(expected, actual);
        }
Ejemplo n.º 6
0
        public void Point()
        {
            var expected = MakeFeatureCollection("POINT(1.2 -2.1)");
            var actual   = GeoJsonConversions.ToGeoJson(GeoJsonConversions.FromGeoJson(expected));

            AssertJson(expected, actual);
        }
Ejemplo n.º 7
0
        public void Points()
        {
            var expected = MakeFeatureCollection(new string[] { "POINT(1.2 -2.1)", "POINT(2.4 -4.8)" });
            var actual   = GeoJsonConversions.ToGeoJson(GeoJsonConversions.FromGeoJson(expected));

            AssertJson(expected, actual);
        }
Ejemplo n.º 8
0
        public void PolygonWithHole()
        {
            var expected = MakeFeatureCollection("POLYGON ((35 10, 45 45, 15 40, 10 20, 35 10), (20 30, 35 35, 30 20, 20 30))");
            var actual   = GeoJsonConversions.ToGeoJson(GeoJsonConversions.FromGeoJson(expected));

            AssertJson(expected, actual);
        }
Ejemplo n.º 9
0
        public void MultiPolygonSinglePart()
        {
            var expected = MakeFeatureCollection("MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)))");
            var actual   = GeoJsonConversions.ToGeoJson(GeoJsonConversions.FromGeoJson(expected));

            AssertJson(expected, actual);
        }
Ejemplo n.º 10
0
        public void MultiPolygonWithHole()
        {
            var expected = MakeFeatureCollection("MULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)), ((20 35, 10 30, 10 10, 30 5, 45 20, 20 35), (30 20, 20 15, 20 25, 30 20)))");
            var actual   = GeoJsonConversions.ToGeoJson(GeoJsonConversions.FromGeoJson(expected));

            AssertJson(expected, actual);
        }
Ejemplo n.º 11
0
        public void Polygon()
        {
            var expected = MakeFeatureCollection("POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))");
            var actual   = GeoJsonConversions.ToGeoJson(GeoJsonConversions.FromGeoJson(expected));

            AssertJson(expected, actual);
        }
Ejemplo n.º 12
0
        public void Number()
        {
            var attributes = new Dictionary <string, object>()
            {
                ["test"] = 1
            };
            var expected = MakeFeatureCollection(attributes);
            var actual   = GeoJsonConversions.ToGeoJson(GeoJsonConversions.FromGeoJson(expected));

            AssertJson(expected, actual);
        }
Ejemplo n.º 13
0
        public void Mixed()
        {
            var attributes = new Dictionary <string, object>()
            {
                ["test1"] = 1,
                ["test2"] = 1.1,
                ["test3"] = "test",
                ["test4"] = true,
                ["test5"] = "teståöä2",
                ["test6"] = false,
            };
            var expected = MakeFeatureCollection(attributes);
            var actual   = GeoJsonConversions.ToGeoJson(GeoJsonConversions.FromGeoJson(expected));

            AssertJson(expected, actual);
        }
Ejemplo n.º 14
0
        public void NumberTenAttribs()
        {
            var attributes = new Dictionary <string, object>()
            {
                ["test"]   = 1,
                ["test2"]  = 1,
                ["test3"]  = 1,
                ["test4"]  = 1,
                ["test5"]  = 1,
                ["test6"]  = 1,
                ["test7"]  = 1,
                ["test8"]  = 1,
                ["test9"]  = 1,
                ["test10"] = 1
            };
            var expected = MakeFeatureCollection(attributes);
            var actual   = GeoJsonConversions.ToGeoJson(GeoJsonConversions.FromGeoJson(expected));

            AssertJson(expected, actual);
        }