Why not ask your question on the new OpenStreetMap Community Forum?

In OSM XML, are the attributes of the elements (node, way, nd) always presented in the same order?

For example is it always the case that the attributes of element node come in this order: id=".." lat=".." lon=".."

asked 04 Feb '13, 19:08

Sadeer's gravatar image

accept rate: 0%

(just in case you haven't already seen it):


(04 Feb '13, 19:27) SomeoneElse ♦

I saw the assumptions sections but it didn't mention anything on the attributes order of an element.

(04 Feb '13, 19:49) Sadeer

No. The rails port issues the attributes in a specific order but that is an implementation detail and not guaranteed. The /map call, the /node /way /relation calls, and the planet file are all produced by different pieces of software and might differ.

If you're doing some sort of quick hack though, you can assume that the order you get your attributes in today will still be the order you get your attributes in tomorrow. That assumption is probably right 99.9% of the time ;)

permanent link

answered 04 Feb '13, 19:25

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



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:


question asked: 04 Feb '13, 19:08

question was seen: 3,329 times

last updated: 04 Feb '13, 19:49

powered by OSQA