Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 26 lines (15 sloc) 1.048 kb
700d754 @kaerast fix readme formatting
kaerast authored
1 = UKTransport
06ff128 @kaerast add readme showing what we're aiming to do
kaerast authored
2
3 UKTransport is a Ruby gem for parsing Naptan CSV files and NPTD CIF files.
4
5 It uses local files and provides a Ruby interface for reading it.
6
700d754 @kaerast fix readme formatting
kaerast authored
7 == Usage
06ff128 @kaerast add readme showing what we're aiming to do
kaerast authored
8
e130afa @kaerast updated documentation to reflect recent changes
kaerast authored
9 x = UKTransport::.Naptan.new(filename) => array of bus stops
aa54261 @kaerast return routes as arrays in UKTransport::Cif
kaerast authored
10 y = UKTransport::Cif.new(filename)
e130afa @kaerast updated documentation to reflect recent changes
kaerast authored
11 y.routes => array of bus route objects
f342ff7 @kaerast update documentation to show we can list stops for a given route
kaerast authored
12 y.routes.first.stops => array of stops a route calls at, in order
e130afa @kaerast updated documentation to reflect recent changes
kaerast authored
13 y.stops => array of bus stop objects
e492d2c @kaerast add link to rubydoc.info docs
kaerast authored
14
1a04d96 @kaerast add 'hook' for saving to database
kaerast authored
15 route.save => does nothing but allows for hooking into a database
16
e492d2c @kaerast add link to rubydoc.info docs
kaerast authored
17 See also the documentation at http://rubydoc.info/github/computergentle/UKTransport/master/frames
4aee156 @kaerast document route data format
kaerast authored
18
19 == Data formats
20
e130afa @kaerast updated documentation to reflect recent changes
kaerast authored
21 The CIF data is better documented at http://www.travelinedata.org.uk/CIF/atco-cif-spec.pdf
22
23 Naptan data is returned in an array
24
25 "ATCOCode","GridType","Easting","Northing","Lon","Lat","CommonName","Identifier","Direction","Street","Landmark","NatGazID","NatGazLocality","ParentLocality","GrandParentLocality","Town","Suburb","StopType","BusStopType","BusRegistrationStatus","RecordStatus","Notes","LocalityCentre","SMSNumber","LastChanged"
Something went wrong with that request. Please try again.