[postgis-devel] ST_SimplifyVW not touching Start and endpoint of polygon

Tom van Tilburg tom.van.tilburg at gmail.com
Sun Oct 15 03:22:54 PDT 2017


I only just found this out and was wondering if it is intentional. When
running ST_SetEffectiveArea it turns out that the triangle-area for points
related to start and endpoint of a polygon are set to dbl_max (example
below). While this is logical for linestrings (it would break your
network), I think it could be implemented better for polygons by
reconnecting the polygon when start/endpoint are throw out because of a
small effective area. I have some polygons with spikes originating from the
startpoint and it is unexpected behaviour to see some spikes not being
removed this way.
Is there a good reason to keep the start/endpoint of polygon intact? And if
so, would it make sense to make it optional?

Tom

P.S. I have the idea that this point has been addressed on another list
(maybe D3) but wasn't able to find it.

----------------------
Example:

SELECT
 ST_AsTExt(
  (ST_DumpPoints(
   ST_SetEffectiveArea(
    ST_GeometryFromText(
'POLYGON((
0 0,
10 0,
20 0,
20 10,
10 10,
10 0,
0 0
))'
    )
   ,0.1)
)).geom)

Result:
"POINT M (0 0 3.40282346638529e+38)"
"POINT M (20 0 3.40282346638529e+38)"
"POINT M (20 10 3.40282346638529e+38)"
"POINT M (10 10 50)"
"POINT M (10 0 50)"
"POINT M (0 0 3.40282346638529e+38)"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20171015/e7d62c01/attachment.html>


More information about the postgis-devel mailing list