[GRASS-user] Can a table imported in the data base (sqlite.db) used to assign new raster category labels non-interactively?

Nikos Alexandris nikos.alexandris at felis.uni-freiburg.de
Mon Mar 17 17:05:47 EDT 2008


Dear All,

I am having a hard time to figure out how I could avoid to enter
interactively new labels for a raster map. I've been reading the last 2
hours in the list, in GRASS-Book.

Any directions highly appreciated.

* A raster map (Global Land Cover  2000 over Europe) looks like this:

r.report glc2000_eu -h
 100%
+-----------------------------------------------------------------------------+
|                            Category Information
|
| #|description
|
|-----------------------------------------------------------------------------|
| 2|
|
| 4|
|
| 6|
|
|11|
|
|12|
|
|16|
|
|20|
|
|22|
|
|23|
|
+-----------------------------------------------------------------------------+

* Importing the file "Global_Legend.dbf" which holds category labels in
the data base:
db.in.ogr dsn=Global_Legend.dbf out=glc2000_legend

*Looking at the imported table
db.select -c glc2000_legend
1|Tree Cover, broadleaved, evergreen
2|Tree Cover, broadleaved, deciduous, closed
3|Tree Cover, broadleaved, deciduous, open
4|Tree Cover, needle-leaved, evergreen
5|Tree Cover, needle-leaved, deciduous
6|Tree Cover, mixed leaf type
7|Tree Cover, regularly flooded, fresh water
8|Tree Cover, regularly flooded, saline water
9|Mosaic: Tree Cover / Other natural vegetation
10|Tree Cover, burnt
11|Shrub Cover, closed-open, evergreen
12|Shrub Cover, closed-open, deciduous
13|Herbaceous Cover, closed-open
14|Sparse herbaceous or sparse shrub cover
15|Regularly flooded shrub and/or herbaceous cover
16|Cultivated and managed areas
17|Mosaic: Cropland / Tree Cover / Other natural vegetation
18|Mosaic: Cropland / Shrub and/or grass cover
19|Bare Areas
20|Water Bodies
21|Snow and Ice
22|Artificial surfaces and associated areas
23|Irrigated Agriculture

Question: IS there a way to add these labels to the raster map
non-interactively?



More information about the grass-user mailing list