comparison python/tests/moving.txt @ 79:5d487f183fe2

added method to test points in polygons and tests
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Fri, 11 Mar 2011 18:12:29 -0500
parents cc192d0450b3
children daa05fae1a70
comparison
equal deleted inserted replaced
78:99e807c29753 79:5d487f183fe2
23 13 23 13
24 24
25 >>> Point.distanceNorm2(Point(3,4),Point(1,7)) 25 >>> Point.distanceNorm2(Point(3,4),Point(1,7))
26 3.6055512754639891 26 3.6055512754639891
27 27
28 >>> Point(3,2).inPolygon([Point(0,0),Point(1,0),Point(1,1),Point(0,1)])
29 False
30 >>> Point(3,2).inPolygon([Point(0,0),Point(4,0),Point(4,3),Point(0,3)])
31 True
32
28 >>> t1 = Trajectory([[0.5,1.5,2.5],[0.5,3.5,6.5]]) 33 >>> t1 = Trajectory([[0.5,1.5,2.5],[0.5,3.5,6.5]])
29 >>> t1.length() 34 >>> t1.length()
30 3 35 3
31 >>> t1[1] 36 >>> t1[1]
32 (1.500000,3.500000) 37 (1.500000,3.500000)
38 >>> t1.getTrajectoryInPolygon1([Point(0,0),Point(4,0),Point(4,3),Point(0,3)])
39 (0.500000,0.500000)
33 40
34 >>> indic1 = TemporalIndicator('bla', [0,3,-4], TimeInterval(4,6)) 41 >>> indic1 = TemporalIndicator('bla', [0,3,-4], TimeInterval(4,6))
35 >>> indic1.empty() 42 >>> indic1.empty()
36 False 43 False
37 >>> indic1[5] 44 >>> indic1[5]