[OSM-dev] Parsing OSM-XML: Order of node / way / relation
Dominik Spies
kontakt at dspies.de
Wed Sep 24 14:41:58 BST 2008
Hi,
I'm trying to write a stream parser for OSM-XML in C# and have a minor problem..
The DTD for 0.5 does not specify any order of nodes, ways or
relations. So, it could be possible that a way references a node which
isn't parsed yet. In this case, I can't add the pointer to the node
(of my node-object) to the way (or node to relation etc.).
BUT in every case I have seen the nodes are in front of the ways and
these a in front of the relations. But can I rely on that?
With relations it's a bit more complicated, because relations can
contain relations. Is there any protection from circular relations?
If I can not, I would appreciate any help how I can do this efficiently?
Regards,
Dominik
More information about the dev
mailing list