I'm using the Python API of GEE and I try to display my results in a PDF file. I'd like to create it with matplotlib so that I can check my figure before exportation. To add a little context :
I create an image using :
task_config = {
'image':clip,
'description':description,
'scale': 30,
'region':buffers[index],
'maxPixels': 1e12
}
task = ee.batch.Export.image.toDrive(**task_config)
task.start()
I can display this image in QGIS:
Then I download it to my local folder and try to read it with matplotlib:
img = plt.imread(file)
plt.imshow(img)
plt.show()
I get the following error :
UnidentifiedImageError: cannot identify image file '/home/prambaud/time_series_results/tmp/test_pts_pt_0_Red_Green_Blue_2005.tif'
Is it normal? Is there another way to open Images that are generated by GEE ?