Mercurial Hosting > traffic-intelligence
diff python/moving.py @ 587:cf578ba866da
added code to load bounding box corners as trajectories
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Thu, 04 Dec 2014 17:46:32 -0500 |
parents | 6ebfb43e938e |
children | c5406edbcf12 |
line wrap: on
line diff
--- a/python/moving.py Thu Dec 04 17:21:45 2014 -0500 +++ b/python/moving.py Thu Dec 04 17:46:32 2014 -0500 @@ -1276,6 +1276,25 @@ return Point.cosine(movingObject1.getPositionAtInstant(instant)-movingObject2.getPositionAtInstant(instant), #deltap movingObject2.getVelocityAtInstant(instant)-movingObject1.getVelocityAtInstant(instant)) #deltav + +################## +# Bounding Boxes +################## + +# class BoundingBoxes(STObject): +# '''Class for : a spatio-temporal object +# with a trajectory and a geometry (constant volume over time) and a usertype (e.g. road user) coded as a number (see +# ''' + +# def __init__(self, num = None, timeInterval = None, positions = None, velocities = None, geometry = None, userType = userType2Num['unknown']): +# super(MovingObject, self).__init__(num, timeInterval) +# self.positions = positions +# self.velocities = velocities +# self.geometry = geometry +# self.userType = userType +# self.features = [] +# # compute bounding polygon from trajectory + def plotRoadUsers(objects, colors): '''Colors is a PlottingPropertyValues instance''' from matplotlib.pyplot import figure, axis