def test_geographic_crop_with_resize(self):
    coords = mercantile.xy_bounds(*tiles[17])
    raster = self.read_only_virtual_geo_raster_wgs84()
    vector = GeoVector(Polygon.from_bounds(*coords), crs=WEB_MERCATOR_CRS)
    (x_ex_res, y_ex_res) = convert_resolution_from_meters_to_deg(self.metric_affine[6], MERCATOR_RESOLUTION_MAPPING[17])
    cropped = raster.crop(vector, (x_ex_res, y_ex_res))
    self.assertAlmostEqual(cropped.affine[0], x_ex_res)
    self.assertAlmostEqual(abs(cropped.affine[4]), y_ex_res, 6)
def test_geographic_crop_with_resize(self):
    coords = mercantile.xy_bounds(*tiles[17])
    raster = self.read_only_virtual_geo_raster_wgs84()
    vector = GeoVector(Polygon.from_bounds(*coords), crs=WEB_MERCATOR_CRS)
    (x_ex_res, y_ex_res) = convert_resolution_from_meters_to_deg(self.metric_affine[6], MERCATOR_RESOLUTION_MAPPING[17])
    cropped = raster.crop(vector, (x_ex_res, y_ex_res))
    self.assertAlmostEqual(cropped.affine[0], x_ex_res)
    self.assertAlmostEqual(abs(cropped.affine[4]), y_ex_res, 6)