[PROJ] Using +nadgrids with cs2cs (version 4.9.3)

Chris Crook ccrook at linz.govt.nz
Mon Dec 2 11:28:07 PST 2019


Thanks Even

Glad to provide some nostalgia.

Cheers
Chris


> -----Original Message-----
> From: Even Rouault [mailto:even.rouault at spatialys.com]
> Sent: Monday, 2 December 2019 10:19 p.m.
> To: proj at lists.osgeo.org
> Cc: Chris Crook
> Subject: Re: [PROJ] Using +nadgrids with cs2cs (version 4.9.3)
>
> 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

________________________________

This message contains information, which may be in confidence 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 PROJ mailing list