Ejemplo n.º 1
0
 def __init__(self, id, in_node, out_node):
     self.id = id
     self.in_node = in_node
     self.out_node = out_node
     self.bearing = spatialfunclib.path_bearing(
         in_node.latitude, in_node.longitude, out_node.latitude, out_node.longitude
     )
     self.length = spatialfunclib.distance(
         in_node.latitude, in_node.longitude, out_node.latitude, out_node.longitude
     )
     self.cluster = None
Ejemplo n.º 2
0
 def __init__(self, id, in_node, out_node):
     self.id = id
     self.in_node = in_node
     self.out_node = out_node
     self.bearing = spatialfunclib.path_bearing(in_node.latitude,
                                                in_node.longitude,
                                                out_node.latitude,
                                                out_node.longitude)
     self.length = spatialfunclib.distance(in_node.latitude,
                                           in_node.longitude,
                                           out_node.latitude,
                                           out_node.longitude)
     self.cluster = None
Ejemplo n.º 3
0
 def _distance_coords(self, location1_latitude, location1_longitude,
                      location2_latitude, location2_longitude):
     return spatialfunclib.distance(location1_latitude, location1_longitude,
                                    location2_latitude, location2_longitude)
Ejemplo n.º 4
0
 def _distance_coords(self, location1_latitude, location1_longitude, location2_latitude, location2_longitude):
     return spatialfunclib.distance(location1_latitude, location1_longitude, location2_latitude, location2_longitude)
Ejemplo n.º 5
0
 def _distance(self, location1, location2):
     return spatialfunclib.distance(location1.latitude, location1.longitude, location2.latitude, location2.longitude)
Ejemplo n.º 6
0
 def _distance(self, location1, location2):
     return spatialfunclib.distance(location1.latitude, location1.longitude,
                                    location2.latitude, location2.longitude)
Ejemplo n.º 7
0
 def length(self):
     return spatialfunclib.distance(
         (self.in_node.latitude, self.in_node.longitude),
         (self.out_node.latitude, self.out_node.longitude))
Ejemplo n.º 8
0
 def length(self):
     return spatialfunclib.distance(self.in_node.latitude, self.in_node.longitude, self.out_node.latitude, self.out_node.longitude)