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

Hi, I want to store some data extracted from OSM (via overpass-api) into my database. Periodically (every month or year not decided yet), I want to search again for those nodes, ways or relations using osm_id and look for changes in the tags and update my database. can I count on the osm_id to retrieve the same node, way or relation as I read that osm_ids my change.

asked 29 Oct '15, 10:18

Faissal%20Aeh's gravatar image

Faissal Aeh
26112
accept rate: 0%


You cannot count on OSM IDs being the same; it is probably better if you load all OSM data for the area in question and then check for another object that has the same (or somewhat the same) tags. One thing that might happen to POIs for example is that they are made into a building and therefore the same tags might now be attached to a different object.

permanent link

answered 29 Oct '15, 13:06

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

but if we cannot count on osm_id there is, actually, no way to re-query a node representing a hotel for example just using the "tourism"="hotel" and the name tags cause they may change also.

(29 Oct '15, 15:32) Faissal Aeh
1

Yes, this is true. What exactly is your use case - what is your local database for, and why do you need to update it (instead of just repeating your overpass query)?

(29 Oct '15, 15:45) Frederik Ramm ♦
1

First, thank you for responding. I want to have a list of hotels in my database (extracted from OSM). And periodically (for ex. every month or 3 months) I want to re-query those elements and if some information was changed (in OSM), I want to update my database with the last one (ex. phone number, stars, addresse...)

(29 Oct '15, 16:00) Faissal Aeh

Did you already check [adiff: ] in the Overpass API documentation? This may be exactly what you're looking for.

(29 Oct '15, 18:01) mmd

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:

×199
×83
×10

question asked: 29 Oct '15, 10:18

question was seen: 3,547 times

last updated: 29 Oct '15, 18:03

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