Mercurial Hosting > traffic-intelligence
diff trafficintelligence/moving.py @ 1146:b219d5a1bb55
added code to categorize interactions
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Wed, 29 Apr 2020 01:09:55 -0400 |
parents | 30171d4fd3df |
children | b55adb13f262 |
line wrap: on
line diff
--- a/trafficintelligence/moving.py Tue Apr 28 10:17:49 2020 -0400 +++ b/trafficintelligence/moving.py Wed Apr 29 01:09:55 2020 -0400 @@ -1371,9 +1371,9 @@ intersection = TimeInterval.intersection(inter, self.getTimeInterval()) if not intersection.empty(): trajectoryInterval = TimeInterval(intersection.first-self.getFirstInstant(), intersection.last-self.getFirstInstant()) - obj = MovingObject(self.num, intersection, self.positions.getTrajectoryInInterval(trajectoryInterval), self.geometry, self.userType, self.nObjects) + obj = MovingObject(self.num, intersection, self.positions.subTrajectoryInInterval(trajectoryInterval), self.geometry, self.userType, self.nObjects) if self.velocities is not None: - obj.velocities = self.velocities.getTrajectoryInInterval(trajectoryInterval) + obj.velocities = self.velocities.subTrajectoryInInterval(trajectoryInterval) return obj else: print('The object does not exist at {}'.format(inter))