[postgis-tickets] r14348 - ST_Segmentize does not add geography box
Regina Obe
lr at pcorp.us
Sun Nov 1 23:34:30 PST 2015
Author: robe
Date: 2015-11-01 23:34:30 -0800 (Sun, 01 Nov 2015)
New Revision: 14348
Modified:
branches/2.1/postgis/geography_measurement.c
Log:
ST_Segmentize does not add geography box
ST_Intersects fails as result
fix for PostGIS 2.1
closes #3355
Modified: branches/2.1/postgis/geography_measurement.c
===================================================================
--- branches/2.1/postgis/geography_measurement.c 2015-11-02 07:31:17 UTC (rev 14347)
+++ branches/2.1/postgis/geography_measurement.c 2015-11-02 07:34:30 UTC (rev 14348)
@@ -990,6 +990,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