示例#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));
 }
示例#2
0
        /// <summary>
        /// Returns the extents of the datasource
        /// </summary>
        /// <returns></returns>
        public virtual IEnvelope GetExtents()
        {
            if (!IsOpen)
            {
                Open(path);
            }

            IEnvelope envelope = new GisSharpBlog.NetTopologySuite.Geometries.Envelope();

            foreach (FeatureDataRow feature in _FeatureTable)
            {
                envelope.ExpandToInclude(feature.Geometry.EnvelopeInternal);
            }

            return(envelope);
        }
示例#3
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);
 }