Custom search

Montag, 26. Mai 2014

northerness, easterness and slope - some proxies if a cell is "sunny"

In (plant) ecology the importance of solar radiation has been recognized for a long time.

Northerness, easterness and slope may be some of the simpler proxies for solar radiation which can be calculated by GIS.

As aspect is a circular land-surface parameter, a sine (eastness) or cosine (northness) transformation can be used to obtain a continuous gradient, stressing the north-south or east-west gradient.

In the northern hemisphere for instance, slopes facing south receive more potential insolation than those facing north; a relation between northerness and slope can also be established.

Let's do some calculations with

Open Data


Open Source

The commands are as simple as

# build a VRT from a list of datasets
gdalbuildvrt -input_file_list dem_tiles.txt dem.vrt

# r.external - Links GDAL supported raster data as a pseudo GRASS raster map
r.external input=C:\data\dem.vrt output=dem10m

# calculation of northerness, easterness and the interaction between northerness and slope
r.northerness.easterness --verbose elevation=dem10m

 The result maps of r.northerness.easterness are
  • northerness: cos(aspect)
  • easterness: sin(aspect)
  • interaction between northerness and slope: northerness*slope
DEM 10m x 10m

DEM 10m x 10m (zoomed)

easterness (zoomed)

northerness (zoomed)

northerness*slope (zoomed)
 Let's do some checks in the field.

Samstag, 10. Mai 2014

Sun, terrain, open data and open source - some ingredients for fieldwork

This year growing season has already begun a few weeks ago. So it's time for field work.

A preliminary visual delineation of habitats based upon digital orthophotos is a common task for an ecologist before fieldwork.

But how valid are these visual delineations?

Ecological site conditions of habitats are often influenced amongst others by terrain forms, solar irradiance and irradiation.

Let's try some nice ingredients to facilitate and prepare fieldwork.

Open data

Open Source

and its nice tools and addons
  • r.sun.hourly - Runs r.sun in loop for given time range.
  • r.sun - Solar irradiance and irradiation model.
  • r.geomorphon - Calculate geomorphons (terrain forms)and associated geometry using machine vision approach.
  • Temporal data processing in GRASS GIS.
  • g.gui.animation - Tool for animating a series of raster and vector maps or a space time raster or vector dataset.
and for scripting

Step 1: Visually delineation of some habitats

Orthophotos of Tyrol as WMS-service.

Step 2: Load a DEM for further analysis

Digital terrain model of Tyrol (10m x 10m).

Step 3: v.habitat.dem - a tool for DEM derived characteristics of habitats



There are a terrain derived raster results, some of them are uploaded to the attribute table of the habitat vector:
Calculation of accumulation, drainage direction, topographic index by r.watershed ...
Calculation of slope and aspect by r.slope.aspect ...
Calculate habitat's areas and populate it to the attribute table ...
Habitat areas smaller than pixel area...
Upload DEM zonal statistics to the attribute table ...
Upload slope zonal statistics to the attribute table ...
Upload aspect zonal statistics to the attribute table ...
Do some simple checks regarding aspect range and populate it to the attribute table...
aspect range 100-200 *
aspect range 201-300 **
aspect range >= 300 ***
Do some simple checks regarding aspect range and slope median and populate it to the attribute table...
aspect range 100-200 and median slope < 5 *
aspect range 201-300 and median slope < 5 **
aspect range >= 300 and median slope < 5 ***
Calculate the most common geomorphons ...
Calculate mutual occurrences of habitats and geomorphons ...
Join geomorphon information to habitat attribute table ...
Run r.sun.hourly in binary mode for light/shadow for a certain day in the year ...
Registering created maps into temporal dataset...

 The most common terrain forms calculated by r.geomorphon are:
  • flat
  • summit
  • ridge
  • shoulder
  • spur
  •  slope
  •  hollow
  • footslope
  • valley
  • depression
for more details see the r.geomorphon-manual


The accumulation indicates the number of cells that drain through each cell and subsequently some information about moisture.

accumulation map

Step 4: Animation of direct sunlight / shadows by terrain for a certain day in the year

Temporal data processing was newly added in GRASS GIS. The results of the r.sun.hourly-analysis are autmatically registered into a temporal database. The space time raster dataset can be easily animated in the g.gui.animation-tool.

animated r.sun.hourly-results: 1st January 2014,
1 hour time step, start time 8:00 morning, end time 18:00 evening

Keep in mind the results are as good as the DEM is. But there are some nice additional informations for planning field work.