[GRASSLIST:1498] Re: bearing/angle
Christian G. Tveen
cgt at navicon.dk
Wed Oct 15 09:33:22 EDT 2003
Thanks.
This assumes that the xy are at a equal distant grid. Looking around the
code, I'm not certain whether some internal variables has this property ?
Regards Christian
Laurent BESSON wrote:
>If your first point P1 as the following coordinates:
>(x1,y1) and your P2 as the coordinates (x2,y2)
>
>You can get the angle by the formula:
>arctan((y2-y1)/(x2-x1))
>
>or alternatively:
>arcsin((x2-x1)/dist)
>
>or
>arccos((y2-y1)/dist)
>
>Can anyone correct me if i'm wrong
>
>Laurent
>
>
>
>On Wed, 15 Oct 2003, Christian G. Tveen wrote:
>
>
>
>>Hello,
>>
>>
>>
>>I need a way to calculate the bearing / angle between two points. To be
>>more precise, I need to know in what direction and how long to go from
>>one point to get to the other. I use the distance functionality to
>>calculate 'how long to go' but need the direction. Is there any
>>functions to do so ? If this is not sufficient information, pls. don't
>>hesitate asking me.
>>
>>
>>Regards
>>
>>Christian G. Tveen
>>
>>
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20031015/981a05f2/attachment.html
More information about the grass-user
mailing list