Hi. I am new to OSM. I have extracted a rectangle of data for Welwyn Garden City, with a view to experimenting with routing algorithms. I have used osm1.c as an example to extract ways, nodes, relations. My question is how do I know which order to plot nodes to draw a way. I don't want to use any library to do this. Is this the order in the way XML data? For example Ingles (a street name) appears to have 20 nodes and no relations. This appears to be the case (order wise) for Ingles but is it generally true? Do 'relations' give this information for some ways. asked 02 Jun '19, 21:56 Mike Begesford |
General information about the OSM xml format is available on the wiki and a simple example of how a way is recorded here. There are a few open source routing engines for osm data if you want to see how others have tackled the problem. answered 02 Jun '19, 22:58 InsertUser I just wanted 'yes' or 'no' from one of the experts out there!
(13 Jun '19, 12:18)
Mike Begesford
1
Relations have nothing to do with this. This information is contained in the XML, specifically the order in which the way refers its nodes via
(13 Jun '19, 12:25)
scai ♦
|
Way nodes in (any format that I know are) are ordered in the data (so first node first and so on, closed ways end with a repeat of the first node). answered 14 Jun '19, 07:16 SimonPoole ♦ |