OSM Waterway analyses

This check creates listings of all waterway relations.
The waterways are listet in flat and hierarchical order. One tree of such a hierarchical waterway list is a watershed.

The script (see. technical details) also traces all connected waterway way segments.

Results for different areas

For the whole planet: flat list, hierarchical list

For some continents:

For some contries: The results can be used to track connection errors, too. While fixing some missing connections, I've seen different reasons, why two waterway relations are not connected:

technical details

Two ways are connected by nodes. The flow direction can be determind by the position of the connection nodes in the way.
Example: The endpoint of one waterway is connected to the start or mid point of a second waterway. Thus way one flows into the second waterway.

With that information you can create a table with all flow direction information of the ways.

With that, you can find out which waterway relation flows into another.

And finally traverse the connected waterways and build wateshed trees.

Sources

You can find the source code on github: https://github.com/werner2101/osm-tests

ideas for improvements


Werner Hoch
Last modified: Fri Jan 4 11:10:47 CET 2013