Tessellace

Say hello to tessellace!

Tessalace

In the last few projects we have worked on at UNEP-WCMC, we've been using tessellated hexagons in our thematic maps.  The attractive younger sibling of the square grid, we've used them to describe the density of endangered species (using the rather excellent cartodb):

 

and to describe where the conservation priority areas are in mexico:

One thing I've found using this approach is the time it takes to make the hexagons.   I wanted something that would generate hexagons instantly and preferably in geojson.  So... I hacked together tesselace.

It's made using a little javascript to create the hexagons as geojson which are rendered on a leaflet js map.  I have put the methods to create the hexagons on github.  I had already made a ruby version so added a little sinatra app to generate the geojson from a url.  

If you want to make a map pretty quickly, you can paste the url into cartodb or use the new ST_GeomFromGeoJSON function in PostGIS

Hope you find it useful!

Filed under  //   cartodb   geojson   hexagons   leaflet  

About

Web bloke. Project runner. Terrible poet. Always think I have more time than I do. Need to write shorter posts. Then they might get written. Know a little about protected areas and the sea. Only a little though.