# [postgis-users] simplifying a polygon

pcreso at pcreso.com pcreso at pcreso.com
Fri Apr 6 15:04:28 PDT 2012

```Hi Dave,

I would have thought ST_Simplify() would met your requirements.

If you use it with a buffer distance of zero, then the full resolution is retained, but any points on a straight boundary segment which are redundant are removed. This is the minimum number of vertices required to define the polygon in full resolution.

You can progressively remove vertices which make least changes to the polygon definition by increasing the buffer distance, but where boundaries are shared between neighbouring polygons this can cause mis-alignments.

Cheers,

Brent Wood

--- On Sat, 4/7/12, Dave Potts <dave.potts at pinan.co.uk> wrote:

From: Dave Potts <dave.potts at pinan.co.uk>
Subject: [postgis-users] simplifying a polygon
To: postgis-users at postgis.refractions.net
Date: Saturday, April 7, 2012, 9:52 AM

I have polygon made up of many different points,it some cases its rather
to accurate for my requirments,i.e. its generating a lot points to
describe a minor change.

I had throught that by saying something like

select ((st_dumppoints(
(st_intersection(ST_Segmentize(st_exteriorRing(jt.the_Geom),70000),pa.the_geom))
)).geom) as the_geom from
journey_table jt, coast_polygon  pa where  jt.generation=1

Would give me minmum list of data points for describing a polygon.  What
it does give me long gap, 3 coordinates, another long grap then another 3
coorindates etc

Where these 3 coordinates are they close together.  What I had hope to get
list the lowest number points that would be useful to describe a polygon.

Q.  Is there a better way of doing this.

Dave.

_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120406/e32bab1e/attachment.html>
```