コード例 #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
ファイル: DxfFile.cs プロジェクト: Sony-NS/SharpMap
        /// <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
ファイル: NtsProvider.cs プロジェクト: lishxi/_SharpMap
 /// <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);
 }