[PROJ] Geoidmodel in WKT without grid file

Javier Jimenez Shaw j1 at jimenezshaw.com
Tue Nov 24 03:47:19 PST 2020


Hi

I have found a behaviour with the geoidmodel in WKT2 that I do not know if
it is the expected one.

My understanding is:

- if there is a geoidmodel and it matches one defined in proj.db then it
uses it, (regardless the vertical CRS)
  - if the proper grid file for that geoidmodel is NOT found then "* * inf"
is returned.
- if there is a geoidmodel tag, but not found in proj.db then it is ignored
  - if the grid file for the vertical CRS is found then it is used
  - if the grid file for the vertical CRS is NOT found then the
transformation is done, but not the vertical part.

Notice the difference between the 2nd and 5th statements (when grid file is
NOT found)

Is that correct?

How did I get here? I wanted to get (in C++) the lat-long in WGS84
transformation from a CRS defined by the WKT2. I was not interested in the
vertical part, but didn't remove it from the WKT2, just go ahead. It
worked... until a WKT2 included a "valid" geoidmodel tag (for some reasons
I have another WKTs with geoidmodel not present yet in proj.db). Then the
(horizontal) transformation failed miserably. No, I am not using PROJ-data
locally or remotely.

Here are some commands to test that (done in PROJ 7.0.1) I use NAVD88 in
the first ones, and EGM96 in the second. Both cases on NAD83(2011) (to
simplify)

echo 40 -75 0 | cs2cs EPSG:6319 "$(projinfo EPSG:6318+5703 -o WKT2:2019 -q
| sed  '25iGEOIDMODEL["GEOID18"],')"
* * inf
echo 40 -75 0 | cs2cs EPSG:6319 "$(projinfo EPSG:6318+5703 -o WKT2:2019 -q
| sed  '25iGEOIDMODEL["GEOID18_"],')"
40.00 -75.00 0.00
echo 40 -75 0 | cs2cs EPSG:6319 "$(projinfo EPSG:6318+5703 -o WKT2:2019 -q
| sed  '25iGEOIDMODEL["GEOID18"],')"
* * inf
echo 40 -75 0 | PROJ_NETWORK=ON cs2cs EPSG:6319 "$(projinfo EPSG:6318+5703
-o WKT2:2019 -q | sed  '25iGEOIDMODEL["GEOID18"],')"
40.00 -75.00 32.87
echo 40 -75 0 | PROJ_NETWORK=ON cs2cs EPSG:6319 "$(projinfo EPSG:6318+5703
-o WKT2:2019 -q | sed  '25iGEOIDMODEL["GEOID12B"],')"
40.00 -75.00 32.85
echo 40 -75 0 | PROJ_NETWORK=ON cs2cs EPSG:6319 "$(projinfo EPSG:6318+5703
-o WKT2:2019 -q )"
40.00 -75.00 32.87

echo 40 -75 0 | PROJ_NETWORK=ON cs2cs EPSG:6319 "$(projinfo EPSG:6318+5773
-o WKT2:2019 -q )"
40.00 -75.00 34.04
echo 40 -75 0 | PROJ_NETWORK=ON cs2cs EPSG:6319 "$(projinfo EPSG:6318+5773
-o WKT2:2019 -q | sed  '25iGEOIDMODEL["GEOID12B"],')"
40.00 -75.00 32.85
echo 40 -75 0 | PROJ_NETWORK=ON cs2cs EPSG:6319 "$(projinfo EPSG:6318+5773
-o WKT2:2019 -q | sed  '25iGEOIDMODEL["GEOID12B_"],')"
40.00 -75.00 34.04
echo 40 -75 0 | PROJ_NETWORK=ON cs2cs EPSG:6319 "$(projinfo EPSG:6318+5773
-o WKT2:2019 -q | sed  '25iGEOIDMODEL["EGM96"],')"
40.00 -75.00 34.04
echo 40 -75 0 | cs2cs EPSG:6319 "$(projinfo EPSG:6318+5773 -o WKT2:2019 -q
| sed  '25iGEOIDMODEL["GEOID12B"],')"
* * inf
echo 40 -75 0 | cs2cs EPSG:6319 "$(projinfo EPSG:6318+5773 -o WKT2:2019 -q
| sed  '25iGEOIDMODEL["EGM96"],')"
40.00 -75.00 0.00

Thanks
.___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__
Entre dos pensamientos racionales
hay infinitos pensamientos irracionales.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20201124/987096c9/attachment.html>


More information about the PROJ mailing list