Mercurial Hosting > traffic-intelligence
diff python/storage.py @ 235:584613399513
added script and functions to remove object tables
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Thu, 05 Jul 2012 23:32:14 -0400 |
parents | b5772df11b37 |
children | 93c26e45efd8 |
line wrap: on
line diff
--- a/python/storage.py Thu Jul 05 23:01:36 2012 -0400 +++ b/python/storage.py Thu Jul 05 23:32:14 2012 -0400 @@ -118,6 +118,13 @@ connection.close() return objects +def removeObjectsFromSqlite(filename): + 'Removes the objects and object_features tables in the filename' + import sqlite3 + connection = sqlite3.connect(filename) + utils.dropTables(connection, ['objects', 'objects_features']) + connection.close() + def loadTrajectoriesFromNgsimFile(filename, nObjects = -1, sequenceNum = -1): '''Reads data from the trajectory data provided by NGSIM project and returns the list of Feature objects'''