[postgis-users] A question on ST_RemEdgeModFace usability

Andrea Peri aperi2007 at gmail.com
Fri Apr 13 12:10:14 PDT 2012

>Hi Andrea,
>What you mean for "standard solution"?
>IMO, removing the sliver polygons is not an easy operation!
>There are several alternatives to do that!
>in GRASS you could use module v.clean;
>in PostGIS you could use filter "smaller than a given area" in WHERE
Every ennvironment has their specificy solution.
In postgis topology:
it is a ISO Topology so youi should use only the methos given from the
the ISO Topology.

ISO don't give any method to remove directly a face.
If you like to remove a face you simply erase the edges that define it.

If you remove 1 edge you open the face merging it with the other near
face creating a new face (with new idface or not).

>again in PostGIS: [1]
I speak remove a sliver polygon in a topology environment.
Removing a sliver polygon in a topology environment mean not only
remove it, but also fill the empty give from the removed polygon with
anyone, or in other words,
That phase (refill the empty) could be difficult if you don't work in
a topology edge-node.
Because the boundaries could be overlapping each-other or leave micro-holes.

The method you refer is in a simple-feature environment so it use the
available methos and functions.
In a topology environment the solution to remove a sliver is not only
more simply, but also more powerful.

Infact often an user should need to decide it how remove the sliver ,
chhosing what edge it agree to remove.

Please notice the standard solution , don't mean the fast solution or
the simpler solution. :)
The topology is more powerful, but this powerful need to be used
without lost the precision of the dataset otherwise it is unuseful.

See this example:

suppose you has this situation:

     |             |                 |
     |            / \                |
     |           e1  e2              |
     |           \   /               |
     |            \ /                |
     |             |                 |
     |             |                 |
     |             |                 |

You want remove this sliver polygon, but you could need to decide what
of the two edge (e1 or e2)
is the right edge to remove to do better result.

If you remove the e1 you will have this result:

     |             |                 |
     |              \                |
     |               e2              |
     |               /               |
     |              /                |
     |             |                 |
     |             |                 |
     |             |                 |

or this other result

     |             |                 |
     |            /                  |
     |           e1                  |
     |           \                   |
     |            \                  |
     |             |                 |
     |             |                 |
     |             |                 |

With the ST_RemEdgeModFace() you could choose what of the two edge remove
removing also the sliver polygon.

For example you could know that the e2 edge is the really boundary of
the object you want to preserve and the otehr edge (e1) is a
spurious edge that you want to remove.
so you do a ST_RemEdgeModFace(e1), so you have removed the edge that
you want to remove and also has removed the sliver polygon.
This is really good.

This is the standard solution as I mean to remove a sliver in a
topology environment.

Surely in particular situations you could apply a programmatic
approach, but always using the ST_RemEdgeModFace().
If you want work in a topology environment.



>So, there is no standard procedure for the solution to removing slivers
>Also this could be interesting [2]! Thinking of a tool for QGIS!
>[1] ->http://gis.hsr.ch/wiki/index.php?title=PostGIS_-_Tipps_und_Tricks&setlang=en#Eliminate_sliver_polygons <http://gis.hsr.ch/wiki/index.php?title=PostGIS_-_Tipps_und_Tricks&setlang=en#Eliminate_sliver_polygons>
> [2] - http://docs.bentley.com/en/PowerMap/geooutlkhelp327.html

Andrea Peri
. . . . . . . . .
qwerty àèìòù
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120413/e07d1b82/attachment.html>

More information about the postgis-users mailing list