Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maxious/actbus-data
Data workflow management for ACT bus data
https://github.com/maxious/actbus-data
Last synced: about 2 months ago
JSON representation
Data workflow management for ACT bus data
- Host: GitHub
- URL: https://github.com/maxious/actbus-data
- Owner: maxious
- Created: 2011-03-19T13:31:02.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2012-11-24T12:54:33.000Z (about 12 years ago)
- Last Synced: 2024-04-22T14:47:59.159Z (9 months ago)
- Language: Python
- Homepage: http://bus.lambdacomplex.org
- Size: 2.88 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
=== Introduction ===
This distribution contains everything required to build a basic google transit
feed for Canberra, Australia.Requirements: BASH, Python 2.5, PHP, Ruby + ruby-devel, libpq/postgresql-devel, libxml2-devel, libxslt-devel
Ruby Gems: postgres json nokogiriSuburb Geocoding Based on Australian Bureau of Statistics data.
Street Geocoding Based on work of OpenStreetMap contributors=== PostGIS setup ===
Install postGIS, make a new database using postgis template
From the shell:
# createdb -T template_postgis my_spatial_db
From SQL:
postgres=# CREATE DATABASE my_spatial_db TEMPLATE=template_postgisOr upgrade existing database to postgis
psql -d bus < /usr/share/pgsql/contrib/postgis-1.5/postgis.sqlMake sure it has SRID 4326 (WGS84) and SRID 900913
INSERT INTO spatial_ref_sys (srid, auth_name, auth_srid, srtext, proj4text)VALUES (900913,'EPSG',900913,'PROJCS["WGS84 / Simple Mercator",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS_1984", 6378137.0, 298.257223563]],PRIMEM["Greenwich", 0.0],UNIT["degree", 0.017453292519943295],AXIS["Longitude", EAST],AXIS["Latitude", NORTH]],PROJECTION["Mercator_1SP_Google"],PARAMETER["latitude_of_origin", 0.0],PARAMETER["central_meridian", 0.0],PARAMETER["scale_factor", 1.0],PARAMETER["false_easting", 0.0],PARAMETER["false_northing", 0.0],UNIT["m", 1.0],AXIS["x", EAST],AXIS["y", NORTH],AUTHORITY["EPSG","900913"]]','+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs');
INSERT INTO spatial_ref_sys ( auth_name, auth_srid, srid, proj4text ) VALUES ( 'EPSG', 4326, 4326, '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' );Download "State Suburbs ASGS Non ABS Structures Ed 2011 Digital Boundaries
in ESRI Shapefile Format" from http://www.abs.gov.au/AUSSTATS/[email protected]/DetailsPage/1270.0.55.003July%202011?OpenDocumentUse shp2pgsql tool http://postgis.refractions.net/documentation/manual-1.3/ch04.html#id2571948
shp2pgsql -D -I ~/Downloads/SSC_2011_AUST.shp suburbs > suburbs.sql
psql -d bus < suburbs.sqlDownload OSM ways from XAPI http://open.mapquestapi.com/xapi/
http://open.mapquestapi.com/xapi/api/0.6/way[highway=*][bbox=148.99,-35.48,149.19,-35.119]Use tool from http://wiki.openstreetmap.org/wiki/Osm2pgsql (or another OSM import tool like osmosis)
osm2pgsql -d bus -U postgres cbrroads.osm=== Running ===
run get.sh in source-html to get html timetables
run make.sh to get GTFS timetables and enchance them
use compile_gtfs from https://github.com/kurtraschke/gtfs if you want a sqlite version
use http://code.google.com/p/gtfsdb/ if you want sql/python geo-alchemy version=== Changes ===
routes.txt:
Add short_name,long_name
Add route_color to match offical line brandings (red/blue/gold/green/brown expresso)stops.txt:
Add stop_codes which don't change (GeoPo)
Add street/suburb to zone_info field
Set bus station flag on bus stations (stop_type)