[postgis-devel] topology : finding if the ring is an inner ring or outer ring

Rémi Cura remi.cura at gmail.com
Fri Feb 20 02:26:16 PST 2015


Thanks,
I wanted to avoid the computing of winding.

But now I doubt it is possible.
Instead of winding I chose to compute signed area, because I'm afraid
robust winding may be difficult.

As a workaround, I wrote a function
<https://github.com/Remi-C/PPPP_utilities/blob/master/postgis_topology/editing_in_qgis/rc_computeRingOrder.sql>that
compute the signed area of a ring,
and that is robust to precision issue.

Now I still have trouble getting the correct ring because the function
topology.getRingEdge doesn't return the correct ring in one case.

I do have a workaround for this, which I will attach to the ticket.

Cheers,
Rémi-C

2015-02-20 10:11 GMT+01:00 Sandro Santilli <strk at keybit.net>:

> On Thu, Feb 19, 2015 at 07:04:44PM +0100, Rémi Cura wrote:
> > Hello,
> > somebody knows how to find the information?
> >
> > I can't find something that will reliabily work with flat ring.
>
> Get on the side of the edge where the face you're interested in is found.
> Walk on that side of the edge until you end back to where you started
> (follow the first edge direction if on its left, opposite direction
> otherwise).
>
> Compute winding of the resulting ring.
> An inner ring of the face in object would be ordered counterclockwise.
> The shell would be clockwise.
>
> http://strk.keybit.net/blog/2012/01/28/a-walk-on-the-wild-side/
>
> --strk;
>
>  Sent from our free software
>  http://www.gnu.org/philosophy/free-sw.html
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20150220/a048f85a/attachment.html>


More information about the postgis-devel mailing list