[PROJ] Help understanding grid files and +towgs84

Kristian Evers kreve at sdfe.dk
Mon Jan 21 23:29:06 PST 2019


Hi Nathan,


1)      cs2cs, and the underlying pj_transform(), need this to know that it should do a datum-shift. You need either a +datum, +towgs84 or a +nadgrids parameter set on both source and target.

2)      Optimization – The alternative is to perform a 7-parameter shift for every possible coordinate transformation.

3)      Yes.

This all happen in parts of PROJ that can be considered legacy code. As you may know we are in the process of giving PROJ a big overhaul that, amongst other things, are meant to make things like this more transparent. From PROJ v. 6 and on your cs2cs call will internally be translated to something like

+proj=pipeline
+step +inv +proj=utm +zone=55 +south +ellps=GRS80
+step +proj=hgridshift +grids=C:\dev\proj-datumgrid\oceania\GDA94_GDA2020_conformal.gsb
+step +proj=utm +zone=55 +south +ellps=GRS80

which in my opinion is a lot simpler to understand.

/Kristian


Fra: PROJ <proj-bounces at lists.osgeo.org> På vegne af Nathan Woodrow
Sendt: 22. januar 2019 01:00
Til: proj at lists.osgeo.org
Emne: [PROJ] Help understanding grid files and +towgs84

Hi,

So I'm mainly just trying to understand how and why this works just for my own knowledge.

I'm currently working on a GDA94 > GDA2020 transform project and noticed that the proj4 string that ships with everything (GDAL, QGIS, PostGIS) only has +proj=utm +zone=55 +south +ellps=GRS80 +units=m +no_defs but in order to get the transform to work correctly I need to add the grid to the source and the +towgs84=0,0,0,0,0,0,0 to the target (GDA2020) proj4 sring.

ogr2ogr command was:

ogr2ogr -s_srs "+proj=utm +zone=55 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +wktext  +nadgrids=C:\temp\GDA94_GDA2020_conformal.gsb"
-t_srs "+proj=utm +zone=55 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +wktext" out.shp in.shp

Now I'm just trying to understand mainly:

1) Why is +towgs84=0,0,0,0,0,0,0 needed on the target? As if it's not there it will just return the same values as the input
2) Why is that not included as default?
3) Is my understanding of the following correct?  Proj is really doing: GDA94 -> WGS84 -> Shifted WGS84 via grid -> GDA2020?

Thanks,
Nathan


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20190122/785783d8/attachment.html>


More information about the PROJ mailing list