Git Product home page Git Product logo

hdm-cartocss's Introduction

HDM-CartoCSS

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

Local configuration

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

Workflow to use it on TileMill:

  1. Clone this dir

  2. Symlink it in your MapBox/project directory with the name hdm

  3. Rename cartocc.json.sample to cartocc.json and adapt it

  4. run cartocc hdm: this will create a project.mml file with correct local config in the project dir

  5. Run tilemill

Importing data

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

DEM

  1. get the file from CGIAR

  2. Reproject it: gdalwarp -s_srs EPSG:4269 -t_srs EPSG:3785 -r bilinear srtm_22_09.tif haiti-3785.tif

  3. Create hillshade: gdaldem hillshade -co compress=lzw haiti-3785.tif haiti-hillshade-80-3785.tif -alt 80

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

  5. Create contour line: gdal_contour -a height haiti-3785.tif haiti_contour_25m.shp -i 25.0

  6. Index shape file: shapeindex haiti_contour_25m.shp

hdm-cartocss's People

Contributors

yohanboniface avatar skorasaurus avatar

Watchers

Nicolás Alvarez avatar cypher avatar Mauricio Miranda avatar James Cloos avatar Ariel Anthieni avatar Carlos Brys avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.