Statistical info API, name of the retrieved data is C0

Hello community,

I am using the FIS API service in Pycharm. When retrieving the data using urllib.urlretrieve. The rettrieved json file has the top name = C0 instead of the adequate layer name (B04 in my case, or “NDVI” in your examples at ) .

why is this the case and will it change again?

thank you,
Marcela Doubkova

I agree, it would be easier to have the actual layer ID than an indexed list of layers, which requires you to refer back to the layer setup in the Configurator. Hopefully the Sentinel-Hub team can improve this.

When setting up Statistical API (FIS) in the beginning, we wanted to support “standard” options, such as band values, NDVI, etc. However, we quickly realized that users are using it for many other things, not just NDVI, e.g. many for cloud detection. The “ndvi” name of the element became irrelevant.
During upgrade of our services to v2 in November 2017 we decided to correct this error.

The principle now is very simple. If the layer is returning only one value (e.g. index value), the element will be named C0. If layer returns multi-channel result, e.g. “cloud coverage” and “certainty”, then there will be root elements “C0” and “C1”. And so on - as many as there are the channels in the results, as many elements there will be. Using it should be pretty straightforward as the user always knows, what the values in the result should represent.

We do not plan to change this in the future anymore, also to prevent further inconveniences with our users (as the one described in this post).

PS: we will update the documentation on the page to reflect that. Thanks for the notice.

Thanks Grega for a quick reply. And THANKS a lot for this forum. Any confusion is fast solved! Marcela