I am looking for a way to get all hydropower stations or dams that are along a given river via Overpass turbo. Something like the following but for a given river instead of a given country:
For example, for all hydropower stations or dams along Luleälven (https://www.openstreetmap.org/relation/6974663). Perhaps it is possible to generate a search area that covers the river, e.g. extending the center of the river bed by 200 m on each side of the river. Or by using a search area that is defined to be "near" the river (most hydropower stations are on the river, but sometimes, they can be besides it, e.g. when the original river bed is bypassing the power station). Perhaps one could even use a search line instead of a search area. Thanks for all hints! asked 02 Jun '21, 21:00 Gåseborg |
'around' is the command you're looking for.
I've set the value to 50m, you may need to increase that, but it'll take longer to run & may return erroneous results. FYI use 'nwr'; it saves a lot of typing answered 03 Jun '21, 00:01 DaveF This works perfectly! Thanks also for the hint on 'nwr' which I was not aware of :)
(03 Jun '21, 09:23)
Gåseborg
@DaveF: One more detail, the river in the example gets water from many smaller rivers. I tried including the largest one of those ("Lilla Luleälven") by changing the second line in your answer to (rel[name="Luleälven"];rel[name="Lilla Luleälven"];)->.river; As a result, the outline of both rivers is shown correct in Overpass turbo, but it cannot find any stations any longer. Could you even give me a hint on how to get this done correcly? That would be great! Perhaps there even is a way to specify just the main river but adding an additional argument to include all mapped tributaries. Thanks in advance!
(14 Jun '21, 21:06)
Gåseborg
|