]> granicus.if.org Git - postgis/commitdiff
#3355 ST_Segmentize does not add geography box
authorRegina Obe <lr@pcorp.us>
Mon, 2 Nov 2015 07:25:27 +0000 (07:25 +0000)
committerRegina Obe <lr@pcorp.us>
Mon, 2 Nov 2015 07:25:27 +0000 (07:25 +0000)
ST_Intersects fails as result
Fixes for 2.3

git-svn-id: http://svn.osgeo.org/postgis/trunk@14346 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/geography_measurement.c

index 84acdd9559632dbddfc9cc82dbaee208e702e0f5..ec29916c557d851e55b0b7b5ac754de5b6a94a5b 100644 (file)
@@ -1083,6 +1083,17 @@ Datum geography_segmentize(PG_FUNCTION_ARGS)
 
        /* 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 */