/// <summary> /// Converts a lineairring into osm objects. /// </summary> /// <param name="linearRing"></param> /// <returns></returns> private static Feature ConvertLinearRing(OsmSharp.IO.Xml.Kml.v2_1.LinearRingType linearRing) { // convert the coordinates. var coordinates = KmlFeatureStreamSource.ConvertCoordinates(linearRing.coordinates); // create the ring. var feature = new Feature(new LineairRing(coordinates)); feature.Attributes.Add("id", linearRing.id); return(feature); }
/// <summary> /// Converts a lineairring into osm objects. /// </summary> /// <param name="linearRing"></param> /// <returns></returns> private static LineairRing ConvertLinearRing(OsmSharp.IO.Xml.Kml.v2_1.LinearRingType linearRing) { // convert the coordinates. IList <GeoCoordinate> coordinates = KmlGeoStreamSource.ConvertCoordinates(linearRing.coordinates); // create the ring. LineairRing ring = new LineairRing(coordinates); ring.Attributes = new SimpleGeometryAttributeCollection(); ring.Attributes.Add("id", linearRing.id); return(ring); }