From: Paul Ramsey Date: Tue, 26 Sep 2017 16:59:15 +0000 (+0000) Subject: Allow triangles unclosed in M to be WKT parsed (References #3818) X-Git-Tag: 2.4.0rc3~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=642b88404a16cee53b4e7cb03aa151295b4e1654;p=postgis Allow triangles unclosed in M to be WKT parsed (References #3818) git-svn-id: http://svn.osgeo.org/postgis/branches/2.4@15834 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/lwin_wkb.c b/liblwgeom/lwin_wkb.c index 1a63ec698..99308d1c2 100644 --- a/liblwgeom/lwin_wkb.c +++ b/liblwgeom/lwin_wkb.c @@ -576,12 +576,6 @@ static LWTRIANGLE* lwtriangle_from_wkb_state(wkb_parse_state *s) return NULL; } - if( s->check & LW_PARSER_CHECK_CLOSURE && ! ptarray_is_closed(pa) ) - { - lwerror("%s must have closed rings", lwtype_name(s->lwtype)); - return NULL; - } - if( s->check & LW_PARSER_CHECK_ZCLOSURE && ! ptarray_is_closed_z(pa) ) { lwerror("%s must have closed rings", lwtype_name(s->lwtype)); diff --git a/liblwgeom/lwin_wkt.c b/liblwgeom/lwin_wkt.c index d7aaca4ca..071b08833 100644 --- a/liblwgeom/lwin_wkt.c +++ b/liblwgeom/lwin_wkt.c @@ -447,7 +447,7 @@ LWGEOM* wkt_parser_triangle_new(POINTARRAY *pa, char *dimensionality) } /* Triangles need closure. */ - if( ! ptarray_is_closed(pa) ) + if( ! ptarray_is_closed_z(pa) ) { ptarray_free(pa); SET_PARSER_ERROR(PARSER_ERROR_UNCLOSED);