<div dir="ltr">OK, thanks.<div><br></div><div>Unfortunately, in our case, an error from <b>OSRValidate()</b> aborts the import completely. At the GDAL API level, there is no way to tell if it could be ignored or not, as it all gets collapsed into a single error code.<div><br></div><div>Presumably if the CRS was truly bad, the subsequent <b>OGRCreateCoordinateTransformation(bad_sr_from_file, desired_good_sr)</b> would fail, which we would obviously also abort on.</div><div><br></div><div>Sounds like we should just remove the <b>OSRValidate()</b> test, which would allow this file to import, but ones that were "more bad" would still be rejected later.</div><div><br></div><div>Simon<br><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 28, 2024 at 10:51 AM Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Le 28/03/2024 à 17:47, Simon Eves a écrit :<br>
> Seems like whether a PROJ warning is reported as an error or warning <br>
> depends on whether it has "Default it to" in the text. This one does <br>
> not, and is returned as an error. The logic here is unclear to me.<br>
<br>
yes, there was indeed a discrepancy between the documented behavior of <br>
the PROJ C API and what the PROJ C++ API offered to fulfill it. That <br>
should be solved by <a href="https://github.com/OSGeo/PROJ/pull/4108" rel="noreferrer" target="_blank">https://github.com/OSGeo/PROJ/pull/4108</a><br>
<br>
However as noted in the updated documentation, the distinction between <br>
warnings and errors is probably not that much relevant, and the mapping <br>
to the OSRValidate() API that dates backs to well before the complete <br>
revanp done in PROJ 6+GDAL 3 is even more arbitrary. The bottom line is <br>
that if OSRValidate() returns a non-OGRERR_NONE code, there's something <br>
that is non nominal, and human expertise is required to assess if it can <br>
be ignored or not.<br>
<br>
<br>
-- <br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
My software is free, but my time generally not.<br>
<br>
</blockquote></div>