JOSM: Searching for negative ID

In a OSM file I have several objects with negative ID (i.e. not yet in OSM database). Is there a way I can search for those IDs? A search for e.g. id:-4 is returns all objects with ID less than or equal to 4, including all with negative ID.

Did you try searching with ‘new’?


Now I did, but searching for “new” will select all objects with negative ID (I presume), so more or less the same as id:-0 (and even id:0, but I don’t know why). What I want is to search for the node/way/relation with id -4. The reason for this is that I have a script that identifies potential problems with certain nodes, and prints their (negative) id.

You are creating this OSM file yourself? If that’s the case, then you can do the following:

odbl=-4 or created_by=-4 or another more descriptive value, of course

Then search for those. It is safe to do this, as those tags will be stripped by JOSM before uploading the data.


Thank you for your suggestion! The files I originally indended to search are output from sosi2osm ( It may be customized to add such tags. Those files are anyway used as input to further processing and I may as well add a tag there. I just hoped there was a way to do it without rewriting the data.