From 588a940f91ba832b5ba720a81ffe48eb2c2e1644 Mon Sep 17 00:00:00 2001 From: Regina Obe Date: Tue, 3 Nov 2015 10:31:51 +0000 Subject: [PATCH] make sure to drop whatever boxes first references #3356 (fix for 2.3 branch) references #3355 redo of fix for 2.3 branch for segmentize git-svn-id: http://svn.osgeo.org/postgis/trunk@14351 b70326c6-7e19-0410-871a-916f4a2858ee --- postgis/geography_inout.c | 4 +++- postgis/geography_measurement.c | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/postgis/geography_inout.c b/postgis/geography_inout.c index 732e5a8cb..12235bca8 100644 --- a/postgis/geography_inout.c +++ b/postgis/geography_inout.c @@ -598,7 +598,9 @@ Datum geography_from_geometry(PG_FUNCTION_ARGS) ); } - + /* Recalculate the boxes after re-setting the geodetic bit */ + lwgeom_drop_bbox(lwgeom); + g_ser = gserialized_geography_from_lwgeom(lwgeom, -1); /* diff --git a/postgis/geography_measurement.c b/postgis/geography_measurement.c index fa8f17420..06b363704 100644 --- a/postgis/geography_measurement.c +++ b/postgis/geography_measurement.c @@ -1084,6 +1084,9 @@ Datum geography_segmentize(PG_FUNCTION_ARGS) /* Calculate the densified geometry */ lwgeom2 = lwgeom_segmentize_sphere(lwgeom1, max_seg_length); + /* force recalculate of box by dropping */ + lwgeom_drop_bbox(lwgeom2); + g2 = gserialized_geography_from_lwgeom(lwgeom2, -1); /* Clean up */ -- 2.50.1