<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Fix in <a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/pull/6945">https://github.com/OSGeo/gdal/pull/6945</a>. The error is
actually harmless as I suspected and was related to the polar
geometry splitting heuristics not properly shutting off
reprojection errors.</p>
<p>Even<br>
</p>
<div class="moz-cite-prefix">Le 19/12/2022 à 19:59, Peter Townsend a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAMQBGmV6WTBXnWvXjTE-yVDhGZiPZPgEKrftdB8+NG9KmzC=mQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">I figured out that the dataset is actually the
"trees" shapefile from the QGIS sample dataset. Throws the same
messaging out.
<div><a href="https://download.qgis.org/downloads/data/"
moz-do-not-send="true" class="moz-txt-link-freetext">https://download.qgis.org/downloads/data/</a><br>
</div>
<div><br>
</div>
<div>qgis_sample_data\shapefiles\trees.*<br>
</div>
<div><br>
</div>
<div>Good luck!</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Dec 19, 2022 at 12:46
PM Even Rouault <<a
href="mailto:even.rouault@spatialys.com"
moz-do-not-send="true" class="moz-txt-link-freetext">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">
<div>
<p>Peter,</p>
<p>I suspect the reprojection of your features went fine,
otherwise you would have got an error message like "Failed
to reproject feature XXXX (geometry probably out of source
or destination SRS)". This error message must come from
some code that tries heuristics related to polar or
anti-meridian geometry splitting, although normally there
are provisions to silent non-critical reprojection errors
related to those heuristics, but perhaps there's some
silencing missing somewhere.</p>
<p>I could have a look if you can pass on the dataset (you
can send it / a link for it privately if needed)</p>
<p>Even<br>
</p>
<div>Le 19/12/2022 à 19:16, Peter Townsend via gdal-dev a
écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr">I've got this test dataset of a bunch of
forest areas in Alaska. The shapefile is in Albers, and
we're converting it to EPSG:4326 lat longs.
<div><br>
</div>
<div>Layer name: trees<br>
Geometry: Polygon<br>
Feature Count: 444<br>
Extent: (-2175230.041280, 1899842.624457) -
(4895522.387686, 6909266.538422)<br>
Layer SRS WKT:<br>
PROJCRS["Albers",<br>
BASEGEOGCRS["NAD27",<br>
DATUM["North American Datum 1927",<br>
ELLIPSOID["Clarke
1866",6378206.4,294.978698213898,<br>
LENGTHUNIT["metre",1]],<br>
ID["EPSG",6267]],<br>
PRIMEM["Greenwich",0,<br>
ANGLEUNIT["Degree",0.0174532925199433]]],<br>
CONVERSION["unnamed",<br>
METHOD["Albers Equal Area",<br>
ID["EPSG",9822]],<br>
PARAMETER["Latitude of false origin",50,<br>
ANGLEUNIT["Degree",0.0174532925199433],<br>
ID["EPSG",8821]],<br>
PARAMETER["Longitude of false origin",-154,<br>
ANGLEUNIT["Degree",0.0174532925199433],<br>
ID["EPSG",8822]],<br>
PARAMETER["Latitude of 1st standard
parallel",55,<br>
ANGLEUNIT["Degree",0.0174532925199433],<br>
ID["EPSG",8823]],<br>
PARAMETER["Latitude of 2nd standard
parallel",65,<br>
ANGLEUNIT["Degree",0.0174532925199433],<br>
ID["EPSG",8824]],<br>
PARAMETER["Easting at false origin",0,<br>
LENGTHUNIT["US survey
foot",0.304800609601219],<br>
ID["EPSG",8826]],<br>
PARAMETER["Northing at false origin",0,<br>
LENGTHUNIT["US survey
foot",0.304800609601219],<br>
ID["EPSG",8827]]],<br>
CS[Cartesian,2],<br>
AXIS["(E)",east,<br>
ORDER[1],<br>
LENGTHUNIT["US survey
foot",0.304800609601219,<br>
ID["EPSG",9003]]],<br>
AXIS["(N)",north,<br>
ORDER[2],<br>
LENGTHUNIT["US survey
foot",0.304800609601219,<br>
ID["EPSG",9003]]]]<br clear="all">
<div><br>
</div>
<div>We're trying to upgrade our GDAL from 3.21 to
3.53, and our poor test is getting flagged now with
either "ERROR 1: Point outside of projection domain"
and/or "ERROR 1: tolerance condition error". </div>
<div><br>
</div>
<div>This is what I'm seeing:</div>
<div>ogr2ogr.exe -skipfailures -t_srs EPSG:4326
--debug on c:\path\output c:\path\trees.shp<br>
GDAL: GDALOpen(c:\path\trees.shp,
this=0000027A1189CBE0) succeeds as ESRI Shapefile.<br>
GDAL: Using ESRI Shapefile driver<br>
GDAL: GDALDriver::Create(ESRI
Shapefile,c:\path\output,0,0,0,Unknown,0000000000000000)<br>
Shape: DBF Codepage = LDID/87 for c:\path\trees.shp<br>
Shape: Treating as encoding 'ISO-8859-1'.<br>
ERROR 1: tolerance condition error<br>
ERROR 1: tolerance condition error<br>
GDALVectorTranslate: 444 features written in layer
'trees'<br>
Shape: 444 features read on layer 'trees'.<br>
GDAL: GDALClose(c:\path\trees.shp,
this=0000027A1189CBE0)<br>
GDAL: GDALClose(c:\path\output,
this=0000027A1189D4A0)<br>
GDAL: In GDALDestroy - unloading GDAL shared
library.<br>
</div>
<div><br>
</div>
<div>(Same thing happens without skipfailures.)</div>
<div><br>
</div>
<div>Now I'm 95% sure it's throwing this error because
there's some vertex somewhere in here that's in that
special "dead zone" for Alaska Albers that can't
convert to 4326 (seen this before on other datasets
trying to project individual points).</div>
<div><br>
</div>
<div>What I'm wondering is this:</div>
<div>1) Is there any way to get GDAL to tell me what
feature/coordinate threw the error?</div>
<div>2) What is it doing as a fallback behavior?
Skipping the point and moving on? I still come out
with the same number of features in the end.</div>
<div><br>
</div>
<div>Thanks!</div>
-- <br>
<div dir="ltr">
<div dir="ltr">
<div>Peter Townsend<br>
</div>
Senior Software Developer<br>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
gdal-dev mailing list
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre cols="72">--
<a href="http://www.spatialys.com" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>Peter Townsend<br>
</div>
Senior Software Developer<br>
</div>
</div>
</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>