[GRASS-user] r.shaded.relief Output Question

   Running r.shaded.relief on a 10m DEM with alt=30, azimuth=235 (the basins
are near the US-Canadian border), and zmult=2, the output looks reversed to
me (see attached .pdf). The stream channels appear to run along ridge lines
rather than valley floors, and the basin boundaries seem to be in the
valleys.

   The source map was resampled to 30 US Feet cell resolution from the
original 1 US Foot cell resolution using r.resamp.stats after 'g.region
res=30 -ap'. Might I inadvertently inverted the elevations when I coarsened
the resolution?

   Suggestions and recommendations, please.

Rich

(attachments)

shaded-dem.pdf (46.4 KB)

Hi Rich,

I can’t imagine that resampling would reverse the DEM values though. A glance at r.info would give you the answer to that - if the values are mostly negative, it should be a pretty good sign that you’re either in Death Valley or inverted :stuck_out_tongue:

One thing to note with r.shaded.relief though is that it doesn’t use the GRASS convention for solar azimuths. NOAA, for example, tells azimuths in degrees clockwise from north, but GRASS normally uses degrees counterclockwise from east. r.shaded.relief follows the NOAA system, but either way, 235° would be in just around the same place for both systems (as odd as that is). The sun would be coming from the southwest. When I look at your map (wish the resolution was a bit higher) it looks like the sun very well could be coming from that direction (I’m just using the rivers as orientation for relative height). Have you tried another angle, like taking a look at what the map looks like if the sun’s shining from 180° (due south)?

Best,
Daniel

B.Sc. Daniel Lee
Geschäftsführung für Forschung und Entwicklung
ISIS - International Solar Information Solutions GbR
Vertreten durch: Daniel Lee, Nepomuk Reinhard und Nils Räder

Deutschhausstr. 10
35037 Marburg
Festnetz: +49 6421 379 6256
Mobil: +49 176 6127 7269
E-Mail: Lee@isi-solutions.org
Web: http://www.isi-solutions.org

ISIS wird gefördert durch die Bundesrepublik Deutschland, Zuwendungsgeber: Bundesministerium für Wirtschaft und Technologie aufgrund eines Beschlusses des Deutschen Bundestages, sowie durch die Europäische Union, Zuwendungsgeber: Europäischer Sozialfonds.
Zusätzliche Unterstützung erhält ISIS von dem Entrepreneurship Cluster Mittelhessen, der Universität Marburg, dem Laboratory for Climatology and Remote Sensing und dem GIS-Lab Marburg.

Am 23. März 2012 17:12 schrieb Rich Shepard <rshepard@appl-ecosys.com>:

Running r.shaded.relief on a 10m DEM with alt=30, azimuth=235 (the basins
are near the US-Canadian border), and zmult=2, the output looks reversed to
me (see attached .pdf). The stream channels appear to run along ridge lines
rather than valley floors, and the basin boundaries seem to be in the
valleys.

The source map was resampled to 30 US Feet cell resolution from the
original 1 US Foot cell resolution using r.resamp.stats after ‘g.region
res=30 -ap’. Might I inadvertently inverted the elevations when I coarsened
the resolution?

Suggestions and recommendations, please.

Rich


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Fri, 23 Mar 2012, Daniel Lee wrote:

I can't imagine that resampling would reverse the DEM values though.

   Me, neither.

A glance at r.info would give you the answer to that - if the values are
mostly negative, it should be a pretty good sign that you're either in
Death Valley or inverted :stuck_out_tongue:

  | Type of Map: raster Number of Categories: 255
  | Data Type: DCELL
  | Rows: 2671
  | Columns: 3216
  | Total Cells: 8589936
  | Projection: Lambert Conformal Conic
  | N: 735780 S: 655650 Res: 30
  | E: 2138580 W: 2042100 Res: 30
  | Range of data: min = 561.412536621094 max = 2212.32543945312
  |
  | Data Source:
  | dem_basin
  | Source map NS res: 0.999982 EW res: 1.00002702
  |
  | Data Description:
  | generated by r.resamp.stats
  |
  | Comments:
  | r.resamp.stats input="dem_basin" output="dem10m.avg" method="average"
  |

   Looks normal to me.

One thing to note with r.shaded.relief though is that it doesn't use the
GRASS convention for solar azimuths.

   That's what the manual page says.

... 235° would be ... from the southwest.

   Yep. That's the way it usually works.

When I look at your map (wish the resolution was a bit higher) it looks
like the sun very well could be coming from that direction (I'm just using
the rivers as orientation for relative height). Have you tried another
angle, like taking a look at what the map looks like if the sun's shining
from 180° (due south)?

   Not yet. I try different altitude angles and moved to 225 degrees so far.

   But, the map appears inverted to me.

Rich

On 03/23/2012 08:31 PM, Rich Shepard wrote:

On Fri, 23 Mar 2012, Daniel Lee wrote:

… 235° would be … from the southwest.

Yep. That’s the way it usually works.

It’s just an optical illusion. Rotate the PDF 90 deg to the right, and it looks “right”. I usually choose azimuth=315 for r.shaded.relief. When the sun is from the NW, shadows appear “below” the features, and we visualize mountains as raised and valleys as lower.

HTH,
Micha

On 03/23/2012 09:29 PM, Micha Silver wrote:

On 03/23/2012 08:31 PM, Rich Shepard wrote:

On Fri, 23 Mar 2012, Daniel Lee wrote:

… 235° would be … from the southwest.

Yep. That’s the way it usually works.

It’s just an optical illusion. Rotate the PDF 90 deg to the right, and it looks “right”. I usually choose azimuth=315 for r.shaded.relief. When the sun is from the NW, shadows appear “below” the features, and we visualize mountains as raised and valleys as lower.

HTH,
Micha

Ooops, Correction: when azimuth=315 the sun is from the South West, producing naturally looking relief maps.

On Fri, 23 Mar 2012, Micha Silver wrote:

Ooops, Correction: when azimuth=315 the sun is from the *South* West,
producing naturally looking relief maps.

Micha,

   You were right the first time. From the manual page, "The azimuth of the
sun in degrees to the east of north (a value between 0 and 360 degrees)."
When the azimuth is 315 degrees the sun is in the northwest.

   It does look better.

Thanks,

Rich

Inverted relief on shaded maps (and also on aerial photos or satellite images) is called pseudoscopy. It’s just an optical illusion. If you live on the northern hemisphere you are more ‘used’ to see images with illumination from the south (and vice-versa for southern hemisphere), so when you have illumination from north you see things ‘inverted’ (the same happens if you rotate 180 degrees a aerial photo or sat image).

To me, in Brazil, I use illumination from NW (315) or NE (045).

cheers

Carlos

PS. Micha, when azimuth = 315 the sun is from North west


Prof. Carlos Henrique Grohmann
Institute of Geosciences - Univ. of São Paulo, Brazil

  • Digital Terrain Analysis | GIS | Remote Sensing -

http://carlosgrohmann.com


Can’t stop the signal.

Sent with Sparrow

On Friday, 23 March 2012 at 16:39, Micha Silver wrote:

On 03/23/2012 09:29 PM, Micha Silver wrote:

On 03/23/2012 08:31 PM, Rich Shepard wrote:

On Fri, 23 Mar 2012, Daniel Lee wrote:

… 235° would be … from the southwest.

Yep. That’s the way it usually works.

It’s just an optical illusion. Rotate the PDF 90 deg to the right, and it looks “right”. I usually choose azimuth=315 for r.shaded.relief. When the sun is from the NW, shadows appear “below” the features, and we visualize mountains as raised and valleys as lower.

HTH,
Micha

Ooops, Correction: when azimuth=315 the sun is from the South West, producing naturally looking relief maps.


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Fri, 23 Mar 2012, Carlos Grohmann wrote:

It's just an optical illusion. If you live on the northern hemisphere you
are more 'used' to see images with illumination from the south

Carlos,

   Yes, I know that aerial photos should be oriented so the shadows are
toward the bottom of the print. Perhaps because today's Friday no azimuth
angle looks good to me. :slight_smile:

Thanks for your input,

Rich

On Fri, 23 Mar 2012, Carlos Grohmann wrote:

To me, in Brazil, I use illumination from NW (315) or NE (045).

Carlos,

   Well, it must be Friday because while I meant to assign the azimuth to 225
degrees (southwest), I kept typing 325. No wonder it did not appear correct!

   With the sun at the proper southwestern angle (225 degrees), the shaded
relief map looks good.

Again, thanks,

Rich