[GRASS-user] Re: How To use a raster MASK correctly?

Roger André randre at gmail.com
Sat Oct 17 14:09:30 EDT 2009


Figured it out.  Used the following r.mapcalc expression:

r.mapcalc "new_hillshade=if(europe_dem < 100, 180, europe_hillshade)"

I think I might be in love!
--

On Sat, Oct 17, 2009 at 10:27 AM, Roger André <randre at gmail.com> wrote:
> Hi All,
>
> I would like to use an elevation mask to reclass certain areas in a
> raster, while leaving the values outside the mask alone.  Below are my
> attempts so far.  Unfortunately, when I export output raster, the
> reclass appears to have been applied to entire raster.  Is there a way
> to do this using a MASK, or using r.mapcalc to create a new map3 that
> modifies specific areas in map2 based on values in map1?
>
> Hope this makes sense,
>
> Roger
> --
>
> Attempt 1
> --------------
>  731  r.mapcalc "MASK=if(europe_dem < 100)"
>  738  r.info europe_hillshade
>  739  r.rescale europe_hillshade from=0,254 to=180,180
> out=europe_hillshade_clean
>


More information about the grass-user mailing list