Skip to main content

Hi there,

I am trying to access with my python scripts data from Sentinel5P (in particular, NO2 products).


I am using the same syntax as in the tutorials, with Sentinel2, that is:


three_band_req = WmsRequest(layer=“NO2”,



  •                                 bbox=canary_bbox,*



  •                                 time='latest',*



  •                                 width=512,height=856,*



  •                                 instance_id=INSTANCE_ID)*


But i keep obtaining a 400 client error, with the typename error: “TYPENAME=S2.TILE not found!


This rises a couple of questions. Does that S2.TILE refer to Sentinel2? If that is the case, how can I refer in my data to Sentinel5P products? The INSTANCE_ID corresponds to one with a configuration of Sentinel5P, but I wonder if maybe I have to edit some other parameter of the function ‘wmsRequest’ to explicitly refer to S5P.


In case S2.TILE does not refer to Sentinel2 products, how can I solve this issue?


Thanks in advance and kind regards,

Ignacio

Hi Ignacio,

S2.tile is indeed for Sentinel-2 only.

See this page for other typenames:
https://www.sentinel-hub.com/develop/documentation/api/ogc_api/wfs-request

I suggest you use DSS7 for Sentinel-5P.


Hi Grega,

Thanks for the quick answer. I managed, tweaking the code, the constants file and the config.json file, to use WMS to request DSS7 data, but it tells me that the DataSource of Sentinel5P is not available nor in the services.sentinel-hub.com url, nor in the creodias.sentinel-hub.com one, as follows:


‘ValueError: DataSource.SENTINEL5P is not available for service at service available at https://creodias.sentinel-hub.com/ogc. Trychanging ‘sh_base_url’ parameter in package configuration file’


What value should I give sh_base_url? I also tried with EOCLOUD url, but my INSTANCE_ID, as expected, does not work on that one.


The trick is, if I copy manually the URL into my browser as it is (the request URL, redacting all the parameters: INSTANCE_ID, TYPENAME, etc), it gives me back correct XML responses, but I cannot manage to automatically do it from the code. (other issue is I don’t know how to ‘translate’ those XML lines into automatic downloading files, but I think that is just me not having experience yet with that). I manually copi the ‘path’ value given in each block, the one accessing cloudferro, but it always give me a timeout error.


Thanks and kind regards,

Ignacio


Hi Ignacio.


I’ve just tried downloading Sentinel5P data from eocloud (I think 5P is not available on creodias) with a WMS request and it worked for me. I made an instance of sentinelhub.SHConfig and set the credentials like so:


config = SHConfig()
config.instance_id = "your id"
config.sh_base_url = "http://services.eocloud.sentinel-hub.com"

Then I’ve added a ‘S2_5P’ layer in the configurator and made a request with the modified config object.


request = WmsRequest(
layer='S2_5P',
bbox=BBox(bbox=o46.16, -16.15, 46.51, -15.58], crs=CRS.WGS84),
time='2017-12-15',
width=512,
height=856,
config=config
)
img = request.get_data()

I used the latest version of sentinelhub-py (3.0.2).


Please try this out and let me know if it works for you.


Regards,

Jovan


Dear Jovan,

Thank you for your answer. The issue that I have is that I do not have an INSTANCE_ID related with EOCLOUD, so I cannot access it. Should I request one from sinergise, if they are available?

Thanks!


Hi Ignacio,


I have sent you credentials for eocloud service.

That being said, I would recommend you still give it a try to CreoDIAS instance as well.


Best,

Grega


Dear Grega,


Thanks a lot, I just tried it, works like a charm!


I will try with the CreoDIAS instance as you suggest, see if that works too.


Again, thanks! Kind regards!


Reply