Is it possible to specify resolution for an AwsTileRequest?

I want to load 20m raw sentinel imagery into a numpy array using AwsTileRequest following the example in the docs but it seems to be downloading all of the raw images in 10, 20, and 60 meter resolution.

Is there a way to only download, for example, the 20 meter files? I am also interested in downloading the SCL layer but the default configuration rejects that value because it is not in the list of acceptable band options.

Here is the command that I am running:

from sentinelhub import AwsTileRequest

request = AwsTileRequest(
    tile='38LPH',
    time='2017-12-15',
    aws_index=0,
    bands=['B02', 'B03', 'B04', 'B08', 'SCL'],
    metafiles=None,
    data_folder='/tmp/sentinel_test',
    data_collection=DataCollection.SENTINEL2_L1C
)

Unfortunately that is not possible with AwsTileRequest. The AwsTileRequest is meant to download full raw Sentinel tiles and tries to reconstruct the naming of the files to SAFE file format. As such, it just fetches objects from AWS s3 bucket.

Obviously, we don’t believe that downloading full tiles (at full resolution) is the way to go, hence the Sentinel Hub service allows users to download precisely the information they want (specifying AOI, time window, resolution, projection…). You can try it out yourself.

Just to add that this package was implemented when there were only L1C files, which are only coming at one resolution. For L2A it was just patched so that it worked for default setup.

Pull requests are always welcome :slight_smile:

1 Like