- determining if great circle segments intersect

Joseph Bussell joe at OTSYS.COM
Thu Mar 10 13:21:33 EST 2005


The euclidean version will not apply.

Great circle segments are well defined as their center points are always
at the center of the planet.  The 2D case is a simple case of solving
simultaneous equations.  The spherical case is likewise solvable in that
manner, but not efficiently.

Thanks for replying though.

Cordially,

Joe Bussell


blaise wrote:

>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