Create a gist now

Instantly share code, notes, and snippets.

@tmcw /
Last active Dec 28, 2015

Hexer is Cool

hexer is cool. It's a new project by Howard Butler that makes hexagon binned files out of point files.

Building hexer

This worked on my system (OSX 10.9, git via homebrew)

git clone
cd hexer
sudo make install

Sample Data

Download EPA Shapefile of Superfund sites and stuff

Unzip those files and make a spherical mercator version.

ogr2ogr -t_srs EPSG:900913 frs_merc FRS_Facilities.shp

Running hexer

Then make the bins. The --edge option lets you control how big the bins are - experiment with a few values to determine what the best ratio of accuracy versus aggregation is for your dataset.

./curse density --input=frs_merc/FRS_Facilities.shp --output=binned.shp --edge 1000


I used TileMill to render the result, but it's a Shapefile so you can use anything.

#binned {
#binned[COUNT > 0] {
#binned[COUNT > 50] {
#binned[COUNT > 100] {

Finished TileMill Map

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment