Skip to content

Commit

Permalink
CreateGeometryFromGML(): recognize aixm:ElevatedPoint (ignoring the e…
Browse files Browse the repository at this point in the history
…levation)

Fixes OSGeo#11582
  • Loading branch information
rouault committed Jan 13, 2025
1 parent 926f93b commit eb94875
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions autotest/ogr/ogr_gml_geom.py
Original file line number Diff line number Diff line change
Expand Up @@ -3085,3 +3085,22 @@ def test_gml_OrientableCurve():
)
assert g is not None
assert g.ExportToWkt() == "LINESTRING (2 3,0 1)"


###############################################################################
#


def test_gml_aixm_ElevatedPoint():

geom = ogr.CreateGeometryFromGML(
"""<aixm:ElevatedPoint srsName="urn:ogc:def:crs:EPSG::4326">
<gml:pos>49 2</gml:pos>
<aixm:elevation uom="M">10</aixm:elevation> <!-- ignored -->
</aixm:ElevatedPoint>"""
)

ogrtest.check_feature_geometry(
geom,
"POINT (49 2)",
)
1 change: 1 addition & 0 deletions ogr/gml2ogrgeometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2061,6 +2061,7 @@ GML2OGRGeometry_XMLNode_Internal(const CPLXMLNode *psNode, const char *pszId,
/* -------------------------------------------------------------------- */
if (EQUAL(pszBaseGeometry, "PointType") ||
EQUAL(pszBaseGeometry, "Point") ||
EQUAL(pszBaseGeometry, "ElevatedPoint") ||
EQUAL(pszBaseGeometry, "ConnectionPoint"))
{
auto poPoint = std::make_unique<OGRPoint>();
Expand Down

0 comments on commit eb94875

Please sign in to comment.