Example #1
0
    def test_get_entire_all_raster(self):
        vr = self.read_only_virtual_geo_raster()
        roi = GeoVector.from_xyz(37108, 25248, 16)
        r = vr.crop(roi)

        self.assertFalse((r.image.data == 0).all())
        self.assertFalse((r.image.mask).all())
        self.assertEqual(r.shape, (3, 612, 612))
Example #2
0
 def test_fails_with_empty_raster_for_tile_out_of_raster_area_with_no_tile_size(
         self):
     vr = self.read_only_virtual_geo_raster()
     roi = GeoVector.from_xyz(16384, 16383, 15)
     r = vr.crop(roi)
     self.assertTrue((r.image.data == 0).all())
     self.assertTrue((r.image.mask).all())
     self.assertEqual(r.image.shape, (3, 1223, 1223))
def test_construction_mutable_raster():
    raster = MutableGeoRaster.empty_from_roi(
        GeoVector.from_xyz(300, 300, 13),
        resolution=MERCATOR_RESOLUTION_MAPPING[13])
    assert isinstance(raster, MutableGeoRaster)