[Gdal-dev] Re: Nad Grid with ogr2ogr

Jeremy Palmer JPalmer at linz.govt.nz
Thu Apr 19 20:52:31 EDT 2007


Hi Brendan,
 
First make sure you have the NZGD49 <=> NZGD2000 datum distortion grid
installed into your proj4 lib directory. 
 
You can download the grid from the:
  LINZ website
http://www.linz.govt.nz/core/surveysystem/geodeticinfo/geodeticdatums/nzgd49tonzgd2000/index.html
or
  PROJ.4 ftp ftp://ftp.remotesensing.org/proj/proj-datumgrid-1.3.zip
 
The PROJ.4 lib directory is either ms4w\proj\nad for MS4W, proj_lib for
FWTools, or can be manually set using the PROJ_LIB environment
variable.
 
I would change your command a little so you don't need to specify the
NZTM proj def on the command line. Instead I would obtain it from the
'epsg' coordinate definition file in the proj lib directory :)
 
ogr2ogr -f "ESRI Shapefile" output.shp input.shp -s_srs "+proj=nzmg
+lat_0=-41 +lon_0=173 +x_0=2510000 +y_0=6023150 +ellps=intl
+datum=nzgd49 +units=m +nadgrids=nzgd2kgrid0005.1gsb +wktext" -t_srs
EPSG:2193
 
Note the use of the "+wktext" parameter for the NZMG proj text. You
need at least OGR 1.4.0 for this to work. See
http://lists.maptools.org/pipermail/gdal-dev/2007-April/012561.html for
more info.
 
Cheers
Jeremy

>>> <bcervin at gmail.com> 20/04/2007 11:49 >>>

Hello Jeremy,

I stumbled across your discussion about nad grid and ogr2ogr. I'm
trying to do the same reprojection as you.

As I noticed that this was very recent I'm hoping you might be able to
give me some help.

I'm having difficulty with ogr2ogr, NZMG->NZTM conversion for shape
files.

I've got what i think should work but it simply isn't. This is my
command:
ogr2ogr output.shp input.shp  -t_srs '+proj=tmerc +lat_0=0.0000000000
+lon_0=173.0000000000 +k_0=0.9996000000 +x_0=1600000.0000000000
+y_0=10000000.0000000000 +a=6378137 +rf=298.257222101 +no_defs
+towgs84=0.000,0.000,0.000' -s_srs '+proj=nzmg +lat_0=-41.0000000000
+lon_0=173.0000000000 +x_0=2510000.0000000000 +y_0=6023150.0000000000
+a=6378388 +rf=297 +no_defs +nadgrids=nzgd2kgrid0005.gsb'

I suspect that your command would work perfectly for me. I'm using a
MS4W version of ogr2ogr.

Thanks for your time.

Cheers, Brendan.


______________________________________________________________________________________________________

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.
______________________________________________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070420/5a8a2f12/attachment.html


More information about the Gdal-dev mailing list