[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0rc1-104-g29e1db1
git at osgeo.org
git at osgeo.org
Fri Feb 26 11:47:39 PST 2021
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".
The branch, master has been updated
via 29e1db13409b995d8e04cabf86d329f15d512645 (commit)
from 7103b573d56ce649cab1de786c65a0c9d08a0a4c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 29e1db13409b995d8e04cabf86d329f15d512645
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Fri Feb 26 10:36:44 2021 -0800
Ensure bboxes are refreshed after cooridinate transforms in scale/affine. References #4863
diff --git a/liblwgeom/lwgeom.c b/liblwgeom/lwgeom.c
index 34c1fea..a2d3d7f 100644
--- a/liblwgeom/lwgeom.c
+++ b/liblwgeom/lwgeom.c
@@ -2019,6 +2019,9 @@ lwgeom_affine(LWGEOM *geom, const AFFINE *affine)
}
}
+ /* Recompute bbox if needed */
+ if (geom->bbox)
+ lwgeom_refresh_bbox(geom);
}
void
@@ -2071,19 +2074,8 @@ lwgeom_scale(LWGEOM *geom, const POINT4D *factor)
}
/* Recompute bbox if needed */
-
- if ( geom->bbox )
- {
- /* TODO: expose a gbox_scale function */
- geom->bbox->xmin *= factor->x;
- geom->bbox->xmax *= factor->x;
- geom->bbox->ymin *= factor->y;
- geom->bbox->ymax *= factor->y;
- geom->bbox->zmin *= factor->z;
- geom->bbox->zmax *= factor->z;
- geom->bbox->mmin *= factor->m;
- geom->bbox->mmax *= factor->m;
- }
+ if (geom->bbox)
+ lwgeom_refresh_bbox(geom);
}
LWGEOM *
diff --git a/regress/core/tickets.sql b/regress/core/tickets.sql
index a24eba2..ad44356 100644
--- a/regress/core/tickets.sql
+++ b/regress/core/tickets.sql
@@ -1343,3 +1343,11 @@ FROM (SELECT
SELECT '#4853', ST_ClusterDBSCAN(geom, eps := 0.000906495804256269, minpoints := 4) OVER() AS cid FROM (VALUES ('0101000020E6100000E4141DC9E5934B40D235936FB6193940'::geometry), ('0101000020E6100000C746205ED7934B40191C25AFCE193940'::geometry), ('0101000020E6100000C780ECF5EE934B40B6BE4868CB193940'::geometry), ('0101000020E6100000ABB2EF8AE0934B404451A04FE4193940'::geometry)) AS t(geom);
SELECT '#4844', ST_AsEWKT(ST_SnapToGrid(ST_Transform('SRID=3575;POINT(370182.35945313 -2213980.8213281)'::geometry,4326),0.001));
+
+SELECT '#4863', st_contains(geometry, st_scale(st_orientedenvelope(geometry),
+ 'SRID=3857; POINT(0.8 0.8)', st_centroid(geometry))) from (select
+ 'SRID=3857; POLYGON((-141972.789895508 6755731.24770785,-141935.49511986
+ 6755733.56891884,-141934.403428904 6755716.1146343,-141971.698204552
+ 6755713.77835553,-141972.789895508 6755731.24770785))'::geometry as
+ geometry) x;
+
diff --git a/regress/core/tickets_expected b/regress/core/tickets_expected
index f8119be..6f22297 100644
--- a/regress/core/tickets_expected
+++ b/regress/core/tickets_expected
@@ -444,3 +444,4 @@ ERROR: LWGEOM_addpoint: Invalid offset
#4853|0
#4853|0
#4844|SRID=4326;POINT(19.492 69.79)
+#4863|t
-----------------------------------------------------------------------
Summary of changes:
liblwgeom/lwgeom.c | 18 +++++-------------
regress/core/tickets.sql | 8 ++++++++
regress/core/tickets_expected | 1 +
3 files changed, 14 insertions(+), 13 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list