Exemplo n.º 1
0
    def __init__(
        self,
        tie_post,
        lat_dist,
        lon_dist,
        frequency,
        time_window,
        label,
        drawing_order=0,
        image="images/train.png",
    ):
        self.clat, self.clon = tie_post
        self.lat_dist = lat_dist
        self.lon_dist = lon_dist
        self.frequency = int(frequency)

        TrackingViz.__init__(
            self,
            label,
            image,
            self.get_loc_at_time,
            time_window,
            (
                self.clat - self.lat_dist,
                self.clat + self.lat_dist,
                self.clon - self.lon_dist,
                self.clon + self.lon_dist,
            ),
            drawing_order,
        )
Exemplo n.º 2
0
    def __init__(
        self,
        tiepost,
        lat_dist,
        lon_dist,
        frequency,
        time_window,
        label,
        drawing_order=0,
        image="images/train.png",
    ):
        self.clat, self.clon = tiepost
        self.lat_dist = lat_dist
        self.lon_dist = lon_dist
        self.frequency = int(frequency)

        TrackingViz.__init__(
            self,
            label,
            image,
            self.getLocAtTime,
            time_window,
            (
                self.clat - self.lat_dist,
                self.clat + self.lat_dist,
                self.clon - self.lon_dist,
                self.clon + self.lon_dist,
            ),
            drawing_order,
        )
Exemplo n.º 3
0
  def __init__(self,bustrack,label,image,
               drawing_order=10):
    """
    Given bustrack a BusTrack object, label a string, and image a
    filename, creates a BusTrackViz wrapper around bustrack with
    the given label and image for visualization.
    """
    self.track = bustrack;
    time_window = bustrack.getRouteTimeInterval()
    bounding_box = bustrack.getBoundingBox()

    TrackingViz.__init__(self,label,image,
                         bustrack.getLocationAtTime,
                         time_window,bounding_box,
                         drawing_order)
Exemplo n.º 4
0
 def __init__(self, label, image, getLatLonAtTimeFunc, time_window, bounding_box, drawing_order=0):
   TrackingViz.__init__(self, label, image, getLatLonAtTimeFunc, time_window, bounding_box, drawing_order)
   # self.label= label
   pygame.font.init()
   font = pygame.font.Font(None, 18)
   self.text = font.render(label , True, (255, 255, 255), (255, 76, 84))