[Gdal-dev] RE: Newbie (ogr2ogr reprojecting NZMG to NZTM)

Jeremy Palmer JPalmer at linz.govt.nz
Mon May 28 22:56:41 EDT 2007


Hi Andrew,
 
Looks like ogr2ogr and ogrinfo is building the wrong datum WKT string.
I've even tried transforming a test shape file and the .prj file
produced had an incorrect WKT projection definition:

i.e
ogr2ogr -f "ESRI Shapefile" crs_node_nztm.shp crs_node.shp -a_srs
"+proj=nzmg +lat_0=-41 +lon_0=173 +x_0=2510000 +y_0=6023150 +ellps=intl
+datum=nzgd49 +units=m +no_defs <> +nadgrids=nzgd2kgrid0005.gsb +wktext"
-t_srs EPSG:2193

crs_node_nztm.prj =

PROJCS["NZGD2000 / New Zealand Transverse Mercator",
   GEOGCS["NZGD2000",
        DATUM["D_",
           SPHEROID["GRS_1980",6378137,298.257222101]],
           PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",173],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",1600000],
    PARAMETER["false_northing",10000000],
    UNIT["Meter",1]]

This is the WKT information from postgis which looks like it has the
correct definition (don't worry about the AUTHORITY references).

"PROJCS["NZGD2000 / New Zealand Transverse Mercator",
   GEOGCS["NZGD2000",
       DATUM["New_Zealand_Geodetic_Datum_2000",
          SPHEROID["GRS
1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],
      TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],
      PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],
      UNIT["degree",0.01745329251994328, AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4167"]],
   PROJECTION["Transverse_Mercator"],
  
PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",173],
  
PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1600000],
   PARAMETER["false_northing",10000000],
   UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","2193"]]"

The actual transformation of the shapefiles seems good, as I've
compared some test against a couple of datasets which were transformed
using our own tools.

Cheers
Jeremy


______________________________________________________________________________________________________

This message contains information, which is confidential and may be subject to legal privilege. 
If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message.
If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info at linz.govt.nz) and destroy the original message.
LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ.

Thank you.
______________________________________________________________________________________________________



More information about the Gdal-dev mailing list