Beispiel #1
0
        /// <summary>
        /// Converts a polygon.
        /// </summary>
        /// <param name="polygon"></param>
        /// <returns></returns>
        private static Polygon ConvertPolygon(OsmSharp.IO.Xml.Kml.v2_0_response.Polygon polygon)
        {
            LineairRing inner = KmlGeoStreamSource.ConvertLinearRing(polygon.innerBoundaryIs.LinearRing);
            LineairRing outer = KmlGeoStreamSource.ConvertLinearRing(polygon.outerBoundaryIs.LinearRing);

            return(new Polygon(outer, new LineairRing[] { inner }));
        }
        /// <summary>
        /// Converts a polygon.
        /// </summary>
        /// <param name="polygon"></param>
        /// <returns></returns>
        private static Feature ConvertPolygon(OsmSharp.IO.Xml.Kml.v2_0_response.Polygon polygon)
        {
            var inner = KmlFeatureStreamSource.ConvertLinearRing(polygon.innerBoundaryIs.LinearRing);
            var outer = KmlFeatureStreamSource.ConvertLinearRing(polygon.outerBoundaryIs.LinearRing);

            return(new Feature(new Polygon(outer.Geometry as LineairRing, new LineairRing[] { inner.Geometry as LineairRing })));
        }