You can also select to filter on custom queries and based on points, lines or polygons. Once you’ve selected the bounding geographic box, you then have the option to display only the tags present in the data in your selection, so you can narrow the data you want even further down beyond that. This is nice because you can construct a query to filter specific types of data in the OSM that you want to return, based on tags in the data or other elements that you deem important. Once installed, it has a user-friendly GUI complete with a query window. This is a plugin available in the QGIS plugins repository. This is an easy-to-use tool, but it’s only available in the countries HOT works. It also allows you to select which feature tags to download. The tool has an interactive map viewer to locate the geographic area you need then draw the bounding box. You need an OSM account to use it, but once you have that, you’re good to go. The Humanitarian OpenStreetMap team put together this extract tool. One of the great features is the ability to get the data in dozens of file formats, including shapefile, Garmin and SVG. This extensive extraction tool allows you to create a custom bounding box to download data, or manually input the geographic coordinates. Anyone can contribute by creating a pull request or issue for another metro area. The data is refreshed weekly and it’s provided in six different file formats. Thankfully for us, they provide the data on their Metro Extracts page. MapZen built a tool to export all OSM data at the metropolitan region level for dozens of cities around the world. If you want data for one city, metro or geographic area… MapZen Metro Extracts Like the Geofabrik exports, it’s a lot of data and you can’t filter for specific tags or features. They also provide a changeset database, so you can identify just the features that changed, if you need to do so. If one continent isn’t enough for you, this resource offers extracts of the entire OSM database updated weekly as XML and PBF. This is great if you want everything for an entire continent, but they’re large files, and you can’t filter on specific tags or features.
Geofabrik, a software consulting firm that specializes in OSM data, offers free extracts by continent, updated weekly. If you want a LOT of data… Geofabrik Downloads So if you can master using the API, you’re essentially covered. The Overpass API also powers some of the other extraction tools. The OpenStreetMap wikipedia can be a helpful resource for using it. Unlike the main OSM API, it’s optimized to retrieve data. The Overpass API is a read-only API that serves up selections of map data from OSM. However, below the Export button they provide some other ways to get the data, which I’ll talk about later. This tool seemed to fail just about every time I tried it, with the exception of very small bounding boxes the size of only a few city blocks. The export tab will open on the left side of your screen with the bounding box populated with the map coordinates you are currently zoomed to. To do so, click the Export button above the window. You can get OpenStreetMap directly from the web browser while viewing the data.
Below, I’ll talk about some tools to get OSM data into QGIS and in a future blog I’ll provide a tutorial for how to export data from OSM and right into QGIS for desktop analysis. Luckily, QGIS has built-in support for OSM files and will render the layers. Though it might seem frustrating that OSM has its own file format, it’s actually very useful for filtering through the vast amount of tags contained in OSM data. OSM file format is XML that describes the data. However, if you’ve downloaded OpenStreetMap data before, you probably noticed it came with its own file extension. If you’re a GIS Analyst, you’re probably used to working with file types like shapefiles, CSVs, and GeoJSON. While it’s open source and the data is free, getting it into a usable format for analysis in desktop GIS, for example, can take a bit of effort. It’s become a fantastic resource for geographic reference data and it’s constantly being improved and updated. Since its inception, OpenStreetMap has crowdsourced the addition of millions of features of spatial data across the world.