forked from OSGeo/grass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathv.class.html
90 lines (70 loc) · 3.7 KB
/
v.class.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<h2>DESCRIPTION</h2>
<em>v.class</em> classifies vector attribute data into classes, for
example for thematic mapping. Classification can be on a column or on an
expression including several columns, all in the table linked to the
vector map. The user indicates the number of classes desired and the
algorithm to use for classification.
Several algorithms are implemented for classification: equal interval,
standard deviation, quantiles, equal probabilities, and a discontinuities
algorithm developed by Jean-Pierre Grimmeau at the Free University of
Brussels (ULB).
It can be used to pipe class breaks into thematic mapping modules such
as <em>d.vect.thematic</em> (see example below);
<h2>NOTES</h2>
<p>The <em>equal interval</em> algorithm simply divides the range max-min
by the number of breaks to determine the interval between class breaks.
<p>The <em>quantiles</em> algorithm creates classes which all contain
approximately the same number of observations.
<p>The <em>standard deviations</em> algorithm creates class breaks which
are a combination of the mean +/- the standard deviation. It calculates
a scale factor (<1) by which to multiply the standard deviation in
order for all of the class breaks to fall into the range min-max of the
data values.
<p>The <em>equiprobabilites</em> algorithm creates classes that would be
equiprobable if the distribution was normal. If some of the class breaks
fall outside the range min-max of the data values, the algorithm prints
a warning and reduces the number of breaks, but the probabilities used
are those of the number of breaks asked for.
<p>The <em>discont</em> algorithm systematically searches discontinuities
in the slope of the cumulated frequencies curve, by approximating this
curve through straight line segments whose vertices define the class
breaks. The first approximation is a straight line which links the two
end nodes of the curve. This line is then replaced by a two-segmented
polyline whose central node is the point on the curve which is farthest
from the preceding straight line. The point on the curve furthest from
this new polyline is then chosen as a new node to create break up one of
the two preceding segments, and so forth. The problem of the difference
in terms of units between the two axes is solved by rescaling both
amplitudes to an interval between 0 and 1. In the original algorithm,
the process is stopped when the difference between the slopes of the two
new segments is no longer significant (alpha = 0.05). As the slope is
the ratio between the frequency and the amplitude of the corresponding
interval, i.e. its density, this effectively tests whether the frequencies
of the two newly proposed classes are different from those obtained by
simply distributing the sum of their frequencies amongst them in proportion
to the class amplitudes. In the GRASS implementation, the algorithm
continues, but a warning is printed.
<h2>EXAMPLE</h2>
Classify column pop of map communes into 5 classes using quantiles:
<div class="code"><pre>
v.class map=communes column=pop algo=qua nbclasses=5
</pre></div>
This example uses population and area to calculate a population density
and to determine the density classes:
<div class="code"><pre>
v.class map=communes column=pop/area algo=std nbclasses=5
</pre></div>
The following example uses the output of d.class and feeds it directly
into <em>d.vect.thematic</em>:
<div class="code"><pre>
d.vect.thematic -l map=communes2 column=pop/area \
breaks=`v.class -g map=communes2 column=pop/area algo=std nbcla=5` \
colors=0:0:255,50:100:255,255:100:50,255:0:0,156:0:0
</pre></div>
<h2>SEE ALSO</h2>
<em>
<a href="v.univar.html">v.univar</a>,
<a href="d.vect.thematic.html">d.vect.thematic</a>
</em>
<h2>AUTHOR</h2>
Moritz Lennert