[OSM-dev] Algorithm help

Ludwig ludwigbrinckmann at gmail.com
Thu May 29 10:54:29 BST 2008


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 <frsantos at gmail.com>:

>
> On Wed, May 28, 2008 at 10:26 PM, Richard Fairhurst <richard at systemed.net>
> 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
> dev at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20080529/53066dd0/attachment.html>


More information about the dev mailing list