Skip to content
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

[GML] asGml3() creates invalid GML for CurvePolygon #57355

Closed
2 tasks done
pathmapper opened this issue May 7, 2024 · 0 comments · Fixed by #57476
Closed
2 tasks done

[GML] asGml3() creates invalid GML for CurvePolygon #57355

pathmapper opened this issue May 7, 2024 · 0 comments · Fixed by #57476
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@pathmapper
Copy link
Contributor

pathmapper commented May 7, 2024

What is the bug or the crash?

asGml3() creates invalid GML for CurvePolygon in terms of XML schema validation:

exterior expects child elements of type AbstractRing (e.g. Ring or LinearRing) not CompositeCurve.

In QGIS Python console:

wkt_geom = 'CURVEPOLYGON (COMPOUNDCURVE ((0 -1,0 1),CIRCULARSTRING (0 1,1 0,0 -1)))'

geometry = QgsGeometry.fromWkt(wkt_geom)

doc = QDomDocument()
gml_geometry = geometry.constGet().asGml3(doc, 0)
doc.appendChild(gml_geometry)

print(doc.toString(2))

results in:

image

Steps to reproduce the issue

see above

Versions

QGIS version 3.37.0-Master QGIS code revision 8189860
Qt version 5.15.3
Python version 3.10.12
GDAL/OGR version 3.9.0dev-18f9ed2b7c
PROJ version 8.2.1
EPSG Registry database version v10.041 (2021-12-03)
GEOS version 3.10.2-CAPI-1.16.0
SQLite version 3.37.2
PDAL version 2.3.0
PostgreSQL client version 14.11 (Ubuntu 14.11-0ubuntu0.22.04.1)
SpatiaLite version 5.0.1
QWT version 6.1.4
QScintilla2 version 2.11.6
OS version Ubuntu 22.04.4 LTS
       
Active Python plugins
grassprovider 2.12.99
MetaSearch 0.3.6
processing 2.12.99
db_manager 0.1.20

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

A similar issue existed in GDAL OSGeo/gdal#7294 and was fixed by @rouault in OSGeo/gdal#7296.

@pathmapper pathmapper added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label May 7, 2024
@rouault rouault self-assigned this May 17, 2024
rouault added a commit to rouault/QGIS that referenced this issue May 17, 2024
…inearRing

that is when it is a ring made of a CircularString or a ring made of a CompoundCurve

Fixes qgis#57355
nyalldawson pushed a commit that referenced this issue May 19, 2024
…inearRing

that is when it is a ring made of a CircularString or a ring made of a CompoundCurve

Fixes #57355
qgis-bot pushed a commit that referenced this issue May 19, 2024
…inearRing

that is when it is a ring made of a CircularString or a ring made of a CompoundCurve

Fixes #57355
nyalldawson pushed a commit that referenced this issue May 19, 2024
…inearRing

that is when it is a ring made of a CircularString or a ring made of a CompoundCurve

Fixes #57355
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants