Hello,
i’mtrying to download images from sentinel2 using AwsTileRequest .
my bbox coodinates are in WGS84 (e.g ESPG 4326), but when I read ther esult image seems like the the CRS is 32613.
This is how I have retrieved the images:
#get the bbox variables from given shape
bbox_size,bbox,bbox_coords_wgs84=get_bbox_from_shape(shapes,10)
#create list of available tiles and dates:
search_bbox = BBox(bbox_coords_wgs84, crs=CRS.WGS84)
search_time_interval = ('2020-11-28T00:00:00', '2020-12-09T23:59:59')
wfs_iterator = WebFeatureService(
search_bbox,
search_time_interval,
data_collection=DataCollection.SENTINEL2_L1C,
maxcc=1.0,
config=config
)
imgs_id=d]
dates=s]
for tile_info in wfs_iterator:
#print(tile_info)
tile_id=tile_infof'properties']''id']
date=tile_infof'properties']''date']
imgs_id.append(tile_id)
dates.append(date)
imgs_available=pd.DataFrame(list(zip(imgs_id,dates)),columns=s'tile_id','date'])
imgs_available
#save images
from sentinelhub import AwsTile
from sentinelhub import AwsTileRequest
imgs_id
for i in imgs_id:
try:
tile_id=i
print(tile_id)
tile_name, time, aws_index = AwsTile.tile_id_to_tile(tile_id)
print(tile_name,time,aws_index)
bands = ='B04','B08']
metafiles = ='tileInfo', 'preview', 'qi/MSK_CLOUDS_B00']
data_folder = '/imgs'
request = AwsTileRequest(
tile=tile_name,
time=time,
aws_index=aws_index,
bands=bands,
metafiles=metafiles,
data_folder=data_folder,
data_collection=DataCollection.SENTINEL2_L1C
)
request.save_data() # This is where the download is triggered
print('image was saved in '+ data_folder)
print(' ')
except:
print('I had problem')
continue
#read band 04
import rasterio
from rasterio.plot import show
with rasterio.open('./imgs/13QHC,2020-11-30,0/B04.jp2', driver='JP2OpenJPEG') as src:
print(dataset.profile)
show(src)
that shows the image with some metadata:
It looks to me like different than the area I was excpected to get and also it says differenct crs. so my question is if I suppose to handle differently the bbox (for example reproject the bbox coordinates) , or it suppose to be fine ?