[GRASS-user] Question about the use of d.vect.thematic
hamish_b at yahoo.com
Thu Mar 18 21:02:03 EDT 2010
> I am trying to use d.vect.thematic to create a thematic map
> where the vector polygons are filled with a color dependent
> on an attribute value, swe, which is of type 'real'. I am
> using sqlite as the db driver. The swe attribute was added
> to my vector map using v.db.join, which worked fine. I can
> query the map and see that the swe values are correct.
> However, when I use d.vect.thematic, I get the following
> Column <swe> is of type <real> which is not numeric.
probable bug in d.vect.thematic which only know integer and
> I don't understand; I guess there are subtle nuances with
> these data type considerations which I don't yet appreciate.
> When I created my sqlite db and table, should I have read-in
> the data as a different type? If so, what?
my advice if you have less than 30,000 area features is to use
the new v.colors scripts to add a new GRASSRGB column with
colors, then use 'd.vect -a'. Maybe it is possible to use
d.vect's new zcolor= option, but that is more for points data
of course v.colors suffers from the same lack of imagination
and so will need an edit to work with "REAL" types.
look for a line like this:
(v.colors, but d.vect.thematic is similar)
elif [ "$NCOLUMN_TYPE" != "INTEGER" ] && [ "$NCOLUMN_TYPE" != "DOUBLE PRECISION" ] ; then
g.message -e "Column <$GIS_OPT_COLUMN> is not numeric"
and try adding
&& [ "$NCOLUMN_TYPE" != "REAL" ]
to the test. (edit to match local conditions)
More information about the grass-user