public void Gml32MultiSurfaceToGeorss4() { var fs = new FileStream(TestContext.CurrentContext.TestPath("../Samples/multisurface32-4.xml"), FileMode.Open, FileAccess.Read); var reader = XmlReader.Create(fs); var gml = GmlHelper.Deserialize(reader); fs.Close(); var geom = gml.ToGeometry(); Assert.IsTrue(geom is MultiPolygon); var georss = (GeoRssWhere)geom.ToGeoRss(); Assert.AreEqual("multipolygon", georss.Type); var georss2 = (GeoRssWhere)GeoRssHelper.Deserialize(georss.CreateReader()); Assert.AreEqual("multipolygon", georss2.Type); var geom2 = georss.ToGeometry(); Assert.IsTrue(geom2 is MultiPolygon); var json = new Feature.Feature(geom, null); }
/// <summary> /// Converts a GeoJSON Feature to an SqlGeometry /// </summary> /// <param name="feature"></param> /// <param name="srid"></param> /// <returns></returns> public static SqlGeometry ToSqlGeometry(this Feature.Feature feature, int srid = 4326) { switch (feature.Geometry.Type) { case GeoJSONObjectType.LineString: return(((LineString)feature.Geometry).ToSqlGeometry(srid)); case GeoJSONObjectType.MultiLineString: return(((MultiLineString)feature.Geometry).ToSqlGeometry(srid)); case GeoJSONObjectType.Point: return(((Point)feature.Geometry).ToSqlGeometry(srid)); case GeoJSONObjectType.MultiPoint: return(((MultiPoint)feature.Geometry).ToSqlGeometry(srid)); case GeoJSONObjectType.Polygon: return(((Polygon)feature.Geometry).ToSqlGeometry(srid)); case GeoJSONObjectType.MultiPolygon: return(((MultiPolygon)feature.Geometry).ToSqlGeometry(srid)); default: throw new NotSupportedException("Geometry conversion is not supported for " + feature.Type.ToString()); } }
public void FeatureCollectionSerialization() { var model = new FeatureCollection(null); for (var i = 10; i-- > 0;) { var geom = new LineString(new[] { new GeographicPosition(51.010, -1.034), new GeographicPosition(51.010, -0.034), }); var props = new Dictionary <string, object>(); props.Add("test1", "1"); props.Add("test2", 2); var feature = new Feature.Feature(geom, props); model.Features.Add(feature); } var serialized = JsonConvert.SerializeObject(model, Formatting.Indented, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() }); Assert.IsNotNull(serialized); Assert.IsFalse(string.IsNullOrEmpty(serialized)); }
public void PointFeatureSerialization() { var point = new Point(new GeographicPosition(45.79012, 15.94107)); var featureProperties = new Dictionary<string, object> { { "Name", "Foo" } }; var model = new Feature.Feature(point, featureProperties); var serializedData = JsonConvert.SerializeObject(model); Assert.IsFalse(serializedData.Contains("longitude")); }
public void LineStringFeatureToWkt() { var linestringf = new Feature.Feature(new LineString( new List <IPosition> { Position1, Position2, Position3 }), null); var wkt = linestringf.ToWkt(); Assert.AreEqual("LINESTRING(124 10,124 11,125 10)", wkt); }
public void PointFeatureSerialization() { var point = new Point(new GeographicPosition(45.79012, 15.94107)); var featureProperties = new Dictionary <string, object> { { "Name", "Foo" } }; var model = new Feature.Feature(point, featureProperties); var serializedData = JsonConvert.SerializeObject(model); Assert.IsFalse(serializedData.Contains("longitude")); }
public void PointFeatureSerialization() { var point = new Point(new GeographicPosition(45.79012, 15.94107)); var featureProperties = new Dictionary <string, object> { { "Name", "Foo" } }; var model = new Feature.Feature(point, featureProperties); var serializedData = JsonConvert.SerializeObject(model, Formatting.Indented, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver(), NullValueHandling = NullValueHandling.Ignore }); Assert.IsFalse(serializedData.Contains("longitude")); }
public void PolygonFeatureSerialization() { var coordinates = new List<GeographicPosition> { new GeographicPosition(52.370725881211314, 4.889259338378906), new GeographicPosition(52.3711451105601, 4.895267486572266), new GeographicPosition(52.36931095278263, 4.892091751098633), new GeographicPosition(52.370725881211314, 4.889259338378906) }; var polygon = new Polygon(new List<LineString> { new LineString(coordinates) }); var featureProperties = new Dictionary<string, object> { { "Name", "Foo" } }; var model = new Feature.Feature(polygon, featureProperties); var serializedData = JsonConvert.SerializeObject(model); }
public void MultiPolygonSerialization() { var expectedJson = "{\"geometry\":{\"coordinates\":[[[[0.0,0.0],[1.0,0.0],[1.0,1.0],[0.0,1.0],[0.0,0.0]]],[[[100.0,100.0],[101.0,100.0],[101.0,101.0],[100.0,101.0],[100.0,100.0]],[[200.0,200.0],[201.0,200.0],[201.0,201.0],[200.0,201.0],[200.0,200.0]]]],\"type\":\"MultiPolygon\"},\"properties\":{},\"type\":\"Feature\"}"; var polygon1 = new Polygon(new List <LineString> { new LineString((new List <GeographicPosition> { new GeographicPosition(0, 0), new GeographicPosition(0, 1), new GeographicPosition(1, 1), new GeographicPosition(1, 0), new GeographicPosition(0, 0) }).ToList <IPosition>()) }); var polygon2 = new Polygon(new List <LineString> { new LineString((new List <GeographicPosition> { new GeographicPosition(100, 100), new GeographicPosition(100, 101), new GeographicPosition(101, 101), new GeographicPosition(101, 100), new GeographicPosition(100, 100) }).ToList <IPosition>()), new LineString((new List <GeographicPosition> { new GeographicPosition(200, 200), new GeographicPosition(200, 201), new GeographicPosition(201, 201), new GeographicPosition(201, 200), new GeographicPosition(200, 200) }).ToList <IPosition>()) }); var multipolygon = new MultiPolygon(new List <Polygon> { polygon1, polygon2 }); var newFeature = new Feature.Feature(multipolygon); var serializedData = JsonConvert.SerializeObject(newFeature, Formatting.Indented, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver(), NullValueHandling = NullValueHandling.Ignore }); var serializedDataWithouWhiteSpace = Regex.Replace(serializedData, @"(\s|$)+", ""); Assert.IsTrue(serializedDataWithouWhiteSpace == expectedJson); }
public void TestFeatureFromClass() { var testObject = new MyTestClass() { BooleanProperty = true, DateTimeProperty = DateTime.Now, DoubleProperty = 1.2345d, EnumProperty = MyTestEnum.Value1, IntProperty = -1, StringProperty = "Hello, GeoJSON !" }; Feature.Feature feature = new Feature.Feature(new Point(new GeographicPosition(10, 10)), testObject); Assert.IsNotNull(feature.Properties); Assert.IsTrue(feature.Properties.Count > 1); Assert.AreEqual(feature.Properties.Count, 6); }
public void PolygonFeatureSerialization() { var coordinates = new List <GeographicPosition> { new GeographicPosition(52.370725881211314, 4.889259338378906), new GeographicPosition(52.3711451105601, 4.895267486572266), new GeographicPosition(52.36931095278263, 4.892091751098633), new GeographicPosition(52.370725881211314, 4.889259338378906) }; var polygon = new Polygon(new List <LineString> { new LineString(coordinates) }); var featureProperties = new Dictionary <string, object> { { "Name", "Foo" } }; var model = new Feature.Feature(polygon, featureProperties); var serializedData = JsonConvert.SerializeObject(model); }
public void PolygonFeatureSerialization() { var coordinates = new List <GeographicPosition> { new GeographicPosition(52.370725881211314, 4.889259338378906), new GeographicPosition(52.3711451105601, 4.895267486572266), new GeographicPosition(52.36931095278263, 4.892091751098633), new GeographicPosition(52.370725881211314, 4.889259338378906) }.ToList <IPosition>(); var polygon = new Polygon(new List <LineString> { new LineString(coordinates) }); var featureProperties = new Dictionary <string, object> { { "Name", "Foo" } }; var model = new Feature.Feature(polygon, featureProperties); var serializedData = JsonConvert.SerializeObject(model, Formatting.Indented, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver(), NullValueHandling = NullValueHandling.Ignore }); }
public void PolygonFeatureToWkt() { var list = new List <LineString>(); list.Add(new LineString( new List <IPosition> { Position1, Position2, Position3, Position4 })); var polygonf = new Feature.Feature(new Polygon(list), null); var wkt = polygonf.ToWkt(); Assert.AreEqual("POLYGON((124 10,124 11,125 10,124 10))", wkt); var geometry = WktExtensions.WktToGeometry("POLYGON((-5.361328125 36.03133177633189,-4.921875 36.80928470205937,-2.021484375 36.949891786813296,3.076171875 42.553080288955826,4.21875 43.51668853502909,8.4375 44.5278427984555,13.095703125 45.89000815866182,19.248046875 42.09822241118974,26.71875 39.707186656826565,35.947265625 36.5978891330702,34.1015625 31.203404950917395,18.984375 30.29701788337205,-5.361328125 36.03133177633189))"); GeometryFactory.SplitWorldExtent((Polygon)geometry); var geomstring = geometry.ToWkt(); var feature = WktExtensions.WktToGeometry("POLYGON((-5.361328125 36.03133177633189,-4.921875 36.80928470205937,-2.021484375 36.949891786813296,3.076171875 42.553080288955826,4.21875 43.51668853502909,8.4375 44.5278427984555,13.095703125 45.89000815866182,19.248046875 42.09822241118974,26.71875 39.707186656826565,35.947265625 36.5978891330702,34.1015625 31.203404950917395,18.984375 30.29701788337205,-5.361328125 36.03133177633189))"); }
public static byte[] Encode(Feature.Feature feature) { return(Encode(feature.Geometry)); }
public static string ToWkt(this Feature.Feature feature) { return(ToWkt(feature.Geometry)); }
public ToSqlGeometryTests() { point = new Point(new Position(53.2455662, 90.65464646)); multiPoint = new MultiPoint(new List <Point> { new Point(new Position(52.379790828551016, 5.3173828125)), new Point(new Position(52.36721467920585, 5.456085205078125)), new Point(new Position(52.303440474272755, 5.386047363281249, 4.23)) }); lineString = new LineString(new List <IPosition> { new Position(52.379790828551016, 5.3173828125), new Position(52.36721467920585, 5.456085205078125), new Position(52.303440474272755, 5.386047363281249, 4.23) }); multiLineString = new MultiLineString(new List <LineString> { new LineString(new List <IPosition> { new Position(52.379790828551016, 5.3173828125), new Position(52.36721467920585, 5.456085205078125), new Position(52.303440474272755, 5.386047363281249, 4.23) }), new LineString(new List <IPosition> { new Position(52.379790828551016, 5.3273828125), new Position(52.36721467920585, 5.486085205078125), new Position(52.303440474272755, 5.426047363281249, 4.23) }) }); polygonWithHole = new Polygon(new List <LineString> { new LineString(new List <Position> { new Position(0.516357421875, 47.6415668949958), new Position(0.516357421875, 47.34463879017405), new Position(0.977783203125, 47.22539733216678), new Position(1.175537109375, 47.463611506072866), new Position(0.516357421875, 47.6415668949958) }), new LineString(new List <Position> { new Position(0.630340576171875, 47.54944962456812), new Position(0.630340576171875, 47.49380564962583), new Position(0.729217529296875, 47.482669772098674), new Position(0.731964111328125, 47.53276262898896), new Position(0.630340576171875, 47.54944962456812) }) }); polygon = new Polygon(new List <LineString> { new LineString(new List <Position> { new Position(52.379790828551016, 5.3173828125), new Position(52.36721467920585, 5.456085205078125), new Position(52.303440474272755, 5.386047363281249, 4.23), new Position(52.379790828551016, 5.3173828125) }) }); multiPolygon = new MultiPolygon(new List <Polygon> { new Polygon(new List <LineString> { new LineString(new List <IPosition> { new Position(52.959676831105995, -2.6797102391514338), new Position(52.9608756693609, -2.6769029474483279), new Position(52.908449372833715, -2.6079763270327119), new Position(52.891287242948195, -2.5815104708998668), new Position(52.875476700983896, -2.5851645010668989), new Position(52.882954723868622, -2.6050779098387191), new Position(52.875255907042678, -2.6373482332006359), new Position(52.878791122091066, -2.6932445076063951), new Position(52.89564268523565, -2.6931334629377890), new Position(52.930592009390175, -2.6548779332193022), new Position(52.959676831105995, -2.6797102391514338) }) }), new Polygon(new List <LineString> { new LineString(new List <IPosition> { new Position(52.89610842810761, -2.69628632041613), new Position(52.8894641454077, -2.75901233808515), new Position(52.89938894657412, -2.7663172788742449), new Position(52.90253773227807, -2.804554822840895), new Position(52.929801009654575, -2.83848602260174), new Position(52.94013913205788, -2.838979264607087), new Position(52.937353122653533, -2.7978187468478741), new Position(52.920394929466184, -2.772273870352612), new Position(52.926572918779222, -2.6996509024137052), new Position(52.89610842810761, -2.69628632041613) }) }) }); geomCollection = new GeometryCollection(new List <IGeometryObject> { point, multiPoint, lineString, multiLineString, polygon, multiPolygon }); feature = new Feature.Feature(polygon, new Dictionary <string, object>() { { "Key", "Value" } }, "Id"); featureCollection = new FeatureCollection(new List <Feature.Feature> { feature, new Feature.Feature(multiPolygon, null) }); }
public WkbConversionsTests() { point = new Point(new Position(53.2455662, 90.65464646)); multiPoint = new MultiPoint(new List <Point> { new Point(new Position(52.379790828551016, 5.3173828125)), new Point(new Position(52.36721467920585, 5.456085205078125)), new Point(new Position(52.303440474272755, 5.386047363281249, 4.23)) }); lineString = new LineString(new List <IPosition> { new Position(52.379790828551016, 5.3173828125), new Position(52.36721467920585, 5.456085205078125), new Position(52.303440474272755, 5.386047363281249, 4.23) }); multiLineString = new MultiLineString(new List <LineString> { new LineString(new List <IPosition> { new Position(52.379790828551016, 5.3173828125), new Position(52.36721467920585, 5.456085205078125), new Position(52.303440474272755, 5.386047363281249, 4.23) }), new LineString(new List <IPosition> { new Position(52.379790828551016, 5.3273828125), new Position(52.36721467920585, 5.486085205078125), new Position(52.303440474272755, 5.426047363281249, 4.23) }) }); /* * POLYGON ( * new Position(5.6718750056992775 43.179268827576763), * new Position(5.7627938771963274 43.282358019007539), * new Position(5.6827878158334473 43.399165901196014), * new Position(5.7883490332690677 43.420263481346808), * new Position(5.6569195891695419 43.575280226136485), * new Position(5.7992059672926253 43.659928964120652), * new Position(5.772453944482355 43.722182053435269), * new Position(5.5305079449053451 43.659231446664869), * new Position(4.7390611308576647 43.924068511657794), * new Position(4.641909591242106 43.867477587972004), * new Position(4.6268107341244811 43.688132623094383), * new Position(4.4864081749462246 43.698853136943086), * new Position(4.4608683979209367 43.58945970637793), * new Position(4.2379330762447731 43.49708004345662), * new Position(4.55238424144851 43.446971295015622), * new Position(4.6618166942350943 43.346294896388663), * new Position(4.8579247842437638 43.334654947962143), * new Position(4.861467735270022 43.455412079597927), * new Position(5.0545884574514082 43.326670147834825), * new Position(5.3160671845314269 43.359760733800755), * new Position(5.3405286722678431 43.214414007811236), * new Position(5.6718750056992775 43.179268827576763), * * new Position(5.0144408111937375, 43.555545986597537), * new Position( 5.2267178460469337, 43.453922302237586), * new Position( 5.0599489280101588, 43.404914999013144), * new Position(5.0144408111937375, 43.555545986597537) */ polygonWithHole = new Polygon(new List <LineString> { new LineString(new List <Position> { new Position(43.179268827576763, 5.6718750056992775), new Position(43.282358019007539, 5.7627938771963274), new Position(43.399165901196014, 5.6827878158334473), new Position(43.420263481346808, 5.7883490332690677), new Position(43.575280226136485, 5.6569195891695419), new Position(43.659928964120652, 5.7992059672926253), new Position(43.722182053435269, 5.772453944482355), new Position(43.659231446664869, 5.5305079449053451), new Position(43.924068511657794, 4.7390611308576647), new Position(43.867477587972004, 4.641909591242106), new Position(43.688132623094383, 4.6268107341244811), new Position(43.698853136943086, 4.4864081749462246), new Position(43.58945970637793, 4.4608683979209367), new Position(43.49708004345662, 4.2379330762447731), new Position(43.446971295015622, 4.55238424144851), new Position(43.346294896388663, 4.6618166942350943), new Position(43.334654947962143, 4.8579247842437638), new Position(43.455412079597927, 4.861467735270022), new Position(43.326670147834825, 5.0545884574514082), new Position(43.359760733800755, 5.3160671845314269), new Position(43.214414007811236, 5.3405286722678431), new Position(43.179268827576763, 5.6718750056992775) }), new LineString(new List <Position> { new Position(43.555545986597537, 5.0144408111937375), new Position(43.453922302237586, 5.2267178460469337), new Position(43.404914999013144, 5.0599489280101588), new Position(43.555545986597537, 5.0144408111937375) }) }); polygonWithHoleReverseWinding = new Polygon(new List <LineString> { new LineString(polygonWithHole.Coordinates[0].Coordinates.Select(c => (Position)c).Reverse().ToList()), new LineString(polygonWithHole.Coordinates[1].Coordinates.Select(c => (Position)c).Reverse().ToList()) }); polygon = new Polygon(new List <LineString> { new LineString(new List <Position> { new Position(52.379790828551016, 5.3173828125), new Position(52.303440474272755, 5.386047363281249, 4.23), new Position(52.36721467920585, 5.456085205078125), new Position(52.379790828551016, 5.3173828125) }) }); multiPolygon = new MultiPolygon(new List <Polygon> { new Polygon(new List <LineString> { new LineString(new List <IPosition> { new Position(52.959676831105995, -2.6797102391514338), new Position(52.930592009390175, -2.6548779332193022), new Position(52.89564268523565, -2.6931334629377890), new Position(52.878791122091066, -2.6932445076063951), new Position(52.875255907042678, -2.6373482332006359), new Position(52.882954723868622, -2.6050779098387191), new Position(52.875476700983896, -2.5851645010668989), new Position(52.891287242948195, -2.5815104708998668), new Position(52.908449372833715, -2.6079763270327119), new Position(52.9608756693609, -2.6769029474483279), new Position(52.959676831105995, -2.6797102391514338), }) }), new Polygon(new List <LineString> { new LineString(new List <IPosition> { new Position(52.89610842810761, -2.69628632041613), new Position(52.926572918779222, -2.6996509024137052), new Position(52.920394929466184, -2.772273870352612), new Position(52.937353122653533, -2.7978187468478741), new Position(52.94013913205788, -2.838979264607087), new Position(52.929801009654575, -2.83848602260174), new Position(52.90253773227807, -2.804554822840895), new Position(52.89938894657412, -2.7663172788742449), new Position(52.8894641454077, -2.75901233808515), new Position(52.89610842810761, -2.69628632041613) }) }) }); geomCollection = new GeometryCollection(new List <IGeometryObject> { point, multiPoint, lineString, multiLineString, polygon, multiPolygon }); feature = new Feature.Feature(polygon, new Dictionary <string, object>() { { "Key", "Value" } }, "Id"); featureCollection = new FeatureCollection(new List <Feature.Feature> { feature, new Feature.Feature(multiPolygon, null) }); }
public void MultiPolygonSerialization() { var expectedJson = "{\"geometry\":{\"coordinates\":[[[[0.0,0.0],[1.0,0.0],[1.0,1.0],[0.0,1.0],[0.0,0.0]]],[[[100.0,100.0],[101.0,100.0],[101.0,101.0],[100.0,101.0],[100.0,100.0]],[[200.0,200.0],[201.0,200.0],[201.0,201.0],[200.0,201.0],[200.0,200.0]]]],\"type\":\"MultiPolygon\"},\"properties\":{},\"type\":\"Feature\"}"; var polygon1 = new Polygon(new List<LineString> { new LineString((new List<GeographicPosition> { new GeographicPosition(0, 0), new GeographicPosition(0, 1), new GeographicPosition(1, 1), new GeographicPosition(1, 0), new GeographicPosition(0, 0) }).ToList<IPosition>()) }); var polygon2 = new Polygon(new List<LineString> { new LineString((new List<GeographicPosition> { new GeographicPosition(100, 100), new GeographicPosition(100, 101), new GeographicPosition(101, 101), new GeographicPosition(101, 100), new GeographicPosition(100, 100) }).ToList<IPosition>()), new LineString((new List<GeographicPosition> { new GeographicPosition(200, 200), new GeographicPosition(200, 201), new GeographicPosition(201, 201), new GeographicPosition(201, 200), new GeographicPosition(200, 200) }).ToList<IPosition>()) }); var multipolygon = new MultiPolygon(new List<Polygon> { polygon1, polygon2 }); var newFeature = new Feature.Feature(multipolygon); var serializedData = JsonConvert.SerializeObject(newFeature, Formatting.Indented, DefaultJsonSerializerSettings); var serializedDataWithouWhiteSpace = Regex.Replace(serializedData, @"(\s|$)+", ""); Assert.IsTrue(serializedDataWithouWhiteSpace == expectedJson); }
public void FeatureCollectionSerialization() { var model = new FeatureCollection(null); for (var i = 10; i-- > 0;) { var geom = new LineString(new[] { new GeographicPosition(51.010, -1.034), new GeographicPosition(51.010, -0.034), }); var props = new Dictionary<string, object>(); props.Add("test1", "1"); props.Add("test2", 2); var feature = new Feature.Feature(geom, props); model.Features.Add(feature); } var serialized = JsonConvert.SerializeObject(model, Formatting.Indented, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() }); Assert.IsNotNull(serialized); Assert.IsFalse(string.IsNullOrEmpty(serialized)); }
public ToSqlGeometryTests() { point = new Point(new GeographicPosition(53.2455662, 90.65464646)); multiPoint = new MultiPoint(new List<Point> { new Point(new GeographicPosition(52.379790828551016, 5.3173828125)), new Point(new GeographicPosition(52.36721467920585, 5.456085205078125)), new Point(new GeographicPosition(52.303440474272755, 5.386047363281249, 4.23)) }); lineString = new LineString(new List<IPosition> { new GeographicPosition(52.379790828551016, 5.3173828125), new GeographicPosition(52.36721467920585, 5.456085205078125), new GeographicPosition(52.303440474272755, 5.386047363281249, 4.23) }); multiLineString = new MultiLineString(new List<LineString> { new LineString(new List<IPosition> { new GeographicPosition(52.379790828551016, 5.3173828125), new GeographicPosition(52.36721467920585, 5.456085205078125), new GeographicPosition(52.303440474272755, 5.386047363281249, 4.23) }), new LineString(new List<IPosition> { new GeographicPosition(52.379790828551016, 5.3273828125), new GeographicPosition(52.36721467920585, 5.486085205078125), new GeographicPosition(52.303440474272755, 5.426047363281249, 4.23) }) }); polygonWithHole = new Polygon(new List<LineString> { new LineString(new List<GeographicPosition> { new GeographicPosition(0.516357421875, 47.6415668949958), new GeographicPosition(0.516357421875, 47.34463879017405), new GeographicPosition(0.977783203125, 47.22539733216678), new GeographicPosition(1.175537109375, 47.463611506072866), new GeographicPosition(0.516357421875, 47.6415668949958) }), new LineString(new List<GeographicPosition> { new GeographicPosition(0.630340576171875, 47.54944962456812), new GeographicPosition(0.630340576171875, 47.49380564962583), new GeographicPosition(0.729217529296875, 47.482669772098674), new GeographicPosition(0.731964111328125, 47.53276262898896), new GeographicPosition(0.630340576171875, 47.54944962456812) }) }); polygon = new Polygon(new List<LineString> { new LineString(new List<GeographicPosition> { new GeographicPosition(52.379790828551016, 5.3173828125), new GeographicPosition(52.36721467920585, 5.456085205078125), new GeographicPosition(52.303440474272755, 5.386047363281249, 4.23), new GeographicPosition(52.379790828551016, 5.3173828125) }) }); multiPolygon = new MultiPolygon(new List<Polygon> { new Polygon(new List<LineString> { new LineString(new List<IPosition> { new GeographicPosition(52.959676831105995, -2.6797102391514338), new GeographicPosition(52.9608756693609, -2.6769029474483279), new GeographicPosition(52.908449372833715, -2.6079763270327119), new GeographicPosition(52.891287242948195, -2.5815104708998668), new GeographicPosition(52.875476700983896, -2.5851645010668989), new GeographicPosition(52.882954723868622, -2.6050779098387191), new GeographicPosition(52.875255907042678, -2.6373482332006359), new GeographicPosition(52.878791122091066, -2.6932445076063951), new GeographicPosition(52.89564268523565, -2.6931334629377890), new GeographicPosition(52.930592009390175, -2.6548779332193022), new GeographicPosition(52.959676831105995, -2.6797102391514338) }) }), new Polygon(new List<LineString> { new LineString(new List<IPosition> { new GeographicPosition(52.89610842810761, -2.69628632041613), new GeographicPosition(52.8894641454077, -2.75901233808515), new GeographicPosition(52.89938894657412, -2.7663172788742449), new GeographicPosition(52.90253773227807, -2.804554822840895), new GeographicPosition(52.929801009654575, -2.83848602260174), new GeographicPosition(52.94013913205788, -2.838979264607087), new GeographicPosition(52.937353122653533, -2.7978187468478741), new GeographicPosition(52.920394929466184, -2.772273870352612), new GeographicPosition(52.926572918779222, -2.6996509024137052), new GeographicPosition(52.89610842810761, -2.69628632041613) }) }) }); geomCollection = new GeometryCollection(new List<IGeometryObject> { point, multiPoint, lineString, multiLineString, polygon, multiPolygon }); feature = new Feature.Feature(polygon, new Dictionary<string, object>() { { "Key", "Value" } }, "Id"); featureCollection = new FeatureCollection(new List<Feature.Feature> { feature, new Feature.Feature(multiPolygon, null) }); }