Package sabx10 :: Package oxm :: Module stop
[hide private]
[frames] | no frames]

Module stop

source code

Stop handling.

Classes [hide private]
  Stop
A Stop object sub-classes Point and adds a description and type to describe a stop.
Functions [hide private]
Stop
_parse_stop_xml(xml_stop)
Take the Element for a stop and turn it into a Stop object.
source code
(list of Stop,dict of Stop)
parse_stops(xml_tree)
Get all the stop elements in the given Element tree and create a list of them with Stop objects.
source code
(Point,float)
_stop_pts_dist(points)
Generator that iterates through all the Point objects, yielding the point and the distance to it along the line for each point.
source code
(list of Stop,Box,int)
_process_stops_in_seg_data(ride_seg, xml_stops, index)
Process the segment, extracting the stops and getting the bounds of the stops.
source code
(list,Box)
process_ride_stops(seg_set, xml_segs, xml_stops)
Process the stop references for the given ride and generate a list of Stop objects for it and the bounding box for all of the stops.
source code
Variables [hide private]
  __package__ = 'sabx10.oxm'
Function Details [hide private]

_parse_stop_xml(xml_stop)

source code 

Take the Element for a stop and turn it into a Stop object.

Parameters:
  • xml_stop (Element) - Element for a stop
Returns: Stop
Stop object

parse_stops(xml_tree)

source code 

Get all the stop elements in the given Element tree and create a list of them with Stop objects.

Parameters:
  • xml_tree (Element or ElementTree) - root of Element tree that has stops in it
Returns: (list of Stop,dict of Stop)
stops in a list and a dictionary

_stop_pts_dist(points)

source code 

Generator that iterates through all the Point objects, yielding the point and the distance to it along the line for each point.

Parameters:
  • points (list of Point objects) - list of points for a segment
Returns: (Point,float)
(Point,distance)

_process_stops_in_seg_data(ride_seg, xml_stops, index)

source code 

Process the segment, extracting the stops and getting the bounds of the stops.

Parameters:
  • ride_seg (Segment) - Segment to process
  • xml_stops (list of Element) - list of Elements for stops in rideset
  • index (int) - next index to use for a stop
Returns: (list of Stop,Box,int)
(stops for segment, bounds, updated index)

process_ride_stops(seg_set, xml_segs, xml_stops)

source code 

Process the stop references for the given ride and generate a list of Stop objects for it and the bounding box for all of the stops.

Parameters:
  • seg_set (list of Segment objects) - list of Segment objects for the ride
  • xml_segs (list of Elements) - list of Element segment objects for this ride
  • xml_stops (list of Elements) - list of Element stop objects
Returns: (list,Box)
(list of Stop,bounds)