[gdal-dev] [ogr2ogr] Anti-meridian issue when reprojecting from a Polar Stereographic projection to a geographic CRS

Vedran Stojnović phidrho at gmail.com
Wed Oct 15 00:45:33 PDT 2025


Hi Andrey,

I am aware that this is not ogr2ogr solution, but you can watch my lecture
on this kind of problem and procedure to avoid this problem in QGIS - and
then maybe you can apply the same procedure/logic using only ogr2ogr.

See this video, you can skip to around 45 minutes.
https://www.youtube.com/watch?v=5M-Q0AinuiY&t=2702s


uto, 14. lis 2025. u 22:02 Andrey VI via gdal-dev <gdal-dev at lists.osgeo.org>
napisao je:

> Unfortunately, the result is still incorrect.
> The empty areas are still here around 88-89°N and some polygons are still
> broken (for example at -67°W, 76°N):
> Example <https://i.ibb.co/CpQGWdpk/Example.png>.
> These polygons turned out to be hidden under others, although in the
> original data all polygons are adjacent but not overlapping. Not sure if
> this is a result of reported errors or a separate issue.
>
>
> Tuesday, October 14, 2025 4:48 PM +03:00 from Rahkonen Jukka <
> jukka.rahkonen at maanmittauslaitos.fi
> <https://e.mail.ru/compose/?mailto=mailto%3Ajukka.rahkonen%40maanmittauslaitos.fi>
> >:
>
> Hi,
>
> This command prints also 6 error lines, but at least the result does not
> have empty areas:
>
> ogr2ogr -t_srs epsg:4626 -wrapdateline -datelineoffset 180 foo3.shp
> polys.shp
>
> I do not know if the result is correct or not, just that it is different.
>
> -Jukka Rahkonen-
>
>
> ________________________________________
> Lähettäjä: gdal-dev <gdal-dev-bounces at lists.osgeo.org
> <http:///compose?To=gdal%2ddev%2dbounces@lists.osgeo.org>> käyttäjän
> Andrey VI via gdal-dev <gdal-dev at lists.osgeo.org
> <http:///compose?To=gdal%2ddev@lists.osgeo.org>> puolesta
> Lähetetty: Tiistai 14. lokakuuta 2025 15.50
> Vastaanottaja: gdal-dev at lists.osgeo.org
> <http:///compose?To=gdal%2ddev@lists.osgeo.org> <gdal-dev at lists.osgeo.org
> <http:///compose?To=gdal%2ddev@lists.osgeo.org>>
> Aihe: [gdal-dev] [ogr2ogr] Anti-meridian issue when reprojecting from a
> Polar Stereographic projection to a geographic CRS
>
> Hello. I can't reproject data from a Polar Stereographic projection
> (EPSG:3996) to a geographic projection (EPSG:4326) correctly using ogr2ogr.
> Command:ogr2ogr -t_srs EPSG:4326 -wrapdateline
> polys_4326.shp polys.shpERROR 1: IllegalArgumentException: Points of
> LinearRing do not form a closed linestring
> ERROR 1: IllegalArgumentException: Points of LinearRing do not form a
> closed linestring
> ERROR 1: IllegalArgumentException: Points of LinearRing do not form a
> closed linestring
> ERROR 1: IllegalArgumentException: Points of LinearRing do not form a
> closed linestring
> ERROR 1: IllegalArgumentException: Points of LinearRing do not form a
> closed linestring
> ERROR 1: IllegalArgumentException: Points of LinearRing do not form a
> closed linestring As a result some polygons are broken and also some
> polygons appears with artifacts.[X]The data used and the result (58 MB):
> https://drive.google.com/file/d/176jtROjjeTlAQTITAJ75tBT1GwiUzSUm/view?usp=sharing. How
> to reproject from a projection naturally crossing the anti-meridian to a
> geographic CRS without any errors using ogr2ogr?--Andrey
>
>
> --
> Andrey VI
> Sent from Mail <https://trk.mail.ru/c/zzm979>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>


-- 
Srdačan pozdrav / Kind regards,
Vedran Stojnović.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20251015/f62c9c6b/attachment.htm>


More information about the gdal-dev mailing list