distance -Reply

You may want to get the program r.distance.

GRASS 4.1 > r.distance help

Usage:

>r.distance [-lq] maps=map1,map2 [fs=name]

Flags:
-l include category labels in the output
-q run quietly

Parameters:
maps maps for computing inter-class distances
   fs output field separator
        default: :

Here is an example of the output:

GRASS 4.1 > r.distance -l maps=dist,dist
Reading map dist@jackson ... 100%
Reading map dist@jackson ... 100%
Processing...
1:1:0:693510:3600110:693510:3600110:1:1
1:2:5942.6929922385:695390:3588470:696490:3582630:1:2
2:1:5942.6929922385:696490:3582630:695390:3588470:2:1
..etc

You should be able to get the program off moon.

Bill Jackson
ENL
USA-CERL

Bill, I couldn't find r.distance on the moon, at least in incoming. Also, Im
not sure it does what I want. From the example above, it looks like
r.distance outputs distances between sets of features in two maps. I
want to end up with a new map whose cell values are the distances to
the nearest specified feature, in my case the nearest distance to a road.
Am I missing something? Jerry Nelson