def test_crop_returns_full_resolution_as_default(self):
    coords = mercantile.xy_bounds(*tiles[17])
    shape = GeoVector(Polygon.from_bounds(*coords), WEB_MERCATOR_CRS)
    raster = self.read_only_virtual_geo_raster()
    (_, win) = raster._vector_to_raster_bounds(shape)
    cropped = raster.crop(shape)
    self.assertEqual(cropped.shape, (raster.num_bands, round(win.height), round(win.width)))
    self.assertEqual(cropped.affine[0], raster.affine[0])
def test_crop_returns_full_resolution_as_default(self):
    coords = mercantile.xy_bounds(*tiles[17])
    shape = GeoVector(Polygon.from_bounds(*coords), WEB_MERCATOR_CRS)
    raster = self.read_only_virtual_geo_raster()
    (_, win) = raster._vector_to_raster_bounds(shape)
    cropped = raster.crop(shape)
    self.assertEqual(cropped.shape, (raster.num_bands, round(win.height), round(win.width)))
    self.assertEqual(cropped.affine[0], raster.affine[0])