<div dir="ltr"><div>Hi Erik, <br></div><div><br></div><div>IIUC, you would need something like the following:</div><div><br></div><div>r.mapcalc expression="bla = if(elev <= 25, 0.0, elev)" <br></div><div><br></div><div>or<br></div><div><br></div><div>r.mapcalc expression="bla = if(elev <= 25, null(), elev)" <br></div><div><br></div><div>HTH, <br></div><div>Vero<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mié, 10 feb 2021 a las 8:47, Erik Victor Lundstrøm (<<a href="mailto:Victor.Lundstrom@uib.no">Victor.Lundstrom@uib.no</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi everyone,<br>
<br>
I've done some google searches related to my problem. Granted, by no <br>
means exhaustive, but unsuccessful nonetheless.<br>
Thus, I hereby by contribute with my first post in the email group <br>
hoping to find some help.<br>
<br>
I work in coastal Norway, and I'd like to produce different rasters <br>
based on estimates for when the sea-level was either higher, or lower, <br>
than today.<br>
When I started doing this years ago, it was simply enough for me to use <br>
the raster calculator and then produce binary maps using the "<=" or <br>
">=" expression as I only wanted to visualise the difference.<br>
However, today I'd like to continue to work with the rasters where the <br>
values on the other side of the threshold that I assign remain intact <br>
but<br>
I find it way too tedious having to 1) produce a binary map, 2) convert <br>
the cells denoting the sea-level change into vector polygons, and then <br>
3) clipping the old raster into a new one.<br>
<br>
I'll try and use an example for what I'd like to try and achieve <br>
instead.<br>
<br>
Let's say I have an elevation raster with values ranging from -0.001 to <br>
1500m. Now, if I'd be interested in producing a raster where anything <br>
below 25m is submerged, then the method that I alluded<br>
to above would produce the following raster = 0 & 1<br>
<br>
What I'm interested in doing now instead, is to find some method where I <br>
still reset anything below 25m as "0", but where I still have all the <br>
remaining values intact.<br>
<br>
I'm thinking that there should be a way, either through the raster <br>
calculator or the reclassify tool, where I could simply reset anything <br>
above or below a certain threshold as either "0", or perhaps even "no <br>
data" but at the same time keep all the other elevation values of the <br>
raster intact.<br>
<br>
This message should hopefully be enough to indicate that I have <br>
relatively poor experience with both the reclassify or mapcalc-tool and <br>
thus any<br>
brief guide on how I could solve my problem would be greatly <br>
appreciated!<br>
<br>
If anything is unclear just let me know and I can try to reformulate.<br>
<br>
Best,<br>
Victor<br>
_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
</blockquote></div>