Tom Evans schrieb:
Our data-model does not support earth as a sphere.
Uh? The data model supports it fine as far as I can see.
Yes, virtually all the tools don't, because it isn't a problem so far (and is
harder...). But they could be improved in the future and the data model would
be
Consider a way from 0°, -189.999° to 0°, 180°. that is, in our current
datamodel, a way that's roughly 40,000 km long.
No. In the datamodel, it's just a way between two nodes.
The nodes are defined in lat, lon, effectively in spherical co-ordinates,
hence them being angles. (ignoring
if the polygon is p1,p2,p3,p4...
c = centre point of polygon
v1 = the vector from c to p1 (p1 - c)
v2 = the vector from c to p2 (p2 - c)
take the cross product of v1 and v2
http://en.wikipedia.org/wiki/Cross_Product
if its positive in the z axis its one way, if its negative its the
On 28 May 2008, at 21:35, 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?
cheers
Richard
___
dev
SteveC wrote:
On 28 May 2008, at 21:35, 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?
cheers
Richard
On 29 May 2008, at 09:47, Richard Duivenvoorde wrote:
SteveC wrote:
On 28 May 2008, at 21:35, 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?
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
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:
SteveC wrote:
On 29 May 2008, at 11:08, Richard Fairhurst wrote:
For anyone interested, this is the code I committed at silly o'clock
last night:
[...]
its amazing any of that works
How so?
cheers
Richard
___
dev mailing list
SteveC wrote:
it's like reading undocumented assembler!
I could do that if it helps?
ld hl,table: call BD58
ld hl,BD2B: ld de,mc_pc: ld bc,mc_pco: call patch
ld hl,BD31: ld de,mc_sp: ld bc,mc_spo: call patch
ld hl,BDF1: ld de,mc_wp: ld bc,mc_wpo: jp patch
Our data-model does not support earth as a sphere.
Uh? The data model supports it fine as far as I can see.
Yes, virtually all the tools don't, because it isn't a problem so far (and is
harder...). But they could be improved in the future and the data model would
be fine. Or am I missing
On 29 May 2008, at 13:17, Dave Stubbs wrote:
On Thu, May 29, 2008 at 9:07 AM, SteveC [EMAIL PROTECTED] wrote:
if the polygon is p1,p2,p3,p4...
c = centre point of polygon
v1 = the vector from c to p1 (p1 - c)
v2 = the vector from c to p2 (p2 - c)
take the cross product of v1 and v2
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
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
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:
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
Thanks Richard and Nathan for the pointers - really appreciated. I
think I've got it now.
Nathan Vander Wilt wrote:
[...]
That said, I'm guessing there are other assumptions being made
within OSM that break down under spherical geometry. If your polygon
doesn't contain pole(s) or cross
17 matches
Mail list logo