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()); }
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()); }
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); }
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); }