<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.5730.11" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>Hi Brendan,</DIV>
<DIV>&nbsp;</DIV>
<DIV>First make sure you have the NZGD49 &lt;=&gt; NZGD2000 datum distortion grid installed into your proj4&nbsp;lib directory. </DIV>
<DIV>&nbsp;</DIV>
<DIV>You can download the grid from the:</DIV>
<DIV>&nbsp; LINZ website <A href="http://www.linz.govt.nz/core/surveysystem/geodeticinfo/geodeticdatums/nzgd49tonzgd2000/index.html">http://www.linz.govt.nz/core/surveysystem/geodeticinfo/geodeticdatums/nzgd49tonzgd2000/index.html</A>&nbsp;or</DIV>
<DIV>&nbsp; PROJ.4 ftp <A href="ftp://ftp.remotesensing.org/proj/proj-datumgrid-1.3.zip">ftp://ftp.remotesensing.org/proj/proj-datumgrid-1.3.zip</A></DIV>
<DIV>&nbsp;</DIV>
<DIV>The PROJ.4&nbsp;lib directory is either ms4w\proj\nad for MS4W, proj_lib for FWTools,&nbsp;or can be manually set using the PROJ_LIB environment variable.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I would change your command a little so you don't need to specify the NZTM proj def on the command line. Instead&nbsp;I would obtain it&nbsp;from the 'epsg' coordinate definition file in the proj lib directory :)</DIV>
<DIV>&nbsp;</DIV>
<DIV>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</DIV>
<DIV>&nbsp;</DIV>
<DIV>Note the use of the "+wktext" parameter for the NZMG proj text.&nbsp;You need at least OGR 1.4.0 for this to work.&nbsp;See <A href="http://lists.maptools.org/pipermail/gdal-dev/2007-April/012561.html">http://lists.maptools.org/pipermail/gdal-dev/2007-April/012561.html</A>&nbsp;for more info.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Cheers</DIV>
<DIV>Jeremy<BR><BR>&gt;&gt;&gt; &lt;bcervin@gmail.com&gt; 20/04/2007 11:49 &gt;&gt;&gt;<BR></DIV>
<DIV style="COLOR: #000000">Hello Jeremy,<BR><BR>I stumbled across your discussion about nad grid and ogr2ogr. I'm trying to do the same reprojection as you.<BR><BR>As I noticed that this was very recent I'm hoping you might be able to give me some help.<BR><BR>I'm having difficulty with ogr2ogr, NZMG-&gt;NZTM conversion for shape files.<BR><BR>I've got what i think should work but it simply isn't. This is my command:<BR>ogr2ogr output.shp input.shp&nbsp; -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'<BR><BR>I suspect that your command would work perfectly for me. I'm using a MS4W version of ogr2ogr.<BR><BR>Thanks for your time.<BR><BR>Cheers, Brendan.<BR></DIV>
<DIV>
<HR>

<DIV>This message contains information, which is confidential and may be subject 
to legal privilege. <BR>If you are not the intended recipient, you must not 
peruse, use, disseminate, distribute or copy this message.<BR>If you have 
received this message in error, please notify us immediately (Phone 0800 665 463 
or <A href="mailto:sinfo@linz.govt.nz">info@linz.govt.nz</A> ) and destroy the 
original message.</DIV>
<DIV>LINZ accepts no responsibility for changes to this email, or for any 
attachments, after its transmission from LINZ.</DIV>
<DIV>&nbsp;</DIV>
<DIV><STRONG>Thank you.</STRONG> <BR></DIV>
<HR>
</DIV>
</BODY></HTML>