[postgis-users] ST_Simplify

lplateandy andy at centremaps.co.uk
Fri Oct 22 02:33:50 PDT 2010


Hi Kevin,

Hopefully the attached (hopefully) PDF will help to show what i mean.

In producing the PDF i think i can see why the issue happens. It seems that
the start and end point of the polygon geometery are the node i was hoping
might be removed during the simplify process.

Not sure if there is a way around this?

I do realise there are ways for a simple rectangle etc to fix this but the
example is mainly for illustration as the issue is a problem in more complex
geometries.

Thanks

Andy


Kevin Neufeld wrote:
> 
> Hi Andy,
> 
> Can you post a small example?
> -- Kevin
> 
> 
> On 10/21/2010 10:02 AM, lplateandy wrote:
>> 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
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
> 
http://old.nabble.com/file/p30027046/ST_simplify_issue.pdf
ST_simplify_issue.pdf 
-- 
View this message in context: http://old.nabble.com/ST_Simplify-tp30021514p30027046.html
Sent from the PostGIS - User mailing list archive at Nabble.com.




More information about the postgis-users mailing list