Mercurial Hosting > traffic-intelligence
comparison python/storage.py @ 702:f0a897d7f3a5 dev
corrected bug when loading features with objects
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Mon, 20 Jul 2015 15:36:48 -0400 |
parents | 957126bfb456 |
children | f83d125d0c55 |
comparison
equal
deleted
inserted
replaced
701:4cc56ff82c3c | 702:f0a897d7f3a5 |
---|---|
420 | 420 |
421 if withFeatures: | 421 if withFeatures: |
422 nFeatures = 0 | 422 nFeatures = 0 |
423 for obj in objects: | 423 for obj in objects: |
424 nFeatures = max(nFeatures, max(obj.featureNumbers)) | 424 nFeatures = max(nFeatures, max(obj.featureNumbers)) |
425 features = loadTrajectoriesFromSqlite(filename, 'feature', nFeatures) | 425 features = loadTrajectoriesFromSqlite(filename, 'feature', nFeatures+1) |
426 for obj in objects: | 426 for obj in objects: |
427 obj.setFeatures(features) | 427 obj.setFeatures(features) |
428 | 428 |
429 except sqlite3.OperationalError as error: | 429 except sqlite3.OperationalError as error: |
430 printDBError(error) | 430 printDBError(error) |