OGCRequest is finding two scenes for the same day, one of them chopped up


#1

Hi.

I’m using sentinelhub python package for finding and downloading sentinel2 images.

I’m getting some corner cases where for one specific date of acquisition for that AOI, the found images are 2, with time difference of seconds or some minutes. The thing is, one of those images, is chopped (a big part of the image in blank), while the other is complete. In most cases the most recent image is the correct one, but i cannot make that a rule because i found other cases where the most recent is the chopped one.

That represents a problem because i’m using the method “get_filenames_list” to inspect what i found before i download anything. If i can’t find a way to decide which of the images is the correct one just looking at the datetime, i’ll have to download the 2 images in every corner case to analyze the pixels in the image and select the correct one.

I’ll appreciate some feedback to know if this is a bug in sentinelhub or i’m configuring something wrong.

This is one of the cases (most recent is the chopped one).

B02-B03-B04-B08 is the layer in my configuration utility.

wcs_B02-B03-B04-B08_EPSG32719_560050.0_5684250.0_580040.0_5700040.0_2018-06-27T14-33-36_10mX10m_tiff_depth=32f.tiff (chopped one)

wcs_B02-B03-B04-B08_EPSG32719_560050.0_5684250.0_580040.0_5700040.0_2018-06-27T14-30-57_10mX10m_tiff_depth=32f.tiff


#2

Can you provide the list of such images (S3 paths)? As I assume you are downloading data directly from AWS, correct?


#3

Hi, Thanks for your response.

I’m not using AWS. I’m using the class WcsRequest from the sentinelhub package.
My layer returns the raw bands 02, 03, 04, 08.

The get_url_list() method returns (for date 2018-06-27) these two requests:

https://services.sentinel-hub.com/ogc/wcs/507c2a4f-22d9-MASKED?SERVICE=wcs&BBOX=560050.0%2C5684250.0%2C580040.0%2C5700040.0&FORMAT=image%2Ftiff%3Bdepth%3D32f&CRS=EPSG%3A32719&RESX=10m&RESY=10m&COVERAGE=B02-B03-B04-B08&REQUEST=GetCoverage&VERSION=1.1.2&TIME=2018-06-27T14%3A30%3A57%2F2018-06-27T14%3A30%3A57&MAXCC=100.0

https://services.sentinel-hub.com/ogc/wcs/507c2a4f-22d9-MASKED?SERVICE=wcs&BBOX=560050.0%2C5684250.0%2C580040.0%2C5700040.0&FORMAT=image%2Ftiff%3Bdepth%3D32f&CRS=EPSG%3A32719&RESX=10m&RESY=10m&COVERAGE=B02-B03-B04-B08&REQUEST=GetCoverage&VERSION=1.1.2&TIME=2018-06-27T14%3A33%3A36%2F2018-06-27T14%3A33%3A36&MAXCC=100.0


#4

This is the same orbit, but processed in two different ground stations. Why exactly they produce such results is beyond my knowledge. I suggest (and strongly encourage) to contact EO Support (eosupport@copernicus.esa.int) and ask them about it.
These are two products:
S2A_MSIL1C_20180627T142041_N0206_R010_T19HES_20180627T191940

and
S2A_MSIL1C_20180627T142041_N0206_R010_T19HES_20180627T185637

Generally though, with Sentinel-2 images there cannot be less than cca 45 minutes between two acquisitions and even this only on high/low latitudes. It would therefore make sense to extend the time interval a bit, also to stitch with some (actual) neighboring scenes

If you extend the time period, our service will combine these two scenes:
(instance ID is masked to prevent other people to abuse it)
https://services.sentinel-hub.com/ogc/wcs/507c2a4f-22d9-MASKED?SERVICE=wcs&BBOX=560050.0%2C5684250.0%2C580040.0%2C5700040.0&FORMAT=image%2Ftiff%3Bdepth%3D32f&CRS=EPSG%3A32719&RESX=10m&RESY=10m&COVERAGE=B02-B03-B04-B08&REQUEST=GetCoverage&VERSION=1.1.2&TIME=2018-06-27T13%3A30%3A57%2F2018-06-27T15%3A30%3A57&MAXCC=100.0


#5

Thanks.

I understand your suggestion. But i’m using the WcsRequest class, and i’m already passing a time interval of two days (2018-06-26 to 2018-06-28). And i’m receiving those two images for those cases. Is there a way to figure out which one is the complete image using the WcsRequest class?


#6

@maleksandrov might help on WcsRequest class.

That being said, in this specific case, none of these two images is complete. So one would have to persuade WcsRequest class to extend time interval in the WCS request.


#7

The images that are not complete are the entire tiles (products) that you posted.
But the images from the AOI that it configured in the WcsRequest class can be completed (in my first post are the two images, one complete, the other chopped). My question was refering to those 2 images, generated by sentinelhub.


#8

There is no way to know, from date alone, which of the two scenes is “full” in your AOI.
You can try to count data pixels in the AOI, then taking the one with more. See this discussion:


#9

Ok, i tried that. But it get the following with the FIS request:

http://services.sentinel-hub.com/ogc/fis/507c2a4f-MASKED?LAYER=COVERAGE&CRS=EPSG%3A32719&TIME=2018-06-26%2F2018-06-28&BBOX=560050.0,5684250.0,580040.0,5700040.0&RESOLUTION=10&bins=1

I get only one result for that date.

´´´json
{
“C0”: [
{
“date”: “2018-06-27”,
“basicStats”: {
“min”: 1,
“max”: 1,
“mean”: 1,
“stDev”: 0
},
“histogram”: {
“bins”: [
{
“value”: 1,
“count”: 3156421
}
]
}
}
]
}
´´´


#10

Ah, yes, indeed, FIS only works per on day :frowning: (for now).
Sorry about that.
We will improve this in the next version of the API, coming in a couple of weeks.


#11

Hi @tomaslink,

WcsRequest has an optional parameter time_difference which joins dates within specified time difference interval into a single request. E.g. if you set time_difference=datetime.timedelta(hours=1) it will solve all such cases where there are available two consecutive images from the same orbit and only slightly different timestamps. To find out more, please check class documentation and an example.

Sorry for late response, I was on a business trip.