Mercurial Hosting > traffic-intelligence
comparison scripts/polytracktopdtv.py @ 1226:d478d3122804
change of bicycle to cyclist
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Wed, 12 Jul 2023 12:12:37 -0400 |
parents | cc5cb04b04b0 |
children | 5654c9173548 |
comparison
equal
deleted
inserted
replaced
1225:202073959fb4 | 1226:d478d3122804 |
---|---|
23 '''Return a dictionnary with integer key and associated type string | 23 '''Return a dictionnary with integer key and associated type string |
24 i.e.: "0" -> "unknown" | 24 i.e.: "0" -> "unknown" |
25 "1" -> "car" | 25 "1" -> "car" |
26 "2" -> "pedestrians" | 26 "2" -> "pedestrians" |
27 "3" -> "motorcycle" | 27 "3" -> "motorcycle" |
28 "4" -> "bicycle" | 28 "4" -> "cyclist" |
29 "5" -> "bus" | 29 "5" -> "bus" |
30 "6" -> "truck" | 30 "6" -> "truck" |
31 ... and other type if the objects_type table is defined in SQLite''' | 31 ... and other type if the objects_type table is defined in SQLite''' |
32 typeDict = dict() | 32 typeDict = dict() |
33 cursor.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='objects_type'") | 33 cursor.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='objects_type'") |
36 if(data is None): | 36 if(data is None): |
37 typeDict["0"] = "unknown" | 37 typeDict["0"] = "unknown" |
38 typeDict["1"] = "car" | 38 typeDict["1"] = "car" |
39 typeDict["2"] = "pedestrians" | 39 typeDict["2"] = "pedestrians" |
40 typeDict["3"] = "motorcycle" | 40 typeDict["3"] = "motorcycle" |
41 typeDict["4"] = "bicycle" | 41 typeDict["4"] = "cyclist" |
42 typeDict["5"] = "bus" | 42 typeDict["5"] = "bus" |
43 typeDict["6"] = "truck" | 43 typeDict["6"] = "truck" |
44 | 44 |
45 else: | 45 else: |
46 cursor.execute("SELECT road_user_type, type_string FROM objects_type") | 46 cursor.execute("SELECT road_user_type, type_string FROM objects_type") |