Mercurial Hosting > traffic-intelligence
changeset 1056:093e2b892ede
integrating additions to storage.py
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Mon, 09 Jul 2018 16:01:15 -0400 |
parents | 9e4e80fc5943 |
children | a7ada64b8214 |
files | ..hgignore.swp trafficintelligence/storage.py trafficintelligence/tests/storage.txt |
diffstat | 3 files changed, 2 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/trafficintelligence/storage.py Mon Jul 09 19:51:42 2018 +0000 +++ b/trafficintelligence/storage.py Mon Jul 09 16:01:15 2018 -0400 @@ -1391,7 +1391,6 @@ self.sectionHeader = config.sections()[0] else: self.sectionHeader = 'DEFAULT' - #Tracker parameters self.accelerationBound = config.getint(self.sectionHeader, 'acceleration-bound') @@ -1413,8 +1412,7 @@ self.minFeatureDisplacement = config.getfloat(self.sectionHeader, 'min-feature-displacement') self.updateTimer = config.getint(self.sectionHeader, 'tracker-reload-time') - def loadHomographyConfig(self, filename = None): - + def loadHomographyConfig(self, filename = None): if filename is None: self.homographyFilename = None self.homography = None
--- a/trafficintelligence/tests/storage.txt Mon Jul 09 19:51:42 2018 +0000 +++ b/trafficintelligence/tests/storage.txt Mon Jul 09 16:01:15 2018 -0400 @@ -1,4 +1,5 @@ >>> from io import StringIO +>>> from os import remove >>> from trafficintelligence.storage import * >>> from trafficintelligence.utils import openCheck, readline >>> from trafficintelligence.moving import MovingObject, Point, TimeInterval, Trajectory, prepareSplines @@ -8,11 +9,7 @@ >>> nonexistentFilename = "nonexistent" >>> loadTrajectoriesFromSqlite(nonexistentFilename, 'feature') -DB Error: no such table: positions -DB Error: no such table: velocities [] ->>> from os import remove ->>> remove(nonexistentFilename) >>> o1 = MovingObject.generate(2, Point(0.,0.), Point(1.,0.), TimeInterval(0,10)) >>> o2 = MovingObject.generate(3, Point(1.,1.), Point(-0.5,-0.2), TimeInterval(0,9))