You are not logged in.

#1 2021-08-03 09:48:11

nilisifo
New Member
Registered: 2021-08-03
Posts: 1

OSM question

Hello. I'm looking for a good way to add additional data (annotations) to OSM. I've a custom routing application (programmed in java) which requires additional, application specific data. For example, each road segment needs to be annotated with a "priority" field. Since this is an application specific field, this is not something you want to add directly to the existing OSM data. Consequently, I was wondering whether there's a good way to add a new layer ('ApplicationLayer') on top of the OSM data. The purpose of this layer is to add additional application-specific data. Ideally, I'm looking for a way to create the layer such that it remains compatible with the underlying OSM data. So if somebody updates/changes OSM, than this should be reflected in the ApplicationLayer. It would be very annoying if there's no way to keep the ApplicationLayer synchronized with the OSM data, or to detect conflicts.

Offline

#2 2021-09-25 19:48:27

bxl-forever
Member
From: Brussels
Registered: 2016-12-12
Posts: 11

Re: OSM question

Hello,

To say this with other words: if I understand correctly you want to have a list of private tags for several ways and, whenever a way is changed in OSM, your private list will keep in sync.
I have been also longing for such a feature but I’m afraid it doesn’t exist.

The hard way would to maintain your own database containing your "priority" fields against an OSM way id and writing down some characteristics about each way (list of nodes, length, and so on).

Over time, a way can be split (one part will keep the original id number and the other parts will get new numbers), two or more ways could be merged, ways can be extended, shrunk, or can get additional nodes in the middle (with or without changing their overall geometry).  Even if a way appears unchanged in OSM, one or several of its nodes may have been moved.  Even worse, any mapper can erase a way at any time and draw a new one instead, making it virtually impossible to detect under the ApplicationLayer model. sad

If your routing application covers a small territory, writing some scripts to periodically monitor significant changes and manually review them may be the easiest solution.  It might be really painful otherwise.

Hope this helps.

Offline

#3 2021-09-26 00:41:10

n76
Member
Registered: 2013-05-22
Posts: 302

Re: OSM question

Consider using something like https://pgrouting.org/docs/tools/osm2pgrouting.html to populate your routing database. The github is at https://github.com/pgRouting/osm2pgrouting where you can see some sample XML files for setting priorities on ways based on the tags found on the ways.

Offline

Board footer

Powered by FluxBB