[postgis-tickets] r16938 - ST_Subdivide: support rect hole in rect shell
Darafei
komzpa at gmail.com
Mon Oct 22 08:26:49 PDT 2018
Author: komzpa
Date: 2018-10-22 08:26:49 -0700 (Mon, 22 Oct 2018)
New Revision: 16938
Modified:
branches/2.5/NEWS
branches/2.5/liblwgeom/lwgeom.c
branches/2.5/regress/subdivide.sql
branches/2.5/regress/subdivide_expected
Log:
ST_Subdivide: support rect hole in rect shell
Closes #4211
Closes https://github.com/postgis/postgis/pull/317
Modified: branches/2.5/NEWS
===================================================================
--- branches/2.5/NEWS 2018-10-22 15:23:38 UTC (rev 16937)
+++ branches/2.5/NEWS 2018-10-22 15:26:49 UTC (rev 16938)
@@ -8,8 +8,9 @@
- #4191, Fix undefined behaviour in ptarray_clone_deep (Raúl Marín)
- #4020, Fix leftovers in topology upgrade from 2.1 (Sandro Santilli)
- #4206, Fix support for PostgreSQL 12 dev branch (Laurenz Albe)
+ - #4211, Fix ST_Subdivide for minimal exterior ring with minimal hole (Darafei
+ Praliaskouski)
-
PostGIS 2.5.0
2018/09/23
WARNING: If compiling with PostgreSQL+JIT, LLVM >= 6 is required
Modified: branches/2.5/liblwgeom/lwgeom.c
===================================================================
--- branches/2.5/liblwgeom/lwgeom.c 2018-10-22 15:23:38 UTC (rev 16937)
+++ branches/2.5/liblwgeom/lwgeom.c 2018-10-22 15:26:49 UTC (rev 16938)
@@ -2353,7 +2353,7 @@
lwpoly = (LWPOLY *)geom;
/* if there are more points in holes than in outer ring */
- if (nvertices > 2 * lwpoly->rings[0]->npoints)
+ if (nvertices >= 2 * lwpoly->rings[0]->npoints)
{
/* trim holes starting from biggest */
for (i = 1; i < lwpoly->nrings; i++)
Modified: branches/2.5/regress/subdivide.sql
===================================================================
--- branches/2.5/regress/subdivide.sql 2018-10-22 15:23:38 UTC (rev 16937)
+++ branches/2.5/regress/subdivide.sql 2018-10-22 15:26:49 UTC (rev 16938)
@@ -58,3 +58,5 @@
drop table big_polygon;
drop table big_polygon_sliced;
+
+select '#4211', (select sum(ST_Area(geom))::numeric(12,11) from ST_Subdivide('MULTIPOLYGON(((-88.2059 41.7325,-88.2060 41.7244,-88.1959 41.7241,-88.1959 41.7326,-88.2059 41.7325),(-88.1997 41.7289,-88.1996 41.7285,-88.1990 41.7285,-88.1990 41.7289,-88.1997 41.7289)))') geom );
Modified: branches/2.5/regress/subdivide_expected
===================================================================
--- branches/2.5/regress/subdivide_expected 2018-10-22 15:23:38 UTC (rev 16937)
+++ branches/2.5/regress/subdivide_expected 2018-10-22 15:26:49 UTC (rev 16938)
@@ -5,3 +5,4 @@
#3522|POINT(1 1)
#3744|1600000000000000
4|29321996468.6|29321996468.6|1857|256
+#4211|0.00008316000
More information about the postgis-tickets
mailing list