[Gdal-dev] Decoding headers in a MIF file
Frank Warmerdam
warmerdam at pobox.com
Fri May 21 09:09:41 EDT 2004
Jacob Bensabat wrote:
> Hello to all
> I am using OGR to read a Mapinfo MIF file. I can read all the data but I
> have problems
> decoding the header. I am interested in getting the extent of the map.
> Here is the relevant part of the header
>
> Version 300
> charset "Windows"
> Delimiter ","
> Index 5,6
> CoordSys NonEarth Units "km" Bounds (-999, -999) (999, 999)
> ....
>
> Using OGRSpatialReference, I am unable to get the map extent - I am getting
> huge number that have nothing
> to do with the ones in the MIF file.
Jacob,
I don't believe that the OGRSpatialReference includes map extents of any
kind. Are you reading the extents from the OGRLayer for the MIF file?
I don't think it gets it's bounds from the Bounds value in the CoordSys
line. It gets the extents by reading all the features and building an MBR.
I believe the Bounds value is supposed to indicate the bounds of validity of
the coordinate system, not necessarily the bounds of the dataset.
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