[PROJ] computing proj_factors with the C API

Nicolas Bellaiche Nicolas.Bellaiche at ign.fr
Wed Feb 3 15:51:57 PST 2021


Hi,

Two major problems I'm struggling with:

1) computing the proj_factors with the C API.

My code seems very simple:


my_proj = proj_create(nullptr, "IGNF:LAMB93");

auto geodetic_crs = proj_crs_get_geodetic_crs(nullptr, my_proj);

PJ_FACTORS facs = proj_factors(geodetic_crs, coord);


the error message sent by proj_factors is "latitude or longitude exceeded limits" but when I look into the code, it seems the geodetic_crs->fwd is not initialized.


The problem disappears if I call proj_init_plus but then I can't use the useful proj_crs_get_horizontal_datum, proj_create_ellipsoidal_2D_cs with the PJ object created.


Anybody understanding what's wrong with my code?



2) if I initialize my PJ object with proj.db, it seems the geoid grid of IGNF:LAMB93 is not loaded, so I can't compute the ellipsoidal height from the altitude and vice versa. I can do it with the old format of proj4 (by copying the file IGNF of PROJ4 in the PROJ_LIB directory and using "+init=IGNF:LAMB93") but then the object is not recognized as an iso object and once again I can't use proj_crs_get_horizontal_datum, proj_create_ellipsoidal_2D_cs etc...


Is there anything I did wrong or is it an issue with PROJ7?


I hope I've been clear enough, any help would be really appreciated,


Thanks a lot for your answers,


Nicolas Bellaiche
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20210203/e01af577/attachment.html>


More information about the PROJ mailing list