Exporting to XML

This is most probably a stupid question. Consider exporting different map sections which all contain part or all of a particular way within the longitude and latitude bounds that define the map sections. If I analyse the XML data, is that particular way always represented in exactly the same manner, i.e. always made up of all the same nodes always in the same order? For example, would the way defined as:

<way id=“12345678” user=“John Doe” uid=“123456” visible=“true”…>

always look the same in my XML data, even if I have exported it 10 times using 10 different sets of coordinates to define the bounds of my map, and even if in some of those maps only part of the way actually lies within the bounds of the map?

My second question is related to this - again exporting map data, if a way extends outside of the bounds defining the map I export, will the entire way always be exported? If I plot map data that I have exported in a package such as Excel, ways often extend well beyond the bounds of the original area I defined?

This is quite important in the application I have created, which imports XML data of map segments (which overlap) into a SQL database and then utilises the data for navigation and route planning.

Hi tursiops73,

your question is not stupid at all. Depending on the program you’re using to extract a geographical region and depending on the program which is going to use the extracted data, there are 4 different ways to perform such extracting operations:

  • leave the way object as it is (with all node references), just delete the node objects which are outside of the region

  • same as before, but remove node references which would refer to nodes which aren’t in the file anymore

  • leave the way object as it is (with all node references), and include every node of this way, even if it is located outside the region

  • clip the way and create a new node at the crossing with the geographical border

The first option is the usual. It has the advantage that you can easily remerge several of these regions.
The second is necessary if you want to process the output file with certain programs, e.g. Map Composer.
The third way is used by downloads.geofabrik.de in their extracting algorithm for the regional downloads.

Hope I could help a little.