Mercurial Hosting > traffic-intelligence
diff python/metadata.py @ 805:180b6b0231c0
added saving/loading points of interests
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Thu, 09 Jun 2016 15:36:21 -0400 |
parents | 1262faae12e7 |
children | fc8b3ce629d1 |
line wrap: on
line diff
--- a/python/metadata.py Tue May 31 17:07:23 2016 -0400 +++ b/python/metadata.py Thu Jun 09 15:36:21 2016 -0400 @@ -18,12 +18,16 @@ description = Column(String) # longer names, eg intersection of road1 and road2 xcoordinate = Column(Float) # ideally moving.Point, but needs to be ycoordinate = Column(Float) + mapImageFilename = Column(String) # path to filename, relative to site name, ie sitename/mapImageFilename + nUnitsPerPixel = Column(Float) # number of units of distance per pixel in map image - def __init__(self, name, description = "", xcoordinate = None, ycoordinate = None): + def __init__(self, name, description = "", xcoordinate = None, ycoordinate = None, mapImageFilename = None, nUnitsPerPixel = 1.): self.name = name self.description = description self.xcoordinate = xcoordinate self.ycoordinate = ycoordinate + self.mapImageFilename = mapImageFilename + self.nUnitsPerPixel = nUnitsPerPixel def getFilename(self): return self.name