NINAnor / NOFA

Docs for the NOFA database
GNU General Public License v3.0
1 stars 0 forks source link

Use pgRouting for connectivity analysis #18

Closed JakobMiksch closed 7 years ago

JakobMiksch commented 7 years ago

pgRouting is an extension for PostgreSQL and PostGIS. It gives the possibility to do routing using a SQL query. In the NOFA project it could be used to model where fish can travel to.

But first the river network has to be made "routable". Hence, a routing graph has to be built. Basically all river segments are properly connected to each other. Each river segment can obtain further attributes (length, slope, width, depth, ... ).

The routing can done using different "profiles". I an usual routing application this would be pedestrian, bike or car. In our case we could use the fish species. So, you can say fish A can travel through a slope of max. 7° , fish B can travel trough a slope of max 9° ... You can do the same with other attributes and even combine it.

Each river segment can obviously be traveled in two directions. And obviously it is a big difference if a fish travels up or downstream. This can also be done with pgRouting.

Also the potential reach of each fish can be modeled. This could be wraped into a function which takes the fish species and the starting point and returns all lakes that could be potentially be reached.

andersfi commented 7 years ago

This is interesting. Just a quick note. Two steps that need to be enhanced before we can proceed further with testing.

  1. Need to link lakes to fish data (i.e. issue #12)
  2. Need to link waterbodies (i.e. connecting all rivers and lakes). This has some issues as the map sources we use have glitches.
JakobMiksch commented 7 years ago

This presentation gives some example how to do routing on river networks using PostGIS Topology