[GRASS-user] raster with multiple attributs

Hamish hamish_nospam at yahoo.com
Sun Oct 22 22:45:57 EDT 2006

Michaël Rabotin wrote:
> for the raster in GRASS, is it possible to have for each pixel several
> attributs or is it limited to one attribut (cat) per pixel ?

not specifically, but a CELL (integer) map could use the 2^n trick:

cell value is comination of 1+2+4+8+16+32+...

feature A is "1"
feature B is "2"
feature C is "4"
feature D is "8"

so if pixel has features A,C,D but not B, the cell value = 13.


In general the raster is a grid of actual data, not a grid of points.

I guess if raster contains less than 1 million cells you could do
"r.to.vect feature=point", then link many attributes to each point in a
DB table.


More information about the grass-user mailing list