/// <summary>
        /// Converts a lineairring into an osm object.
        /// </summary>
        /// <param name="linearRing"></param>
        /// <returns></returns>
        private static Feature ConvertLinearRing(OsmSharp.IO.Xml.Kml.v2_0_response.LinearRing 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);
        }
Exemple #2
0
        /// <summary>
        /// Converts a lineairring into an osm object.
        /// </summary>
        /// <param name="linearRing"></param>
        /// <returns></returns>
        private static LineairRing ConvertLinearRing(OsmSharp.IO.Xml.Kml.v2_0_response.LinearRing 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);
        }