Custom search

Montag, 10. November 2014

Open river

As posted in earlier blogs here and here, the federal state of Tyrol provides a nice set of open data. Let's have a closer look at the river system spatial data and in particular the river Isel.

river system of Tyrol

glacier river Isel in the Eastern district of Tyrol
 The river Isel is known as one of the last near natural glacier rivers in the Alps.

In this post following open software tools are used: GRASS GIS and R. In the last days I've uploaded a new GRASS GIS addon: v.fixed.segmentpoints.

v.fixed.segmentpoints GUI

This little addon creates segment points along a vector line with fixed distances.

segment points along a vector line with fixed distances (e.g. every 10m a point along a river)
But how can this addon now be useful related to streams? One of the individual characteristics of a single stream is the long profile. The long profile shows how a river’s gradient changes as it flows from its source to its mouth/outlet.

Let's do a few simple steps in GRASS GIS:
# set every 10m a point along the vector line of the river isel (open data)
v.fixed.segmentpoints vector=riverisel cat=1 dir=C:\tmp\ distance=10

# given a 10m x 10m DEM,(open data), v.what.rast - uploads raster values at positions of vector points to the table.
v.what.rast map=segmentpoints raster=dem column=elevation

# db.out.ogr - exports attribute tables into a CSV file as input for a R session
db.out.ogr input=segmentpoints dsn=C:\tmp\rinput.csv
Then start a R session:
# import GRASS exported data into R
riverdata <- read.csv("rinput.csv", header = TRUE, sep = ",", dec = ".")

# quick look at the statistics
    distance               elevation    
 Min.   :    0           Min.   : 665.3 
 1st Qu.:14715     1st Qu.: 742.7 
 Median :29430   Median : 933.6 
 Mean   :29430    Mean   :1098.0 
 3rd Qu.:44145   3rd Qu.:1289.3 
 Max.   :58858    Max.   :2411.5 

# make data coloumns available for calculation

# plot the river long profile
plot(distance,elevation, type = "l", col = "blue", \
main = "river long profile: glacier river Isel", \
xlab = "distance from source (m)", ylab = "elevation (m a.s.l.)")
Thanks to 2 open data sets, 2 open source software and a few command line statements a river long profile can be compiled:

river long profile: Isel

 And now some impressions how the glacier river Isel evolves and transforms from its source to its outlet along its profile.

Keine Kommentare:

Kommentar veröffentlichen