Mercurial > hg > nsaunier > traffic-intelligence
view python/tests/moving_shapely.txt @ 697:0421a5a0072c dev
improvemend by Adrien Lessard to choose output homography filename
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Fri, 17 Jul 2015 14:22:45 -0400 |
| parents | 6ae68383071e |
| children | 7c38250ddfc7 |
line wrap: on
line source
>>> from moving import * >>> from shapely.geometry import Polygon >>> t1 = Trajectory([[0.5,1.5,2.5],[0.5,3.5,6.5]]) >>> t1.getTrajectoryInPolygon(Polygon([[0,0],[4,0],[4,3],[0,3]])) (0.500000,0.500000) >>> t1.getTrajectoryInPolygon(Polygon([[10,10],[14,10],[14,13],[10,13]])).length() 0
