[gdal-dev] OGR Transformation Clarification

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] OGR Transformation Clarification

andrew.bell.ia@gmail.com
Hi,

Can someone please explain in some more detail what is meant by this statement in the description of OCTNewCoordinateTransformation() ?

"This will honour the axis order advertized by the source and target SRS, as well as their "data axis to SRS axis mapping". To have a behaviour similar to GDAL < 3.0, the OGR_CT_FORCE_TRADITIONAL_GIS_ORDER configuration option can be set to YES."

I'm trying to understand what the difference is from GDAL < 3.0 and how I might know that I'm seeing an issue and need to use the specified configuration option.

Thanks,

-- 
Andrew Bell
[hidden email]

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: OGR Transformation Clarification

Even Rouault-2
Andrew,

>
> Can someone please explain in some more detail what is meant by this
> statement in the description of OCTNewCoordinateTransformation() ?
>
> "This will honour the axis order advertized by the source and target SRS,
> as well as their "data axis to SRS axis mapping". To have a behaviour
> similar to GDAL < 3.0, the OGR_CT_FORCE_TRADITIONAL_GIS_ORDER configuration
> option can be set to YES."
>
> I'm trying to understand what the difference is from GDAL < 3.0 and how I
> might know that I'm seeing an issue and need to use the specified
> configuration option.

See https://trac.osgeo.org/gdal/wiki/rfc73_proj6_wkt2_srsbarn#Axisorderissues

Basically OGR_CT_FORCE_TRADITIONAL_GIS_ORDER forces
SetAxisMappingStrategy(OAMS_TRADITIONAL_GIS_ORDER) on the copies of the source
and target CRS used by OGRCoordinateTransformation

If you use EPSG:4326 or any geographic CRS imported from EPSG, as well as some
projected CRS with a northing,easting order from EPSG, you'll see differences
between GDAL < and >= 3.0. You may cope with that either by switching the
order of coordinates you provide to / get from OGRCoordinateTransformation, or
if you want to continue working with the order of coordinates you used to
have, you can set OGR_CT_FORCE_TRADITIONAL_GIS_ORDER=YES, or call
SetAxisMappingStrategy(OAMS_TRADITIONAL_GIS_ORDER) on the source & target CRS

Even

--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev