<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">2013/12/10 stevejking <span dir="ltr"><<a href="mailto:stevejking@talktalk.net" target="_blank">stevejking@talktalk.net</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Andre Joost wrote<br>
<div><div class="h5">> Am 29.11.2013 09:59, schrieb Jeremy Palmer:<br>
>> Hi gdal-devs,<br>
>><br>
>> I'm trying to shift shapefile data using a custom NTv2 grid file. The<br>
>> logical source and destination coordinate systems are the same<br>
>> (geographic coordinates EPSG:4167), I only want to shift the data.<br>
>><br>
>> The type of command I'm trying to run is:<br>
>><br>
>> ogr2ogr -f "Esri Shapefile" -a_srs "+proj=longlat +ellps=GRS80"<br>
>> -t_srs "+proj=longlat +ellps=GRS80 +nadgrids=custom_grid.gsb +wktext"<br>
>> dst_datasource_name src_datasource_name<br>
>><br>
>> but the output shapefile does not get transformed...<br>
>><br>
>> Is this because there is a short circuit in proj4 if the ellipsoids<br>
>> are the same?<br>
>><br>
><br>
> No, you have to explicitely specify +towgs84=0,0,0,0,0,0,0 for the first<br>
> srs. Otherwise it is assumed that both share the same datum.<br>
><br>
> HTH,<br>
> André Joost<br>
><br>
> _______________________________________________<br>
> gdal-dev mailing list<br>
<br>
</div></div>> gdal-dev@.osgeo<br>
<br>
> <a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
<br>
Andre is on the right track.<br>
<br>
But, I believe you need to specify the +nadgrids=c:\custom_grid.gsb in your<br>
source projection, then use the +towgs84=0,0,0,0,0,0,0 in your target.<br>
<br>
You may get away without specifying any path to your gsb, not sure.<br>
<br>
<br>
HTH<br>
Regards,<br>
Steve<br>
<br></blockquote></div><br></div><div class="gmail_extra">Hi,<br><br></div><div class="gmail_extra">Just as a side note, I like to turn on the debugging mode by setting the environment variable PROJ_DEBUG to any number.<br>
</div><div class="gmail_extra">It gives useful info on how your ntv2 grid is used and might help you identify other issues if any.<br><br></div><div class="gmail_extra">Regards<br><br>Thomas<br></div><div class="gmail_extra">
<br clear="all"></div><div class="gmail_extra"><br>-- <br><div dir="ltr">Thomas Campagne<br>Vancouver, BC<br>Canada<br></div>
</div></div>