[gdal-dev] Using a custom operation with osr.CoordinateTransformation
Even Rouault
even.rouault at spatialys.com
Tue Apr 19 03:17:03 PDT 2022
Hi,
looking at
https://github.com/OSGeo/PROJ/blob/master/data/sql/other_transformation_custom.sql
should give you good hints on how to add custom transformations, here
under a PROJ authority
If you want to create your own authority, you'll also need to do similar
steps as the ones dones for the NKG authority in
https://github.com/OSGeo/PROJ/blob/master/data/sql/nkg_post_customizations.sql
Even
Le 19/04/2022 à 08:55, Stefano Iacovella a écrit :
> 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
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
--
http://www.spatialys.com
My software is free, but my time generally not.
More information about the gdal-dev
mailing list