Rich, The if syntax in r.mapcalc is as follows:
if(test condition, response if true, response if false) So, by reversing the test in the if statement will give you values of 1 for low slope areas. Check out the r.mapcalc man page for the complete if syntax Daniel On Sat, Nov 6, 2010 at 4:06 PM, Rich Shepard <[email protected]> wrote: > On Sat, 6 Nov 2010, Martin Landa wrote: > >> r.mapcalc 'slope_30 = if(slope_map > 30, 1, 0)' >> >> r.mapcalc generates raster map with two values - 1 for areas where slope >> is greater then 30% and 0 for areas where slope is lower or equal then >> 30%. > > Martin, > > Is the reverse 'slope_30 = if(slope_map < 30, 1, 0)' mean that areas = 1 > are < than 30% and areas with 0 are >= 30%? > > My question is the value of areas where slope = 30% are placed with the > different mapcalc expressions. > > Thanks, > > Rich > _______________________________________________ > grass-user mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/grass-user > _______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
