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.
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@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
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
On 26/12/2010 12:51, Catlike wrote:
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?
I've always found the r.mapcalc gui a bit funny to use. If you open a terminal and type:
r.mapcalc elev300="if(elev>300, elev, null() )"
that should get you what you want. The 'if' statement will set to NULL anything under 300. And above 300 will get the value of the original elevation.
Again, thank you.
--
Micha Silver
http://www.surfaces.co.il/
Arava Development Co. +972-52-3665918
Three equivalent answers in as many minutes. Talk about good service
···
--
Micha Silver
[http://www.surfaces.co.il/](http://www.surfaces.co.il/)
Arava Development Co. +972-52-3665918
On Sunday 26 of December 2010 13:50:49 Micha Silver wrote:
Three equivalent answers in as many minutes. Talk about good service
Almost... I was quick(er) and skipped the word "over" with respect to the
300m. Anyway...
Cheers, N
Thank you all. Happy New Year!
On Sun, Dec 26, 2010 at 3:50 AM, Micha Silver <micha@arava.co.il> wrote:
Three equivalent answers in as many minutes. Talk about good service
On 26/12/2010 13:10, Malte Martin wrote:
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
MalteAm 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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-userMalte Martin
----------------------------
+ 49 531 2258085
+ 49 177 3841416
Comeniusstr. 4
D-38102 Braunschweig
skype: maltehmThis mail was received via Mail-SeCure System.
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-userThis mail was received via Mail-SeCure System.
--
Micha Silver
http://www.surfaces.co.il/
Arava Development Co. +972-52-3665918