~ubuntu-branches/ubuntu/wily/grass/wily

« back to all changes in this revision

Viewing changes to raster/r.distance/description.html

Tags: 7.0.0~rc1+ds1-1~exp1
* New upstream release candidate.
* Repack upstream tarball, remove precompiled Python objects.
* Add upstream metadata.
* Update gbp.conf and Vcs-Git URL to use the experimental branch.
* Update watch file for GRASS 7.0.
* Drop build dependencies for Tcl/Tk, add build dependencies:
  python-numpy, libnetcdf-dev, netcdf-bin, libblas-dev, liblapack-dev
* Update Vcs-Browser URL to use cgit instead of gitweb.
* Update paths to use grass70.
* Add configure options: --with-netcdf, --with-blas, --with-lapack,
  remove --with-tcltk-includes.
* Update patches for GRASS 7.
* Update copyright file, changes:
  - Update copyright years
  - Group files by license
  - Remove unused license sections
* Add patches for various typos.
* Fix desktop file with patch instead of d/rules.
* Use minimal dh rules.
* Bump Standards-Version to 3.9.6, no changes.
* Use dpkg-maintscript-helper to replace directories with symlinks.
  (closes: #776349)
* Update my email to use @debian.org address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<h2>DESCRIPTION</h2>
2
 
 
3
 
<em>r.distance</em> locates the closest points between "objects" in two raster maps.  An
4
 
"object" is defined as all the grid cells that have the same category
5
 
number, and closest means having the shortest "straight-line" distance.
6
 
The cell centers are considered for the distance calculation (two
7
 
adjacent grid cells have the distance between their cell centers).
8
 
<p>
9
 
 
10
 
The output is an ascii list, one line per pair of objects, in the following form:
11
 
<div class="code"><pre>
12
 
cat1:cat2:distance:east1:north1:east2:north2
13
 
</pre></div>
14
 
 
15
 
<dl>
16
 
<dt><b>cat1</b>
17
 
<dd>Category number from map1
18
 
 
19
 
<dt><b>cat2</b>
20
 
<dd>Category number from map2
21
 
 
22
 
<dt><b>distance</b>
23
 
<dd>The distance in meters between "cat1" and "cat2"
24
 
 
25
 
<dt><b>east1,north1</b>
26
 
<dd>The coordinates of the grid cell "cat1" which is closest to "cat2"
27
 
 
28
 
<dt><b>east2,north2</b>
29
 
<dd>The coordinates of the grid cell "cat2" which is closest to "cat1"
30
 
</dl>
31
 
 
32
 
<h3>Flags</h3>
33
 
<b>-l</b> 
34
 
The -l flag outputs the category labels of the matched raster objects at the 
35
 
beginning of the line, if they exist.
36
 
<p>
37
 
<b>-o</b>
38
 
The -o flag reports zero distance if the input rasters are overlapping.
39
 
<p>
40
 
 
41
 
<h2>NOTES</h2>
42
 
The output format lends itself to filtering.  For example, to "see" lines
43
 
connecting each of the category pairs in two maps, filter the output using
44
 
awk and then into <em>d.graph</em>:
45
 
<p>
46
 
 
47
 
<div class="code"><pre>r.distance maps=map1,map2 | \
48
 
awk -F: '{print "move",$4,$5,"\ndraw",$6,$7}' | d.graph -m</pre></div>
49
 
 
50
 
<p>
51
 
To create a vector map of all the "map1" coordinates, filter the output into
52
 
awk and then into <em>v.in.ascii</em>:
53
 
<p>
54
 
 
55
 
<div class="code"><pre>r.distance maps=map1,map2 | \
56
 
<br>awk -F: '{print $4,$5}' | v.in.ascii format=point output=name fs=space</pre></div>
57
 
 
58
 
<h2>SEE ALSO</h2>
59
 
<em><a href="r.buffer.html">r.buffer</a></em>,
60
 
<em><a href="r.cost.html">r.cost</a></em>,
61
 
<em><a href="r.drain.html">r.drain</a></em>,
62
 
<em><a href="v.distance.html">v.distance</a></em>
63
 
 
64
 
<h2>AUTHOR</h2>
65
 
Michael Shapiro, U.S. Army Construction Engineering Research Laboratory
66
 
 
67
 
<p><i>Last changed: $Date: 2008-05-13 21:22:32 +0200 (Tue, 13 May 2008) $</i></p>