Mercurial Hosting > traffic-intelligence
diff python/tests/moving.txt @ 113:606010d1d9a4
corrected errors in trajectories (if empty) and getTrajectoryInPolygon
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Mon, 18 Jul 2011 14:29:07 -0400 |
parents | 916678481896 |
children | 74b1fc68d4df |
line wrap: on
line diff
--- a/python/tests/moving.txt Mon Jul 18 14:28:40 2011 -0400 +++ b/python/tests/moving.txt Mon Jul 18 14:29:07 2011 -0400 @@ -43,6 +43,8 @@ >>> Point(3,2).inPolygon([Point(0,0),Point(4,0),Point(4,3),Point(0,3)]) True +>>> Trajectory().length() +0 >>> t1 = Trajectory([[0.5,1.5,2.5],[0.5,3.5,6.5]]) >>> t1.length() == 3. True @@ -50,6 +52,8 @@ (1.500000,3.500000) >>> t1.getTrajectoryInPolygon(np.array([[0,0],[4,0],[4,3],[0,3]])) (0.500000,0.500000) +>>> t1.getTrajectoryInPolygon(np.array([[10,10],[14,10],[14,13],[10,13]])).length() +0 >>> indic1 = TemporalIndicator('bla', [0,3,-4], TimeInterval(4,6)) >>> indic1.empty()