Skip to main content

Hello!

I want to download an image (Landsat-8) and the date it was taken. For this, I combine WMS + WFS.

The bbox I am using:

-65.01038687755081,-34.83256549540951,-64.97794366609234,-34.75317944010311

To download the image I use:

https://services-uswest2.sentinel-hub.com/ogc/wms/{INSTANCE_ID}?SERVICE=WMS&REQUEST=GetMap&BBOX={BBOX}&LAYERS=TRUE-COLOR&MAXCC=15&RESX=30m&RESY=30m&FORMAT=image/tiff&CRS=CRS:84

This last request downloads an image from 24/05/2021

(I only know this because I requested “addiotionalData” in the layer configuration as stated here)

However, when I do the same request with WFS as follows:

https://services.sentinel-hub.com/ogc/wfs/{INSTANCE_ID}?REQUEST=GetFeature&srsName=CRS:84&TYPENAMES=DSS13&BBOX={BBOX}&OUTPUTFORMAT=application/json&MAXFEATURES=10&MAXCC=15

I get the following:

{‘type’: ‘FeatureCollection’,
‘features’: {‘type’: ‘Feature’,
‘geometry’: {‘type’: ‘MultiPolygon’,
‘crs’: {‘type’: ‘name’,
‘properties’: {‘name’: ‘urn:ogc:def:crs:OGC::CRS84’}},
‘coordinates’: : -66.17699746759213, -35.269739550863164],
r-64.16323374467363, -35.65718908264593],
5-63.70066183727885, -33.9474911167693],
8-65.67603408145614, -33.56524292725187],
9-66.17699746759213, -35.269739550863164]]]]},
‘properties’: {‘id’: ‘LC08_L2SP_229084_20210812_20210819_02_T1’,
‘date’: ‘2021-08-12’,
‘time’: ‘16:09:29.22’,
‘path’: ‘https://usgs-landsat.s3.amazonaws.com/collection02/level-2/standard/oli-tirs/2021/229/084/LC08_L2SP_229084_20210812_20210819_02_T1/LC08_L2SP_229084_20210812_20210819_02_T1’,
‘crs’: ‘EPSG:32720’,
‘mbr’: ‘208200,6052300 438600,6284200’,
‘cloudCoverPercentage’: 0.14}},
{‘type’: ‘Feature’,
‘geometry’: {‘type’: ‘MultiPolygon’,
‘crs’: {‘type’: ‘name’,
‘properties’: {‘name’: ‘urn:ogc:def:crs:OGC::CRS84’}},
‘coordinates’: ty-65.70984077881769, -33.56288463216503],
-63.73758134237661, -33.94498307026547],
-64.19963550942893, -35.65522086337681],
b-66.21343790812278, -35.26609419694817],
-65.70984077881769, -33.56288463216503]]]]},
‘properties’: {‘id’: ‘LC08_L2SP_229084_20210524_20210529_02_T1’,
‘date’: ‘2021-05-24’,
‘time’: ‘14:09:02.11’,
‘path’: ‘https://usgs-landsat.s3.amazonaws.com/collection02/level-2/standard/oli-tirs/2021/229/084/LC08_L2SP_229084_20210524_20210529_02_T1/LC08_L2SP_229084_20210524_20210529_02_T1’,
‘crs’: ‘EPSG:32720’,
‘mbr’: ‘205500,6052300 435600,6284200’,
‘cloudCoverPercentage’: 0.04}}]}

Which shows that there is a newer image than 2021-05-24 and WMS is not getting that one.

My question here is two-fold.

  • Why is the WMS Service not getting the image from 2021-08-12?

  • Is there an easier way to get the date from the image downloaded with WMS? The “addiotionalData” could actually add the requested data as metadata and not print it on the middle of the image…

Thank you very much,
 

Hi.

 
  • Why is the WMS Service not getting the image from 2021-08-12?

The WMS Service is not returning the image from 2021-08-12 because this acquisition has a higher cloud cover percentage (0.14) than the acquisition from 2021-05-24 (0.04) and the Mosaic order parameter in the TRUE-COLOR layer you are calling is set to Least cloud coverage. Setting this parameter to Most recent fixed the problem for me.

 

Is there an easier way to get the date from the image downloaded with WMS? The “addiotionalData” could actually add the requested data as metadata

As far as I know, it is not possible to generate such multi-part responses with WMS requests.

You might want to have a look at our Process API for this. Please take a look at this example request for Landsat-8 that returns scene metadata information alongside a True Color image.


Reply