[Gdal-dev] Ogr Mapinfo driver bug for NZ projections based on
datum NZGD2000
Frank Warmerdam
warmerdam at pobox.com
Thu Apr 12 02:13:27 EDT 2007
Jeremy Palmer wrote:
> Hi,
>
> I've been having trouble creating Mapinfo files with correct coordinate
> system header information for NZ projections based on NZGD2000.
> Currently the trunk version of ogr2ogr is creating Mapinfo files with a
> WGS84 datum (the default) within the coordsys definition when it should
> not be. I think the reason for this is the OGRSpatialReference datum
> name does exactly not match any entries in the asDatumInfoList within
> mitab_spatialref.cpp.
>
> I have attached a patch that adds the NZGD2000 datum name as currently
> loaded into the OGRSpatialReference from WKT. This is not a clean
> solution as it adds a new entry for a datum definition that already
> exists. But I see this sort of hack has been done in the past so at
> least it is consistent!
Jeremy,
You should file a ticket on this if you don't want it getting lost, likely
upstream in the MITAB bugzilla.
I've recently introduced an OGRSpatialReference::GetEPSGGeogCS() method
which attempts to do lots of guessing based on names and stuff to relate
a geogcs/datum with a well known epsg geogcs. I think the best approach
might be to improve logic in this method for NZGD2000, and modify the MITAB
code to make use of this.
Datum recognition is quite a nightmare currently for many gdal and ogr drivers.
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 | President OSGeo, http://osgeo.org
More information about the Gdal-dev
mailing list