<HTML><BODY><div class="cl-16t7tke51h"><div>Actually</div><div>> Polygon ID 2 should be</div><div>> POLYGON ((135 77.17079836679849336, 90 80.91016666428700432, <strong>90 90</strong>, 180 90, 180 80.91016666428700432, 135 77.17079836679849336))</div><div>is <span lang="en"><span><span>incorrect because the first point of this polygon should be </span></span></span><strong>0 90</strong><span lang="en"><span><span>. So I think that reprojected geometries should be as in </span></span></span>test_polys-2_3996-4326-proper.csv (attached)<span lang="en"><span><span>:</span></span></span></div><div><div><div>WKT,ID</div><div>"POLYGON ((-90 80.910166664287,-135 77.1707983667985,-180 80.910166664287,-180 90,0 90,-90 80.910166664287))","1"</div><div>"POLYGON ((0 90,180 90,180 80.910166664287,135 77.1707983667985,90 80.910166664287,0 90))","2"</div><div>"POLYGON ((-45 77.1707983667985,-90 80.910166664287,0 90,0 80.910166664287,-45 77.1707983667985))","3"</div><div>"POLYGON ((0 80.910166664287,0 90,90 80.910166664287,45 77.1707983667985,0 80.910166664287))","4"</div></div></div><div class="mail-quote-collapse"><blockquote style="border-left:1px solid #0857A6;margin:10px;padding:0 0 0 10px"><span>Friday, October 24, 2025 7:32 PM +03:00 from Andrey VI via gdal-dev <<a href="https://e.mail.ru/compose/?mailto=mailto%3Agdal-dev%40lists.osgeo.org">gdal-dev@lists.osgeo.org</a>>:</span><br> <div><div id=""><div class="cl-e3dfmlkkwd"><div class="js-helper_mr_css_attr js-readmsg-msg_mr_css_attr"><div id="style_17613235461223195051_mr_css_attr"><div id="style_17613235461223195051_BODY_mr_css_attr"><div class="cl-f8jebby3nd_mr_css_attr"><div>Thank you, Even.<br> </div><div>I think that I found an issue with re-projection.</div><div><div>4 polygons in EPSG:3996 as test_polys-2_3996.csv:</div><div><div><div><div><div>WKT,ID</div><div>"POLYGON ((-1000000 0,-1000000 1000000,0 1000000,0 0,-1000000 0))",1</div><div>"POLYGON ((0 0,0 1000000,1000000 1000000,1000000 0,0 0))",2</div><div>"POLYGON ((-1000000 -1000000,-1000000 0,0 0,0 -1000000,-1000000 -1000000))",3</div><div>"POLYGON ((0 -1000000,0 0,1000000 0,1000000 -1000000,0 -1000000))",4</div></div></div><div> </div></div></div><div>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</div><div> </div><div><span lang="en"><span><span>Resulting </span></span></span>test_polys-2_3996-4326.csv<span lang="en"><span><span>:</span></span></span></div><div><div><div><div><div>WKT,ID</div><div>"POLYGON ((-90 80.910166664287,-135 77.1707983667985,180.0 80.910166664287,180 90,-90 90,-90 80.910166664287))","1"</div><div>"POLYGON ((135.0 77.1707983667985,90.0 80.910166664287,180 90,180.0 80.910166664287,135.0 77.1707983667985))","2"</div><div>"POLYGON ((-45 77.1707983667985,-90 80.910166664287,-90 90,0 90,0.0 80.910166664287,-45 77.1707983667985))","3"</div><div>"POLYGON ((0.0 80.910166664287,0 90,90 90,90.0 80.910166664287,45.0 77.1707983667985,0.0 80.910166664287))","4"</div></div></div><div> </div><div><span lang="en"><span><span>It looks like polygons with IDs 1 and 2 were reprojected incorrectly.</span></span></span></div><div><div>Polygon ID 1 should be</div><div>POLYGON ((-90 80.91016666428700432, -135 77.17079836679849336, <strong>-180</strong> 80.91016666428700432, <strong>-180</strong> 90, -90 90, -90 80.91016666428700432))</div><div>Polygon ID 2 should be</div><div>POLYGON ((135 77.17079836679849336, 90 80.91016666428700432, <strong>90 90</strong>, 180 90, 180 80.91016666428700432, 135 77.17079836679849336))</div></div><div> </div></div></div></div><div> </div><div class="mail-quote-collapse_mr_css_attr"><div class="mail-quote-collapse"><blockquote style="border-left:1px solid #0857A6;margin:10px;padding:0 0 0 10px"><span><span>Thursday, October 23, 2025 1:39 PM +03:00 from Even Rouault <<a href="https://e.mail.ru/compose/?mailto=mailto%3Aeven.rouault%40spatialys.com">even.rouault@spatialys.com</a>>:</span></span><br> <div><div><div id=""><div class="cl-2rq88b3ivs_mr_css_attr"><div class="js-helper_mr_css_attr js-readmsg-msg_mr_css_attr"><div id="style_17612159500155575403_mr_css_attr"><div id="style_17612159500155575403_BODY_mr_css_attr">Andrey,<br><br>| With ogr2ogr re-projection now works as expected, but when using gdal<br>vector pipeline (reproject -d EPSG:4326) it works without any changes.<br>Is this correct?<br><br>Actually an extra fix for vector reproject was needed:<br><a href="https://github.com/OSGeo/gdal/pull/13275">https://github.com/OSGeo/gdal/pull/13275</a><br><br>Even<br><br><br>--<br><a href="http://www.spatialys.com">http://www.spatialys.com</a><br>My software is free, but my time generally not.</div></div></div></div></div></div></div></blockquote></div></div> <div>--<br>Andrey</div></div></div><div> </div><div>_______________________________________________<br>gdal-dev mailing list<br><a href="https://e.mail.ru/compose/?mailto=mailto%3Agdal-dev%40lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br><a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a></div></div></div></div></div></div></blockquote></div><br><div>--<br>Andrey</div></div></BODY></HTML>