[PROJ] Using +nadgrids with cs2cs (version 4.9.3)
Even Rouault
even.rouault at spatialys.com
Mon Dec 2 01:19:13 PST 2019
Chris,
ah, the good old times... Actually not so good, as it shows how hard it could
be to manage to do things correctly.
So you want to do this:
# PROJ < 6
echo '173 -41 0' | cs2cs -v -f %.10f \
+proj=latlong +ellps=intl +nadgrids=nzgd2kgrid0005.gsb \
+to \
+proj=latlong +ellps=GRS80 +towgs84=0,0,0
173.0001712855 -40.9982540723 0.0000450267
The left part is the "definition" of NZGD49: based on Intl 1924 and it
transforms to WGS84 with nzgd2kgrid0005.gsb (there was a typo in the extension
you used). You could also have used +datum=nzgd49 instead of +ellps=intl.
Alone +datum=nzgd49 expands to "+ellps=intl
+towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993", and the +nadgrids will
override the +towgs84, but that's a confusing.
The right part is the "definition" of NZGD2000: equivalent to WGS84 for our
purpose. You *need* the +towgs84=0,0,0 argument so that both left and right
side have a transformation term to WGS84
Cross-checking with modern times:
$ echo "-41 173 0" | src/cs2cs -f "%.10f" NZGD49 NZGD2000
-40.9982540714 173.0001712855 0.0000000000
The results are slightly different as in PROJ 6 there's no conversion in the
geocentric domain. The grid is applied directly in the geographic 2D domain.
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the PROJ
mailing list