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

I want a full osm object like we get on querying http://www.openstreetmap.org/api/0.6/way/40003158/full

but i also want to specify the version of the object too like in http://www.openstreetmap.org/api/0.6/way/40003158/3

I want to have the full object of older versions i.e. result of both queries in combined form

asked 10 Apr '14, 09:31

amritkarma's gravatar image

amritkarma
684212941
accept rate: 11%


This is not currently possible. Work is underway to support this in a future version of the Overpass API but it's not quite there yet. Currently, you would have to download an old planet file from planet.openstreetmap.org and then extract the object(s) in question from that.

permanent link

answered 10 Apr '14, 10:01

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

To be slightly more verbose than Frederiks correct answer: What is the meaning of "version 3 of way 40003158"? A way is changed if and only if either it's tags or the list of nodes are modified. There is no new version of a way when one of it's nodes is moved to another position.

Therefore let's imagine the following scenario:

  1. way 40003158 ("the way" in the following) is in version 2 and has two nodes A and B, both in version 1 (short as A1 and B1)
  2. Somebody moves A1 to another position. Afterwards we have the way still in version 2 and B1, but A2 now as that node has a new version.
  3. As next somebody reverts the way. This changes the order of A and B in the way. As a result we have the way in version 3, and the nodes as A2 and B1.
  4. Sombody moves B1, leading to B2.
  5. Somebody changes some tags on the way, leading to the way being in v4.

Now, after (4) happened you want to get the full version of the way in version 3. But which one do you want? Version 3 of the way had 2 different states: (way3, A2,B1) and (way3, A2,B2). You can imagine that for ways with more nodes there may be many different states of the complex object identified by the same way-object version in OSM.

To get what you want you would need to know the timestamp, too, and you would have to adjust your question to one of the following:

  • "I want to have the full version 3 of the way 40003158 at the time where the way reached that version"
  • "I want to have the full version 3 of the way 40003158 at time X"
  • "I want to have the complete/"deep" object state of way 40003158 at time X"

All this is possible, but far from trivial yet. As Frederik mentioned, it's a planned feature for Overpass (afaik mainly the last variant of the reformulated question).

CAUTION: If you nevertheless would like to tackle that problem yourself, please be careful with API requests regarding full object history, which would be necessary. These are expensive requests on the server and therefore not a good idea to be scripted and done in batch sequences like you would probably need them.

permanent link

answered 10 Apr '14, 10:22

jongleur1983's gravatar image

jongleur1983
714
accept rate: 0%

edited 10 Apr '14, 10:25

Your answer
toggle preview

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:

×290
×147
×26
×4

question asked: 10 Apr '14, 09:31

question was seen: 6,345 times

last updated: 26 Jul '14, 22:57

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