Mercurial Hosting > traffic-intelligence
diff python/storage.py @ 829:0ddcc41663f5
renaming
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Wed, 29 Jun 2016 13:50:21 -0400 |
parents | ef8795dba5ed |
children | 2a5856961933 |
line wrap: on
line diff
--- a/python/storage.py Tue Jun 28 17:18:45 2016 -0400 +++ b/python/storage.py Wed Jun 29 13:50:21 2016 -0400 @@ -283,7 +283,7 @@ print('List of missing objects to attach corresponding curvilinear trajectories: {}'.format(missingObjectNumbers)) def saveTrajectoriesToSqlite(outputFilename, objects, trajectoryType, withFeatures = False): - '''Writes features, ie the trajectories positions (and velocities if exist) + '''Writes features, ie the trajectory positions (and velocities if exist) with their instants to a specified sqlite file Either feature positions (and velocities if they exist) or curvilinear positions will be saved at a time @@ -793,7 +793,7 @@ s = readline(f, commentCharacters) return dataStrings -def writeList(filename, l): +def saveList(filename, l): f = openCheck(filename, 'w') for x in l: f.write('{}\n'.format(x)) @@ -1108,7 +1108,7 @@ out.close() -def writePositionsToCsv(f, obj): +def savePositionsToCsv(f, obj): timeInterval = obj.getTimeInterval() positions = obj.getPositions() curvilinearPositions = obj.getCurvilinearPositions() @@ -1120,10 +1120,10 @@ s += ',{},{}'.format(p2[0],p2[1]) f.write(s+'\n') -def writeTrajectoriesToCsv(filename, objects): +def saveTrajectoriesToCsv(filename, objects): f = openCheck(filename, 'w') for i,obj in enumerate(objects): - writePositionsToCsv(f, obj) + savePositionsToCsv(f, obj) f.close()