Esempio n. 1
0
 /// <summary>
 /// Returns the BoundingBox of the dataset.
 /// </summary>
 /// <returns>BoundingBox</returns>
 public SharpMap.Geometries.BoundingBox GetExtents()
 {
     GisSharpBlog.NetTopologySuite.Geometries.Envelope envelope = new GisSharpBlog.NetTopologySuite.Geometries.Envelope();
     foreach (GisSharpBlog.NetTopologySuite.Features.Feature feature in features)
     {
         envelope.ExpandToInclude(feature.Geometry.EnvelopeInternal);
     }
     return(GeometryConverter.ToSharpMapBoundingBox(envelope));
 }
Esempio n. 2
0
        /// <summary>
        /// Returns the BoundingBox of the dataset.
        /// </summary>
        /// <returns>BoundingBox</returns>
        public BoundingBox GetExtents()
        {
            Envelope envelope = new Envelope();

            foreach (Feature feature in _features)
            {
                envelope.ExpandToInclude(feature.Geometry.EnvelopeInternal);
            }
            return(GeometryConverter.ToSharpMapBoundingBox(envelope));
        }