Understanding TIME keyword in WCS/WMS/FIS in ogc standards


#1

Dear all,

I am having troubles understanding how actually the ‘time’ keyword in the WCS/WMS services work. I know that this has been touched in multiple Topics/emails, but I have not found any clear definition. Your definition of TIME in WCS/WMS is as follows:

TIME: If a time range is specified the result is based on all scenes between the specified dates conforming to the cloud coverage criteria and stacked based on priority setting - e.g. most recent on top. The time range is written as two time values separated by a slash, followed by a second slash and a period parameter (which must be P1D). Optional, default: none (the last valid image is returned). Examples: “TIME=2016-01-01”, “TIME=2016-01-01/2016-02-01/P1D”.

  1. What actually means ‘is based on all scenes’ and what should be the output (one or multiple arrays)? Is it the same for WMS and WCS and FIS? If I am not mistaken you are doing some sort of averaging for the FIS service, do you?

  2. I am requesting WCS/WMS service based on FIS results. I am afraid I may be missing some data, when I only put the DATE from FIS results into Time keyword of WCS/WMS.

thanks a lot for your time,
Marcela


#2

There is indeed a bit of confusion among various services. OGC standard does not help much here actually as it was not designed for multi-temporal databases.
We are trying to make this more consistent with the upcoming API.

To respond to your questions:

  1. For “TIME=2016-01-01/2016-02-01/P1D” for WMS/WCS what we do is search for all scenes acquired in the chosen AOI between 1st of January 2016 and 1st of February 2016. Assuming you have PRIORITY=mostRecent (this is also default setting), we will take the last scene (from date point of view) from the list and fill the AOI with it. In case the scene does not fill the whole AOI (e.g. on the borders of scenes or orbits), we will take the one before last scene and fill the rest of the AOI with it. And so on until either AOI is fully filled or there are no more scenes in the list.
  2. For the “TIME=2016-01-01” the process is the same as above. A period of “beginning of satellite mission, e.g. 1st of June 2015 up to 1st of January 2016” is taken into account. The date in the “TIME” is therefore just “END DATE”. In case you would like to get imagery only for one day, you should set: TIME=2016-01-01/2016-01-01 .
  3. FIS works a bit differently. Within FIS we first search for all the scenes in the chosen AOI and time range. Then we find all unique dates (note that only “date” is taken into account, not “date time” so in case there are two acquisitions in the same day (only happens close to the poles), we will miss some scenes) and go through each of the dates, get pixel values for AOI and that specific date, do a statistic and return it as a result.
  4. Not sure what averaging you mean for FIS. We calculate values of all pixels (at selected resolution level) in the AOI and then calculate min/max/median values.

So, assuming you use FIS for “AOI based cloud assessment”, you should use MAXCC=100 within FIS, which will result in all dates, when scenes are available in the AOI (even if not covering full AOI). Then you should use WMS/WCS with TIME=YYYY-MM-DD/YYYY-MM-DD, where YYYY-MM-DD is the date the FIS service (on both sides of “/” the same date)

Note that when searching for scenes in the AOI and chosen time range, we also take MAXCC parameter into account - e.g. we filter out scenes, which have cloud coverage (based on scene meta-data, not on local AOI) more than what is chosen. E.g. for MAXCC=20 we will only select scenes with cloud coverage less than 20%. This is valid both for WMS/WCS as well as FIS.


#3

Thanks a lot. Its a bit clearer. It would be beneficial to have this already in the API documentation.

Just some more comments/questions.

  1. WCS/WMS on overlapping Sentinel swaths:
    I tried your suggestion on a shapefile on 2 overlapping swaths. My goal is to fill in the entire AOI for 1st of April. I know that there are multiple scenes available from ESA for that day and that the entire AOI can be filled. I actually tested that in sentinelPython using the the time_difference keyword in WCSreqeust . The output of ogc request however only provides one scene with one unexpected shape very different from WCSRequest in python sentinelhub (see the attachment and the link - my ID is replaced with MYID). Am I doing something wrong?

services.sentinel-hub.com/ogc/wcs/MYID?REQUEST=GetCoverage&COVERAGE=GITELSON-CHL-RED-EDGE&CRS=EPSG%3A32633&TIME=2019-04-01/2019-04-01/P1D&maxcc=100&ATMFILTER=NONE&GEOMETRY=POLYGON%20((497821.6581624898%205205107.938366433%2C%20501484.5074434849%205191167.257394785%2C%20516165.8930382404%205189754.204027675%2C%20516058.2597842703%205199371.821613719%2C%20497821.6581624898%205205107.938366433))&resx=10m&resy=10m&SHOWLOGO=false&format=image/tiff;depth=32f

  1. FIS request:
  • The filling of the AOI happens in the same way as in WCS? In other words, in case the last scene doesn’t fill the entire AOI you take the one before?
  • Statistics is computed only then, on the filled AOI?
  • I wonder if scientists monitoring ice or sea are not sad about the missed data around the poles.

thanks, Marcela


#4

For WMS/WCS - It seems to me that this shape is the shape of the polygon that you pass in GEOMETRY parameter. Isn’t it so? Perhaps I am missing something.

For FIS - for each “date” (e.g. 2019-04-01/2019-04-01) FIS actually runs a WCS request and then calculates the statistic based on returned values. So yes, same rules apply for FIS as for WCS.
As mentioned previosly, FIS always executes requests for “one individual date”, so the “one scene before” only applies if it is taken in the same day.
Statistics is computed on all the pixels, which are returned, even if they do not fill the whole AOI. If you add “bins=10” to the FIS request, you will be able to calculate number of pixels, which fall in each group.


#5

Sorry Grega. You are correct.
I compared the output of the OGC with output from SENTINELHUB python script where I have not updated the custoumrlparameter with Geometry, only used BBOX.

Thanks for the FIS explanation. Now its clear.

Marcela