Skip to content

jecor/SaharaOSM

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SaharaOSM

A specialized OpenStreetMap Mapnik style for the Sahara and other desertic regions.

It is possible to have a look at the final result here:

http://tmpsahara.dyndns.org

(Temporary hosting on a Raspberry Pi).

Current Extent

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.

Setup

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.

Databases

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:

Then you need to set up an empty PostGIS database called africa_contours that will receive contours vectors later on.

Shapefiles

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:

Put these zip files at path/to/SaharaOSM/data and extract them in their natural directories.

Elevation data

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...

Dependencies

  • 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.

  • carto >= 0.9.3 (we're using instances with cascading rules)
  • mapnik >= 2.1.0

About

A specialized OpenStreetMap Mapnik style for the Sahara and other desertic regions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%