While I don't have a direct answer to your question I might ask, why use
20 lines of python code when 1 line of ogr2ogr gives the correct result?
On 3/14/23 11:15, Dion-Degodez,Nicolas (ECCC) wrote:
_Context_
We are trying to reproject a GeoJSON polygon to EPSG:4326.
In some cases, depending
Nicolas,
ogr2ogr uses the OGRGeometryFactory::transformWithOptions() method that
has logic to deal with poles, antimerdian, etc. whereas
OGRGeometry::transform() does basic point-to-point reprojection
You can achieve what you want by using the ogr.GeomTransformer(ct)
method that returns a og
Context
We are trying to reproject a GeoJSON polygon to EPSG:4326.
In some cases, depending on whether we use the ogr2ogr command line or the
equivalent in python, the resulting polygon is different.
In those situations, the command line gives us the appropriate polygon, whereas
the python code g