So I export the network from the OpenStreetMap however when the data is all in latitude/longitude format. I need the data in the longitude/latitude. Is there a way to get that automatically from the website. Please let me know. THANKS!!!
Nope, probably not. But if you explain exactly what you mean by “Export the data from the OpenStreetMap” - what website/program are you using, where are you clicking, what are you typing - maybe people can help.
You know that we can export a map from OpenStreetMap, right? It will come out as a “map.osm” when we export such file. It will have information on the transit, intersection etc… Below is a sample line that you see from the “map.osm” file:
You notice that lat is for latitude and lon is for longitude. I wonder if it’s possible to switch the order such that longitude comes first.
I don’t understand why that would be helpful. I certainly can’t see a business case for its being done.
Either you are parsing this with a proper XML parsers, in which case the order will make no difference, as XML attributes are not order sensitive, or you are using a quick and dirty parser, in which case parsing script can just as easily swap the fields over.
If you are using a quick and dirty parser, please note that in this sort of use of XML, newlines are totally irrelevant, so there is no guarantee that they will exist or be in the same places (although I doubt that the OSM API implementation will change in this respect in the near future).