Ejemplo n.º 1
0
 def __init__(self, name, latitude, longitude, timezone):
   """Constructor for city"""
   super().__init__()
   if name is None or name == "":
     self.name = str([latitude, longitude])
   else:
     self.name = name
   self.latstr = latitude
   self.lonstr = longitude
   self.latitude = sexastr2deci(latitude)
   self.longitude = sexastr2deci(longitude)
   self.timezone = timezone
Ejemplo n.º 2
0
 def __init__(self, name, latitude, longitude, timezone):
     """Constructor for city"""
     super(City, self).__init__()
     if name is None or name == "":
         self.name = str([latitude, longitude])
     else:
         self.name = name
     if ":" in str(latitude):
         self.latitude = sexastr2deci(latitude)
         self.longitude = sexastr2deci(longitude)
     else:
         self.latitude = float(latitude)
         self.longitude = float(longitude)
     self.timezone = timezone