The user can select the distance around each cell which is considered for the new value as well as the statistical value (mean,median,min,max).

# Extract a stream from spearfish dataset for sample application r.watershed -f elevation="elevation.10m@PERMANENT" accumulation="accum" r.mapcalc "accum_abs = abs(accum)" r.stream.extract elevation="elevation.10m@PERMANENT" threshold=200 stream_rast="stream" direction="dirs" r.stream.basins dir="dirs" coors="602140,4927950" basins="basins" r.mapcalc "sample_stream = basins && stream" # Extract geological information for sample stream course r.mapcalc "geology_sample_stream = if(sample_stream,geology@PERMANENT,null())" # Calculate median geological material ("median category value") for # 1500 m up- and downstream of each stream cell r.rdfilter.py input=geology_sample_stream stat=median distance=1500

Berlin, Germany

*Last changed: $Date$*