Richard Fairhurst wrote:
> Can anybody point me in the direction of an algorithm that will  
> determine whether a closed way (polyline) is clockwise or anti- 
> clockwise?
> 
> cheers
> Richard
> 
> _______________________________________________
> dev mailing list
> dev@openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev

Richard,
there is a good set of (explanations of) algorithms here:

http://www.faqs.org/faqs/graphics/algorithms-faq/

There is no copy and paste code there, but the explanation how to do it 
in "Subject 2.07: How do I find the orientation of a simple polygon?" 
can maybe help you further?

Richard Duivenvoorde

_______________________________________________
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev

Reply via email to