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

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
55447
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 ♦
44.7k13326701
accept rate: 18%

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 ♦
82.5k927201273
accept rate: 23%

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.4k1449100
accept rate: 11%

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:

×167
×84

question asked: 16 Jun '15, 20:41

question was seen: 3,243 times

last updated: 23 Jun '15, 09:07

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