[postgis-tickets] r14347 - ST_Segmentize does not add geography box

Regina Obe lr at pcorp.us
Sun Nov 1 23:31:18 PST 2015


Author: robe
Date: 2015-11-01 23:31:17 -0800 (Sun, 01 Nov 2015)
New Revision: 14347

Modified:
   branches/2.2/postgis/geography_measurement.c
Log:
ST_Segmentize does not add geography box
ST_Intersects fails as result
fix for PostGIS 2.2
references #3355 

Modified: branches/2.2/postgis/geography_measurement.c
===================================================================
--- branches/2.2/postgis/geography_measurement.c	2015-11-02 07:25:27 UTC (rev 14346)
+++ branches/2.2/postgis/geography_measurement.c	2015-11-02 07:31:17 UTC (rev 14347)
@@ -1083,6 +1083,17 @@
 
 	/* Calculate the densified geometry */
 	lwgeom2 = lwgeom_segmentize_sphere(lwgeom1, max_seg_length);
+	
+	/*
+	** Set the geodetic flag so subsequent
+	** functions 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