[postgis-tickets] r15833 - Allow triangles unclosed in M to be parsed in WKT (References #3818)

Paul Ramsey pramsey at cleverelephant.ca
Tue Sep 26 09:58:40 PDT 2017


Author: pramsey
Date: 2017-09-26 09:58:39 -0700 (Tue, 26 Sep 2017)
New Revision: 15833

Modified:
   trunk/liblwgeom/lwin_wkb.c
   trunk/liblwgeom/lwin_wkt.c
Log:
Allow triangles unclosed in M to be parsed in WKT (References #3818)


Modified: trunk/liblwgeom/lwin_wkb.c
===================================================================
--- trunk/liblwgeom/lwin_wkb.c	2017-09-26 16:23:36 UTC (rev 15832)
+++ trunk/liblwgeom/lwin_wkb.c	2017-09-26 16:58:39 UTC (rev 15833)
@@ -576,12 +576,6 @@
 		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));

Modified: trunk/liblwgeom/lwin_wkt.c
===================================================================
--- trunk/liblwgeom/lwin_wkt.c	2017-09-26 16:23:36 UTC (rev 15832)
+++ trunk/liblwgeom/lwin_wkt.c	2017-09-26 16:58:39 UTC (rev 15833)
@@ -447,7 +447,7 @@
 	}
 
 	/* Triangles need closure. */
-	if( ! ptarray_is_closed(pa) )
+	if( ! ptarray_is_closed_z(pa) )
 	{
 		ptarray_free(pa);
 		SET_PARSER_ERROR(PARSER_ERROR_UNCLOSED);



More information about the postgis-tickets mailing list