[GRASS-user] script for a multidirectional, oblique-weighted, shaded-relief image

maning sambale emmanuel.sambale at gmail.com
Mon Jun 5 01:13:09 EDT 2006


Hello,

I found an article creating a multidirectional, oblique-weighted,
shaded-relief image from the USGS
(http://pubs.usgs.gov/of/1992/of92-422/of92-422.pdf).

I basically creates a hillshade using different illumination angles.
This is especially useful in very mountainous areas.  I tried to
recreate  this with GRASS but having difficulty with r.mapcalc
equations.

Heres what I've made so far:

# Multidirectional, oblique-weighted, shaded-relief image

# Compute hillshade at azimuth 225, 270, 315 and 360 at 30 degrees sun
illumination angle
r.shaded.relief map=DEM_90 at PERMANENT shadedmap=shade225 altitude=30
azimuth=225 zmult=1 scale=1
r.shaded.relief map=DEM_90 at PERMANENT shadedmap=shade270 altitude=30
azimuth=270 zmult=1 scale=1
r.shaded.relief map=DEM_90 at PERMANENT shadedmap=shade315 altitude=30
azimuth=315 zmult=1 scale=1
r.shaded.relief map=DEM_90 at PERMANENT shadedmap=shade360 altitude=30
azimuth=360 zmult=1 scale=1

# compute aspect map
r.slope.aspect elevation=DEM_90 at PERMANENT format=degrees prec=float
aspect=aspect zfactor=1.0 min_slp_allowed=0.0

# Resample aspect map
# compute focalmean
???

# compute weights 225, 270, 315 and 360
# this is the basic formula how in r,mapcalc?
r.mapcalc
w225 = sin2(aspect - 225°)
w270 = sin2(aspect - 270°)
w315 = sin2(aspect - 315°)
w360 = sin2(aspect - 360°)

#compute weighted hilshaded
r.mapcalc weightedshaded = (((w225 * shade225) + (w270 * shade270) +
(w315 * shade315) + (w360 * shade360))/2)

Any ideas?

thanks,

maning
-- 
|---------|----------------------------------------------------------|
| __.-._  |"Ohhh. Great warrior. Wars not make one great." -Yoda     |
| '-._"7' |"Freedom is still the most radical idea of all" -N.Branden|
|  /'.-c  |Linux registered user #402901, http://counter.li.org/     |
|  |  /T  |www.esambale.wikispaces.com|
| _)_/LI  |www.geocities.com/esambale/philbiodivmap/philbirds.html   |
|---------|----------------------------------------------------------|




More information about the grass-user mailing list