I am new to GRASS and I need to compute, from a DEM, a map showing the areas with a slope lower than 30%. So basically I would like 2 slope categories, <30% and >30%, but I am quite lost in the way I should do it. Could you please sketch me the steps to achieve it?
I am new to GRASS and I need to compute, from a DEM, a map showing the areas
with a slope lower than 30%. So basically I would like 2 slope categories,
<30% and >30%, but I am quite lost in the way I should do it. Could you
please sketch me the steps to achieve it?
So, by reversing the test in the if statement will give you values of 1
for low slope areas.
In the question asked to start this thread, there's apparently no interest
in values == 30%. By default, those are included in the false category. And
if one wants them included in the true category the test condition needs to
be <= rather than just <.
where grassrule.txt contained:
1 thru 30 = 1
31 thru 90 = 2
----------------
This works pretty well and the result corresponds to what I wanted. Great !!
Now I also tried to use r.mapcalc instead of r.reclass as follows:
r.mapcalc 'new_slope_30_bis = if(new_slope > 30, 1, 0)'
However for some reason the resulting map new_slope_30_bis has:
Rows: 20
Columns: 20
Total Cells: 400
while the original new_slope, as well as new_slope_30 have both Total Cells: 47212692. So you can imagine the result is not very nice...
Why is this happening ? (and am I allowed to attach screenshots to my emails in this mailing list??)
Sincerely yours,
Emma
On 6-Nov-10, at 10:08 PM, Rich Shepard wrote:
On Sat, 6 Nov 2010, Daniel Victoria wrote:
So, by reversing the test in the if statement will give you values of 1
for low slope areas.
In the question asked to start this thread, there's apparently no interest
in values == 30%. By default, those are included in the false category. And
if one wants them included in the true category the test condition needs to
be <= rather than just <.