Skip to main content

Hi,


I noticed a strange thing when experimenting with the code found here:
https://www.sentinel-hub.com/faq#t29n349


Here is my the WFS-request:
https://services.sentinel-hub.com/ogc/wfs/<--omitted-->?service=WFS&version=2.0.0&request=GetFeature&time=2018-06-15/2018-07-04/P1D&typenames=S2.TILE&maxfeatures=100&srsname=EPSG:4326&bbox=55.684141460475985,13.18809986114502,55.672042726430575,13.232645988464357&maxcc=30&outputformat=application/json

I recive dates from the WFS-request (parsed from the GeoJSON data). Like this:

[“2018-07-01”, “2018-06-29”, “2018-06-26”, “2018-06-24”, “2018-06-21”, “2018-06-19”, “2018-06-16”]. I have pasted the response data here (with a few more dates), and to me everything looks great, latest image taken 2018-07-01. Link to response data.


I then proceed to fetch the images using those dates, as the code suggests.

But when I view the images it is clear to me, knowing the crops in the area, that the images are about one month old.

So when viewing an image taken at the date 2018-07-01 I can see that the image represents the acutal date of 2018-05-30.

To be specific all images I download after the date 2018-05-30 are identical to the image taken that date. Images taken previous to that date differ from each other, so there’s no issue there.


Here is one of the WCS-requests sent to get the (as of today) latest image taken.
https://services.sentinel-hub.com/ogc/wcs/<--omitted-->?service=WCS&version=1.1.2&request=GetCoverage&time=2018-07-01&coverage=TRUE_COLOR&srsname=EPSG:4326&bbox=55.684141460475985,13.18809986114502,55.672042726430575,13.232645988464357&resx=4m&resy=4m&showlogo=false&format=image/png


There must be something that I’m doing wrong. Can someone assist me in finding the problem?

To me it looks like the time-parameter in the WCS-request is correct.

It looks ok to me - when comparing the images of different dates there is definitely change after 2018-05-30


05-30:
https://services.sentinel-hub.com/ogc/wcs/<–omitted–>?service=WCS&version=1.1.2&request=GetCoverage&time=2018-05-30&coverage=TRUE_COLOR,DATE&srsname=EPSG:4326&bbox=55.684141460475985,13.18809986114502,55.672042726430575,13.232645988464357&resx=4m&resy=4m&showlogo=false&format=image/png


06-06:
https://services.sentinel-hub.com/ogc/wcs/<–omitted–>?service=WCS&version=1.1.2&request=GetCoverage&time=2018-06-11&coverage=TRUE_COLOR,DATE&srsname=EPSG:4326&bbox=55.684141460475985,13.18809986114502,55.672042726430575,13.232645988464357&resx=4m&resy=4m&showlogo=false&format=image/png


07-01:
https://services.sentinel-hub.com/ogc/wcs/<–omitted–>?service=WCS&version=1.1.2&request=GetCoverage&time=2018-07-01&coverage=TRUE_COLOR,DATE&srsname=EPSG:4326&bbox=55.684141460475985,13.18809986114502,55.672042726430575,13.232645988464357&resx=4m&resy=4m&showlogo=false&format=image/png


How have you set up the priority for displaying the images?


Your issue is almost the same as this one.

The TRUE_COLOR layer in your configuration is set with “maximum cloud coverage = 20%” and "priority = least cloud coverage. You will find explanations of these two parameters here.

If you want to ensure that you get exactly the image on the specific date, you should:


  • Set cloud coverage filter to 100%, either in Configuration utility or by adding parameter MAXCC=100 to your request.

  • Set priority parameter to “Most recent”, again either in Configuration utility or by adding parameter “PRIORITY=mostRecent”

  • The TIME parameter is also not used according to the specifications. If you want to get imagery from specific date, you should put TIME=2018-07-01/2018-07-01

Example request:
https://services.sentinel-hub.com/ogc/wcs/<–omitted–>?service=WCS&version=1.1.2&request=GetCoverage&time=2018-07-01/2018-07-01&coverage=TRUE_COLOR&srsname=EPSG:4326&bbox=55.684141460475985,13.18809986114502,55.672042726430575,13.232645988464357&resx=4m&resy=4m&showlogo=false&format=image/png&MAXCC=100&PRIORITY=mostRecent


I have created a new layer in your configuration “TRUE-COLOR-DATE”, which shows the date of the image as described here.
https://services.sentinel-hub.com/ogc/wcs/<–omitted–>?service=WCS&version=1.1.2&request=GetCoverage&time=2018-07-01/2018-07-01&coverage=TRUE-COLOR-DATE&srsname=EPSG:4326&bbox=55.684141460475985,13.18809986114502,55.672042726430575,13.232645988464357&resx=4m&resy=4m&showlogo=false&format=image/png&MAXCC=100&PRIORITY=mostRecent


Another note: I noticed you are using RESX=4m&RESY=4m. As Sentinel-2 imagery has resolution of 10m, this does not make much sense, you only download more data, but level of information is the same. I suggest you put RESX=10m, unless you see some benefit in interpolated data.



Very helpful answer! Thank you.
I will continue experimenting with the info you sent.


If I add the DATE parameter like this: coverage=TRUE_COLOR,DATE I get a correct image.
If I remove DATE I recieve a old image. There’s no clouds in the area of either of the images.
How come I get a newly taken image when adding DATE?


No idea why it would do that. The solution provided by @gmilcinski should resolve the issue.



I’m considering if it is a browser cache related issue. But I had devtools up and cache disabled… Strange.

Thank you for your help!


This is certainly a browser/cache issue. Services do not cache anything on server side so every request is evaluated in the same manner. And adding “,DATE” does not change it.


Perhaps worth to note at this point that we will eventually be retiring the “,DATE” option as it is not consistent with general parameters, e.g. adding another “virtual” layer to the request. The same functionality is now available by setting it in Configuration utility:
https://www.sentinel-hub.com/faq/how-do-i-find-image-acquisition-date

We are trying to ensure backward compatibility, but for those using “,DATE” options, we recommend to do it the other way, through advanced parameters.


As you say it has to be related to browser cache. Although I had devtools up and cache turned off.

I’m happy with the answers I have got so I will continue working.


Reply