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

Malte Martin malte at perlomat.de
Sun Dec 26 06:10:05 EST 2010


Hi

should be something like (untested)

r.mapcalc 'elevation300map=if((originalelevationmap >  
300),originalelevationmap,NULL())'

this means:

if originalelevationmap > 300 get the value from the  
originalelevationmap, otherwise the value should be NULL and all is  
wirtten to the map elevation300map.

Otherwise take a closer look to
http://grass.osgeo.org/gdp/html_grass64/r.mapcalc.html

I haven't used r.mapcalc for a long time so I don't know if there had  
been changes in the syntax - the trick is to use the if clause  
implemented in r.mapcalc. I have no QGIS/GRASS installed on this pc...

I hope that helps and merry christmas
Malte

Am 26.12.2010 um 11:51 schrieb Catlike:

>
> Thank you for reading.
> 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).
> Unfortunately, the QGIS graphic user interface does not show me what  
> the
> actual command I create is.
> What I get when I run the command is a new raster in which every  
> cell has
> been converted to equal 300 meters!
> What should I do differently?
> Again, thank you.
> -- 
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/Can-I-use-r-mapcalc-to-create-sorted-elevation-raster-tp5867462p5867462.html
> Sent from the Grass - Users mailing list archive at Nabble.com.
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user

Malte Martin
----------------------------
+ 49 531 2258085
+ 49 177 3841416

Comeniusstr. 4
D-38102 Braunschweig
skype: maltehm



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20101226/4a82544b/attachment.html


More information about the grass-user mailing list