Hi,
I am trying to create a WMS configuration with Sentinel-5P-L2. I keep getting “no products found” under it when I try to add a new layer. I am able to browse Sentinel-5 products on EO, but I would like to get it on WMS. Any suggestions?
-Kalai
Hi,
I am trying to create a WMS configuration with Sentinel-5P-L2. I keep getting “no products found” under it when I try to add a new layer. I am able to browse Sentinel-5 products on EO, but I would like to get it on WMS. Any suggestions?
-Kalai
For Sentinel-5P we do not yet have pre-defined products configured, so you need to compile them yourself using the band names described here:
docs.sentinel-hub.comSentinel Hub is multi-spectral, temporal satellite imagery service for real-time processing of big remote sensing data.
To start it is easiest to use “New Configuration → Create configuration based on” functionality:
Thanks for the response. I did try the pre-configured Sentinel-5p template functionality, which also has the same issue. Even though the band names are configured, preview is not shown, and when I export it to ‘playground’, I cannot see the maps.
Moreover, when I click on the ‘data processing’ editor, I don’t get to see the base products. I tried giving the band names in the custom script, but that doesn’t work.
Just want to check if I am missing anything else you suggested.
Thanks!
The CreoDIAS datasources do not work in Preview and Playground, I believe (these features were not yet updated to support non-core datasets).
You should however be able to view the products using WMS in QGIS or similar.
For these layers you only have Custom scripts defined, there are no product definitions yet.
Hi,
I’m also trying to use Sentinel-5P data using Sentinelhub-py and getting only white images, just like in the preview in the configuration, even though in the EO-browser shows data at the same place on the same day.
Here’s the code that I’m using for testing:
def plot_images(images, factor=1):
“”"
Utility function for plotting RGB images.
“”"
fig = plt.subplots(nrows=len(images), ncols=1, figsize=(30, 10))
i=0
for image in images:
i=i+1
plt.subplot(len(images),1,i)
if np.issubdtype(image.dtype, np.floating):
plt.imshow(np.minimum(image * factor, 1))
else:
plt.imshow(image)
config2 = SHConfig()
config2.instance_id = INSTANCE_ID
config2.sh_base_url=“https://creodias.sentinel-hub.com”
budapest_bbox = BBox(bbox=_18.97, 47.46, 19.13, 47.58], crs=CRS.WGS84)
request = WmsRequest(
data_folder=‘bp’,
layer=‘NO2’,
bbox=budapest_bbox,
time=‘2020-04-07’,
width=1024,
maxcc=0.2,
config=config2
)
imgs = request.get_data(save_data=True)
print(‘These %d images were taken on the following dates:’ % len(imgs))
for index, date in enumerate(request.get_dates()):
print(’ - image %d was taken on %s’ % (index, date))
print(‘Returned data is of type = %s and length %d.’ % (type(imgs), len(imgs)))
if imgs:
print(‘Last element in the list is of type {} and has shape {}’.format(type(imgsf-1]),
imgs -1].shape))
plot_images(imgs)
I created a request for easier debugging, though I’m not sure if there should be data (this is the bounding box from the API documentation). You can see the white image if you set up NO2 data from the Sentinel-5P satellite:
Ah, I just found out in another thread, that the data is only available on EOCLOUD (now I understand why I could see NO2 data in the EO Browser).
I would like to get access to EOCLOUD as well (or the data synchronized).
EO Browser is using the services from CreoDIAS as well… And CreoDIAS is in general much more stable.
NO2 is complex and your URL (thanks for thinking about debugging, it makes it much easier, but it still took me half an hour to debug).
Some hints and suggestions:
(first general ones)
-use CRS in your call, otherwise it is difficult to assess, which area you are actually looking at
-use TIME parameter - service would probably default to something, but you never know, if there is data there on that date
(NO2-specific)
-use MINQA=0 parameter, otherwise your AOI might fall in the place where data are masked
-NO2 values are in 10-5 range. WMS service will take value from 0-1 and map them to the range of output format (see this page for explanation). So 10-5 will be more or less always close to 0. It would be best to set-up a script, which scales your desired range to 0-1 and output that. Or, even better, use process API. Alternative option (but not really recommended due to overheads of the format) is to use 32 bit float output.
An example of the request, which gets the data
BTW, EO Browser is showing NO2_VISUALIZED layer, which is also available in your configuration - you can check how it is configured.
Thanks Grega,
Thanks very much for the help!
In the web request casse the problem was that I didn’t set the time parameter.
Right now there’s no official way to set MINQA with the Python API, but I’ll just find a workaround (probably by modifying the Python object or changing the code), so that’s not a problem.
I was using the right mapping for NO2 (I checked that in the EO browser), that wasn’t an issue.
Now I have a new interesting problem:
Your request works, but the Python API requests time stamps that may not exist on the server. It may be some metadata problem about the timestamps maybe, but I’m not sure.
request.get_url_list() returned this in Python:
p‘https://creodias.sentinel-hub.com/ogc/wms/ID?SERVICE=wms&WARNINGS=False&MAXCC=100.0&BBOX=-13152499.0%2C4020692.0%2C-13115771.0%2C4038942.0&FORMAT=image%2Fpng&CRS=EPSG%3A3857&TIME=2020-04-08T18%3A44%3A57%2F2020-04-08T18%3A44%3A57&WIDTH=1024&HEIGHT=1024&LAYERS=NO2&REQUEST=GetMap&VERSION=1.3.0’,
‘https://creodias.sentinel-hub.com/ogc/wms/ID?SERVICE=wms&WARNINGS=False&MAXCC=100.0&BBOX=-13152499.0%2C4020692.0%2C-13115771.0%2C4038942.0&FORMAT=image%2Fpng&CRS=EPSG%3A3857&TIME=2020-04-08T18%3A45%3A00%2F2020-04-08T18%3A45%3A00&WIDTH=1024&HEIGHT=1024&LAYERS=NO2&REQUEST=GetMap&VERSION=1.3.0’]
With further debugging I can see this request being done to get the timestamps that are requested by the server:
The result is this:
{
“type”: “FeatureCollection”,
“features”:
{
“type”: “Feature”,
“geometry”: {“type”:“MultiPolygon”,“crs”:{“type”:“name”,“properties”:{“name”:“urn:ogc:def:crs:EPSG::3857”}},“coordinates”:pro-1.3266363277280314E7,4072169.224825622],:-1.3263590047624962E7,3939558.2125377525],2-1.3132292008110182E7,3941531.684808312],2-1.3133544011092536E7,4074241.231656274],3-1.3266363277280314E7,4072169.224825622]]]]},
“properties”: {
“id”: “S2A_OPER_MSI_L1C_TL_EPAE_20200409T013007_A025049_T11SLT_N02.09”,
“date”: “2020-04-08”,
“time”: “18:45:00”,
“path”: “s3://sentinel-s2-l1c/tiles/11/S/LT/2020/4/8/0”,
“crs”: “EPSG:32611”,
“mbr”: “300000,3690240 409800,3800040”,
“cloudCoverPercentage”: 48.02
}
},
{
“type”: “Feature”,
“geometry”: {“type”:“MultiPolygon”,“crs”:{“type”:“name”,“properties”:{“name”:“urn:ogc:def:crs:EPSG::3857”}},“coordinates”:atur-1.3145448417186476E7,4074119.4686022527],-1.3144059943240127E7,3941415.71363462],-1.3012704565664465E7,3942030.015184638],-1.3012569074989967E7,4074764.4519769405],r-1.3145448417186476E7,4074119.4686022527]]]]},
“properties”: {
“id”: “S2A_OPER_MSI_L1C_TL_EPAE_20200409T013007_A025049_T11SMT_N02.09”,
“date”: “2020-04-08”,
“time”: “18:44:57”,
“path”: “s3://sentinel-s2-l1c/tiles/11/S/MT/2020/4/8/0”,
“crs”: “EPSG:32611”,
“mbr”: “399960,3690240 509760,3800040”,
“cloudCoverPercentage”: 70.63
}
}
]
}
These are both just white squares showing that there’s no data available probably. But if you modify the time to be just 2020-04-08 instead of 2020-04-08T18%3A44%3A57%2F2020-04-08T18%3A44%3A57 you can see the data.
Do you have any idea of what could cause the issue?
Thanks,
Adam
The WFS call that is made above, checks for Sentinel-2 data, due to TYPENAMES=S2.TILE setting. You can also see this in results, which describe Sentinel-2…
And as you then use S2 times to ask for S5P image, it does not work.
Check this page for TYPENAMES setting:
sentinel-hub.comThe Sentinel Hub Web Feature Service conforms to the WFS standard. It provides access to the geometric (vector) metadata about the available data collection tiles. WFS is also only available via a user-preconfigured custom server instance URL.
I am not familiar enough with sentinelhub-py libraries to know, whether this is a bug or a feature (e.g. you need to set something there). The libraries were initially designed around Sentinel-2 and only later extended to other sources, so it is possible that some things require tweaking.
If you figure it out it is a bug, please report it here:
Download and process satellite imagery in Python using Sentinel Hub services. - Issues · sentinel-hub/sentinelhub-py
Or, even better, submit a pull request with a resolution to GitHub.
Best,
Grega
I am not familiar enough with sentinelhub-py libraries to know, whether this is a bug or a feature (e.g. you need to set something there). The libraries were initially designed around Sentinel-2 and only later extended to other sources, so it is possible that some things require tweaking.
Thanks very much!
I found a data_source variable, but it uses S5p_L2.TILE instead of DSS7 for typename.
I can probably add overwriting the TYPENAME and MINQA to CustomUrlParams and send a pull request, I’ll try it. Also the documentation should probably have an example for using Sentinel 5P.
I created pull request https://github.com/sentinel-hub/sentinelhub-py/pull/120 .
It contains MINQA support, and non-eocloud Sentinel5P type name (DSS7) support.
I tested it by hand.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.