Sorry for the slow reply Even, I just tried this now and it seems to have worked. Thank you very much for you help on this matter.
For posterity and other's benefit I modified my original command to include -clipsrc -180.1 -85.0511 180.1 85.0511 i.e. OGR_ENABLE_PARTIAL_REPROJECTION=true ogr2ogr -unsetFieldWidth -t_srs EPSG:3857 -clipsrc -180.1 -85.0511 180.1 85.0511 -nlt PROMOTE_TO_MULTI -f PostgreSQL PG:"dbname='ogr' host='localhost' port='5432' user='myusername password='redacted'" ne_10m_ocean.shp Thanks again Adam On Tue, 22 Feb 2022 at 20:47, Even Rouault <even.roua...@spatialys.com> wrote: > 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 > listgdal-dev@lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/gdal-dev > > -- http://www.spatialys.com > My software is free, but my time generally not. > >
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev