[gdal-dev] MapInfo Datum lookup bug, CSV data for drivers
Frank Warmerdam
warmerdam at pobox.com
Mon Mar 16 13:26:40 EDT 2009
Qi-Shan Lim wrote:
> Hi all,
>
> I'm new to GDAL/OGR development and have run up against an existing
> bug with the MapInfo driver, which I'm willing to help fix. Details
> are at http://trac.osgeo.org/gdal/ticket/481#comment:8 with a comment
> which I'll reproduce here for convenience:
>
> I'm hitting this problem as well and really need to get it resolved.
> Only just started working with gdal/ogr so comments would be
> appreciated on this proposal:
>
> ---
> 1. Change asDatumInfoList to include the EPSG code for the datum. I
> imagine this could be accomplished with a mixture of pattern-matching
> the names and some manual intervention.
Qi-Shan,
I agree that this would be a good idea. The MITAB code predates some
of the EPSG support in OGR (particularly the use of authority[] nodes,
and so it was not included originally. Populating the column may not
always be practical though.
> 2. Change SetSpatialRef? to look up the data based on the datum's EPSG
> code instead of name i.e. use poSpatialRef->GetAuthorityCode?("DATUM")
> instead of poSpatialRef->GetAttrValue?("DATUM")
Seems reasonable where available.
> 3. (Optional) Move asDatumInfoList (and the other hard-coded data, I
> guess) into a csv file.
I'm not too keen on moving it into a CSV file as currently MITAB
in standalone mode has no dependency on external files which keeps it's
use quite a bit simplier than would otherwise be the case.
> Is this going to work or am I talking rubbish? If it sounds reasonable
> I'll go ahead and do up a patch.
Thanks.
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