Ejemplo n.º 1
0
 def test_connected_multipoint_shortest_distance_to2(self):
     line = Line([(127.0, -35.0), (132.0, -28.0), (142.0, -29.0)],
                 crs=LonLatWGS84)
     dist = line.shortest_distance_to(Point((98.0, -7.0), crs=LonLatWGS84))
     self.assertAlmostEqual(dist, 4257313.5324397, places=6)
     return
Ejemplo n.º 2
0
 def test_connected_multipoint_shortest_distance_to2(self):
     line = Line([(127.0, -35.0), (132.0, -28.0), (142.0, -29.0)], crs=LonLatWGS84)
     dist = line.shortest_distance_to(Point((98.0, -7.0), crs=LonLatWGS84))
     self.assertAlmostEqual(dist, 4257313.5324397, places=6)
     return
Ejemplo n.º 3
0
 def test_connected_multipoint_shortest_distance_to(self):
     line = Line([(0.0, 0.0), (2.0, 2.0), (5.0, 4.0)])
     dist = line.shortest_distance_to(Point((0.0, 2.0)))
     self.assertTrue(abs(dist - math.sqrt(2)) < 1e-10)
     return
Ejemplo n.º 4
0
 def test_connected_multipoint_shortest_distance_to(self):
     line = Line([(0.0, 0.0), (2.0, 2.0), (5.0, 4.0)])
     dist = line.shortest_distance_to(Point((0.0, 2.0)))
     self.assertTrue(abs(dist - math.sqrt(2)) < 1e-10)
     return