You are not logged in.
- Topics: Active | Unanswered
Announcement
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***
Pages: 1
#1 2015-03-10 21:28:45
- Geir Ove Myhr
- Member
- Registered: 2012-08-14
- Posts: 25
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.
Offline
#2 2015-03-10 21:31:01
- Polyglot
- Member
- From: Belgium
- Registered: 2011-11-25
- Posts: 243
Re: JOSM: Searching for negative ID
Did you try searching with 'new'?
Jo
Offline
#3 2015-03-12 09:43:50
- Geir Ove Myhr
- Member
- Registered: 2012-08-14
- Posts: 25
Re: JOSM: Searching for negative ID
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.
Offline
#4 2015-03-12 10:20:32
- Polyglot
- Member
- From: Belgium
- Registered: 2011-11-25
- Posts: 243
Re: JOSM: Searching for negative ID
You are creating this OSM file yourself? If that's the case, then you can do the following:
assign
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.
Jo
Offline
#5 2015-03-19 09:50:20
- Geir Ove Myhr
- Member
- Registered: 2012-08-14
- Posts: 25
Re: JOSM: Searching for negative ID
Thank you for your suggestion! The files I originally indended to search are output from sosi2osm (https://github.com/Gnonthgol/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.
Offline
Pages: 1