How to search just the nodes shared by ways with given tags?


In JOSM, I want to select the nodes shared by ways with specific tags.

An example, as pictured below: select all nodes shared by highway=footway and barrier=kerb, in order to add the tag barrier=kerb to the nodes themselves, in one fell swoop.

Is there an Overpass script a query for this?

Edit: solution for the given example:
type:node child barrier=kerb and child highway=footway

Thank you,

1 Like

Your question is not clear to if you want to use JOSM query/search language to select data directly in JOSM or if you want to do the same to download data from an Overpass API instance.

In any case see JosmFilterDoc/ at master · simonpoole/JosmFilterDoc · GitHub the child function will match elements that are children of whatever matches the expression, so

child (type:way building)

should return all nodes of ways with a building key.

1 Like

Sorry, I’m too used to say “Overpass” as metonymy for “query”.
I meant the first case (select data).
I’ll edit the original post for clarity.

Thank you,