I'm trying to export numpy ndarray that I have to TIFF using rasterio. I have the transform of the image:
print(transf)
>>>(583932.1992386435, 10.0, 0, 2223772.1491772938, 0, -10.0)
When I use this when I save the raster I recieve error :
with rasterio.open('test.tiff',
'w',
driver='GTiff',
height=img.shape[0],
width=img.shape[1],
count=3,
dtype=img.dtype,
crs=rasterio.crs.CRS.from_dict(init='epsg:4326'),
nodata=None, # change if data has nodata value
transform=transf) as dst:
dst.write(vi[:,:,0], 1)
dst.write(vi[:,:,1], 2)
dst.write(vi[:,:,2], 3)
TypeError: GDAL-style transforms have been deprecated. This exception will be raised for a period of time to highlight potentially confusing errors, but will eventually be removed.
I haven't found any posts in regard to this error. How can I change it? How can I save my result ndarray int TIFF given the transform?