Ah, and you should avoid using the "+init=" prefix. This is a deprecated legacy syntax that doesn't enforce axis order of the CRS definition (without practical consequence for IGNF: CRS since they use "GIS friendly" axis order)

To help debugging this, please provide the output of:

PROJ_DEBUG=3 projinfo -s IGNF:LAMB93 -t IGNF:RGF93 -o PROJ

On my system I get:

pj_open_lib(proj.ini): call fopen(/home/even/proj/install-proj-master/share/proj/proj.ini) - succeeded pj_open_lib(proj.db): call fopen(/home/even/proj/install-proj-master/share/proj/proj.db) - succeeded
Candidate operations found: 1
-------------------------------------
Operation No. 1:

unknown id, Inverse of LAMBERT-93 + Conversion from RGF93 geographiques (dms) to RGF93 cartesiennes geocentriques, 0 m, World

PROJ string:
+proj=pipeline
  +step +inv +proj=lcc +lat_0=46.5 +lon_0=3 +lat_1=44 +lat_2=49 +x_0=700000
        +y_0=6600000 +ellps=GRS80
  +step +proj=cart +ellps=GRS80

Le 26/05/2023 à 21:46, Even Rouault a écrit :

Hi,

I get the expected 4070327.25 166078.93 4891298.61 result with proj 6.0.0, 7.2.1, 9.2.0 and master

There's no grid involved in this operation, just inverse LCC projection on the RGF93 datum

I also tried to reproduce your issue if the PROJ < 6 IGNF file is found in the PROJ resource path(s) (non nominal situation - this file is not needed any more, and will generally lead to suboptimal results. Its content is included in the proj.db file), but even with that I get the expected result. So no idea why you get wrong results

Even


Le 26/05/2023 à 20:54, Nicolas Bellaiche a écrit :
Hi all,

I'm migrating my C++ code from PROJ4 to PROJ9 and I meet a worrying issue with the computation. Some of my regress tests don't pass so I've tested with cs2cs and gets the same difference:

PROJ4

echo652760.73700000 <callto:652760.73700000>7033791.24300000 43 <callto:7033791.24300000 43>.64200000 | cs2cs +init=IGNF:LAMB93 +to +init=IGNF:RGF93:

4070327.25166078.93 4891298.61 <callto:166078.93 4891298.61>


PROJ7 or PROJ9

echo652760.73700000 <callto:652760.73700000>7033791.24300000 43 <callto:7033791.24300000 43>.64200000 | cs2cs +init=IGNF:LAMB93 +to +init=IGNF:RGF93:

4070355.05166080.07 4891332.24 <callto:166080.07 4891332.24>




I suspect that PROJ7 and PROJ9 don't read properly the geoid file but I'm not sure. Someone can help me tracking and fixing this problem?

Thanks,

Nicolas Bellaiche
Institut Géographique National France

_______________________________________________
PROJ mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/proj
--
http://www.spatialys.com
My software is free, but my time generally not.

_______________________________________________
PROJ mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/proj

--
http://www.spatialys.com
My software is free, but my time generally not.
_______________________________________________
PROJ mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/proj

Reply via email to