[gdal-dev] Projecting nzmg/nzgd49 to nzgd2000

Mike Leahy mgleahy at alumni.uwaterloo.ca
Wed Sep 24 01:13:21 EDT 2008

Hello list,

I'm trying to figure out some issues I'm having with re-projecting some 
data located on Stewart Island at the south end of New Zealand.  The 
source data are using UTM coordinates projected in New Zealand Map Grid, 
based on the New Zealand Geodedic Datum 1949, and I'm reprojecting them 
to UTM coordinates using New Zealand Geodedic Datum 2000 (which I guess 
is basically WGS84).  The corresponding epsg numbers are 27200 and 2193 

The problem I've encountered is that if I let gdalwarp or ogr2ogr 
automatically detect the NZGD49 projection from the dataset, and specify 
the output projection using -t_srs epsg:2193, the output is off by about 
165 metres or so.  If I add the parameter -s_srs epsg:27200 to the 
gdalwarp/ogr2ogr commands, the output seems to be correct (i.e., it 
lines up with coordinates that are similarly reprojected using ESRI's 
ArcGIS).  I have posted a sample image of the output here: 
http://img210.imageshack.us/my.php?image=projectionsmux9.jpg.  In that 
image, the background raster and the red dots were incorrectly projected 
(without specifying -s_srs), while the green dots shows how far off 
these from their correct locations.

I have included below the SRS WKT definitions based on what I get from 
the actual prj file, from ogrinfo, and from what is listed in the 
spatial_ref_sys table in PostGIS.

Now that I know this is happening, it's not a major problem...but what 
could be the cause?  I don't see anything missing in the WKT vs the 
corresponding proj4 text in my epsg file.

I'm using GDAL/OGR 1.5.2 and Proj 4.6.0.



srs wkt from a prj file:


srs wkt from ogrinfo (for same dataset as above):


srs wkt for srid=27200 in PostGIS:

PROJCS["NZGD49 / New Zealand Map 

More information about the gdal-dev mailing list