]> granicus.if.org Git - postgis/commitdiff
Allow triangles unclosed in M to be WKT parsed (References #3818)
authorPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 26 Sep 2017 16:59:15 +0000 (16:59 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 26 Sep 2017 16:59:15 +0000 (16:59 +0000)
git-svn-id: http://svn.osgeo.org/postgis/branches/2.4@15834 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwin_wkb.c
liblwgeom/lwin_wkt.c

index 1a63ec698fd2069eacd74e586562f89ea40ca615..99308d1c241647dccb8f7792adf795334a09ec75 100644 (file)
@@ -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));
index d7aaca4ca6dfde3d8d8ca0ae579b9fa05ef8c58d..071b08833281570bb4e41c743e72a870b9b866cf 100644 (file)
@@ -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);