From eb948754d3fc20d058d0f1c4b1422e1c98b3fbd6 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 13 Jan 2025 17:43:27 +0100 Subject: [PATCH] CreateGeometryFromGML(): recognize aixm:ElevatedPoint (ignoring the elevation) Fixes #11582 --- autotest/ogr/ogr_gml_geom.py | 19 +++++++++++++++++++ ogr/gml2ogrgeometry.cpp | 1 + 2 files changed, 20 insertions(+) diff --git a/autotest/ogr/ogr_gml_geom.py b/autotest/ogr/ogr_gml_geom.py index 086a1b635726..a9a60667f7d5 100755 --- a/autotest/ogr/ogr_gml_geom.py +++ b/autotest/ogr/ogr_gml_geom.py @@ -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( + """ + 49 2 + 10 + """ + ) + + ogrtest.check_feature_geometry( + geom, + "POINT (49 2)", + ) diff --git a/ogr/gml2ogrgeometry.cpp b/ogr/gml2ogrgeometry.cpp index 1ad0ba5c44b1..5f79556f82c0 100644 --- a/ogr/gml2ogrgeometry.cpp +++ b/ogr/gml2ogrgeometry.cpp @@ -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();