How do I search for (or exclude) the last nodes in ways in JOSM?

I’m using JOSM to add new sidewalks and clean up existing sidewalks in my city. I want to make sure I haven’t forgotten to tag all intersection nodes that are shared by a sidewalk and a highway as highway=crossing. I’d also like to search for other similar errors from mappers who’ve come before me.

To accomplish this, I think that I can select all untagged nodes that are shared by 2 ways where one of them is a sidewalk and the other is a street. I only want to select nodes that are neither the first nor the last node in the way.

From reading the “JOSM/Search” wiki page wiki page and the “Filter Dialog” help page, I know there is nth:1 to select the first node, or nth:-1 to select all nodes but the first, but how would I select (or exclude) all nodes but the last? Is there a nth:count or nth:max or something?

I’ve gotten this far:

type:node ways:2 untagged child highway=footway nth:-1 child (highway=* & -(highway=footway ^ highway=steps))

If I can figure out how to exclude the last nodes, I’ll be in much better shape. If anyone has a better idea or if there’s already a tool or a preset for this scenario, I’d love to know about it. Thanks in advance!

2 posts - 2 participants

Read full topic


Ce sujet de discussion accompagne la publication sur https://community.openstreetmap.org/t/how-do-i-search-for-or-exclude-the-last-nodes-in-ways-in-josm/109139