The Geos Library has a method isCCW (counterclockwise) - (
http://geos.refractions.net/ro/doxygen_docs/html/classgeos_1_1algorithm_1_1CGAlgorithms.html
).

Unfortunately this algorithm is not exposed in the Geos C API (only the C++
API), and thus not available in the Python etc bindings - but the code is
LGPL.

HTH

Ludwig


2008/5/29 Francisco R. Santos <[EMAIL PROTECTED]>:

>
> On Wed, May 28, 2008 at 10:26 PM, Richard Fairhurst <[EMAIL PROTECTED]>
> wrote:
>
>> Can anybody point me in the direction of an algorithm that will
>> determine whether a closed way (polyline) is clockwise or anti-
>> clockwise?
>>
>
> Take a look at this:
>
>
> http://geometryalgorithms.com/Archive/algorithm_0101/algorithm_0101.htm#orientation2D_polygon()<http://geometryalgorithms.com/Archive/algorithm_0101/algorithm_0101.htm#orientation2D_polygon%28%29>
>
> Regards,
> Quico
>
>
> _______________________________________________
> dev mailing list
> [email protected]
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev
>
>
_______________________________________________
dev mailing list
[email protected]
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev

Reply via email to