[GRASSLIST:10032] Re: which is the best method to calculate the distance between two points?

Odoardo Zecca odoardo.zecca at gmail.com
Sat Jan 28 05:49:40 EST 2006


On 1/27/06, Patricio Antonio Toledo Peña <patricioantoniotoledo at gmail.com>
wrote:
>
> dear grass list,
>
> i have two points, they do not belong to a vector map, i have found that i
> can obtain the distance (in UTM and LAT/LONG locations) with this (ugly)
> trick
>
> grass$ r.profile map=rmap profile=x1,y1,x2,y2 2> temp_file
> grass$ distance=$(awk '/length/{print $4}' < temp_file)
>
> this method needs a query to a raster map, which is unnecessary, is
> something like d.measure available in r.* commands?
>
> Thanks in advance
>
>
>
> --
> Patricio Toledo


Try d.geodesic.

*d.geodesic* - Displays a geodesic line, tracing the shortest distance
between two geographic points along a great circle, in a longitude/latitude
data set. (from the grass 6 manual)

--
Odoardo Zecca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20060128/b3b58c38/attachment.html


More information about the grass-user mailing list