GPSDataTools
index
/Users/colin/colin_dev/transit/gps2gtfs/core/src/GPSDataTools.py

GPSDataTools.py: Utilities and class definitions for dealing with raw GPS 
tracking data.
 
In general one is only interested in the Route class, which loads GPS data 
from the database for a particular route and automatically turns it into 
individual trips.

 
Modules
       
datetime
dbqueries
gisutils
math

 
Classes
       
__builtin__.object
GShape
Route
TrackedVehicleSegment
Vehicle
VehicleReport
VehicleSegment

 
class GShape(__builtin__.object)
     Methods defined here:
__init__(self, id)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class Route(__builtin__.object)
    Represents the set of vehicle trips belonging to a particular route.
Upon initialization, all VehicleReports are found for that route,
and subsequently segmented into appropriate VehicleSegments.
 
  Methods defined here:
__init__(self, route_short_name)
clear_filters(self)
export_segments(self, valid_only=True)
filter_by_endpoint(self)
filter_by_report_time(self)
find_segments(self)
load_route_dirtags(self)
load_shapes(self)
load_vehicle_reports(self)
segments(self, return_valid_only=False)
shape_for_dirtag(self, dirtag)
vehicles(self)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class TrackedVehicleSegment(__builtin__.object)
    A variation on the VehicleSegment class for segments which have
already been identified with a GTFS trip ID and all the associated
information.
 
  Methods defined here:
__init__(self, segment_id, useCorrectedGTFS=True)
getGTFSRouteInfo(self)
Returns (routeID,directionID) for this trip.

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class Vehicle(__builtin__.object)
    Represents a uinque transit vehicle, as definted by its ID 
in the vehicle_track table
 
  Methods defined here:
__init__(self, vehicle_id)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class VehicleReport(__builtin__.object)
    POD structure representing a single row in the GPS log.
 
  Methods defined here:
__init__(self, id, lat, lon, routetag, dirtag, reported_update_time)
timeInSecondsIntoDay(self)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class VehicleSegment(__builtin__.object)
    A list of VehicleReports, representing a single trip made by
a vehicle.
 
  Methods defined here:
__init__(self, reports)
export_segment(self)
Exports this segment to the database.
getGTFSRouteInfo(self)
Returns (routeID,directionID) for this trip.

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Functions
       
calcDistance(lation1, lation2)
Caclulate distance between two lat lons in meters
gen_kml(route, dopoints=False, dotimestamps=False)
now()
time(...)
time() -> floating point number
 
Return the current time in seconds since the Epoch.
Fractions of a second may be present if the system clock provides them.

 
Data
        THRESH_MINIMUM_REPORTS = 10
THRESH_SEG_ENDPOINT_TO_SHAPE_ENDPOINT = 50
THRESH_TIME_BETWEEN_REPORTS = 120
argv = ['/Library/Frameworks/Python.framework/Versions/Current/bin/pydoc', '-w', 'GPSDataTools']
rad = 0.017453292519943295