Author: Ben
This module will introduce OpenStreetMap (OSM) and the High Resolution Settlement Layer (HRSL). At the end of this module, learners would be familiar with:
They should also be able to:
The required tools and resources for this module are:
Maps have become ubiquitous in our daily lives. We can just pull up our phones and open applications that utilize maps and location data. There are apps that we use for orienting and locating ourselves, for navigating and getting from one place to another, maps are shown when we order food from our favorite delivery service, etc. Maps have become so integral to our day to day activities that we tend to forget that there are places in the world that are still unmapped or not found in the digital maps that we use.
The ubiquity of maps in our lives is a byproduct of the sheer amount of location and spatial data that we are collecting. The opportunities and potential for creating something good from the geospatial data available to us is outstanding but this will only be possible if these geospatial datasets are free and open.
OpenStreetMap (OSM) (https://www.openstreetmap.org/) is a free, editable map of the whole world that is built by volunteers from across the globe and released with an open-content license. It is a project that creates and distributes free geographic data for the world – a map of the world by the people and for the people. If something is missing on OSM, you are free to add it. If something is wrong in OSM, you are free to correct it. OSM is a digital common good that greatly amplifies the value of the information added to it.
Figure 3.1. OpenStreetMap
For more information about why OpenStreetMap exists and its importance, check out: https://wiki.openstreetmap.org/wiki/FAQ#Why_OpenStreetMap.3F
You can also read: https://wiki.openstreetmap.org/wiki/About_OpenStreetMap
According to OpenStreetMap, it “is open data, licensed under the Open Data Commons Open Database License (ODbL) (https://opendatacommons.org/licenses/odbl/) by the OpenStreetMap Foundation (OSMF) (https://osmfoundation.org/)” and that “you are free to copy, distribute, transmit and adapt our data, as long as you credit OpenStreetMap and its contributors. If you alter or build upon our data, you may distribute the result only under the same licence.” When creating a map that uses OSM data, it is required that you credit “© OpenStreetMap contributors”. You can read more about OpenStreetMap’s Copyright and License here: https://www.openstreetmap.org/copyright
One of the core values of OpenStreetMap is the ability to collect, edit, and share map data which can be used for many different purposes. Such is the freedom provided by the ObDL. Because OpenStreetMap allows users to utilize its data with very few restrictions, there is a wide variety of applications, services, and use-cases that are built, being built, or can be built with OpenStreetMap. OpenStreetMap is used for creating maps, routing services, education, and even humanitarian and advocacy purposes.
In fact, there exists HOT or the Humanitarian OpenStreetMap Team (https://www.hotosm.org/) which is an international team dedicated to humanitarian action and community development through open mapping.
OpenStreetMap is also a crucial part of some advocacy mapping communities such as MapBeks (https://wiki.openstreetmap.org/wiki/MapBeks) – an online LGBT mapping community, based in the Philippines, that advocates for diversity inclusion and representation focused specifically for Lesbians, Gays, Bisexuals, Transgender, Queer, Intersex, etc. (LGBTQI+) on OpenStreetMap; and Mental Health AWHEREness (https://mentalhealthawhereness.com/) – a volunteer-organized online platform and map that shows the locations of mental health facilities and services that offer help to people on their mental health within the Philippines.
A list of OpenStreetMap-based services can be found at https://wiki.openstreetmap.org/wiki/List_of_OSM-based_services.
OSM data can be used in QGIS in several ways. The first one is by using OSM-derived tile layers as basemaps. In fact QGIS comes with a connection to an OpenStreetMap tile layer by default. You can find this layer named “OpenStreetMap” under the XYZ Tiles list in the Browser Panel.
You can add other OSM-derived tiles in QGIS such as those found in the Leaflet Providers list (https://leaflet-extras.github.io/leaflet-providers/preview/). OSM-derived tiles provide users free and open access to an updated basemap since these tiles are usually regularly updated to match the current state (e.g. features) of OSM.
You can also load the features from OSM as vector data in QGIS. This can be done by downloading OSM data from sites such as GEOFABRIK (https://www.geofabrik.de/data/download.html).
OSM feature data can also be directly loaded in QGIS using the QuickOSM plugin. This plugin takes advantage of the Overpass API (https://wiki.openstreetmap.org/wiki/Overpass_API) that allows users to quickly select a subset of OSM data using queries. This is made possible because features in OSM (https://wiki.openstreetmap.org/wiki/Mapfeatures) are tagged using a free tagging system (https://wiki.openstreetmap.org/wiki/Tags) that allows the map to include an unlimited number of attributes describing each feature. These tags can then be used to query certain features based on their attributes/tags.
Usually, the OSM community and local communities agree on certain key and value combinations suitable for the most commonly used tags which ten act as an informal standard. This ensures that data users can expect consistency in tagging common features such as roads, buildings, etc. However. users can always create new tags to improve the style of the map or support analyses that rely on previously unmapped attributes or tags of the features.
or this exercise, we will load road network data and locations of fast food chains from OSM that can be found in the division of Rajshahi using the QuickOSM plugin.
QuickOSM works by querying the tags (keys and values) of the features in OSM. For more information about how to use the key/value in QuickOSM, go to: https://wiki.openstreetmap.org/wiki/Mapfeatures.
Figure 3.2. Rajshahi layers loaded in QGIS
Open the QuickOSM plugin (Vector ‣ QuickOSM ‣ QuickOSM). A dialog should open with five tabs:
Figure 3.3. QuickOSM plugin
Load all highways inside the extent of the Rajshahi_district layer.
Figure 3.4. Load all highways in the Rajshahi_district layer extent
Figure 3.5. Highway data loaded from OSM
Figure 3.6. The Overpass query version of the Quick query to load highways
Next, let’s load all fast food restaurant locations in the Rajshahi_division layer extent. Open the QuickOSM plugin and put the following parameters in the Quick query tab:
Figure 3.7: Load amenities (points) tagged as fast_food in the Rajshahi_division layer extent
Figure 3.8: Fast food locations loaded from OSM
True or False:
According to Facebook and the Center for International Earth Science Information Network (CIESIN) at Columbia University, the “High Resolution Settlement Layer (HRSL) provides estimates of human population distribution at a resolution of 1 arc-second (approximately 30m)”.
Population grids have been developed for 140 countries and can be accessed from the Humanitarian Data Exchange (https://data.humdata.org/search?organization=facebook&q=%22High%20Resolution%20Population%20Density%20Maps%20%2B%20Demographic%20Estimates%22).
The population estimates are based on census data and high-resolution (0.5) satellite imagery from DigitalGlobe. Settlements and human-built structures are identified in the imagery by applying computer vision techniques. These locations are then used as a proxy for places where people live. Afterwards, CIESIN used proportional allocation to distribute population data from the census data to the settlement extents.
For the current iteration of the HRSL, seven maps/datasets for the distribution of various populations are available:
Figure 3.9: HRSL data on HDX
The population grids provide high-resolution and accurate information on both the delineation of settlements in urban and rural areas as well as the number of people living in these. This information is useful for many research areas such as disaster and humanitarian response, planning, and development of infrastructure.
To read more about the HSRL, you can go to:
How to work with Facebook population density data - http://www.statsmapsnpix.com/2021/01/how-to-work-with-facebook-population.html
Open population and open challenges - https://engineering.fb.com/2016/11/15/core-data/open-population-datasets-and-open-challenges/
Connecting the world with better maps - https://engineering.fb.com/2016/02/21/core-data/connecting-the-world-with-better-maps/
Mapping the world population one building at a time - https://arxiv.org/abs/1712.05839
The HRSL data found on HDX comes in GeoTIFF (raster) and CSV (vector) format. The CSV are point locations with corresponding population values. For this exercise, a subset of the data for your country has already been prepared but you can always download the whole dataset or even other datasets to try.
Figure 3.10: The HRSL for Rajshahi, Bangladesh
The Overpass API (https://wiki.openstreetmap.org/wiki/Overpass_API), formerly known as OSM Server Side Scripting, or OSM3S before 2011, is a read-only API that serves up custom selected parts of the OSM map data. Unlike the main API, which is optimized for editing, Overpass API is optimized for data consumers to get a small subset of the roughly 10 million elements in OpenStreetMap. These subsets can be selected by search criteria such as location, type of objects, tag properties, proximity, or combinations of them. The Overpass API serves as the backend for other OSM-based services like the QuickOSM plugin.
Using an Overpass query allows you to create more complex feature selection in QuickOSM. For example, let’s load all fast foods again inside the extent of Rajshahi_division but this time let’s just get the branches of KFC. If you look at the attribute table of fast food layer, you will notice that it has a name **field. The fields in the attribute table of data loaded from OSM correspond to the tag keys so if we want to just select all KFC fast food branches, we need to add a filter that selects a feature if it has a **key:value of name: KFC. This filter can easily be added in an Overpass API.
Quick query to load all amenities tagged as fast food
Overpass to load all amenities tagged as fast food
Overpass query to load all amenities tagged as fast food whose name is KFC
Amenities tagged as fast food whose name is KFC loaded from OSM
You can also test and create Overpass queries in Overpass turbo (https://wiki.openstreetmap.org/wiki/Overpass_turbo) which is a web based data mining tool for OpenStreetMap.
If you can’t find the feature you want or need on OpenStreetMap, you can always add or edit features on the map itself. Sign up at https://www.openstreetmap.org/ and start contributing!