Dear community, we currently are creating indoor maps for our university campus. Unfortunately we are not allowed to upload all this data to the official OSM servers, but we had to set up our own one. Since we can't use the official one, we made the database and the processes working with its data to work with negative osm ids. The problem now is that JOSM behaves as following: When creating new elements these elements get negative ids. Once the just-saved file gets loaded, all negative ids within it will be replaced with new negative ids. That means there's no consistency of the same file thanks to JOSM. So my question is: Is there a way to reserve / allocate "real" OSM-IDs for the created ways, relations and nodes without uploading the data itself. I assume we could just upload a node/way/relation without containing useful information, but I'm frightened someone could remove due to its uselessness and the very same ID could be assigned to some other element. And since our database data is not stativ but will be upgraded from time to time we cannot just chose any positive ID not yet included in the database because some day it might. Any help is welcome! Thank you! asked 12 Jan '14, 17:02 Henry Moews |
Sorry, but AFAIK there is no way to reserver/lock IDs without real payload. If you start from an empty dataset, you might use your own (nonnegative) IDs and keep them in a local xml file. Another way would be to setup your own rails port server with own API etc. that keeps your stuff seperated from OSM DB, while allowing multiple users to edit this data. I'm not an expert but I guess there might be legal problems if you mix OSM data with non free (as you aren't allowed to publish) informations on a dataset level. There is also a small but nice existing indoor community at OSM :) answered 12 Jan '14, 18:20 iii Thanks for pointing out the legal problems. Indeed, we're working with these indoor definitions.
(12 Jan '14, 19:52)
Henry Moews
|
Use positive IDs for your own data file, starting at 1. If you need to mix your data with data from OSM for some processing, use a small script to re-number your file to using IDs above the highest in OSM at that time. answered 12 Jan '14, 19:30 Frederik Ramm ♦ Yeah, actually the data gets immediately in touch with (our own) OSM database. But your idea of re-numbering made me think of re-numbering all of our own OSM elements in the database whenever we update from the official OSM servers having an ID conflict.
(12 Jan '14, 19:57)
Henry Moews
appending to Frederik's hint: can this be a solution? http://www.geofabrik.de/en/projects/separatedata/index.html
(13 Jan '14, 17:14)
stephan75
|
Reserving IDs is a very bad idea... Aside from the obvious management complications, there are other complications whenever you encounter conflicts of IDs, software not aware of the reservations, etc. Also, you're trying to use a tool (JOSM) that wasn't designed to work with "mixed" (OSM and private) data. JOSM will keep renumbering your IDs internally, and it wouldn't matter to it, because even if different between different loads of the same file, it'll be consistent at the moment of the upload to the OSM servers (which will replace the negative numbers with valid IDs) The ID that'll be used is the next sequence number of the relevant tables. If by some reason the upload fails, the whole transaction is rolled back and the IDs used are "lost" forever. However, not everything is lost... One workaround I thought is relatively simple, emulates the reservation system, but has some limitations. Let me explain...
The limitations are:
Updates to the APIDB using osmosis, or other tools, from the daily/hourly/minutely changes all come with the IDs already assigned, therefore the sequence number is never touched when you apply them. Your own changes, on the other hand, do not have valid IDs yet, and the API server will use the default (implicit or explicit, can't remember) of the ID column which is "nextval([name_of_sequence])". EDIT: I didn't fully understood Frederick's answer cited before. Corrected! answered 12 Jan '14, 21:07 MCPicoli |
Why do you even worry about conflicting IDs if you don't intend to upload your results anyway ? Put your objects in your own db, and use a mashup to display your indoor map on top of the osm basemap. You can "seed" your work using an extract of OSM data if you want, say the town your school resides in. That would just be a snapshot of osm data; updating said data after you modified it should be possible, but is likely to run into problems now and then. Also, remember that if you seed your own map this way, it certainly constitute a derived work and you would have to redistribute it, making the whole effort of keeping your work separate a bit pointless. If you ever want to merge your data with the osm data (assuming you didn't seed it with osm data, and kept it separate), just extract your db as a *.osm file, negate all the ids, load it into josm, check for problems, and upload to osm. answered 13 Jan '14, 09:31 Vincent de P... ♦ You can't upload to your own local DB and update it from the diffs unless you take care about conflicting IDs.
(13 Jan '14, 10:08)
MCPicoli
That's part of the problems you could have. You'd have to fix them manually on a case by case basis. Not that I'm advocating this method. I really think you should either upload directly to osm, or use a completely separate db.
(13 Jan '14, 12:45)
Vincent de P... ♦
|
Not a very good idea to work with negative IDs. Editing software all expect negatives to be NEW items without real IDs assigned yet.