/// <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)); }
/// <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); }
/// <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); }