From: Olivier Courtin Date: Wed, 26 Mar 2014 10:11:51 +0000 (+0000) Subject: #2681 fix. X-Git-Tag: 2.2.0rc1~1175 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5499011b8ce216b8c0a6609f9e58eba9e24eef30;p=postgis #2681 fix. git-svn-id: http://svn.osgeo.org/postgis/trunk@12361 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis/lwgeom_in_gml.c b/postgis/lwgeom_in_gml.c index ee30a0c14..caa043e8b 100644 --- a/postgis/lwgeom_in_gml.c +++ b/postgis/lwgeom_in_gml.c @@ -1335,6 +1335,10 @@ static LWGEOM* parse_gml_patch(xmlNodePtr xnode, bool *hasz, int *root_srid) } } + /* Interior but no Exterior ! */ + if ( ! ppa ) + gml_lwerror("invalid GML representation", 48); + /* PolygonPatch/interior */ for (ring=1, xa = xnode->children ; xa != NULL ; xa = xa->next) { diff --git a/regress/in_gml.sql b/regress/in_gml.sql index a37ce9594..736d1d1aa 100644 --- a/regress/in_gml.sql +++ b/regress/in_gml.sql @@ -301,6 +301,8 @@ SELECT 'surface_21', ST_AsEWKT(ST_GeomFromGML('1,2 3,4 5,6 1,2')); +-- ERROR: interior but no exterior +SELECT 'surface_23', ST_AsEWKT(ST_GeomFromGML('1,2 3,4 5,6 1,2')); -- diff --git a/regress/in_gml_expected b/regress/in_gml_expected index 60b0442cd..6fa4e2d6d 100644 --- a/regress/in_gml_expected +++ b/regress/in_gml_expected @@ -88,6 +88,7 @@ surface_19|POLYGON((1 2,3 4,5 6,1 2),(7 8,10 11,13 14,7 8)) ERROR: invalid GML representation surface_21|POLYGON((1 2,3 4,5 6,1 2)) ERROR: invalid GML representation +ERROR: invalid GML representation mpoint_1|MULTIPOINT(1 2) mpoint_2|MULTIPOINT(1 2,3 4) mpoint_3|SRID=4326;MULTIPOINT(1 2)