Mercurial > hg > nsaunier > traffic-intelligence
comparison python/moving.py @ 6:597d61c1eebe
minor doc update
| author | Nicolas Saunier <nico@confins.net> |
|---|---|
| date | Wed, 04 Nov 2009 19:13:08 -0500 |
| parents | de5642925615 |
| children | ffddccfab7f9 |
comparison
equal
deleted
inserted
replaced
| 5:824c35230b73 | 6:597d61c1eebe |
|---|---|
| 54 return TimeInterval(max(self.first, interval2.first), min(self.last, interval2.last)) | 54 return TimeInterval(max(self.first, interval2.first), min(self.last, interval2.last)) |
| 55 | 55 |
| 56 class STObject: | 56 class STObject: |
| 57 '''Class for spatio-temporal object | 57 '''Class for spatio-temporal object |
| 58 i.e. with temporal and spatial existence | 58 i.e. with temporal and spatial existence |
| 59 (time interval and bounding polygon for positions (e.g. rectangle)''' | 59 (time interval and bounding polygon for positions (e.g. rectangle)). |
| 60 It does not mean that the object is defined | |
| 61 for all time instants within the time interval''' | |
| 60 | 62 |
| 61 def __init__(self, timeInterval = TimeInterval(), boundingPolygon = None, num = None): | 63 def __init__(self, timeInterval = TimeInterval(), boundingPolygon = None, num = None): |
| 62 self.timeInterval = timeInterval | 64 self.timeInterval = timeInterval |
| 63 self.boundingPolygon = boundingPolygon | 65 self.boundingPolygon = boundingPolygon |
| 64 self.num = num | 66 self.num = num |
| 74 | 76 |
| 75 | 77 |
| 76 | 78 |
| 77 # return bounding box, and generic polygon, that defaults to box | 79 # return bounding box, and generic polygon, that defaults to box |
| 78 | 80 |
| 79 class Track(STObject): | 81 class Trajectory(STObject): |
| 80 '''Class for trajectories | 82 '''Class for trajectories |
| 81 i.e. sequence of positions''' | 83 i.e. a temporal sequence of positions''' |
| 82 pass | 84 pass |
| 83 | 85 |
| 86 | |
| 87 class TemporalIndicator: | |
| 88 '''Class for temporal indicators | |
| 89 i.e. indicators that take a value at specific instants''' | |
| 90 pass | |
| 84 | 91 |
| 85 | 92 |
| 86 if __name__ == "__main__": | 93 if __name__ == "__main__": |
| 87 import doctest | 94 import doctest |
| 88 import unittest | 95 import unittest |
