- determining if great circle segments intersect
blaise
bpicinbono at WORLDONLINE.FR
Thu Mar 10 07:05:22 PST 2005
Hi Joe,
First : you'll need to fully define your circle segments : sarting and ending
points are not enough, you can have an infinite number of circle segments
passing by : you need another parameter such as center of circle.
Second : you mean circle segments on the earth surface ? Well, this is 3D
geometry; i don't know if lat/lon coordinate system will be the easier to
work with... ?
Third : for 2D plane geometry, I found this page :
http://perso.wanadoo.fr/math.15873/IntCercl.html
It's in french but math is kind of international langage, you will understand
it very easily. It deals with entire circles, but you should adapt it to
segment easily.
hope it'll help
Blaise
Le mercredi 9 Mars 2005 22:28, Joseph Bussell a écrit :
> Greetings Group,
> Could someone please offer an efficient algorithm for determining if
> two great circle segments intersect?
> Specifically, given:
> Segment A (startLatA,startLonA) - (destLatA, destLonA)
> &
> Segment B (startLatB,startLonB) - (destLatB, destLonB)
>
> bool intersects( Segment& A, Segment& B )
> {
> ???
> }
>
> All I want to know is if they share a point. A bonus would be knowing
> where that point is.
>
> Cordially,
>
> Joe Bussell
> On Time Systems
More information about the MapServer-users
mailing list