Compute river basins based on OSM data.
This tool is intended to create maps of river basins like Flussgebiete Deutschlands.
Compile Osmium/osmjs. See OSM wiki to get started.
ant -lib /usr/share/java
Run osmjs to create shapefiles and CSV files with config_rivermap:
osmjs -2 -m -l sparsetable -i osm2shape.js -j js/config_rivermap.js germany.osm.pbf
Run rivers with the CSV files generated by osmjs to build the river basins:
ant -lib /usr/share/java -Dargs="wways.csv wtr.csv rsystems.csv" RunRiverSystems
This creates the CSV file rsystems.csv that contains the mapping of the OSM way ID to the name of the river basin.
Merge this CSV file into the waterways shape file:
ant -lib /usr/share/java -Dargs="waterways.shp rsystems.csv waterways-r.shp" RunJoinCsv
Alternatively you may use other tools, like Quantum GIS to merge CSV and shape file.
Use tilemill to render, customize, and export the map.