[GRASS-user] r.mapcalc changes color table

Tim Michelsen timmichelsen at gmx-topmail.de
Thu Nov 26 14:37:23 EST 2009


Dear Grass Users,
I have a large georeferenced digital map.

I successfully imported it into GRASS.

Now I would like to "cut" only a small rectangle -- my investigation
area -- out of this large map.

I used the following approach:

1) import the TIFF
2) select the part of interest in the GRASS monitor
3) set the zoomed area as region (monitor tools)
4) create a boundary vector: v.in.region
5) convert boundary raster to a raster v.to.rast
6) use r.mapcalc to cut: r.mapcalc "cut=if(boundary_raster, large_map,
null())"

This works well for the cutting. But the color table of the large input
map is lost resulting in a strange coloring.
Opened in QGIS, it shows me that there is a "color map" associated with
the layer.
How do I get the same color table in the r.mapcalc result?

Thanks in advance,
Timmie



More information about the grass-user mailing list