Mercurial Hosting > traffic-intelligence
comparison 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 |
comparison
equal
deleted
inserted
replaced
234:2d34060db2e9 | 235:584613399513 |
---|---|
116 objects.append(obj) | 116 objects.append(obj) |
117 | 117 |
118 connection.close() | 118 connection.close() |
119 return objects | 119 return objects |
120 | 120 |
121 def removeObjectsFromSqlite(filename): | |
122 'Removes the objects and object_features tables in the filename' | |
123 import sqlite3 | |
124 connection = sqlite3.connect(filename) | |
125 utils.dropTables(connection, ['objects', 'objects_features']) | |
126 connection.close() | |
127 | |
121 def loadTrajectoriesFromNgsimFile(filename, nObjects = -1, sequenceNum = -1): | 128 def loadTrajectoriesFromNgsimFile(filename, nObjects = -1, sequenceNum = -1): |
122 '''Reads data from the trajectory data provided by NGSIM project | 129 '''Reads data from the trajectory data provided by NGSIM project |
123 and returns the list of Feature objects''' | 130 and returns the list of Feature objects''' |
124 objects = [] | 131 objects = [] |
125 | 132 |