[postgis-tickets] r14346 - #3355 ST_Segmentize does not add geography box

Regina Obe lr at pcorp.us
Sun Nov 1 23:25:28 PST 2015


Author: robe
Date: 2015-11-01 23:25:27 -0800 (Sun, 01 Nov 2015)
New Revision: 14346

Modified:
   trunk/postgis/geography_measurement.c
Log:
#3355 ST_Segmentize does not add geography box
ST_Intersects fails as result
Fixes for 2.3

Modified: trunk/postgis/geography_measurement.c
===================================================================
--- trunk/postgis/geography_measurement.c	2015-10-29 13:51:07 UTC (rev 14345)
+++ trunk/postgis/geography_measurement.c	2015-11-02 07:25:27 UTC (rev 14346)
@@ -1083,6 +1083,17 @@
 
 	/* Calculate the densified geometry */
 	lwgeom2 = lwgeom_segmentize_sphere(lwgeom1, max_seg_length);
+	
+	/*
+	** Set the geodetic flag so subsequent
+	** functions to do the right thing.
+	*/
+	lwgeom_set_geodetic(lwgeom2, true);
+	
+	/* Recalculate the boxes after re-setting the geodetic bit */
+	lwgeom_drop_bbox(lwgeom2);
+	lwgeom_add_bbox(lwgeom2);
+	
 	g2 = geography_serialize(lwgeom2);
 	
 	/* Clean up */



More information about the postgis-tickets mailing list