コード例 #1
0
        /// <summary>
        /// Boundingbox of the dataset
        /// </summary>
        /// <returns>boundingbox</returns>
        public SharpMap.Geometries.BoundingBox GetExtents()
        {
            if (this._bbox == null)
            {
                OGR.Envelope _OgrEnvelope = new Envelope();
                int          i            = _OgrLayer.GetExtent(_OgrEnvelope, 1);

                this._bbox = new SharpMap.Geometries.BoundingBox(_OgrEnvelope.MinX,
                                                                 _OgrEnvelope.MinY,
                                                                 _OgrEnvelope.MaxX,
                                                                 _OgrEnvelope.MaxY);
            }

            return(_bbox);
        }