Beispiel #1
0
 def test_poly_extent_foreign_crs(self):
     poly = Polygon([(0.0, 8.0), (0.0, 5.0), (6.0, 1.0)], crs=LonLatWGS84)
     poly3 = Polygon([(0.0, 8.0, 0.5), (0.0, 5.0, 0.8), (6.0, 1.0, 0.6)],
                     crs=LonLatWGS84)
     x, y = zip(*poly.vertices(crs=NSIDCNorth))
     self.assertEqual(poly.extent(NSIDCNorth), (min(x), max(x), min(y), max(y)))
     self.assertEqual(poly3.extent(NSIDCNorth), (min(x), max(x), min(y), max(y)))
     return
Beispiel #2
0
 def test_poly_extent_foreign_crs(self):
     poly = Polygon([(0.0, 8.0), (0.0, 5.0), (6.0, 1.0)], crs=LonLatWGS84)
     poly3 = Polygon([(0.0, 8.0, 0.5), (0.0, 5.0, 0.8), (6.0, 1.0, 0.6)],
                     crs=LonLatWGS84)
     x, y = zip(*poly.vertices(crs=NSIDCNorth))
     self.assertEqual(poly.extent(NSIDCNorth),
                      (min(x), max(x), min(y), max(y)))
     self.assertEqual(poly3.extent(NSIDCNorth),
                      (min(x), max(x), min(y), max(y)))
     return
Beispiel #3
0
 def test_poly_extent(self):
     poly = Polygon([(0.0, 8.0), (0.0, 5.0), (6.0, 1.0)])
     poly3 = Polygon([(0.0, 8.0, 0.5), (0.0, 5.0, 0.8), (6.0, 1.0, 0.6)])
     self.assertEqual(poly.extent(), (0.0, 6.0, 1.0, 8.0))
     self.assertEqual(poly3.extent(), (0.0, 6.0, 1.0, 8.0))
     return
Beispiel #4
0
 def test_poly_extent(self):
     poly = Polygon([(0.0, 8.0), (0.0, 5.0), (6.0, 1.0)])
     poly3 = Polygon([(0.0, 8.0, 0.5), (0.0, 5.0, 0.8), (6.0, 1.0, 0.6)])
     self.assertEqual(poly.extent(), (0.0, 6.0, 1.0, 8.0))
     self.assertEqual(poly3.extent(), (0.0, 6.0, 1.0, 8.0))
     return