[GRASS-user] conditional buffering with DEM

Nikos Alexandris nik at nikosalexandris.net
Fri May 1 07:45:51 PDT 2015


* Moritz Lennert <mlennert at club.worldonline.be> [2015-04-23 20:58:10 +0200]:

> On 23/04/15 16:44, Ahmet Temiz wrote:
> > thank you Nikos
> >
> > I meant that  creating buffers from a line, which also querying DEM values.
> >
> > DEM is in subquery position of buffer map
> 
> You cannot do that directly, AFAIK, but using r.mapcalc you can combine 
> the two variables. Different paths are possible. Here's one (supposing a 
> buffer of 500m):
> 
> - Create a raster map with distance to the line using r.grow.distance
> - Use r.mapcalc in order to check for both distance and DEM value, e.g.
> 
> NewMap = if(DEM > 100 && DEM < 200 && distance < 500, 1, null())
> 
> This will give you a map with non-null (value 1) in those pixels that 
> are within the buffer distance and that correspond to the DEM-related 
> condition.
> 
> Is this what you are looking for ?
> 
> Another path would be combining r.buffer output with the DEM in r.mapcalc.
> 
> Moritz
> 
[..]

Dear Ahmet,

did Moritz' suggested approach match your needs?

Thank you, Nikos


More information about the grass-user mailing list