<div dir="ltr"><div>Sorry for the slow reply Even, <br></div><div><br></div><div>I just tried this now and it seems to have worked. Thank you very much for you help on this matter. <br></div><div><br></div><div>For posterity and other's benefit I modified my original command to include <br></div><div><br></div><div><code>-clipsrc -180.1 -85.0511 180.1 85.0511<br></code></div><div><code><br></code></div><div><code>i.e. <br></code></div><div><code><br></code></div><div><code>OGR_ENABLE_PARTIAL_REPROJECTION=true
ogr2ogr -unsetFieldWidth -t_srs EPSG:3857 <code>-clipsrc -180.1 -85.0511 180.1 85.0511 </code>-nlt PROMOTE_TO_MULTI -f
PostgreSQL PG:"dbname='ogr' host='localhost' port='5432'
user='myusername password='redacted'" ne_10m_ocean.shp</code></div><div><code><br></code></div><div><code>Thanks again</code></div><div><code><br></code></div><div><code>Adam</code></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 22 Feb 2022 at 20:47, 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">
<div>
<p>This dataset includes latitude up to 90 degree north, which
projects to infinity in EPSG:3857. You should use the -clipsrc
option of ogr2ogr to for example cut at 85 degree<br>
</p>
<div>Le 21/02/2022 à 10:14, Adam Akhtar via
gdal-dev a écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hi,</div>
<div><br>
</div>
<div>I'm getting a "tolerance condition error" when trying to
reproject Natural Earth data into webmercator 3857 using
ogr2ogr. <br>
</div>
<div><br>
</div>
<div>These are the commands I am running</div>
<div><br>
</div>
<div>```</div>
<div>wget <a href="https://naturalearth.s3.amazonaws.com/10m_physical/ne_10m_ocean.zip" target="_blank">https://naturalearth.s3.amazonaws.com/10m_physical/ne_10m_ocean.zip</a></div>
<div>unzip ne_10m_ocean.zip</div>
<div><br>
</div>
<div>// reproject the unzipped shape file<br>
</div>
<div>OGR_ENABLE_PARTIAL_REPROJECTION=true ogr2ogr
-unsetFieldWidth -t_srs EPSG:3857 -nlt PROMOTE_TO_MULTI -f
PostgreSQL PG:"dbname='ogr' host='localhost' port='5432'
user='myusername password='redacted'" ne_10m_ocean.shp</div>
<div>```</div>
<div><br>
</div>
<div>This results in the following output <br>
</div>
<div><br>
</div>
<div>```</div>
<div>ERROR 1: tolerance condition error<br>
ERROR 1: tolerance condition error<br>
ERROR 1: tolerance condition error<br>
ERROR 1: tolerance condition error<br>
ERROR 1: tolerance condition error<br>
ERROR 1: tolerance condition error<br>
ERROR 1: tolerance condition error<br>
ERROR 1: tolerance condition error<br>
ERROR 1: tolerance condition error<br>
ERROR 1: tolerance condition error<br>
ERROR 1: tolerance condition error<br>
ERROR 1: tolerance condition error<br>
ERROR 1: tolerance condition error<br>
ERROR 1: tolerance condition error<br>
ERROR 1: tolerance condition error<br>
ERROR 1: tolerance condition error<br>
ERROR 1: tolerance condition error<br>
ERROR 1: tolerance condition error<br>
ERROR 1: tolerance condition error<br>
ERROR 1: Reprojection failed, err = -20, further errors will
be suppressed on the transform object.</div>
<div>```</div>
<div><br>
</div>
<div>I'm sure this used to run fine a few months ago so I'm not
sure why it is suddenly breaking. <br>
</div>
<div><br>
</div>
<div>This happens on both my arm Mac and my Intel server
instance.</div>
<div><br>
</div>
<div>Server instance:</div>
<div>EC2 M5 Intel with Ubuntu 20.04.3 LTS</div>
<div>GDAL 3.3.2, released 2021/09/01</div>
<div><br>
</div>
<div>Mac <br>
</div>
<div>M1 Arm Mac Big Sur 11.6 <br>
</div>
<div>GDAL 3.3.3, released 2021/10/25</div>
<div><br>
</div>
<div>Is this or a bug or am I incorrectly using the command? Any
help will be greatly appreciated. <br>
</div>
<font color="#888888">
<div><br>
</div>
<div>Adam</div>
</font></div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
gdal-dev mailing list
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre cols="72">--
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</div>
</blockquote></div>