|
@@ -101,6 +101,7 @@ Query information from selected point(s). <em>v.distance</em> takes
|
|
points from a vector map as input instead of stdin. A new vector map
|
|
points from a vector map as input instead of stdin. A new vector map
|
|
with query points has to be created before the map can be analysed.
|
|
with query points has to be created before the map can be analysed.
|
|
<p>
|
|
<p>
|
|
|
|
+
|
|
Create query map (if not present):
|
|
Create query map (if not present):
|
|
|
|
|
|
<div class="code"><pre>
|
|
<div class="code"><pre>
|
|
@@ -159,14 +160,46 @@ v.to.db map=vdistance_vectors option=length column=length
|
|
v.univar vdistance_vectors column=length
|
|
v.univar vdistance_vectors column=length
|
|
</pre></div>
|
|
</pre></div>
|
|
|
|
|
|
|
|
+<h3>Print distance between points</h3>
|
|
|
|
+
|
|
|
|
+Example for a Latitude-longitude location (EPSG 4326):
|
|
|
|
+<div class="code"><pre>
|
|
|
|
+# points along the equator
|
|
|
|
+echo "0|-61|1" | v.in.ascii output=pnt1 input=-
|
|
|
|
+echo "0|-58|1" | v.in.ascii output=pnt2 input=-
|
|
|
|
+
|
|
|
|
+# here, distances is in degree units
|
|
|
|
+v.distance from=pnt1 to=pnt2 upload=dist col=distance -p --q
|
|
|
|
+from_cat|distance
|
|
|
|
+1|3
|
|
|
|
+</pre></div>
|
|
|
|
+
|
|
<h3>Print distance matrix</h3>
|
|
<h3>Print distance matrix</h3>
|
|
|
|
|
|
|
|
+Note: Matrix-style output is enabled only for flag <em>-a</em> and one
|
|
|
|
+given upload option.
|
|
|
|
+<p>
|
|
|
|
+Spearfish sample data location:
|
|
<div class="code"><pre>
|
|
<div class="code"><pre>
|
|
v.distance -pa from=archsites to=archsites upload=dist col=dist
|
|
v.distance -pa from=archsites to=archsites upload=dist col=dist
|
|
</pre></div>
|
|
</pre></div>
|
|
|
|
|
|
-Note: Matrix-like output is enabled only for flag <b>-a</b> and one
|
|
|
|
-given upload option.
|
|
|
|
|
|
+<p>
|
|
|
|
+North Carolina sample data location:
|
|
|
|
+
|
|
|
|
+<div class="code"><pre>
|
|
|
|
+v.distance -pa from=hospitals to=hospitals upload=dist \
|
|
|
|
+ col=dist separator=comma
|
|
|
|
+from_cat to_cat dist
|
|
|
|
+ 1 2 3 4 5 ...
|
|
|
|
+1 0 7489.10 339112.17 70900.39 70406.23 ...
|
|
|
|
+2 7489.10 0 345749.12 76025.46 75538.87 ...
|
|
|
|
+3 339112.17 345749.12 0 274153.19 274558.98 ...
|
|
|
|
+4 70900.39 76025.46 274153.19 0 501.11 ...
|
|
|
|
+5 70406.23 75538.87 274558.98 501.11 0 ...
|
|
|
|
+...
|
|
|
|
+</pre></div>
|
|
|
|
+
|
|
|
|
|
|
<h2>SEE ALSO</h2>
|
|
<h2>SEE ALSO</h2>
|
|
|
|
|
|
@@ -177,7 +210,7 @@ given upload option.
|
|
</em>
|
|
</em>
|
|
|
|
|
|
|
|
|
|
-<h2>AUTHOR</h2>
|
|
|
|
|
|
+<h2>AUTHORS</h2>
|
|
|
|
|
|
Janne Soimasuo 1994, University of Joensuu, Faculty of Forestry, Finland<br>
|
|
Janne Soimasuo 1994, University of Joensuu, Faculty of Forestry, Finland<br>
|
|
Cmd line coordinates support: Markus Neteler, ITC-irst, Trento, Italy<br>
|
|
Cmd line coordinates support: Markus Neteler, ITC-irst, Trento, Italy<br>
|