def __call__(self, vertex1, edge, vertex2, context):
        event_time = vertex2.state.time
        trip_id = vertex2.state.trip_id
        stop_id = vertex1.label.split("-")[-1]
        
        route_desc = "-".join(list( self.gtfsdb.execute( "SELECT routes.route_short_name, routes.route_long_name FROM routes, trips WHERE routes.route_id=trips.route_id AND trip_id=?", (trip_id,) ) )[0])
        stop_desc = list( self.gtfsdb.execute( "SELECT stop_name FROM stops WHERE stop_id = ?", (stop_id,) ) )[0][0]
        lat, lon = list( self.gtfsdb.execute( "SELECT stop_lat, stop_lon FROM stops WHERE stop_id = ?", (stop_id,) ) )[0]
        
        what = "Board the %s"%route_desc
        where = stop_desc
        when = "about %s"%str(TimeHelpers.unix_to_localtime( event_time, self.timezone_name ))
        geom = (lon,lat)
        return NarrativeEvent(what, where, when, geom)
dataset/ETHPy150Open bmander/graphserver/pygs/graphserver/ext/routeserver/events.py/HeadwayBoardEvent.__call__/original