The HDM rendering is a Carto project, focusing on the Humanitarian Data Model.
Preview: http://hotosm.github.io/HDM-CartoCSS/
Compare: http://hotosm.github.io/HDM-CartoCSS/compare.html
## Deploying
Suggestion is to use cartocc for managing the local config (like db credentials, path to shp...). Have a look at the cartocc.json.sample
file to quick start
-
Clone this dir
-
Symlink it in your MapBox/project directory with the name
hdm
-
Rename
cartocc.json.sample
tocartocc.json
and adapt it -
run
cartocc hdm
: this will create aproject.mml
file with correct local config in the project dir -
Run tilemill
We are using PostGIS, with the default osm2pgsql import style, AND with the hstore column. Ex.:
osm2pgsql -G -U ybon -d hdm data/haiti-and-domrep-latest.osm.pbf --hstore --create
-
get the file from CGIAR
-
Reproject it:
gdalwarp -s_srs EPSG:4269 -t_srs EPSG:3785 -r bilinear srtm_22_09.tif haiti-3785.tif
-
Create hillshade:
gdaldem hillshade -co compress=lzw haiti-3785.tif haiti-hillshade-80-3785.tif -alt 80
-
If you have more than one tiff for you covered area, merge them in a vrt file (remember to use absolute path):
gdalbuildvrt haiti-hillshade.vrt ~/OSM/SRTM/srtm_22_09-hillshade-80-3785.tif ~/OSM/SRTM/srtm_23_09-hillshade-80-3785.tif
-
Create contour line:
gdal_contour -a height haiti-3785.tif haiti_contour_25m.shp -i 25.0
-
Index shape file:
shapeindex haiti_contour_25m.shp