The wiki says nothing about it, as a certainty or uncertainty. Does anybody with field experience know whether way tags will always come after the refs?

asked 16 Jun '15, 20:41

CrazyDave2345's gravatar image

CrazyDave2345
10446
accept rate: 0%


I would suggest not building a parser that depends on a specific order, which shouldn't be an issue in any case. The specifics are likely to be implementation dependent and might and will differ between APIs and the numerous tools that process and provide OSM data.

permanent link

answered 16 Jun '15, 21:03

SimonPoole's gravatar image

SimonPoole ♦
38.3k13284609
accept rate: 19%

edited 23 Jun '15, 09:07

The osmosis programme has a --sort task that you can use to sort any OSM file into nodes/ways/relations.

permanent link

answered 23 Jun '15, 08:17

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
70.0k806341097
accept rate: 24%

Depends where you get them from. The files on (say) planet.openstreetmap.org will usually conform to this. However there is no guarantee that this will happen. You might try to use a tool that will produce an XML file in a different manner. So you should be able to handle files with many different orderings.

So to answer your question: No, you cannot rely on that.

permanent link

answered 17 Jun '15, 08:36

rorym's gravatar image

rorym
5.3k144898
accept rate: 11%

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:

×139
×78

question asked: 16 Jun '15, 20:41

question was seen: 2,049 times

last updated: 23 Jun '15, 09:07

powered by OSQA