[GRASS-user] v.colors rules
Nikos Alexandris
nikos.alexandris at felis.uni-freiburg.de
Mon Feb 9 07:37:17 EST 2009
On Mon, 2009-02-09 at 12:12 +0100, Paolo Craveri wrote:
> Hi to all
>
> How v.colors with option rules works ?
>
> I tried:
>
> cat color.txt
> 1 red
> 2 green
> 3 blue
> 4 orange
> 5 purple
>
> v.db.select mypoints
> cat
> 5
> 1
> 4
> 3
> 2
>
> v.colors map=mypoints column=cat rules=color.txt
> ERROR: Pick one of color, rules, or raster options
>
> v.colors map=mypoints color=rules column=cat rules=color.txt
> ERROR: value <rules> out of range for parameter <color>
>
> v.colors map=mypoints color=rules.txt
> ERROR: value <rules.txt> out of range for parameter <color>
>
>
> Thanks
> --
Ciao Paolo.
It doesn't work for me either!
Nikos
=============================================================
# query samples_unburned6 for unique values in the 2nd column
v.db.select samples_unburned6 | cut -d"|" -f2 | sort -u
1
3
332
5
value
# v.colors with random (or other) colors works just fine
v.colors samples_unburned6 column=value color=random
# v.colors "rules=" or "raster" fails
# first the *rules*
cat samples_color.rules
-333 255:0:0
-331 0:255:0
1 255:0:0
2 255:255:0
3 0:255:0
5 0:0:255
332 200:200:200
334 0:0:0
# try to use "rules="
v.colors samples_unburned6 column=value rules=samples_color.rules
ERROR: Pick one of color, rules, or raster options
# list the colr file for some raster map
cat training_6_prefire
% -333 334
-333:255:0:0 -331:0:255:0
-331:0:255:0 1:255:0:0
1:255:0:0 2:255:255:0
2:255:255:0 3:0:255:0
3:0:255:0 5:0:0:255
5:0:0:255 332:200
332:200 334:0
# try to use "raster="
v.colors samples_unburned6 column=value raster=training_6_prefire
ERROR: Pick one of color, rules, or raster options
==================================================================
More information about the grass-user
mailing list