Mercurial Hosting > traffic-intelligence
comparison python/utils.py @ 42:1a2ac2d4f53a
added loading of the rest of the data for objects
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Thu, 01 Jul 2010 10:44:32 -0400 |
parents | 8cafee54466f |
children | 74d2de078baf |
comparison
equal
deleted
inserted
replaced
41:eb78c6edc0c8 | 42:1a2ac2d4f53a |
---|---|
174 from shapely.geometry import Polygon | 174 from shapely.geometry import Polygon |
175 | 175 |
176 tmp = array(poly.exterior) | 176 tmp = array(poly.exterior) |
177 plot(tmp[:,0], tmp[:,1], options) | 177 plot(tmp[:,0], tmp[:,1], options) |
178 | 178 |
179 def line2Floats(l, separator=' '): | |
180 '''Returns the list of floats corresponding to the string''' | |
181 return [float(x) for x in l.split(separator)] | |
182 | |
183 def line2Ints(l, separator=' '): | |
184 '''Returns the list of ints corresponding to the string''' | |
185 return [int(x) for x in l.split(separator)] | |
179 | 186 |
180 ######################### | 187 ######################### |
181 # running tests | 188 # running tests |
182 ######################### | 189 ######################### |
183 | 190 |