[gdal-dev] exceptions when calling proj_create_crs_to_crs() with noop

Michael Katz michaeladamkatz at yahoo.com
Sat Aug 19 04:16:32 PDT 2023


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.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230819/c7efa42b/attachment.htm>


More information about the gdal-dev mailing list