You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reading a GML file containing a gml:CircleByCenterPoint geometry, the geometry is reported as a CURVEPOLYGON with a CIRCULARSTRING, consisting of three points, the first point being equal to the third point.
In ISO/IEC 13249-3:2016, the current version of the standard, an ST_CircularCurve with equal segment start and end point is no longer permitted, Instead, type ST_Circle is introduced to deal with circles. This is described in ISO/IEC 13249-3:2016 Annex D Incompatibilities with ISO/IEC 13249-3:2011.
The WKT reported when converting a gml:CircleByCenterPoint geometry, will fail in e.g.
It would be better if a gml:CircleByCenterPoint would be converted to a CURVEPOLYGON with an CIRCULARSTRING defined by 5 points. That encoding will be recognized by more databases and other tools, hence increasing interoperability.
I noticed this issue with the WKT encoding of circles when reading GML. The underlying problem as described above possibly occurs in other drivers, I did not investigate that.
What is the bug?
When reading a GML file containing a
gml:CircleByCenterPoint
geometry, the geometry is reported as aCURVEPOLYGON
with aCIRCULARSTRING
, consisting of three points, the first point being equal to the third point.This is compliant with earlier editions of the SQL/MM standard (ISO/IEC 13249-3), as e.g. documented in the PostGIS documentation, https://postgis.net/docs/manual-3.5/using_postgis_dbmanagement.html#CircularString.
In ISO/IEC 13249-3:2016, the current version of the standard, an
ST_CircularCurve
with equal segment start and end point is no longer permitted, Instead, typeST_Circle
is introduced to deal with circles. This is described in ISO/IEC 13249-3:2016 Annex D Incompatibilities with ISO/IEC 13249-3:2011.The WKT reported when converting a
gml:CircleByCenterPoint
geometry, will fail in e.g.It would be better if a
gml:CircleByCenterPoint
would be converted to aCURVEPOLYGON
with anCIRCULARSTRING
defined by 5 points. That encoding will be recognized by more databases and other tools, hence increasing interoperability.I noticed this issue with the WKT encoding of circles when reading GML. The underlying problem as described above possibly occurs in other drivers, I did not investigate that.
Steps to reproduce the issue
The following geometry:
is reported as
CURVEPOLYGON (CIRCULARSTRING (-1 2,3 2,-1 2))
.SELECT sdo_geom.VALIDATE_GEOMETRY_WITH_CONTEXT(sdo_util.FROM_WKTGEOMETRY('CURVEPOLYGON (CIRCULARSTRING (-1 2,3 2,-1 2))') , 0,005) FROM dual;
fails with ORA-13346.A better WKT representation would e.g. be
CURVEPOLYGON (CIRCULARSTRING (-1 2,1 0,3 2,1 4,-1 2))
.Relevant code (I think):
gdal/ogr/gml2ogrgeometry.cpp
Lines 2042 to 2057 in abaccaa
Versions and provenance
GDAL 3.10.1, released 2025/01/08, installed from OSGeo4W.
Additional context
No response
The text was updated successfully, but these errors were encountered: