How is the order of nodes maintained?

Points in a line have to be maintained in a certain order so the result of painting the line doesn’t look nonsensical, but I don’t see any sorting information stored in the record. Are they kept in order by hand?

In the API database there is a column called IIRC sequence_id which provides the ordering. When the planet is built nodes (or members in a relation) are exported into the XML format based on that sequence. Therefore you must treat order in the XML format as the implicit order of the nodes.

Remember that the XML format is mainly for moving data around, and therefore only requires enough information to achieve that result: additionally adding a sequence identifier when this can be done merely by inspecting a record is the sort of thing which is not needed.

ah, thanks. So I didn’t find any ordering info in the xml because there isn’t any. I wondered whether I was just not seeing it.