Hello, I`ve got a head ache because I do not know the purpose of bolded numbers in (for example) this line: way id="90669109" user="woodpeck" uid="5164" visible="true" version="1" changeset="6718705" timestamp="2010-12-20T18:52:24Z" nd ref="1052251551"/. There is no reference of it in the whole file. My job is to make xml code shorter so can anyone explain me the meaning of bolded numbers above?! Thanks a lot!

asked 22 May '13, 08:52

iBus's gravatar image

iBus
11112
accept rate: 0%

edited 22 May '13, 08:54

1

For what purpose do you want to make this XML file shorter?

(22 May '13, 09:07) scai ♦
1

(not a direct answer to the question but) if you're interested in making OSM XML files smaller you might want to consider PBF format. It stores exactly the same data, but the files take up less space. There are links at the bottom of that page to various language implementations.

(22 May '13, 09:13) SomeoneElse ♦

Scai I'm working on "public transport solution" - the simpler the better. some part of code might be deleted - I'm trying to determine what is relevant and what is not.

(22 May '13, 09:28) iBus

@iBus Then maybe you should have asked a different question. If you are only interested in the actual data you can leave out most of the other attributes.

(22 May '13, 09:34) scai ♦

Take a look at your way here. A way in OSM consists of several nodes. The number 1052251551 is just the ID of one of the nodes belonging to your way, that's all. Your XML file probably only includes information about your way. In order to get information about each node of your way you have to download a similar XML file for each of the referenced nodes. This can be done for example by calling our API or by using an extract of the DB. The latter will be faster if you need more than a few calls and it will put less stress on the OSM servers.

permanent link

answered 22 May '13, 09:05

scai's gravatar image

scai ♦
32.0k20293443
accept rate: 23%

edited 22 May '13, 10:22

1

It's not a good idea to encourage scraping of the API like this - better to use an extract that contains all the data. Resolving each referenced node could lead to tens of thousands of API requests.

(22 May '13, 10:06) Andy Allan
1

Indeed. For most use cases using an extract is a better idea. I updated my answer.

(22 May '13, 10:19) scai ♦
1

If there is only the example way and the XML was obtained from a http://www.openstreetmap.org/api/0.6/way/90669109 call then adding /full for http://www.openstreetmap.org/api/0.6/way/90669109/full will include the nodes for the way. But as above, if there are many ways/nodes, starting with an extract of the appropriate area would be better. (And no, I don't understand why the way is older than all the member nodes)

(22 May '13, 10:44) EdLoach ♦
3

@EdLoach Because all nodes have been updated at least once since creating the way. Updating a node doesn't automatically update the way as long as no node gets removed or added.

(22 May '13, 11:49) scai ♦
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:

×21
×6

question asked: 22 May '13, 08:52

question was seen: 1,844 times

last updated: 22 May '13, 11:49

powered by OSQA