[Gdal-dev] Re: Decoding headers in a MIF file
Frank Warmerdam
warmerdam at pobox.com
Tue May 25 16:09:59 EDT 2004
Jacob Bensabat wrote:
> Hi
> Then the question is where this information is stored ? Or if it is stored
> at all ?
> This information is crucial for rendering as various maps can be in various
> coordinates systems
> and we want to know prior to loading the map how to adapt it.
> Actually shp files also have this kind of header.
> thanks
Jacob,
The OGRLayer::GetExtent() method can be used to fetch the extent of an
individual layer. For some formats (such as Shapefiles which you mention)
OGR is able to answer this request cheaply by reading bounds from the header.
For MIF format the entire file has to be scanned to get the extents.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list