gdal icon indicating copy to clipboard operation
gdal copied to clipboard

Support for GML <OrientableCurve> tag

Open miladmoradi89 opened this issue 1 year ago • 2 comments

Feature description

I had few GML files that had OrientableCurve in it and I realized that pyhton GDAL package does not support GML orientablecurve.

I thought it would be beneficial for the community if we can add feature to GDAL package.

http://www.datypic.com/sc/niem21/e-gml32_OrientableCurve.html

Additional context

No response

miladmoradi89 avatar Jun 25 '24 17:06 miladmoradi89

@miladmoradi89 It would be helpful if you could attach an example of such file/geometry

rouault avatar Jun 25 '24 17:06 rouault

I tried to read a gml geometry like this using GDAL python package and I had strange error that apparently means that orientableCurve tag is not supported by the GDAL. Then, I remove that OrientableCurve and to make it valid I also removed the baseCurve of it.

Then, the remaining was understandable by GDAL python package. I think it will be a good idea to add this feature.

Geom:

<geometry> <surfaceProperty xlink:href="#test1234"> <Surface srsName="http://www.opengis.net/def/crs/EPSG/0/4326" gml:id="test2345"> <gml:patches> <gml:PolygonPatch> <gml:exterior> <gml:Ring> <gml:curveMember xlink:href="#test45678"> <gml:CompositeCurve srsName="http://www.opengis.net/def/crs/EPSG/0/4326" gml:id="test4567"> <gml:curveMember xlink:href="#oc984"> <gml:OrientableCurve srsName="http://www.opengis.net/def/crs/EPSG/0/4326" gml:id="test98765" orientation="+"> <gml:baseCurve> <gml:Curve> <gml:segments> <gml:LineStringSegment> <gml:posList>75.815 133.596 75.8147 133.4639 75.8113 133.993 75.813 133.861 75.814 133.728 75.815 133.596</gml:posList> </gml:LineStringSegment> </gml:segments> </gml:Curve> </gml:baseCurve> </gml:OrientableCurve> </gml:curveMember> </gml:CompositeCurve> </gml:curveMember> </gml:Ring> </gml:exterior> </gml:PolygonPatch> </gml:patches> </Surface> </surfaceProperty> </geometry>

based on what I saw neither of GDAL nor QGIS were able to read the GML OrientableCurve tag. But as soon as I remove the OrientableCurve and baseCurve then both of them can read it.

miladmoradi89 avatar Jun 25 '24 18:06 miladmoradi89

Hi again,

Did you just added read support for OrientableCurve!! in just 2 weeks!

miladmoradi89 avatar Jul 06 '24 16:07 miladmoradi89

yes support has been added in the master branch. It will land in GDAL 3.10 towards November. Or you can get it from Conda gdal-master build at https://gdal.org/download.html#gdal-master-conda-builds

rouault avatar Jul 06 '24 18:07 rouault