[GRASSLIST:4439] RE: shaded relief
Glynn Clements
glynn.clements at virgin.net
Mon Sep 9 11:50:06 EDT 2002
Markus Neteler wrote:
> > One pitfall I've encountered is where the horizontal and vertical units
> > are not the same. If you shade a DEM where the horizontal resolution is
> > expressed in degrees lat/long, and the vertical in meters, you will get
> > a very stark relief map indeed, and no amount of playing with the sun
> > altitude will help. In this case, you can either reproject the DEM to a
> > coordinate system with horizontal units in meters, or modify the code in
> > shade.rel.sh.
>
> if you have a suggestion for modifying the formula, we could
> add a test:
> if LATLONG
> do this
> else
> do that
> fi
>
> Perhaps you could provide a modified r.mapcalc formula?
A fix would involve changing:
.../(8.*ewres()) , \\
to e.g.
.../($scale*8.*ewres()) , \\
(and similarly for nwres).
But how to set "scale"? It depends upon both the horizontal and
vertical units. The horizontal units can be obtained from the
PROJ_UNITS file (if it exists). Can the vertical units be determined
automatically (I suspect not)?
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-user
mailing list