Mercurial Hosting > traffic-intelligence
diff python/tests/storage.txt @ 834:119c4efe6398
added option to load subsampled trajectories
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Thu, 30 Jun 2016 14:19:59 -0400 |
parents | 180b6b0231c0 |
children | 6db83beb5350 |
line wrap: on
line diff
--- a/python/tests/storage.txt Thu Jun 30 14:01:13 2016 -0400 +++ b/python/tests/storage.txt Thu Jun 30 14:19:59 2016 -0400 @@ -38,6 +38,16 @@ True >>> o2.getPositions() == objects[1].getPositions() True +>>> objects = loadTrajectoriesFromSqlite('test.sqlite', 'feature', timeStep = 2) +>>> objects[0].positions.length() +6 +>>> objects[1].positions.length() +5 +>>> objects = loadTrajectoriesFromSqlite('test.sqlite', 'feature', timeStep = 3) +>>> objects[0].positions.length() +4 +>>> objects[1].positions.length() +4 >>> align1 = Trajectory.fromPointList([Point(-1, 0), Point(20, 0)]) >>> align2 = Trajectory.fromPointList([Point(-9, -3), Point(6, 3)]) >>> align1.computeCumulativeDistances()