Artifacts on tile borders

Hi,
When viewing S2 data which spans two tiles I am seeing artifacts on the border between the tiles (I think) when looking at illumination angles. It reminded me of the discussion which I saw recently on SNAP forum so could it be because you are not using SNAP S2_resampling processor on the back end.

Code and screenshot are below.

start_date      = '2022-01-03'
end_date        = '2022-01-03'

spatial_extent = {'west': -74  , 'east': -73.106493944999954, 'south': 4.432483427000022, 'north': 5.425259437000022}
s2_cube = connection.load_collection(
    'SENTINEL2_L2A_SENTINELHUB',
    spatial_extent = spatial_extent,
    temporal_extent = [start_date, end_date],
    bands = ['sunAzimuthAngles', 'sunZenithAngles'] 
)

Dear @rmgu,

we are looking into this issue.

For now I can already let you know that for the requested date only data for the left part of the image was acquired (so we are indeed working on the edge of a tile/orbit). If the returned data looks otherwise okay, I suggest you work with what you got and ignore the by us faulty generated part on the right side.

Best,
Daniel

@daniel.thiex When downloading through a synchronous request, I got this error from sentinelhub:
Your request of 5000.00 meters per pixel exceeds the limit 1500.00 meters per pixel of the collection S2L2A.
So apparently, requesting these bands in the native resolution is not supported?

To workaround this, I added B05, which forces the datacube down to 20m resolution. This actually resulted in a correct image.

@rmgu is it your intention to work with these bands without any other bands? Or was this just some test?

Hi,
I am actually seeing this error (5000.00 meters per pixel…) quite often and it appears to be semi-random and not necessarily related to the spatial resolution (I don’t specify any).

@jeroen.dries the idea is to combine the two illumination angle bands with a DEM into a single datacube (see the question on data types) and use them as input into the shadow detection UDF. In the final implementation this datacube might also have reflectance bands but for now during the UDF development I just use those three bands.

Hi @rmgu ,

so as workaround, I would add at least a single reflectance band, like B01. That should fix it for now.
The 5km is basically the native resolution of these angle bands in Sentinel-2 products, so even if you don’t resample explicitly, it will still select this resolution if you don’t include other bands with a higher resolution.

@daniel.thiex not sure how to avoid this, should we update the GSD in collection metadata, or is there a way to avoid the error in Sentinelhub?

1 Like