Skip to content

Instantly share code, notes, and snippets.

@glw
Last active January 2, 2016 11:18
Show Gist options
  • Save glw/8295255 to your computer and use it in GitHub Desktop.
Save glw/8295255 to your computer and use it in GitHub Desktop.
What I did.
#upload python script here https://github.com/glw/chicagodivvybikes.git to download divvy bike station data. output it geojson file. I choose geojson so that I could re-use this script for other projects that will require geojson.
#geojson to shpfile
ogr2ogr -f "ESRI Shapefile" divvy_stations.shp divvybikestations.geojson
#shpfile to sql
shp2pgsql -s 4326 -I divvy_stations.shp divvy_stations > divvy_stations.sql
#Download Chicago OSM streets: XML format
wget http://osm-extracted-metros.s3.amazonaws.com/chicago.osm.bz2
#load OSM data into postgresql using osm2pgrouting
osm2pgrouting -file chicago.osm -conf "/usr/share/osm2pgrouting/mapconfig.xml" -dbname chicago_streets_routing -user XXXX -passwd XXXX -clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment