Mercurial > hg > nsaunier > traffic-intelligence
comparison python/tests/moving_shapely.txt @ 635:6ae68383071e
corrected issue with tests requiring shapely, adding a separate test file
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Tue, 24 Mar 2015 14:17:12 +0100 |
| parents | |
| children | 7c38250ddfc7 |
comparison
equal
deleted
inserted
replaced
| 634:b61b309cb9da | 635:6ae68383071e |
|---|---|
| 1 >>> from moving import * | |
| 2 >>> from shapely.geometry import Polygon | |
| 3 | |
| 4 >>> t1 = Trajectory([[0.5,1.5,2.5],[0.5,3.5,6.5]]) | |
| 5 >>> t1.getTrajectoryInPolygon(Polygon([[0,0],[4,0],[4,3],[0,3]])) | |
| 6 (0.500000,0.500000) | |
| 7 >>> t1.getTrajectoryInPolygon(Polygon([[10,10],[14,10],[14,13],[10,13]])).length() | |
| 8 0 | |
| 9 |
