Skip to content

skaringa/rivers

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 

rivers

Compute river basins based on OSM data.

This tool is intended to create maps of river basins like Flussgebiete Mitteleuropas.

prerequisites

workflow

  1. Build libosmium, osmium-tool, and rivermap-osmium-tools.

  2. Compile rivers:

     ant -lib /usr/share/java
    
  3. Download europe-latest.osm.pbf file from Geofabrik. Generally the tool should work with other regions as well, but in that case you probably need to add more names and IDs to WellknownRivers.java.

  4. Run the osmium tools to extract waterways from the OSM file and to create CSV files with te IDs of waterways and their nodes (you may need to prefix the executables with an additional path):

     osmium tags-filter europe-latest.osm.pbf -e tags-filter.txt -o water.pbf
     osmium extract -b 5.0,44.5,20.0,56.0 water.pbf -o water-clipped.pbf
     osmium_waterway_ids water-clipped.pbf wways.csv wtr.csv
    
  5. Run rivers with the CSV files generated above 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.

  6. Convert the OSM PBF water file into Spatialite and merge rsystems.csv into it (you may need to prefix the executable with an additional path):

     osmium_rivermap -r rsystems.csv water-clipped.pbf waterways.sqlite
    
  7. Use tilemill to render, customize, and export the map.

Tilemill project files are located in the tilemill-project subdirectory.

About

Compute river basins based on OSM data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published