#NEWLINE# def test_warp_from_to_file_multi( tmpdir ) : #NEWLINE# #INDENT# 'File to file' #NEWLINE# tiffname = str ( tmpdir . join ( 'foo.tif' ) ) #NEWLINE# with rasterio . open ( 'tests/data/RGB.byte.tif' ) as src : #NEWLINE# #INDENT# dst_crs = dict ( proj = 'merc' , a = 6378137 , b = 6378137 , lat_ts = 0.0 , lon_0 = 0.0 , x_0 = 0.0 , y_0 = 0 , k = 1.0 , units = 'm' , nadgrids = '@null' , wktext = True , no_defs = True ) #NEWLINE# kwargs = src . meta . copy ( ) #NEWLINE# kwargs . update ( transform = DST_TRANSFORM , crs = dst_crs ) #NEWLINE# with rasterio . open ( dst , 'w' , ** kwargs ) as dst : #NEWLINE# #INDENT# for i in ( 1 , 2 , 3 ) : #NEWLINE# #INDENT# reproject ( rasterio . band ( src , i ) , rasterio . band ( dst , i ) , num_threads = 2 )