From: Regina Obe Date: Mon, 2 Nov 2015 07:25:27 +0000 (+0000) Subject: #3355 ST_Segmentize does not add geography box X-Git-Tag: 2.3.0beta1~399 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=faf92882dbdfe96f9261ed702873c450c77a51c6;p=postgis #3355 ST_Segmentize does not add geography box ST_Intersects fails as result Fixes for 2.3 git-svn-id: http://svn.osgeo.org/postgis/trunk@14346 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis/geography_measurement.c b/postgis/geography_measurement.c index 84acdd955..ec29916c5 100644 --- a/postgis/geography_measurement.c +++ b/postgis/geography_measurement.c @@ -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 */