Thank you, Even.
I think that I found an issue with re-projection.
4 polygons in EPSG:3996 as test_polys-2_3996.csv:
WKT,ID
"POLYGON ((-1000000 0,-1000000 1000000,0 1000000,0 0,-1000000 0))",1
"POLYGON ((0 0,0 1000000,1000000 1000000,1000000 0,0 0))",2
"POLYGON ((-1000000 -1000000,-1000000 0,0 0,0 -1000000,-1000000 -1000000))",3
"POLYGON ((0 -1000000,0 0,1000000 0,1000000 -1000000,0 -1000000))",4
gdal vector pipeline read test_polys-2_3996.csv --oo KEEP_GEOM_COLUMNS=NO !
reproject -s EPSG:3996 -d EPSG:4326 ! write -f CSV --lco GEOMETRY=AS_WKT
test_polys-2_3996-4326.csv
Resulting test_polys-2_3996-4326.csv :
WKT,ID
"POLYGON ((-90 80.910166664287,-135 77.1707983667985,180.0 80.910166664287,180
90,-90 90,-90 80.910166664287))","1"
"POLYGON ((135.0 77.1707983667985,90.0 80.910166664287,180 90,180.0
80.910166664287,135.0 77.1707983667985))","2"
"POLYGON ((-45 77.1707983667985,-90 80.910166664287,-90 90,0 90,0.0
80.910166664287,-45 77.1707983667985))","3"
"POLYGON ((0.0 80.910166664287,0 90,90 90,90.0 80.910166664287,45.0
77.1707983667985,0.0 80.910166664287))","4"
It looks like polygons with IDs 1 and 2 were reprojected incorrectly.
Polygon ID 1 should be
POLYGON ((-90 80.91016666428700432, -135 77.17079836679849336, -180
80.91016666428700432, -180 90, -90 90, -90 80.91016666428700432))
Polygon ID 2 should be
POLYGON ((135 77.17079836679849336, 90 80.91016666428700432, 90 90 , 180 90,
180 80.91016666428700432, 135 77.17079836679849336))
>Thursday, October 23, 2025 1:39 PM +03:00 from Even Rouault <
>[email protected] >:
>
>Andrey,
>
>| With ogr2ogr re-projection now works as expected, but when using gdal
>vector pipeline (reproject -d EPSG:4326) it works without any changes.
>Is this correct?
>
>Actually an extra fix for vector reproject was needed:
>https://github.com/OSGeo/gdal/pull/13275
>
>Even
>
>
>--
>http://www.spatialys.com
>My software is free, but my time generally not.
--
Andrey
WKT,ID
"POLYGON ((-1000000 0,-1000000 1000000,0 1000000,0 0,-1000000 0))",1
"POLYGON ((0 0,0 1000000,1000000 1000000,1000000 0,0 0))",2
"POLYGON ((-1000000 -1000000,-1000000 0,0 0,0 -1000000,-1000000 -1000000))",3
"POLYGON ((0 -1000000,0 0,1000000 0,1000000 -1000000,0 -1000000))",4
WKT,ID
"POLYGON ((-90 80.910166664287,-135 77.1707983667985,180.0 80.910166664287,180 90,-90 90,-90 80.910166664287))","1"
"POLYGON ((135.0 77.1707983667985,90.0 80.910166664287,180 90,180.0 80.910166664287,135.0 77.1707983667985))","2"
"POLYGON ((-45 77.1707983667985,-90 80.910166664287,-90 90,0 90,0.0 80.910166664287,-45 77.1707983667985))","3"
"POLYGON ((0.0 80.910166664287,0 90,90 90,90.0 80.910166664287,45.0 77.1707983667985,0.0 80.910166664287))","4"
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev