One usually computes the midpoint along the great circle
then compares the distance it is from the straight line
between the endpoints and recursively does this for the 
resulting segments until the error term is 'good enough.

The algorithm goes something like

DrawGreatCircle(error,pt1,pt2,style):

 proj_pt1 = WorldToDevice(ProjFwd(pt1))
 proj_pt2 = WorldToDevice(ProjFwd(pt2))
 mid_pt   = MidPointGreatCircle(pt1,pt2)
 proj_mid = WorldToDevice(ProjFwd(mid_pt))

 if distPointLine2D (proj_mid, Line2D(proj_pt1,proj_pt2)) < error:
    DrawLine(proj_pt1,proj_pt2,style)
 else:
    DrawGreatCircle(error,pt1,mid_pt)
    DrawGreatCircle(error,mid_pt,pt2)

http://williams.best.vwh.net/avform.htm#Intermediate
 
HTH
 
Norman

_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to