Hi,

yes, the Simplify() command is an implementation of the Douglas-Poiker algorithm. This algorithm is direction dependent, which is a problem in Postgis, which stores edges in polygon mosaics twice.

I've just recently discussed this issue with a colleague, who is currently looking into implementing an alternative simplify algorithm which delivers the same results regardless of directionality. The problem is that in a polygon mosaic one has to be sure not to remove nodes where 2 or more polygons join/depart. This relates to a previous post I asked, how to detect nodes in a polygon mosaic. The algorithm would have to read in a list of nodes. These nodes aren't allowed to be removed by the algorithm.

Another option would be to generate a topology and store the edges only once. There is some early work on topology in Postgis (dated from 2005), but I don't know if anyone is actively working on this?

Anyway, my colleague is looking into this issue. He is starting to work on this in a couple days. I will send a note to this list, if something useful is available.

If someone has other ideas how to solve the problem, I'd be happy to hear.

Andreas



Dane Blakely Springmeyer wrote:
A question regarding the function ST_Simplify:

I have a postgis layer of watershed polygons that I would like to simplify, yet while keeping all shared edges. In other words, I'd like to remove vertices along shared boundaries without creating gaps between adjacent polygons. I'm no expert in how the Douglas-Peuker algorithm works, but I found this past postgis-users thread:

[postgis-users] Simplify() and direction dependency
http://postgis.refractions.net/pipermail/postgis-users/2005-January/006590.html

It seems that directionality of the lines making up the multigeometry may cause gaps or slivers between polygons in cases. Whether or not this is the correct explanation, it IS what am experiencing. Perhaps this could be avoided by fixing the input data, but short of modifying the directionality of my data, are there any other functions or ideas regarding the ST_simplify command that might be helpful here?

Details: Postgis 1.3.1 build on Mac Os 10.4 with postgresql 8.2.5 using multipolygon data imported from shapefile.

A graphic to illustrate the slivers is attached: dark black line is raw dataset, blue polygons on top are simplified using 5000 as tolerance.

Thanks,

Dane


------------------------------------------------------------------------



------------------------------------------------------------------------

_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

--

--
Andreas Neumann
Böschacherstrasse 6
CH-8624 Grüt (Gossau ZH)
Switzerland
Phone: ++41-44-2736668
Email: [EMAIL PROTECTED]

Web: http://www.carto.net/neumann/
SVG Examples: http://www.carto.net/papers/svg/samples/
SVG.Open: http://www.svgopen.org/
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to