A specialized OpenStreetMap Mapnik style for the Sahara and other desertic regions.
It is possible to have a look at the final result here:
(Temporary hosting on a Raspberry Pi).
The project is set up to cover mainly Morroco (up to Western Sahara region), and part of Mauritania. However, there are no difficulties to make it cover larger/different area. The relief directory contains a Makefile that should then be changed to take into account different elevation tile names.
There is currently no utility to adapt the various parameters of the project: database names are fixed, host is localhost, and the absolute path to relief files will have to be changed manually. I will provide script to do this automatically in the future.
You need OpenStreetMap data loaded into a PostGIS database called africa
, imported with the import style africa.style
located in the import directory.
I use the Africa extract from geofabrik.de:
africa.osm.pbf
download
Then you need to set up an empty PostGIS database called africa_contours
that will receive contours vectors later on.
Please don't use get_shapefiles.sh, which has not yet been adapted for this project. You will have to manually download the following files:
shoreline_300.shp
downloadprocessed_p.shp
downloadbuiltup_area.shp
downloadne_110m_admin_0_boundary_lines_land.shp
downloadne_10m_populated_places_fixed.shp
downloadne_10m_bathymetry_all.zip
downloadne_10m_geographic_lines.zip
downloadne_10m_graticules_all.zip
downloadne_10m_ocean.zip
downloadwater-polygons-split-3857.zip
download
Put these zip files at path/to/SaharaOSM/data
and extract them in their natural directories.
You will need SRTM v4 90m Digital Elevation Data from CGIAR:
The data are available by http here:
http://srtm.csi.cgiar.org/SRT-ZIP/SRTM_V41/SRTM_Data_GeoTiff/srtm_xx_yy.zip
where xx_yy is a tile number corresponding to latitude/longitude. You will find the required tile numbers in the Makefile of the relief directory.
Ensure gdal utilities are installed and available from the command line. Then, to generate necessary tif relief files type:
make all
If you have a multicore CPU, you can speed-up the process by adding -j number_of_cpu_you_have
to make, which will launch the various commands in parallel.
After making sure you have set up en empty PostGIS database called africa_contours
, you can type:
make import-contours
which will extract contours from the elevation data and will import them in the database. Warning, this process can take a long time...
- TileMill - This is a TileMill project you can copy (or symlink) directly into your Mapbox/project directory
If you aren't using TileMill, you can compile the CartoCSS stylesheets into Mapnik XML using the command-line carto
command.
- osm2pgsql to import you data into a PostGIS database
- PostgreSQL
- PostGIS
- GDAL utilities various utilities you will need to build the relief background from NASA/CGIAR elevation data.