[gdal-dev] "tolerance condition error" on reprojecting natural earth data to webmercator (3857)

Even Rouault even.rouault at spatialys.com
Tue Feb 22 03:46:57 PST 2022


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

Le 21/02/2022 à 10:14, Adam Akhtar via gdal-dev a écrit :
> Hi,
>
> I'm getting a "tolerance condition error" when trying to reproject 
> Natural Earth data into webmercator 3857 using ogr2ogr.
>
> These are the commands I am running
>
> ```
> wget https://naturalearth.s3.amazonaws.com/10m_physical/ne_10m_ocean.zip
> unzip ne_10m_ocean.zip
>
> // reproject the unzipped shape file
> 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
> ```
>
> This results in the following output
>
> ```
> ERROR 1: tolerance condition error
> ERROR 1: tolerance condition error
> ERROR 1: tolerance condition error
> ERROR 1: tolerance condition error
> ERROR 1: tolerance condition error
> ERROR 1: tolerance condition error
> ERROR 1: tolerance condition error
> ERROR 1: tolerance condition error
> ERROR 1: tolerance condition error
> ERROR 1: tolerance condition error
> ERROR 1: tolerance condition error
> ERROR 1: tolerance condition error
> ERROR 1: tolerance condition error
> ERROR 1: tolerance condition error
> ERROR 1: tolerance condition error
> ERROR 1: tolerance condition error
> ERROR 1: tolerance condition error
> ERROR 1: tolerance condition error
> ERROR 1: tolerance condition error
> ERROR 1: Reprojection failed, err = -20, further errors will be 
> suppressed on the transform object.
> ```
>
> I'm sure this used to run fine a few months ago so I'm not sure why it 
> is suddenly breaking.
>
> This happens on both my arm Mac and my Intel server instance.
>
> Server instance:
> EC2 M5 Intel with Ubuntu 20.04.3 LTS
> GDAL 3.3.2, released 2021/09/01
>
> Mac
> M1 Arm Mac Big Sur 11.6
> GDAL 3.3.3, released 2021/10/25
>
> Is this or a bug or am I incorrectly using the command? Any help will 
> be greatly appreciated.
>
> Adam
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220222/3258db40/attachment.html>


More information about the gdal-dev mailing list