[postgis-tickets] r16557 - #4079, ensure that polygons are CW coming out of the ASMVTGEOM process

Paul Ramsey pramsey at cleverelephant.ca
Mon May 7 10:59:57 PDT 2018


Author: pramsey
Date: 2018-05-07 10:59:57 -0700 (Mon, 07 May 2018)
New Revision: 16557

Modified:
   trunk/postgis/mvt.c
Log:
#4079, ensure that polygons are CW coming out of the ASMVTGEOM process


Modified: trunk/postgis/mvt.c
===================================================================
--- trunk/postgis/mvt.c	2018-05-06 17:22:27 UTC (rev 16556)
+++ trunk/postgis/mvt.c	2018-05-07 17:59:57 UTC (rev 16557)
@@ -779,7 +779,10 @@
 		lwgeom->type == COLLECTIONTYPE)
 	{
 		lwgeom = lwgeom_make_valid(lwgeom);
+		/* In image coordinates CW actually comes out a CCW, so */
+		/* we also reverse. ¯\_(ツ)_/¯ */
 		lwgeom_force_clockwise(lwgeom);
+		lwgeom_reverse_in_place(lwgeom);
 	}
 
 	/* if geometry collection extract highest dimensional geometry type */



More information about the postgis-tickets mailing list