#NEWLINE# def test_calculate_default_transform( ) : #NEWLINE# #INDENT# target_transform = Affine ( 0.0028535715391804096 , 0.0 , ( - 78.95864996545055 ) , 0.0 , ( - 0.0028535715391804096 ) , 25.550873767433984 ) #NEWLINE# with Env ( ) : #NEWLINE# #INDENT# with rasterio . open ( 'tests/data/RGB.byte.tif' ) as src : #NEWLINE# #INDENT# wgs84_crs = { #NEWLINE# #INDENT# 'init' : 'EPSG:4326' , #NEWLINE# #UNINDENT# } #NEWLINE# ( dst_transform , width , height ) = calculate_default_transform ( src . crs , wgs84_crs , src . width , src . height , * src . bounds ) #NEWLINE# assert dst_transform . almost_equals ( target_transform ) #NEWLINE# assert ( width == 835 ) #NEWLINE# assert ( height == 696 )