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

Sandro Santilli strk at keybit.net
Fri Feb 20 01:11:02 PST 2015

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.



 Sent from our free software

More information about the postgis-devel mailing list