~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to scripts/v.rast.stats/v.rast.stats.html

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<h2>DESCRIPTION</h2>
 
2
 
 
3
<em>v.rast.stats</em> calculates basic univariate statistics from
 
4
a raster map only for the parts covered by the specified vector map.
 
5
The vector map will be rasterized according to the raster map resolution.
 
6
Then univariate statistics are calculated per vector category (cat) from
 
7
the raster map and the results uploaded to the vector map attribute table.
 
8
A new column is generated in the attribute table for each statistic requested 
 
9
in <b>method</b> (if not already present).
 
10
 
 
11
<h2>NOTES</h2>
 
12
<em>v.rast.stats</em> is only meaningful for lines or polygons.
 
13
<p> 
 
14
The module may take a long time to run if the raster region contains a large
 
15
number of cells. In this case the <b>--verbose</b> flag may be used to track
 
16
progress.
 
17
<p>The script stops if a (prefixed) upload column is already present in the
 
18
vector map attribute table, unless otherwise instructed with the <b>-c</b>
 
19
continue flag. The column prefix will be separated from the statistic name
 
20
with an underscore. For example with a prefix of "<tt>elev</tt>" the sum
 
21
column will be named <tt>elev_sum</tt>.
 
22
<p>If a DBF database is being used, note that column names are restricted by the
 
23
DBF specification to 10 characters. Therefore it is advised to be economical
 
24
in the use of the column prefix when using DBF as any additional characters
 
25
will be chopped off.
 
26
<p>If a MASK is present, it will be restored after the script finished.
 
27
The script changes temporarily to the resolution of the given raster map.
 
28
<p><!-- r.univar limitation -->
 
29
Large amounts of system memory can be used when extended statistics 
 
30
(<em>first_quartile,median,third_quartile,percentile </em>) are being requested 
 
31
with a very large region setting. If the region is too large the module 
 
32
should display memory allocation errors. Basic statistics can be calculated 
 
33
using any size input region.
 
34
 
 
35
<h2>EXAMPLES</h2>
 
36
 
 
37
Example to upload DEM statistics to ZIP codes vector map
 
38
(North Carolina sample dataset):
 
39
 
 
40
<div class="code"><pre>
 
41
g.copy vect=zipcodes_wake,myzipcodes_wake
 
42
# set computational region to DEM:
 
43
g.region raster=elevation -p
 
44
# calculate DEM statistics, upload to vector map table:
 
45
v.rast.stats myzipcodes_wake raster=elevation \
 
46
  column_prefix=elev method=minimum,maximum,average,stddev,percentile \
 
47
  percentile=95
 
48
# verify results:
 
49
v.info -c myzipcodes_wake
 
50
v.db.select myzipcodes_wake
 
51
v.univar myzipcodes_wake column=elev_range type=centroid
 
52
</pre></div>
 
53
 
 
54
<h2>SEE ALSO</h2>
 
55
 
 
56
<em>
 
57
<a href="r.univar.html">r.univar</a>, 
 
58
<a href="v.univar.html">v.univar</a>,
 
59
<a href="v.vect.stats.html">v.vect.stats</a>,
 
60
<a href="v.what.rast.html">v.what.rast</a>,
 
61
<a href="v.what.rast3.html">v.what.rast3</a>,
 
62
<a href="v.what.vect.html">v.what.vect</a>
 
63
</em>
 
64
 
 
65
<h2>AUTHOR</h2>
 
66
 
 
67
Markus Neteler, CEA (for the <a href="http://www.eden-fp6project.net/">EDEN EU/FP6 Project</a>)
 
68
 
 
69
<p><i>Last changed: $Date: 2014-12-19 22:55:37 +0100 (Fri, 19 Dec 2014) $</i>