NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

With JOSM I have just removed some tags addr:street that were set on many nodes in a city (nodes that were the corners of buildings). I did use the search and first searched for "addr:street" (in quotation marks) and then for tags=1. Then I deleted this tag.

But now I have also many unused nodes which are not part of ways. How can I search for them?

asked 28 Jul '13, 17:42

erik's gravatar image

erik
558152234
accept rate: 9%

4

Please keep in mind before deleting those nodes (yes, you did not write that), to try to look why these nodes are existing (see object history, OWL's beta history tab, whodidit, …).

Sometimes

  • you can find newbies needing help,
  • just the tags are missing and the creating user forgot to add them (mail the user),
  • you can find other problems in the related changeset,
  • (last year, but maybe still today) that could be a surviving left-over from the redaction bot (license change) which may be an indicator that there is some feature missing (could be seen in aerial imagery sometimes).
(28 Jul '13, 18:40) aseerel4c26 ♦
3

Yes, it were some small buildings in a small village deleted by the redaction bot I think. As I will be there tomorrow, I will possibly create them again.

(29 Jul '13, 02:48) erik

While the OP has answered his own question, here's a simpler one-step search:

type:node untagged -child
permanent link

answered 29 Jul '13, 10:18

Vincent%20de%20Phily's gravatar image

Vincent de P... ♦
17.3k18152249
accept rate: 19%

Thank you very much for this. I suppose -child means »is no child«, am I rigth? As from the description of the JOSM search I thought that child and parent need an expression after them to which they apply. Strange …

(29 Jul '13, 15:56) erik
1

Your answer is covered in the JOSM wiki help page as an example (http://wiki.openstreetmap.org/wiki/JOSM/Search_function). But this page does not mention the parent token at all. And it does not cover the tokens relating to expressions written after them as seen in the JOSM program itself in the search dialog. Very strange. Is there a better reference/documentation besides the source code?

(29 Jul '13, 16:10) erik
1

That's how I interpret it. The "-" works for other expresions too, like "building=* -source=*". But I do not understand the feature fully, for example how to use "child" with an expresion. The documentation could do with some improvements.

(29 Jul '13, 16:16) Vincent de P... ♦

Ok, I have found a solution.

  1. First search for type:node tags:0
  2. Then search for child parent type:node and select remove from selection.

Explanation

  1. Searches for all nodes which have zero tags (that includes many nodes that are part of ways).
  2. Then search for nodes which have a parent (a way). And then the child of this parent (the nodes that are part of a way). By removing these from the selection, we have only the unused orphan nodes left. Voilà.
permanent link

answered 28 Jul '13, 17:58

erik's gravatar image

erik
558152234
accept rate: 9%

edited 28 Jul '13, 17:58

I have made the following cheat sheet of JOSM filters and search expressions. I have them on my OSM wiki page at: https://wiki.openstreetmap.org/wiki/User:Mdelatorre#Searching_and_filtering

I hope they can help!

Search or Filter Expression

Description

building inview nodes:4-

Buildings in view with more than 4 nodes

highway=* name:

Highways that have a name

type:way highway=* name~"^[0-9]+.*"

Highways of any kind that the name starts with one number

type:way name:-

Ways that do not have a name

type:node untagged

Nodes that are not tagged

type:node untagged -child

Nodes that are not tagged neither part of a way

new tags:0-0 nodes:3-

New objects with no tags with more than three nodes

nodes:3- -(building=*)

Objects with more than three nodes that are not buildings

nodes:3- -(building=*) -(highway=*)

As the previous excluding highways

type:node -highway=stop

Nodes excluding stop signs

type:node new "addr:housenumber"

Nodes with new house numbers tags

type:node is_in:

Nodes with an is_in tag set

new modified

Objects that are in state new or modified

timestamp:2020-01-15/

Objects that were last modified after the YYYY-MM-DD date given

timestamp:2020-01-01/2020-04-30

Objects that were last modified in the date range given

waterway | boundary=administrative

Objects that are a waterway or an administrative boundary

type:relation admin_level=10

Relations that have an administrative level equal to 10

child(type:relation id:<id>) waterway=river

Children of the relation (the members) with the id <id> tagged waterway=river

closed areasize:-200

Closed ways (areas) with areas up to 200m² in size

closed waylength:1000-

Closed ways with perimeters greater than 1000m in length

type:node -untagged child closed

Tagged nodes which are part of closed ways

parent(child(selected)) type:way

Neighbouring ways of a selected way

parent child selected type:way

Same as above. Parentheses are optional for single-argument expressions

parent(type:node highway:stop) highway:residential

Residential ways that have a stop sign in a child node

child (type=route "<name>")

Everything that is member of a relation of type route with name <name>

type:node ways:2 child highway=residential

Intersection nodes of residential ways

type:way and highway=residential and name!=* and noname!=yes

Residential roads missing a name

type:way and (highway in (motorway, motorway_link, trunk, trunk_link, primary,

primary_link, secondary, secondary_link,

tertiary, tertiary_link, unclassified,

residential, living_street, pedestrian) or

(highway=service and service=alley))

All types of highways

building=* and building!=no and geometry:polygon

All buildings. This filter also excludes the (rare) objects marked with building=no, which is a tag used to indicate that a feature might be expected to be a building

leisure=park and geometry:polygon or amenity=bench and (geometry:point or

geometry:line)

Parks and park benches

(landuse=forest or natural=wood) and geometry:polygon

Forests and woods

  1. DELATORRE, Manuel;[JOSM search and filter examples](https://pastebin.com/Qf2g5VDh);pastebin.com;2020
permanent link

answered 17 Oct '20, 07:51

mdelatorre's gravatar image

mdelatorre
1773411
accept rate: 0%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×622
×193
×11
×5
×1

question asked: 28 Jul '13, 17:42

question was seen: 7,565 times

last updated: 17 Oct '20, 07:51

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum