[postgis-users] ST_Simplify

lplateandy andy at centremaps.co.uk
Thu Oct 21 10:02:28 PDT 2010


Hi,

I have, in the simplest example, a square polygon of 1 by 1 kilometer size
with nodes every 25 meters.

I can use ST_Simplify (the_geom,5) to remove most of the points.

However, for some reason i end up with the four corner nodes and a fifth
node 25m clockwise from the top left corner.

In itself, this would be fine - 5 nodes is better than 160.

However, on some of the polygons, there are more complex boundaries which i
wish to smooth out using simplify. I would do this with  ST_Simplify
(the_geom,26) example - going over the minimum 25 metres between  any nodes.

In the example of the square with 5 nodes, the problem i find then is that
the top left node is removed and the one 25m clockwise remains. The result
is that i no longer have a 1km square but sloping Western boundary correctly
going 1km North South but incorrectly veering across 25m to the East.

Is there a way to remove the stray node so i am more likely to maintain my
overall polygon shape. I did try st_simplifiypreservetopology but saw no
noticeable difference.

Hope that makes sense, any help much appreciated

Andy
-- 
View this message in context: http://old.nabble.com/ST_Simplify-tp30021514p30021514.html
Sent from the PostGIS - User mailing list archive at Nabble.com.




More information about the postgis-users mailing list