Michael,
You're not the only one to have reported such issue. Before
https://github.com/OSGeo/PROJ/pull/3834 which will be in PROJ 9.3, this
exception is expected. But even with current released versions, the
exception is caught inside PROJ itself, before it reaches the caller of
proj_create_crs_to_crs(), and thus it should not be noticed, unless you
run PROJ under a debugger that catches C++ exceptions. If you receive it
in a non-debugger environment, then there's something wrong somewhere in
the building of PROJ (like if C++ exception handling would have been
disabled?), or mixing it with other software (incompatible runtimes?). I
haven't encountered such situation myself, and our CI either.
Even
Le 19/08/2023 à 13:16, Michael Katz via gdal-dev a écrit :
When I call
PJ *p = proj_create_crs_to_crs(
PJ_DEFAULT_CTX,
"+proj=longlat +ellps=GRS80 +no_defs",
"+proj=longlat +datum=WGS84",
NULL );
It returns a valid projections with the srs "+proj=noop". However, I
see that it throws four exceptions in the process, all like
Exception thrown at 0x752D8712 in MARPLOT Server.exe: Microsoft C++
exception: std::invalid_argument at memory location 0x0682C4B0.
Unfortunately I don't have symbols tied to the built GDAL library I'm
using.
Can you tell me if those exceptions are expected, if they indicate
something wrong, and if so how I should fix? (Obviously in this case I
could note that both srs have "+proj=longlat" in the string and not
create the projection at all, but I'd like to leave the code general
and let it handle this case with the noop.)
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev
--
http://www.spatialys.com
My software is free, but my time generally not.
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev