[gdal-dev] Using a custom operation with osr.CoordinateTransformation

Stefano Iacovella stefano.iacovella at gmail.com
Mon Apr 18 23:55:35 PDT 2022


Dear all,

I am wondering which is the best approach to use a custom operation to
transform coordinates from a datum to another.
I have managed to use a custom operation by creating a specific pipeline
and set it as:

options = osr.CoordinateTransformationOptions()

options.SetOperation('''+proj=pipeline
                        +step +proj=axisswap +order=2,1
                        +step +proj=unitconvert +xy_in=deg +xy_out=rad
+step +proj=push +v_3
                        +step +proj=cart +ellps=intl
                        +step +proj=helmert +x=-104.1 +y=-49.1 +z=-9.9
+rx=0.971 +ry=-2.917 +rz=0.714 +s=-11.68  +convention=position_vector
                        +step +inv +proj=cart +ellps=WGS84
                        +step +proj=pop +v_3
                        +step +proj=unitconvert
                        +xy_in=rad
                        +xy_out=deg
                        +step +proj=axisswap +order=2,1''')

transform = osr.CoordinateTransformation(source_crs, target_crs, options)

I have a few custom operation, then I would like to understand if it is
possible to include their definitions in the PROJ configuration, with a
different autorithy then EPSG. So that I can use it in something similar to:

options.SetOperation('urn:ogc:def:coordinateOperation:my_authority::900001')

I tried to read documentation of GDAl and PROJ but didn't find, probably my
fault, any clear explanation on how to customize configuration to include
custom operation.

Thank you all in advance for any hint

Stefano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220419/339c3a4b/attachment.html>


More information about the gdal-dev mailing list