I am trying to write up a MATLAB function to go to a user specified location on Opens Street Maps and return the OSM file using websave(). This works but the OSM I receive is nothing more than the xml and osm version and box bounds. How do I download the nodes and tags as if I were on Open Street's site? The URL I'm using is this: https://api.openstreetmap.org/api/0.6/map?bbox=11.54,48.14,11.543,48.145 Update: What I'm attempting to do is simply execute the "Export" function that OpenStreetMap's website has but from MATLAB. The OSM files I download do not appear to have any nodes as shown below:
Thanks. asked 14 Dec '18, 16:42 jholland4134 aseerel4c26 ♦ |
I notice that the min and max longitude above are the same. answered 15 Dec '18, 19:04 nevw 1
Thanks to nevw, I rechecked my code and noticed that I failed to expand my bounds. The rest appears to be fine.
(18 Dec '18, 22:47)
jholland4134
meta: @jholland4132: Please could you mark an answer as accepted if your problem is solved now?
(19 Dec '18, 07:05)
aseerel4c26 ♦
|
That URL is returning an OpenStreetMap XML file(6MB), and it includes nodes.. You can read information on the XML format of OSM. It's possible that Matlab just doesn't (automatically) understand what kind of XML it is, and how to process it. If you're interested in only reading the data from OpenStreetMap, you might want to take a look at the Overpass API. This has several features so you can query specific data in the area, or get different file formats returned. answered 14 Dec '18, 18:55 LivingWithDr... Thank you for the assistance.
(15 Dec '18, 15:21)
jholland4134
|