Ejemplo n.º 1
0
 def test_multilinestring(self):
     c = [[[10, 10], [20, 20], [10, 40]],
          [[40, 40], [30, 30], [40, 20], [30, 10]]]
     fc = bbox.flatcoords(c)
     exp = [[10, 10], [20, 20], [10, 40], [40, 40], [30, 30], [40, 20],
            [30, 10]]
     self.assertEqual(fc, exp)
Ejemplo n.º 2
0
 def test_polygon(self):
     c = [[[35, 10], [45, 45], [15, 40], [10, 20], [35, 10]],
          [[20, 30], [35, 35], [30, 20], [20, 30]]]
     fc = bbox.flatcoords(c)
     exp = [[35, 10], [45, 45], [15, 40], [10, 20], [35, 10], [20, 30],
            [35, 35], [30, 20], [20, 30]]
     self.assertEqual(fc, exp)
Ejemplo n.º 3
0
 def test_multipolygon(self):
     c = [[[[40, 40], [20, 45], [45, 30], [40, 40]]],
          [[[20, 35], [10, 30], [10, 10], [30, 5], [45, 20], [20, 35]],
           [[30, 20], [20, 15], [20, 25], [30, 20]]]]
     fc = bbox.flatcoords(c)
     exp = [[40, 40], [20, 45], [45, 30], [40, 40], [20, 35], [10, 30],
            [10, 10], [30, 5], [45, 20], [20, 35], [30, 20], [20, 15],
            [20, 25], [30, 20]]
     self.assertEqual(fc, exp)
Ejemplo n.º 4
0
 def test_multipoint(self):
     c = [[10, 40], [40, 30], [20, 20], [30, 10]]
     fc = bbox.flatcoords(c)
     exp = [[10, 40], [40, 30], [20, 20], [30, 10]]
     self.assertEqual(fc, exp)
Ejemplo n.º 5
0
 def test_linestring(self):
     c = [[30, 10], [10, 30], [40, 40]]
     exp = [[30, 10], [10, 30], [40, 40]]
     self.assertEqual(bbox.flatcoords(c), exp)
Ejemplo n.º 6
0
 def test_point(self):
     c = [30, 10]
     exp = [[30, 10]]
     self.assertEqual(bbox.flatcoords(c), exp)