FIS: get_data method vs. POST request - different results


Because of the character limit in the URL I used the POST request to retrieve statistical information. But I got very low NDVI values. So I used the get_data method and the POST request to compare the statistical information for the same polygon. The results are quite different. Can somebody explain me why? Thanks

Here is the configuration for the get_data method:

from sentinelhub import SHConfig, CRS, constants, FisRequest, Geometry
from shapely.geometry import Polygon

class configuration:
    def use_modis():
        sh_config = SHConfig()
        sh_config.instance_id = <INSTANCE_ID>
        sh_config.ogc_base_url = ''

geometry1 = Geometry(Polygon([(9.888827680050385, 48.51217273580289),
                              (9.89264918894377, 48.51226462256068),
                              (9.893282254167623, 48.51638404099815),
                              (9.889316705153087, 48.51622619699188),
                              (9.888827680050385, 48.51217273580289)]),

fis_request = FisRequest(layer=<NDVI_LAYER>,
fis_data = fis_request.get_data(save_data=False)

[{'C0': [{'basicStats': {'max': 0.8196691274642944,
     'mean': 0.8196691274642944,
     'min': 0.8196691274642944,
     'stDev': 0.0},
    'date': '2019-05-11'}]}]

And here is the post request:

import requests

url = ''+<INSTANCE_ID>

response =,
                             'Accept': 'application/json, text/plain, */*',
                             'Content-Type': 'application/json; charset=utf-8',
                             'Connection': 'keep-alive'
                             "geometry":"POLYGON ((9.888827680050385 48.51217273580289, 9.89264918894377 48.51226462256068, 9.893282254167623 48.51638404099815, 9.889316705153087 48.51622619699188, 9.888827680050385 48.51217273580289))",

{'C0': [{'basicStats': {'max': 0.11925021559000015,
    'mean': 0.11925021559000015,
    'min': 0.11925021559000015,
    'stDev': 0.0},
   'date': '2019-05-11'}]}

When I download the MODIS scene and calculate the NDVI manually, I got the same value like with the FIS get_data method.


That looks strange.
Can you perhaps post here CURL requests for both of these options, masking the second part of the instance ID?


CURL for the post request:

curl -X POST \ \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d '{"layer":"MODIS_NDVI","crs":"EPSG:4326","time":"2019-05-11/2019-05-11","resolution":"500m","geometry":"POLYGON ((9.888827680050385 48.51217273580289, 9.89264918894377 48.51226462256068, 9.893282254167623 48.51638404099815, 9.889316705153087 48.51622619699188, 9.888827680050385 48.51217273580289))","maxcc":100}'

I don’t know how to create a curl request from get_data method. I did the FIS request in a jupyter notebook like it is shown right here

//edit: Here is the URL for the get_data method:


The difference between these calls is an order of lat/lon in the GEOMETRY parameter.

A WKT representation of a geometry describing the region of interest.
This is a common issue with EPSG:4326, a consequence of a confusion in OGC standard
As stated in the Statistical API page:

Note that WCS 1.1.1 standard is used here, so for EPSG:4326 coordinates should be in latitude/longitude order.


Well, yeah, thats quite confusing! Thanks a lot