GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
v.colors(1) Grass User's Manual v.colors(1)

v.colors - Creates/modifies the color table associated with a vector map.

vector, color table

v.colors
 
v.colors --help
 
v.colors [-rwlngac] map=name [layer=string] use=string [column=name] [ range=min,max] [color=style] [ raster=name] [raster_3d=name] [ rules=name] [rgb_column=name] [--help] [--verbose] [--quiet] [-- ui]

-r
 
Remove existing color table
-w
 
Only write new color table if it does not already exist
-l
 
List available rules then exit
-n
 
Invert colors
-g
 
Logarithmic scaling
-a
 
Logarithmic-absolute scaling
-c
 
Convert color rules from RGB values to color table
 
Option ’rgb_column’ with valid RGB values required
--help
 
Print usage summary
--verbose
 
Verbose module output
--quiet
 
Quiet module output
--ui
 
Force launching GUI dialog

map=name [required]
 
Name of vector map
 
Or data source for direct OGR access
layer=string
 
Layer number or name
 
Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.
 
Default: 1
use=string [required]
 
Source values
 
Options: attr, cat, z
 
Default: cat
 
attr: read values from attribute table (requires <column> option)
 
cat: use category values
 
z: use z coordinate (3D points or centroids only)
column=name
 
Name of column containing numeric data
 
Required for use=attr
range=min,max
 
Manually set range (refers to ’column’ option)
 
Ignored when ’rules’ given
color=style
 
Name of color table
 
Options: aspect, aspect.bak, aspectcolr, aspectcolr.bak, bcyr, bcyr.bak, bgyr, bgyr.bak, blues, blues.bak, byg, byg.bak, byr, byr.bak, celsius, celsius.bak, corine, corine.bak, curvature, curvature.bak, differences, differences.bak, elevation, elevation.bak, etopo2, etopo2.bak, evi, evi.bak, fahrenheit, fahrenheit.bak, gdd, gdd.bak, grass, grass.bak, greens, greens.bak, grey, grey.bak, grey.eq, grey.log, grey1.0, grey1.0.bak, grey255, grey255.bak, gyr, gyr.bak, haxby, haxby.bak, kelvin, kelvin.bak, ndvi, ndvi.bak, ndwi, ndwi.bak, oranges, oranges.bak, population, population.bak, population_dens, population_dens.bak, precipitation, precipitation.bak, precipitation_daily, precipitation_daily.bak, precipitation_monthly, precipitation_monthly.bak, rainbow, rainbow.bak, ramp, ramp.bak, random, reds, reds.bak, roygbiv, roygbiv.bak, rstcurv, rstcurv.bak, ryb, ryb.bak, ryg, ryg.bak, sepia, sepia.bak, slope, slope.bak, soilmoisture, soilmoisture.bak, srtm, srtm.bak, srtm_plus, srtm_plus.bak, terrain, terrain.bak, viridis, viridis.bak, water, water.bak, wave, wave.bak
 
aspect: aspect oriented grey colors
 
aspect.bak: no description
 
aspectcolr: aspect oriented rainbow colors
 
aspectcolr.bak: no description
 
bcyr: blue through cyan through yellow to red
 
bcyr.bak: no description
 
bgyr: blue through green through yellow to red
 
bgyr.bak: no description
 
blues: white to blue
 
blues.bak: no description
 
byg: blue through yellow to green
 
byg.bak: no description
 
byr: blue through yellow to red
 
byr.bak: no description
 
celsius: blue to red for degree Celsius temperature
 
celsius.bak: no description
 
corine: EU Corine land cover colors
 
corine.bak: no description
 
curvature: for terrain curvatures (from v.surf.rst and r.slope.aspect)
 
curvature.bak: no description
 
differences: differences oriented colors
 
differences.bak: no description
 
elevation: maps relative ranges of raster values to elevation color ramp
 
elevation.bak: no description
 
etopo2: colors for ETOPO2 worldwide bathymetry/topography
 
etopo2.bak: no description
 
evi: enhanced vegetative index colors
 
evi.bak: no description
 
fahrenheit: blue to red for Fahrenheit temperature
 
fahrenheit.bak: no description
 
gdd: accumulated growing degree days
 
gdd.bak: no description
 
grass: GRASS GIS green (perceptually uniform)
 
grass.bak: no description
 
greens: white to green
 
greens.bak: no description
 
grey: grey scale
 
grey.bak: no description
 
grey.eq: histogram-equalized grey scale
 
grey.log: histogram logarithmic transformed grey scale
 
grey1.0: grey scale for raster values between 0.0-1.0
 
grey1.0.bak: no description
 
grey255: grey scale for raster values between 0-255
 
grey255.bak: no description
 
gyr: green through yellow to red
 
gyr.bak: no description
 
haxby: relative colors for bathymetry or topography
 
haxby.bak: no description
 
kelvin: blue to red for temperature in Kelvin scale
 
kelvin.bak: no description
 
ndvi: Normalized Difference Vegetation Index colors
 
ndvi.bak: no description
 
ndwi: Normalized Difference Water Index colors
 
ndwi.bak: no description
 
oranges: white to orange
 
oranges.bak: no description
 
population: color table covering human population classification breaks
 
population.bak: no description
 
population_dens: color table covering human population density classification breaks
 
population_dens.bak: no description
 
precipitation: precipitation color table (0..2000mm)
 
precipitation.bak: no description
 
precipitation_daily: precipitation color table (0..1000mm)
 
precipitation_daily.bak: no description
 
precipitation_monthly: precipitation color table (0..1000mm)
 
precipitation_monthly.bak: no description
 
rainbow: rainbow color table
 
rainbow.bak: no description
 
ramp: color ramp
 
ramp.bak: no description
 
random: random color table
 
reds: white to red
 
reds.bak: no description
 
roygbiv: no description
 
roygbiv.bak: no description
 
rstcurv: terrain curvature (from r.resamp.rst)
 
rstcurv.bak: no description
 
ryb: red through yellow to blue
 
ryb.bak: no description
 
ryg: red through yellow to green
 
ryg.bak: no description
 
sepia: yellowish-brown through to white
 
sepia.bak: no description
 
slope: r.slope.aspect-type slope colors for raster values 0-90
 
slope.bak: no description
 
soilmoisture: soilmoisture color table (0.0-1.0)
 
soilmoisture.bak: no description
 
srtm: color palette for Shuttle Radar Topography Mission elevation
 
srtm.bak: no description
 
srtm_plus: color palette for Shuttle Radar Topography Mission elevation (with seafloor colors)
 
srtm_plus.bak: no description
 
terrain: global elevation color table covering -11000 to +8850m
 
terrain.bak: no description
 
viridis: perceptually uniform sequential color table viridis
 
viridis.bak: no description
 
water: water depth
 
water.bak: no description
 
wave: color wave
 
wave.bak: no description
raster=name
 
Raster map from which to copy color table
raster_3d=name
 
3D raster map from which to copy color table
rules=name
 
Path to rules file
rgb_column=name
 
Name of color column to populate RGB values
 
If not given writes color table

v.colors allows creating or modifying color table associated with a vector map similarly to r.colors for raster maps.
Color rules are built from features category values ( use=cat) or numeric data column ( use=attr) defined by column option. For 3D vector maps is allowed to define color rules based on points or centroids z-coordinate ( use=z). 3D vector lines are not supported.
The raster option allows user to specify a raster map from which to copy the color table, similarly raster_3d option for 3D raster map.
The rules color table type will cause v.colors to read color table specifications from given file and will build the color table accordingly. See r.colors manual page for details.
If the user specifies the -w flag, the current color table file for the input map will not be overwritten. This means that the color table is created only if the vector map does not already have a color table. If this option is not specified, the color table will be created if one does not exist, or modified if it does.
Alternatively the color rules can be stored in a string column ( rgb_column) by saving the RRR:GGG:BBB values suitable for use with d.vect.

For vector maps with a large number of features it’s more convenient to store color rules in an attribute column (given by rgb_column) rather then in a color table file. Reading color tables with more then 1000 items is slow.

Define color table wave based on categories from layer 1
 
v.colors map=soils_general layer=1 color=wave

Define color table ryg based on values from attribute column AREA. Attribute table is linked to layer 1.
 
v.to.db map=soils_general layer=1 option=area column=AREA
v.colors map=soils_general layer=1 color=wave use=attr column=AREA

Write color values to the attribute table (column GRASSRGB) instead of creating color table.
 
v.colors map=soils_general layer=1 color=wave use=attr column=AREA rgb_column=GRASSRGB
# See some GRASSRGB values:
v.db.select map=soils_general where="cat < 4"
cat|OBJECTID|AREA|PERIMETER|GSLNC250_|GSLNC250_I|GSL_NAME|GRASSRGB
1|1|0|164616.125|2|1|NC113|212:42:127
2|2|0|30785.529297|3|2|NC096|212:42:127
3|3|0|87572.882812|4|3|NC097|212:42:127

Convert existing RGB values to color table rules.
 
v.colors -c map=soils_general rgb_column=GRASSRGB
Note that in this case the vector map has a proper color table assigned (check by v.colors.out) together with GRASSRGB attribute column. Also note that color table is preferred over RGB values stored in attribute table.

Existing color table can be removed by -r flag.
 
v.colors -r map=soils_general
Before removing color table you can store color rules to the file by v.colors.out and later to assign by rules option.
 
v.colors.out map=soils_general rules=soils.colr
v.colors map=soils_general rules=soils.colr
To drop RGB column use v.db.dropcolumn.
 
v.db.dropcolumn map=soils_general column=GRASSRGB

d.vect, r.colors, r.colors.out, r3.colors, r3.colors.out, v.colors.out
See also wiki page Color tables (from GRASS User Wiki)
ColorBrewer is an online tool designed to help people select good color schemes for maps and other graphics.

Martin Landa, OSGeoREL, Czech Technical University in Prague, Czech Republic
Last changed: $Date: 2015-02-13 16:14:07 +0100 (Fri, 13 Feb 2015) $

Available at: v.colors source code (history)
Main index | Vector index | Topics index | Keywords index | Graphical index | Full index
© 2003-2018 GRASS Development Team, GRASS GIS 7.4.3 Reference Manual
GRASS 7.4.3

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.