Nederland has cleaned out all its untagged + unconnected nodes. There were many, most were remainders of vey old landuse/natural imports. Also, the polygoncutout JOSM plugin leaves many untagged loose nodes, the idea is that JOSM validation finds them and you can remove them with a single click, but sometimes they are missed. And some versions of another tool for single building import appear to have left idle nodes. I looked around a bit, and other countries also have these idle nodes.
We did this in patches in a hands-on workflow, not a mass edit. We used the overpass-turbo query below, with JOSM. Note: this query uses an enormous amount of RAM, so the search area should not be wide. I’ll explain that below the query! If anyone can improve on this query, I would sure like to hear it!
The query (Updated 2026-03-23 20:04 (Dutch time) to also exclude untagged nodes with a role in a relation):
// Find unconnected nodes without tags within an area and within the map view.
// Settings
[out:xml][timeout:125];
// Find area with Nominatim
{{geocodeArea:Dortmund}}->.searchArea;
// Find nodes without tags
node(area.searchArea)({{bbox}}) (if: count_tags() == 0)->.candidates;
// Check if the candidates are in use by a parent way or relation, including long passing through ways.
// First, get the union of all the ways and relations for the candidate nodes, save to the parents set
( way(bn.candidates); relation(bn.candidates); )->.parents;
// Get the union of the nodes of these ways and relations, save to the .used set
( node(w.parents); node(r.parents); )->.used;
// Select the .candidates that are not in the .used set
( .candidates; - .used; )->.unused;
// Output result
.unused out meta;
Explanation:
The main problem is to rule out nodes that are used by ways, including long ways. It’s easy to exclude ways that are actually in the search area, but long passing through ways are not present in the area, just a few nodes, which then appear to be unconnected. Pipelines, railways, highways, power lines, a lot actually.
So the query does a reverse lookup without bounds, to see which nodes belong to a way, any way. And that is the memory hungry part. I have tried doing it without intermediate sets, that is possible but then CPU is the bottle neck, which is worse than the RAM limit.
Our workflow, starting in overpass-turbo:
- Zoom in
- Run query
- Export via remote control to a cleared JOSM
- Select all (should not show any tags)
- Get parents (should not produce any ways or relations)
- Delete
- Upload
(I tried Osmose first, but I couldn’t get it to export manageable chunks to JOSM).