-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Python/OGR] Geometry Conversion GML -> WKT -> GML returns invalid Geometry #9238
Comments
Would you mind attaching the gml as GML file that can be studied with ogrinfo and ogr2ogr? |
Sure: test1.zip |
gdalgml32.zip has the <gml:interior>
<gml:Ring>
<gml:curveMember>
<gml:Curve gml:id="gmltest.geom.0.interior.0.0"> The WKT string seems to be the same in both cases (
<gml:interior>
<gml:Ring> albeit no |
@pathmapper maybe have a look |
Please notice that in my test the curvepolygon WKT was first turned into a PostGIS geometry by the PostGIS database with So the next step might be to test if GDAL could have some bug in
|
With
|
@kraftto maybe the issue is that your result is missing the namespace declaration? If |
Yeah I should have mentioned that I'm talking about XML Schema validity :) I added this to the original issue description. The GML geometry should look like the one in gdalgml32.zip. |
Turns out that this has been reported before in #7294 and was fixed in #7296. You need minimum GDAL 3.6.3 and then you will get <gml:interior>
<gml:Ring>
<gml:curveMember> From https://github.com/OSGeo/gdal/blob/v3.6.3/NEWS.md
|
My bad! Similar use case in #7294 I guess ;) |
Expected behavior and actual behavior.
Loading the GML 3.2 Geometry mentioned below as WKT and subsequently re-exporting it to GML 3.2 leads to a changed and invalid geometry in terms of XML schema validation. Apparently a
gml:Ring
orgml:LinearRing
element is missing as agml:interior
sub-element, as well asgml:id
generation for sub-geometriesSteps to reproduce the problem.
returns
Operating system
Ubuntu 22.04 64 bit
GDAL version and provenance
GDAL 3.4.1 with Python 3.10
The text was updated successfully, but these errors were encountered: