GRASS logo

NAME - Allows creation and/or modification of raster map layer support files.


raster, metadata

SYNOPSIS --help [-bsnd] map=name [title=phrase] [history=phrase] [units=string] [vdatum=string] [source1=phrase] [source2=phrase] [description=phrase] [raster=string] [loadhistory=name] [savehistory=name] [semantic_label=phrase] [--overwrite] [--help] [--verbose] [--quiet] [--ui]


Delete the semantic label
Update statistics (histogram, range)
Create/reset the null file
Delete the null file
Allow output files to overwrite existing files
Print usage summary
Verbose module output
Quiet module output
Force launching GUI dialog


map=name [required]
Name of raster map
Title for resultant raster map
Text to append to the next line of the map's metadata file
Text to use for map data units
Text to use for map vertical datum
Text to use for data source, line 1
Text to use for data source, line 2
Text to use for data description or keyword(s)
Raster map from which to copy category table
Text file from which to load history
Text file in which to save history
Semantic label e.g. S2_8A

Table of contents

DESCRIPTION allows the user to create and/or edit raster map support information. Editing of raster map color tables, category labels, header, history, semantic label elements and title is supported. Category labels can also be copied from another raster map.

Raster band management

Raster semantic label concept is similar to dimension name in other GIS and remote sensing applications. Most common usage will be assigning a remote sensing platform sensor band ID to the raster, although any identifier is supported. Raster semantic label is suggested to work with imagery classification tools.


These examples are based on the North Carolina dataset, more specfically the landuse raster map. Copy the landuse map to the current mapset
g.copy raster=landuse,my_landuse

Update statistics -s map=my_landuse 

Update Title map=my_landuse title="Landuse copied"

Append to History Metadata map=my_landuse history="Copied from PERMANENT mapset"

Update Units Display map=my_landuse units=meter

Set semantic label

Note: landuse map doesn't confirm to CORINE specification. This is an example only. map=my_landuse semantic_label=CORINE_LULC


If metadata options such as title or history are given the module will run non-interactively. If only the map name is given will run interactively within a terminal shell and the user with be prompted for input.

Freeform metadata information is stored in a "hist" file which may be appended to by using the history option. Currently this is limited to 50 lines of text with a maximum line length of 78 characters. Any input larger than this will be wrapped to the next line. All other metadata strings available as standard options are limited to 79 characters.


r.category, r.describe,, r.null, r.region,, r.timestamp


Micharl Shapiro, CERL: Original author
Brad Douglas: GRASS 6 Port
M. Hamish Bowman: command line enhancements
Markus Neteler: category copy from other map
Maris Nartiss: semantic label management


Available at: source code (history)

Latest change: Thu Feb 3 11:10:06 2022 in commit: 73413160a81ed43e7a5ca0dc16f0b56e450e9fef

Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

© 2003-2022 GRASS Development Team, GRASS GIS 8.0.3dev Reference Manual