Updating maps in RapidPro

Aug. 3, 2016

Updated: March 14, 2019 

RapidPro uses OpenStreetMaps, an open source mapping tool, to obtain shapefiles of administrative boundaries. OpenStreetMaps operates under an open database license.

This is an example Overpass query to view administrative boundaries.

1. Visit the OpenStreetMaps wiki and see which levels are present for your country. If admin_level = N/A, that level is missing.

2. Go to overpass-turbo and centre the map on the country of interest. 

3. Delete the text on the left side of the overpass-turbo page and replace with the contents of this file:

           /*
           This is an example Overpass query.
           Try it out by pressing the Run button above!
           You can find more examples with the Load tool.
           */
           (
           relation
            ["boundary"="administrative"]
            ["admin_level"="8"]
            ({{bbox}}); /* this is auto-completed with the
            current map view coordinates. */
            );
           (._;>;);
           out;

4. Edit the admin_level to the level you want to check - in the example above, the "admin_level" = "8".  Press 'Run' to highlight and outline all boundaries for that level. Note: If you query an admin_level that is N/A, you will receive the following message:This map intentionally left blank. (received empty dataset)

The screenshot below shows the overpass query window contents for the example above. 

Example query for overpass

-

If your country's geographical data are not available or up to date in OpenStreetMaps, you have a few options

Once the shapefiles are obtained with the appropriate licensing:

  • shapes/features that aren't already in OSM have to be added
  • proper tags/metadata have to be entered for shapes
  • relations and groups have to be set up or edited 

Once the boundaries are updated in OSM, extract boundaries (or ask your vendor) in RapidPro.

UNICEF RapidPro recommends you reach out to your country's OpenStreetMap community as a first step.

1. Locate shapefiles with a copyright holder who is willing to reassign rights.

Many governments maintain map files for national census and are happy to share the data in OpenStreetMaps. NGOs and research institutions may also have shapefiles they would be willing to contribute. The existing license will have to be extended to be in the public domain with copyrights granted to OSM foundation, under these terms. That would require action by the copyright holder(s) willing to reassign the rights.

2. Locate shapefiles with a compatible license.

Other map files that are licensed for commercial use are incompatible with OpenStreetMaps, and therefore incompatible with RapidPro.

3. Use a third party firm to update OpenStreetMaps. OSM maintains a list here: https://wiki.openstreetmap.org/wiki/Commercial_OSM_Software_and_Services

Several of these firms mention 'OSM editing' or 'OSM consulting' which would include this kind of work.

Since OpenStreetMaps has an open database license, shapefiles and contributions must be freely licensed for any and all usage. This aspect of OpenStreetMaps means that updates are available as a public good that benefit everyone.

For more information on this process, see 

http://wiki.openstreetmap.org/wiki/Import/Guidelines