[PROJ] Strange behaviour using PROJ from conda

Even Rouault even.rouault at spatialys.com
Wed Sep 4 12:00:58 PDT 2024


Javier,

The Conda vs your build difference can be easily explained because Conda 
sets PROJ_NETWORK=ON in the conda environment.

When PROJ_NETWORK=ON, you can also get the expected result by adding 
--bbox as well to cs2cs.

Now, the real issue is why PROJ_NETWORK=ON without --box does 
(negatively) affect results .. ? The reason is that in that situation 
the heuristics first finds the NKG related operations, and does not 
think it needs to do extra efforts to consider intermediate CRSs to get 
other solutions. Unfortunately the NKG solutions only cover a small 
proportion of the area of use of the source/target CRS, so they are not 
good general purpose solutions.

I've tuned this in https://github.com/OSGeo/PROJ/pull/4244

Now:

$ echo 46 6 0 2024.6 |  PROJ_NETWORK=OFF bin/cs2cs EPSG:9989 EPSG:4937 -d 9
45.999994986    5.999991132 -0.001870790 2024.6
$ echo 46 6 0 2024.6 |  PROJ_NETWORK=ON bin/cs2cs EPSG:9989 EPSG:4937 -d 9
45.999994986    5.999991132 -0.001870790 2024.6
$ echo 46 6 0 2024.6 |  PROJ_NETWORK=OFF bin/cs2cs EPSG:9989 EPSG:4937 
-d 9 --bbox 5.5,45.5,6.5,46.5
45.999994986    5.999991132 -0.001870790 2024.6
$ echo 46 6 0 2024.6 |  PROJ_NETWORK=ON bin/cs2cs EPSG:9989 EPSG:4937 -d 
9 --bbox 5.5,45.5,6.5,46.5
45.999994986    5.999991132 -0.001870790 2024.6

(Anybody wanting to do a "Fast, reliable and geodetic-grade qualiy 
coordinate operation inference from a geodetic database" master or PhD 
thesis ... ? I may consider mentoring them, unless they decide to put 
some AI in the equation ;-) ;-). Or perhaps that's actually the way to 
do it. Spy all conversations occurring in offices of geodetic 
institutions and coordinate transformation software editors, 
speech-to-text them, ingest that into a LLM, and add some sanity filter 
on the garbage it spits out)

Even

-- 
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20240904/6b8cd472/attachment.htm>


More information about the PROJ mailing list