[PROJ] Change in behaviour (ONLY_BEST option)

Javier Jimenez Shaw j1 at jimenezshaw.com
Wed Apr 12 07:46:22 PDT 2023


Hi

I am trying to migrate an application from PROJ 9.1.0 to PROJ 9.2.0, and I
found a change in behaviour, that I was not expecting in this release:
Transform a coordinate not having the proper geoid file (the Spanish one in
this test). I was expecting that the z component is not changed. But I am
getting an error instead, and "* * inf" value.
I know that ONLY_BEST is there, but I understood that the default was to
keep the same behaviour as before, and show a warning asking for a
"definition".
But that is not what I experience. See this command lines:

echo 39 -3 0 | PROJ_DEBUG=2 PROJ_NETWORK=OFF cs2cs EPSG:4326+5773
EPSG:4326+5782
pj_open_lib(proj.ini): call
fopen(/home/jshaw/work/PROJ/install-sh/share/proj/proj.ini) - succeeded
pj_open_lib(proj.db): call
fopen(/home/jshaw/work/PROJ/install-sh/share/proj/proj.db) - succeeded
pj_open_lib(us_nga_egm96_15.tif): call fopen(us_nga_egm96_15.tif) - failed
pj_open_lib(egm96_15.gtx): call fopen(egm96_15.gtx) - failed
pj_open_lib(es_ign_egm08-rednap.tif): call fopen(es_ign_egm08-rednap.tif) -
failed
pj_open_lib(es_2019m.asc): call fopen(es_2019m.asc) - failed
pj_open_lib(es_2019z.asc): call fopen(es_2019z.asc) - failed
pj_open_lib(us_nga_egm96_15.tif): call fopen(us_nga_egm96_15.tif) - failed
pj_open_lib(egm96_15.gtx): call fopen(egm96_15.gtx) - failed
pj_open_lib(es_ign_egm08-rednap.tif): call fopen(es_ign_egm08-rednap.tif) -
failed
Attempt to use coordinate operation Inverse of WGS 84 to EGM96 height (1) +
ETRS89 to Alicante height (1) using ETRS89 to WGS 84 (1) failed. Grid
es_ign_egm08-rednap.tif is not available. Consult
https://proj.org/resource_files.html for guidance. Grid us_nga_egm96_15.tif
is not available. Consult https://proj.org/resource_files.html for
guidance. This might become an error in a future PROJ major release. Set
the ONLY_BEST option to YES or NO. This warning will no longer be emitted
(for the current transformation instance).
* * inf


echo 39 -3 0 | PROJ_DEBUG=2 PROJ_ONLY_BEST_DEFAULT=NO PROJ_NETWORK=OFF
cs2cs EPSG:4326+5773 EPSG:4326+5782
pj_open_lib(proj.ini): call
fopen(/home/jshaw/work/PROJ/install-sh/share/proj/proj.ini) - succeeded
pj_open_lib(proj.db): call
fopen(/home/jshaw/work/PROJ/install-sh/share/proj/proj.db) - succeeded
pj_open_lib(us_nga_egm96_15.tif): call fopen(us_nga_egm96_15.tif) - failed
pj_open_lib(egm96_15.gtx): call fopen(egm96_15.gtx) - failed
pj_open_lib(es_ign_egm08-rednap.tif): call fopen(es_ign_egm08-rednap.tif) -
failed
pj_open_lib(es_2019m.asc): call fopen(es_2019m.asc) - failed
pj_open_lib(es_2019z.asc): call fopen(es_2019z.asc) - failed
39.00 -3.00 0.00


echo 39 -3 0 | PROJ_DEBUG=2 PROJ_NETWORK=ON cs2cs EPSG:4326+5773
EPSG:4326+5782
pj_open_lib(proj.ini): call
fopen(/home/jshaw/work/PROJ/install-sh/share/proj/proj.ini) - succeeded
pj_open_lib(proj.db): call
fopen(/home/jshaw/work/PROJ/install-sh/share/proj/proj.db) - succeeded
pj_open_lib(us_nga_egm96_15.tif): call fopen(us_nga_egm96_15.tif) - failed
pj_open_lib(egm96_15.gtx): call fopen(egm96_15.gtx) - failed
pj_open_lib(us_nga_egm96_15.tif): call fopen(us_nga_egm96_15.tif) - failed
pj_open_lib(egm96_15.gtx): call fopen(egm96_15.gtx) - failed
Using https://cdn.proj.org/us_nga_egm96_15.tif
pj_open_lib(es_ign_egm08-rednap.tif): call fopen(es_ign_egm08-rednap.tif) -
failed
pj_open_lib(es_2019m.asc): call fopen(es_2019m.asc) - failed
pj_open_lib(es_2019z.asc): call fopen(es_2019z.asc) - failed
pj_open_lib(es_ign_egm08-rednap.tif): call fopen(es_ign_egm08-rednap.tif) -
failed
Using https://cdn.proj.org/es_ign_egm08-rednap.tif
pj_open_lib(us_nga_egm96_15.tif): call fopen(us_nga_egm96_15.tif) - failed
pj_open_lib(egm96_15.gtx): call fopen(egm96_15.gtx) - failed
Using https://cdn.proj.org/us_nga_egm96_15.tif
pj_open_lib(es_ign_egm08-rednap.tif): call fopen(es_ign_egm08-rednap.tif) -
failed
Using https://cdn.proj.org/es_ign_egm08-rednap.tif
39.00 -3.00 0.30


The behaviour in 9.1.0 was the same as with "PROJ_ONLY_BEST_DEFAULT=NO",
that is what I was expecting now (plus warning message).

Am I missing something? Is this a bug?

Thanks.

.___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20230412/b012db84/attachment.htm>


More information about the PROJ mailing list