All the bands in the GeoTiff file only contain NA values. Below is my code. I first started with getting an image from ImageCollection and choosing the bands which I want i.e.RGB and export to drive as GeoTiff file.
col1 = ee.ImageCollection('LANDSAT/LC08/C02/T1_TOA').first().select(['B2','B3','B4'])
coords = geo_file['features'][0]['geometry']['coordinates']
aoi = ee.Geometry.Polygon(coords)
task = ee.batch.Export.image.toDrive(**{
'image': col1,
'description': 'new_old',
'folder': 'DS1 Project',
'scale': 100,
'fileFormat': 'GeoTIFF',
'region': coords,
'crs':'EPSG:4326'
})
task.start()
Then I opened the geotiff image using raster and checking the values:
import rasterio
from rasterio.plot import show
fp = r'/content/new_old.tif'
img = rasterio.open(fp)
print(img.read(1))
array([[nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan], [nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan],
Can you figure out what I am doing wrong?