[GRASS-user] import satellite data in Grass

Martina Schaefer smartina at mun.ca
Wed Jun 25 13:14:29 EDT 2008


thanks again.

Hamish wrote:
> Martina:
>>>> What I also want to do, is measure distances and
>>>> angles between objects on my images. For the moment I don't
>>>> really see where to search for this kind of tools. I thought that
>>>> it would be possible to draw lines and measure them and angles
>>>> between them?
> ...
>> d.measure works fine finally for measuring distances (even
>> if I don't get to work the command line d.measure but only
>> the one in menu of the Map Display).
>> But I still don't have an idea about how to measure the
>> angle between two of this drawn lines.
> --this won't work correctly for lat/lon, only projected locations--
Yes, I need the lat/lon files only to print some maps for somebody and 
I'm doing (or at least trying) to do my analysis on the UTM files.

> maybe the easies way is to use d.where (use middle mouse button to draw a line)
> then take the two east and north coordinates:
> # pythag hypot:  a^2 + b^2 = c^2
> distance = sqrt( (e2-e1)^2 + (n2-n1)^2 )
> # angle:  tan(theta) = opposite side of triange / adjacent side
> theta = atan2(n2-n1, e2-e1)
> $radians2deg:
> theta_degrees = theta * 180/pi
> # convert angle counterclockwise-from-east to clockwise-from-north:
> heading = 90 - theta_degrees 
> if(heading < 0)  then  heading = heading + 360
> you could write a little script to process all that from two mouse clicks.
> d.where | awk ...
>  or
> COORDS=`d.where`
> .....
ok,... so there is nothing implemented
I'll see, either I'll write this script or I'll just print a map and 
measure the angles by hand, should be faster and good enough for what we 


More information about the grass-user mailing list