`osm-river-basins`: Website to show how are rivers in OSM connected

FYI, this code doesn’t look at relations, only the tagged ways. It only uses the name tag from a way, not any relation.

There are 3 planet wide views, which include/exclude certain things. (1) Any way with a waterway=river tag, then group all connected ways together (default view) (2) any way with any waterway tag, and any name tag, then group all connected ways together. (3) like (2) but only group ways with the same name tag together.

Any named streams (waterway=stream), or canal (waterway=canal) will be included in (2) & (3) (but obv. not in (1)). This means the Rhine & Danube are connected (via the River Main & Main Danube Canal). :wink:

I tried to include all streams (not just named streams), but that resulted in too much data, and the resulting vector tiles looked rubbish. I think there’s room for tippecanoe to improve here.

However you can run it yourself for a smaller area. :wink:

1 Like

It’s the total length of all the waterways which make up that connected group. All groups have that calculated. I think the map drawing library (MapLibre) is deciding which numbers to show and not show so as not to be too cluttered. Try zooming in more.

Certainly found the 37 member part Arielli had sections tagged with name Fiume Arielli and others with Arielli. Made uniform+alt_name. One gap not figured out yet, not at any zoom to include preposterous zoom will it show colour, a culvert before and after which parts do show.

In the realm of consideration.

1 Like

@amapanda_αšαš‹αšαš…αš‡αš did you find an answer to my question?

Do the waterways have names? To keep things simple, I only include waterway=river or with a waterway tag and a name tag. Do you have an example of something in Hungary that isn’t showing up on my map?

(I did wonder why Hungary was so empty…)

Done.

Sorry, I was off having lunch and watching Game of Thrones (hold the door… :door::cry:)
IMG_20230820_152045_2

That’s weird. To the left and right are 2 green coloured segments, both with length 60 km. So those 2 green parts are part of that same group. I don’t know why it’s not showing on the map. It shows up on the other data views which include all waterways. I’ve done data updates… so :woman_shrugging:t2:

2 Likes

This is pointing out a lot of hydrographic issues in Norway that would otherwise be hard to find. Thanks!

1 Like

I’m not sure why Way: β€ͺOude Rijn‬ (β€ͺ830653234‬) | OpenStreetMap doesn’t show up: OSM River Basins

Thanks!

One I just noticed is that if streams are connected via a culvert, then they show up as connected via colour & length, but it shows a gap at the connecting point e.g. https://amandasaurus.github.io/osm-river-basins/?tiles=planet-waterway-name-no-group#map=18.71/-28.0914792/153.3986749 & Way: β€ͺCamp Creek‬ (β€ͺ653704349‬) | OpenStreetMap

Edit: But then in other spots they do & don’t connect! https://amandasaurus.github.io/osm-river-basins/?tiles=planet-waterway-name-no-group#map=16.85/-28.014578/153.348496 is connected under the railway, but not the motorway, but Way: β€ͺBunyip Brook‬ (β€ͺ193407963‬) | OpenStreetMap & Way: β€ͺBunyip Brook‬ (β€ͺ193407995‬) | OpenStreetMap show they have identical descriptions etc?

It seems so, for example this river is missing, which is waterway=river + name = Galga.
But even just looking at the waterway=rivers on overpass-turbo shows a lot of missing rivers, and these aren’t even named other waterways (beware that this query pulls 50+ megabytes).

So I don’t see any reason for it to be that empty.

Way: β€ͺAare‬ (β€ͺ164431385‬) | OpenStreetMap (ww=river) and Way: β€ͺAare‬ (β€ͺ81292140‬) | OpenStreetMap (ww=canal) are connected waterways with name=Aare, but https://amandasaurus.github.io/osm-river-basins/#map=12.7/46.67341/7.8835 show Lake Brienz and Lake Thun disconnected.
Is that an error in the OSM data or a glitch with your site[1]?


  1. which is awesome by the way! β†©οΈŽ

You linked to a view which only looks at waterway=river. The second way is =canal, so it not included.

One of the other views, groups all waterway tagged objects together, lumping =canal in with =river. In this case, the Aare is shown as connected, and part of the 645,000 km long super european waterway system.

Do the waterways have names?
It seems so, for example this river
https://www.openstreetmap.org/relation/15307504 is missing, which is
waterway=river + name = Galga.

That’s a relation. This tool ignores relations. Some of the member ways are waterway=stream (e.g. https://www.openstreetmap.org/way/220287569). The default view only looks at waterway=river, making Hungary seem sorta empty, however when you switch to any waterway tag, you can see Hungary is more full.

There are a couple of waterway=* which are not actual waterways, like lock_gate, dam, weir… which you might want to exclude in those cases.

1 Like

Since Northern Europe and Northern Italy are part of the same blob in view (2), where is the connection? I am curious, but was not able to find it by visual inspection.

Could be wrong – but I think there’s currently a couple of different basins in Northern Italy/Northern Europe that all happen to be pink right now in view 2, making them look the same when they are not.

If you zoom way in, it’ll show you the total length of the basin along the lines – looks like the Euro-super basin is 646857km, there’s another pink basin in Northern Italy that’s 63156km, and then a couple more around Livorno and Grosseto.

1 Like

Thanks! That sounds pretty conclusive, didn’t notice.

1 Like

One of the other views, groups all waterway tagged objects together, lumping =canal in with =river.

Sorry, I misunderstood your post above, thanks for the clarification!