Exemplo n.º 1
0
        public void ShouldParseWkt(string input, string expected)
        {
            var builder=new GmlGeometryBuilder();
            builder.Parse(input, CommonServiceLocator.GetCoordinateSystemProvider().Wgs84);

            var g=builder.ConstructedGeometry;

            Assert.Equal<string>(expected, g.ToString());
        }
Exemplo n.º 2
0
        public void ShouldParseWkt(string input, string expected)
        {
            var builder = new GmlGeometryBuilder();

            builder.Parse(input, CommonServiceLocator.GetCoordinateSystemProvider().Wgs84);

            var g = builder.ConstructedGeometry;

            Assert.Equal <string>(expected, g.ToString());
        }
Exemplo n.º 3
0
        public void WriteJson_ShouldGenerateValidGeoJson(string wkt, string expectedJson)
        {
            var builder=new GmlGeometryBuilder(CommonServiceLocator.GetCoordinateSystemProvider().Wgs84);
            builder.Parse(wkt, CommonServiceLocator.GetCoordinateSystemProvider().Wgs84);
            var g=builder.ConstructedGeometry;

            var json=JsonConvert.SerializeObject(g, Formatting.None);

            Assert.Equal(expectedJson, json);
        }
Exemplo n.º 4
0
        public void WriteJson_ShouldGenerateValidGeoJson(string wkt, string expectedJson)
        {
            var builder = new GmlGeometryBuilder(CommonServiceLocator.GetCoordinateSystemProvider().Wgs84);

            builder.Parse(wkt, CommonServiceLocator.GetCoordinateSystemProvider().Wgs84);
            var g = builder.ConstructedGeometry;

            var json = JsonConvert.SerializeObject(g, Formatting.None);

            Assert.Equal(expectedJson, json);
        }