[postgis-tickets] r16407 - Fix cast from box3d to geometry

Darafei komzpa at gmail.com
Thu Feb 22 03:16:37 PST 2018


Author: komzpa
Date: 2018-02-22 03:16:37 -0800 (Thu, 22 Feb 2018)
New Revision: 16407

Modified:
   branches/2.3/NEWS
   branches/2.3/postgis/lwgeom_box3d.c
   branches/2.3/regress/regress_expected
   branches/2.3/regress/sfcgal/regress_expected
Log:
Fix cast from box3d to geometry

Patch by Matthias Bay

Closes https://github.com/postgis/postgis/pull/214
Closes #4020


Modified: branches/2.3/NEWS
===================================================================
--- branches/2.3/NEWS	2018-02-22 11:13:38 UTC (rev 16406)
+++ branches/2.3/NEWS	2018-02-22 11:16:37 UTC (rev 16407)
@@ -5,8 +5,9 @@
 
   - #3978, Fix KNN when upgrading from 2.1 or older (Sandro Santilli)
   - #4003, lwpoly_construct_circle: Avoid division by zero (Raúl Marín Rodríguez)
+  - #4020, Casting from box3d to geometry now returns correctly connected
+           PolyhedralSurface (Matthias Bay)
 
-
 PostGIS 2.3.6
 2018/01/17
 

Modified: branches/2.3/postgis/lwgeom_box3d.c
===================================================================
--- branches/2.3/postgis/lwgeom_box3d.c	2018-02-22 11:13:38 UTC (rev 16406)
+++ branches/2.3/postgis/lwgeom_box3d.c	2018-02-22 11:16:37 UTC (rev 16407)
@@ -328,10 +328,10 @@
 				   	&points[0], &points[1], &points[2], &points[3]));
 		/* add top polygon */
 		geoms[1] = lwpoly_as_lwgeom(lwpoly_construct_rectangle(LW_TRUE, LW_FALSE,
-				   	&points[4], &points[5], &points[6], &points[7]));
+				   	&points[4], &points[7], &points[6], &points[5]));
 		/* add left polygon */
 		geoms[2] = lwpoly_as_lwgeom(lwpoly_construct_rectangle(LW_TRUE, LW_FALSE,
-				   	&points[0], &points[1], &points[5], &points[4]));
+				   	&points[0], &points[4], &points[5], &points[1]));
 		/* add right polygon */
 		geoms[3] = lwpoly_as_lwgeom(lwpoly_construct_rectangle(LW_TRUE, LW_FALSE,
 				   	&points[3], &points[2], &points[6], &points[7]));
@@ -340,7 +340,7 @@
 				   	&points[0], &points[3], &points[7], &points[4]));
 		/* add front polygon */
 		geoms[5] = lwpoly_as_lwgeom(lwpoly_construct_rectangle(LW_TRUE, LW_FALSE,
-				   	&points[1], &points[2], &points[6], &points[5]));
+				   	&points[1], &points[5], &points[6], &points[2]));
 
 		geom = (LWGEOM *) lwcollection_construct(POLYHEDRALSURFACETYPE,
 				SRID_UNKNOWN, NULL, ngeoms, geoms);

Modified: branches/2.3/regress/regress_expected
===================================================================
--- branches/2.3/regress/regress_expected	2018-02-22 11:13:38 UTC (rev 16406)
+++ branches/2.3/regress/regress_expected	2018-02-22 11:16:37 UTC (rev 16407)
@@ -92,7 +92,7 @@
 107c|POLYGON((2 3 5,2 8 5,6 8 5,6 3 5,2 3 5))
 107d|POLYGON((1 -1 4,2 -1 4,2 -1 9,1 -1 9,1 -1 4))
 107e|POLYGON((-1 3 5,-1 6 5,-1 6 8,-1 3 8,-1 3 5))
-107f|POLYHEDRALSURFACE(((1 2 3,1 5 3,4 5 3,4 2 3,1 2 3)),((1 2 6,1 5 6,4 5 6,4 2 6,1 2 6)),((1 2 3,1 5 3,1 5 6,1 2 6,1 2 3)),((4 2 3,4 5 3,4 5 6,4 2 6,4 2 3)),((1 2 3,4 2 3,4 2 6,1 2 6,1 2 3)),((1 5 3,4 5 3,4 5 6,1 5 6,1 5 3)))
+107f|POLYHEDRALSURFACE(((1 2 3,1 5 3,4 5 3,4 2 3,1 2 3)),((1 2 6,4 2 6,4 5 6,1 5 6,1 2 6)),((1 2 3,1 2 6,1 5 6,1 5 3,1 2 3)),((4 2 3,4 5 3,4 5 6,4 2 6,4 2 3)),((1 2 3,4 2 3,4 2 6,1 2 6,1 2 3)),((1 5 3,1 5 6,4 5 6,4 5 3,1 5 3)))
 108|2
 109|4
 110|6

Modified: branches/2.3/regress/sfcgal/regress_expected
===================================================================
--- branches/2.3/regress/sfcgal/regress_expected	2018-02-22 11:13:38 UTC (rev 16406)
+++ branches/2.3/regress/sfcgal/regress_expected	2018-02-22 11:16:37 UTC (rev 16407)
@@ -121,7 +121,7 @@
 107c|POLYGON((2 3 5,2 8 5,6 8 5,6 3 5,2 3 5))
 107d|POLYGON((1 -1 4,2 -1 4,2 -1 9,1 -1 9,1 -1 4))
 107e|POLYGON((-1 3 5,-1 6 5,-1 6 8,-1 3 8,-1 3 5))
-107f|POLYHEDRALSURFACE(((1 2 3,1 5 3,4 5 3,4 2 3,1 2 3)),((1 2 6,1 5 6,4 5 6,4 2 6,1 2 6)),((1 2 3,1 5 3,1 5 6,1 2 6,1 2 3)),((4 2 3,4 5 3,4 5 6,4 2 6,4 2 3)),((1 2 3,4 2 3,4 2 6,1 2 6,1 2 3)),((1 5 3,4 5 3,4 5 6,1 5 6,1 5 3)))
+107f|POLYHEDRALSURFACE(((1 2 3,1 5 3,4 5 3,4 2 3,1 2 3)),((1 2 6,4 2 6,4 5 6,1 5 6,1 2 6)),((1 2 3,1 2 6,1 5 6,1 5 3,1 2 3)),((4 2 3,4 5 3,4 5 6,4 2 6,4 2 3)),((1 2 3,4 2 3,4 2 6,1 2 6,1 2 3)),((1 5 3,1 5 6,4 5 6,4 5 3,1 5 3)))
 108|2
 109|4
 110|6



More information about the postgis-tickets mailing list