Skip to content

Commit 588a940

Browse files
committed
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
1 parent b78065a commit 588a940

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

postgis/geography_inout.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,9 @@ Datum geography_from_geometry(PG_FUNCTION_ARGS)
598598
);
599599
}
600600

601-
601+
/* Recalculate the boxes after re-setting the geodetic bit */
602+
lwgeom_drop_bbox(lwgeom);
603+
602604
g_ser = gserialized_geography_from_lwgeom(lwgeom, -1);
603605

604606
/*

postgis/geography_measurement.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,6 +1084,9 @@ Datum geography_segmentize(PG_FUNCTION_ARGS)
10841084
/* Calculate the densified geometry */
10851085
lwgeom2 = lwgeom_segmentize_sphere(lwgeom1, max_seg_length);
10861086

1087+
/* force recalculate of box by dropping */
1088+
lwgeom_drop_bbox(lwgeom2);
1089+
10871090
g2 = gserialized_geography_from_lwgeom(lwgeom2, -1);
10881091

10891092
/* Clean up */

0 commit comments

Comments
 (0)