[gdal-dev] Set axis order with ogr2ogr

Elena Ruiz eruiz at aplitop.com
Wed Feb 8 01:40:15 PST 2023


Hello, I need to do a conversion between GML to SHP vector files with the app ogr2ogr.exe, and be able to set the order of the axes TRADITIONAL_GIS_ORDER / AUTHORITY_COMPLIANT, in the OGR API documentation (ogr_srs_api.h), I found the following:

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

And from here I have deduced that I could use the OGR_CT_FORCE_TRADITIONAL_GIS_ORDER tag to establish the order of the axes and I have used the following command line:

ogr2ogr -f "ESRI Shapefile" "C:\Users\elena\Downloads\Recinto.shp" "C:\Users\elena\Downloads\Recinto.gml" -co OGR_CT_FORCE_TRADITIONAL_GIS_ORDER YES

I am using GDAL 1.1.1 on x86, for this version of GDAL it does create the SHP file, it does not give an error when executed, but it does not make any change in the order of the axes of the destination file.
But I have also tried it with version 2.4.4 for x64 and in this case it gives me the following errors:

ERROR 1: Field gml_id has a NULL content which is not allowed
ERROR 1: Unable to write feature 0 from layer LandCoverUnit.
ERROR 1: Terminating translation prematurely after failed
translation of layer LandCoverUnit (use -skipfailures to skip errors)

I attach an example file in the following link: https://aplitop.sharefile.com/d-scfcb397f54a649598913d6ae00d0d398

I hope someone can tell me how I can do what I need, thanks and regards.
________________________________

[https://www.aplitop.com/descargas/firma1.jpg]


Elena Ruiz
Sofware Development & Technical Support
Tel. +34 952 43 97 71
eruiz at aplitop.com
Sumatra, 9 - 29190 M?laga (Spain)
www.aplitop.com

[cid:SocialLink_Facebook_32x32_a745adb8-c250-4372-8480-e77f503dad3d.png]<https://www.facebook.com/AplitopSL/>   [cid:SocialLink_Twitter_32x32_858247f6-9d4a-4740-a6b3-9b5ebfd98a97.png] <https://twitter.com/aplitop>    [cid:SocialLink_Linkedin_32x32_154d63de-bf68-468f-9eb0-ffed102fac77.png] <https://www.linkedin.com/company/aplitop>    [cid:SocialLink_Youtube_32x32_0dea15dd-3774-4086-be9d-f62560b70c86.png] <https://www.youtube.com/user/aplitop>


In accordance with the provisions of the European Regulation of Data Protection 2016/679 (Reglamento Europeo de Protecci?n de Datos 2016/679), we inform you that the data and the information you provide us through this medium will be used by APLITOP, S.L., with C.I.F. B-92543396 and with address at C / Sumatra, 9, Malaga, 29190, in order to answer your questions and inform you about our products. The data provided will be kept as long as it does not request its cessation and will not be transferred to third parties except in cases where there is a legal obligation. You have the right to access your personal data, correct inaccurate data or request its deletion when the data is no longer necessary for the purposes that were collected, as well as any rights recognized in the RGPD 2016/679
<https://www.aplitop.com/New/en/443/publication-of-point-clouds-on-web>

<https://www.aplitop.com/New/en/438/tcpmdt-v9-is-here><https://www.aplitop.com/Event/en/429/aplitop-at-intergeo-2022-essen>

<https://www.aplitop.com/Event/en/358/intergeo-2019>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230208/31bb9470/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SocialLink_Facebook_32x32_a745adb8-c250-4372-8480-e77f503dad3d.png
Type: image/png
Size: 365 bytes
Desc: SocialLink_Facebook_32x32_a745adb8-c250-4372-8480-e77f503dad3d.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230208/31bb9470/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SocialLink_Twitter_32x32_858247f6-9d4a-4740-a6b3-9b5ebfd98a97.png
Type: image/png
Size: 619 bytes
Desc: SocialLink_Twitter_32x32_858247f6-9d4a-4740-a6b3-9b5ebfd98a97.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230208/31bb9470/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SocialLink_Linkedin_32x32_154d63de-bf68-468f-9eb0-ffed102fac77.png
Type: image/png
Size: 468 bytes
Desc: SocialLink_Linkedin_32x32_154d63de-bf68-468f-9eb0-ffed102fac77.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230208/31bb9470/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SocialLink_Youtube_32x32_0dea15dd-3774-4086-be9d-f62560b70c86.png
Type: image/png
Size: 817 bytes
Desc: SocialLink_Youtube_32x32_0dea15dd-3774-4086-be9d-f62560b70c86.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230208/31bb9470/attachment-0007.png>


More information about the gdal-dev mailing list