Hello,

I am trying to use the kml ogr driver in gdal 3.0, but there is something I find weird with the spatial references:

- When a layer is created (in the constructor), a wgs84 geoCRS is created, without setting its "Axis mapping strategy" to OAMS_TRADITIONAL_GIS_ORDER, meaning that it uses latitude first and longitude second. This spatial reference is then compared to the source spatial reference, and if it doesn't match, a OGRCoordinateTransformation is created to convert from the source SRS to wgs84 (as kml only supports wgs84).

- When opening a kml datasource using the driver, a wgs84 geoCRS is created, this time with its axis mapping strategy set to OAMS_TRADITIONAL_GIS_ORDER (longitude first and latitude second). A layer is then created with this spatial reference and compared with a lat/long wgs84 as described above. And as they mismatch, a coordinate transformation is created between the two geoCRS.

I think the wgs84 spatial reference of the layer should also have its axis set to OAMS_TRADITIONAL_GIS_ORDER.

Or maybe I am not understanding correctly of spatial references work in this driver ? I am still a bit confused with these axis order issues.

Cédric

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to