[GRASS-user] Can I use r.mapcalc to create "sorted" elevation raster?

Nikos Alexandris nik at nikosalexandris.net
Sun Dec 26 06:17:52 EST 2010


Catlike wrote:

> I am trying to use r.mapcalc, through QGIS, to take an elevations raster
> with a wide variety of values and create a new elevations raster which only
> contains those cells that have a value over a certain number (in this case,
> 300 meters).

The command in grass should be something like:
r.mapcalc "OutputMap300m = if ( InputElevationMap == 300 , 300 , null())"

The above means: if the Input map (cell) equals to 300, then write 300 to the 
(respective) Output Map (cell), otherwise don't write anything (=null()).

> Unfortunately, the QGIS graphic user interface does not show me what the
> actual command I create is.

Not sure how construct the command in the graphical r.mapcalc in QGIS. The 
if() function is of course there,  but I need a liitle more time (=another 
time) to figure out... :-)

Cheers, Nikos


More information about the grass-user mailing list