Opening Up Open Street Map
This post gives some background on Open Street Map, an open source, crowd sourced alternative to Google Maps. We also cover how data can be downloaded and used for analysis.
A key aspect of our postgrad GIS courses is an independent project, where students formulate their own projects to ensure they develop some analysis skills in an area that’s important to them. As the majority of students in the courses are from off-shore, and are interested in doing some analysis in their home countries (or elsewhere), we’re often in the difficult position of having to get data from and for other places – something that can be quite a challenge, particularly in countries where the spatial data infrastructure (i.e. availability of data) is not well developed. We’re pretty well served here with data on the J: drive and on-line portals (Koordinates.com, the LINZ Data Service and the Landcare Data Portal (LRIS) but the rest of the world can be patchy.
Case in point, Krishna Gurung, with us from Nepal, who was keen to get his hands on some useful data, including walking tracks, roads, and elevation in particular. While I was initially very doubtful of getting our hands on some data, I’ve been pleasantly surprised by what we’ve been able to get.
Data for his project was acquired from two main sources: Open Street Map and the United States Geological Survey (USGS). In this post I’ll mainly focus on the former, but a future post will look in more detail about how remotely sensed data can be downloaded from the USGS.
To start off, let’s look at Open Street Map. Here’s a local example of what you might see:
Open Street Map is essentially an open source alternative to Google Maps, but instead of being developed and maintained by the minions at the Googleplex, everything you see on Open Street Map (henceforth, OSM) has been crowd sourced, i.e. anyone interested in contributing can. Anyone. So all that you see was created by people interested enough to put the effort in. OSM was inspired by Wikipedia in that everyone’s an editor. There are some rudimentary query features so you can see attributes in a GISy sort of way – click on the “?” at the right border and then click on a feature on the map and you’ll see what amounts to an attribute table at left.
Features can be digitised in or GPS tracks can be uploaded which are then checked by someone further up the food chain before being approved and added to the global database. As you can see above, there’s a lot of potentially useful data for some basic analysis. A real plus of OSM is if you can see the data you can download it with the right tools. There are a variety of tools available, and a lot of variation in the degree of difficulty, but the good people at ESRI have developed an editor that can be built in to ArcGIS. (Note the “Export” button – this is a quick way to get a hold of the data but there are several, challenging data hoops to jump through before getting to work with them easily – not for the faint of heart.)
The ArcGIS Editor for OSM toolbox can be downloaded and then installed on your machine. Installation is pretty straightforward (check with ITS if you want to do this on an LU machine):
- Unzip the folder that you’ve downloaded and extract all the files to a local folder;
- Depending on your computer (32 or 64-bit), go into that folder and click the Setup file;
- Installation Help files can be found on the Git Hub here and further instructions here;
- One step that isn’t covered in the instructions is actually adding the toolbox to ArcMap so you can use it;
- Open ArcMap (or ArcCatalog) and go to ArcToolbox;
- Right-click on “ArcToolbox” and choose “Add Toolbox”
- Double-click on “Toolboxes” and head into the “System Toolboxes”
- From here, look for “OpenStreetMap Toolbox.tbx” and double-click on it
- The toolbox should now appear in back your normal ArcToolbox window
- Open it now – there are quite a few tools in there but initially we’ll just use the”Download, Extract, and Symbolize OSM Data”
The icon at left means that this tool is a model built using Python. We’ll get to using the tool in just a second, but first we need to add OSM to an ArcMap map and focus on the area where we want to download data. This is easily done with the Add Data button, , on the Standard Toolbar. Note the wee black down arrow at right. If you click that and dropdown window appears with some options:
“Add Data…” is a tried and true friend, but we’re more interested in “Add Basemap…” – click that now:
These are a collection of streamed basemaps that you can add to any map (though I’d suggest adding it to your map after you’ve already added some of your own, local data) to give some spatial context to your map. Note OpenStreetMap at lower right. If you click on that, and then “Add”, OSM will be added to your map:
Here it is at its full extent. You can zoom in and pan around as you would with any map. Let’s zoom in to Krishna’s area of interest, a portion of the Mustang district of Nepal in the Annapurna Conservation Area (ACA), northwest of Kathmandu:
You can see we’ve got mostly vector data here: points, lines and polygons. One thing we’re doing is setting the extent of the data to download, so it pays to spend some time making sure all the features you want to grab are shown on the map. Next we need to open up the download tool and set the parameters:
- First, set the “Extent of data download”. You’ve got several options:
- Set this to “Same as Display” though think about if the other options might be useful in future.
- Next, set the “Target Feature Dataset”. This should be an existing geodatabase somewhere on your H: drive or local drive. Here I’ve set mine to a file geodatabase called NepalData.gdb in my H:\Nepal folder. Marpha is the name of the dataset the layers will be saved to – the tool will create it so long as you provide a name
- You can rename the “OSM Group Layer” if you like. Here’s the tool ready to go:
Clicking OK sends the tool off to do its thing. And here’s the result (with OSM turned off so that you can actually see the data):
Sweet! So whereas before we would struggle to get basic data of this sort for places outside of New Zealand, Open Street Map now brings the world to our desktop. Of course you’ll have to bear in mind that the data available are limited to first, what data have been digitised, and second, what extent (scale) the data window is zoomed to.
I mentioned earlier that OSM users can contribute data to the global database. Now that we’ve got a local copy of these data, we can add to it, or edit it (sometimes it needs correcting) and then we can later upload it back to the OSM server for checking and approval. To do this, you would need to create an OSM account and then use the “Upload OSM Data” from the OpenStreetMap Toolbox, as shown above.
To close, some of the really crucial data for Krishna was elevation, preferably as a DEM. An intriguing possibility was revealed when we switched the layer from the Standard map to the Cycle map (this is looking at OSM in a web browser, not in ArcMap):
Contours! If we could just grab those contours we could construct our own DEM!
And that will be the topic of our next post.
C