[OSM-dev] Algorithm help
Dirk-Lüder Kreie
osm-list at deelkar.net
Thu May 29 01:11:08 BST 2008
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20080529/937251aa/attachment.pgp>
More information about the dev
mailing list