<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Michael,</p>
<p>You're not the only one to have reported such issue. Before
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/PROJ/pull/3834">https://github.com/OSGeo/PROJ/pull/3834</a> 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.</p>
<p>Even<br>
</p>
<div class="moz-cite-prefix">Le 19/08/2023 à 13:16, Michael Katz via
gdal-dev a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:564355260.1860619.1692443792267@mail.yahoo.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div class="yahoo-style-wrap" style="font-family:Helvetica Neue,
Helvetica, Arial, sans-serif;font-size:13px;">
<div dir="ltr" data-setdir="false">
<div>
<div dir="ltr" data-setdir="false">When I call</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div>PJ *p = proj_create_crs_to_crs(</div>
<div><span><span></span> PJ_DEFAULT_CTX,</span></div>
<div><span><span></span> "</span>+proj=longlat
+ellps=GRS80 +no_defs",</div>
<div dir="ltr" data-setdir="false"><span><span></span>
"+proj=<span><span style="color: rgb(0, 0, 0);
font-family: "Helvetica Neue", Helvetica,
Arial, sans-serif;">long</span></span>lat
+datum=WGS84",</span></div>
<div><span><span></span> NULL );</span></div>
</div>
<br>
</div>
<div dir="ltr" data-setdir="false">It returns a valid
projections with the srs "<span>+proj=noop". However, I see
that it throws four exceptions in the process, all like</span></div>
<div dir="ltr" data-setdir="false"><span><br>
</span></div>
<div dir="ltr" data-setdir="false">
<div>
<div>Exception thrown at 0x752D8712 in MARPLOT Server.exe:
Microsoft C++ exception: std::invalid_argument at memory
location 0x0682C4B0.</div>
<div><br>
</div>
</div>
<div dir="ltr" data-setdir="false">Unfortunately I don't have
symbols tied to the built GDAL library I'm using.</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false">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 "<span><span style="color: rgb(0, 0,
0); font-family: "Helvetica Neue", Helvetica,
Arial, sans-serif;">+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.)</span></span></div>
<div dir="ltr" data-setdir="false"><br>
</div>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>