[postgis-tickets] r15777 - ST_ConcaveHull fix for ExteriorRing is not a polygon

Regina Obe lr at pcorp.us
Tue Sep 19 20:52:42 PDT 2017


Author: robe
Date: 2017-09-19 20:52:42 -0700 (Tue, 19 Sep 2017)
New Revision: 15777

Modified:
   branches/2.2/NEWS
   branches/2.2/postgis/postgis.sql.in
Log:
ST_ConcaveHull fix for ExteriorRing is not a polygon
Closes #2836 for PostGIS 2.2.6

Modified: branches/2.2/NEWS
===================================================================
--- branches/2.2/NEWS	2017-09-20 00:19:16 UTC (rev 15776)
+++ branches/2.2/NEWS	2017-09-20 03:52:42 UTC (rev 15777)
@@ -5,6 +5,8 @@
   - #3786, ptarray null and heap issues on is_closed
   - #3774, Trigonometric length for CompoundCurves
   - #3731, Crash on very small table of homogenous data
+  - #2836, Receiving ERROR: ExteriorRing: geom is
+           not a polygon with ST_ConcaveHull
 
 
 PostGIS 2.2.5

Modified: branches/2.2/postgis/postgis.sql.in
===================================================================
--- branches/2.2/postgis/postgis.sql.in	2017-09-20 00:19:16 UTC (rev 15776)
+++ branches/2.2/postgis/postgis.sql.in	2017-09-20 03:52:42 UTC (rev 15777)
@@ -5578,8 +5578,10 @@
 					var_tempgeom := ST_ForceSFS(ST_Intersection(var_tempgeom, var_convhull));
 					IF param_allow_holes THEN
 						var_param_geom := var_tempgeom;
+					ELSIF ST_GeometryType(var_tempgeom) = 'ST_Polygon' THEN
+						var_param_geom := ST_MakePolygon(ST_ExteriorRing(var_tempgeom));
 					ELSE
-						var_param_geom := ST_MakePolygon(ST_ExteriorRing(var_tempgeom));
+						var_param_geom := ST_ConvexHull(var_tempgeom);
 					END IF;
 					return var_param_geom;
 				ELSIF ST_IsValid(var_tempgeom) THEN



More information about the postgis-tickets mailing list