Skip to content

AxisPhilly/make-philly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

make-philly

A collection of Makefiles to get and convert Philly geodata into web-friendly formats (i.e. GeoJSON and TopoJSON).

We were inspired to learn Make from Mike Bostock's Why Use Make article and to create this collection from his us-atlas and world-atlas projects.

Dependencies

All of the Makefiles depend on ogr2ogr (which is part of GDAL), and most of the steps require Node.js and TopoJSON. On OS X, GDAL and Node can can be installed with Homebrew:

$ brew install node
$ brew install gdal

Once you have Node, you can install TopoJSON with NPM:

$ npm install -g topojson

Usage

These Makefiles mostly do the following:

  • Download a ZIP file or Shapefile
  • Extract the ZIP file if need be
  • Convert the Shapefile to GeoJSON
  • Convert the GeoJSON to TopoJSON

Each Makefile is stored in a directory named after the data it retrieves and processes.

First, cd into the directory for the data you want. Then, to run all of the steps of the Makefile:

$ make all

If you only want the GeoJSON of the Azavea neighborhood data, for example, you can execute that task, and all of its dependent tasks by providing the filename (or ouput) of the specific task:

$ make neighborhoods.json

Take a look at the Makefiles to see what those files names are.

Data that is projected in EPSG:2272 is reprojected in EPSG:4326 for easy web map compatiability. You can change which projection the data is reprojected to, or remove the reprojection step entirely, by editing or removing the -t_srs flag of steps that use ogr2ogr.

Testing

For a quick preview and test of GeoJSON files, use GeoJSONLint.com.

About

A collection of Makefiles for Philadelphia data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published