Nathan Vander Wilt schrieb:

On May 28, 2008, at 1:35 PM, Richard Duivenvoorde wrote:
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?
Richard,
there is a good set of (explanations of) algorithms here:

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


If you can treat the earth as a cartesian plane 360 units wide by 180 tall these equations could be used. But be careful here. Lat/lon coordinates actually are based on a more complicated topology. A spherical polygon always encloses a finite area less than the surface area, so the usual method of "checking for negative area" doesn't work out so well.

Our data-model does not support earth as a sphere.

--

Dirk-Lüder "Deelkar" Kreie
Bremen - 53.0952°N 8.8652°E


Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to