[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 
respectively.

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.

Regards,
Mike

=============================

srs wkt from a prj file:

PROJCS["GD_1949_New_Zealand_Map_Grid",GEOGCS["GCS_New_Zealand_1949",DATUM["D_New_Zealand_1949",SPHEROID["International_1924",6378388.0,297.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["New_Zealand_Map_Grid"],PARAMETER["False_Easting",2510000.0],PARAMETER["False_Northing",6023150.0],PARAMETER["Longitude_Of_Origin",173.0],PARAMETER["Latitude_Of_Origin",-41.0],UNIT["Meter",1.0]]

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

PROJCS["GD_1949_New_Zealand_Map_Grid",GEOGCS["GCS_New_Zealand_1949",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International_1924",6378388.0,297.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["New_Zealand_Map_Grid"],PARAMETER["False_Easting",2510000.0],PARAMETER["False_Northing",6023150.0],PARAMETER["Longitude_Of_Origin",173.0],PARAMETER["Latitude_Of_Origin",-41.0],UNIT["Meter",1.0]]


srs wkt for srid=27200 in PostGIS:

PROJCS["NZGD49 / New Zealand Map 
Grid",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 
1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],PROJECTION["New_Zealand_Map_Grid"],PARAMETER["latitude_of_origin",-41],PARAMETER["central_meridian",173],PARAMETER["false_easting",2510000],PARAMETER["false_northing",6023150],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","27200"]]


More information about the gdal-dev mailing list