Skip to main content
DownloadFailedException: Failed to download from:
https://services.sentinel-hub.com/api/v1/statistics
with HTTPError:
400 Client Error: Bad Request for url: https://services.sentinel-hub.com/api/v1/statistics
Server response: "{"status": 400, "reason": "Bad Request", "message": "Your request of 1666.52 meters per pixel exceeds the limit 1500.00 meters per pixel of the collection S2L2A. Please revise the resolution (or corresponding width/height) to make sure it is in supported range.", "code": "COMMON_EXCEPTION"}"

The above error is a result of the following script. not sure why this happens, it was usually 2500 meters (the max resolution for downloading). Also the Image shape at 10 m resolution: (166, 95) pixels


   aggregation = SentinelHubStatistical.aggregation(
evalscript=ndvi_new_evalscript,
time_interval=yearly_time_interval,
aggregation_interval="P1D",
resolution=(10, 10),
)

# Define histogram calculations
histogram_calculations = {
"ndvi": {
"histograms": {"default": {"nBins": 20, "lowEdge": -1.0, "highEdge": 1.0}}
}
}

# Initialize empty list for feature requests
features_requests = []

# Loop over each geometry value in the AOI polygon
for geo_shape in AOI_polygon.geometry.values:
request = SentinelHubStatistical(
aggregation=aggregation,
input_data=[
SentinelHubStatistical.input_data(
DataCollection.SENTINEL2_L2A,
other_args={"dataFilter": {"mosaickingOrder": "leastCC"}},
)
],
geometry=Geometry(geo_shape, crs=CRS(AOI_polygon.crs)),
calculations=histogram_calculations,
config=config,
)

# Append the request to the list of feature requests
features_requests.append(request)

Hi @aswin.manohar ,


The error message indicates that you are requesting a resolution of 1666.52 meters per pixels, which exceeds the limit 1500 meters per pixel for Sentinel-2 L2A data.


Note that the unit of the resolution will be the same as your input geometry. I’m guessing that your geometry is in WGS84. If that’s the case, could you please set the resolution to 0.0001 and try again?


Hi @chung.horng, so the resolution parameter takes values only in degrees? Yes, makes sense since my crs is wgs84 I have another question, so the maximum limit for process/statistical API for requesting data in an area is (2500,2500) at 10m per pixel?


I have an area of 74 km2 that I want to do a time series analysis for. I get an mage shape at 10 m resolution: (1086, 1157) pixels.I think it should be okay to use process api until the area exceeds (2500,2500). Unfortunately I am not able to use the batch processing because I have no access to AWS. At our company, we use another cloud provider. Just wondering if it is possible to use batch processing with another cloud provider.


Hi @aswin.manohar ,


It takes value in the same unit of your input geometry. If your geometry is in WGS84, the resolution is in degree. If your geometry is in UTM, the resolution is in meter.


The 2500 * 2500 pixels are the limit of the dimension for Processing API. The 1500 meter pixel resolution is the limit on how large a pixel can be depending on the data collection. The limit for the Sentinel-2 L2A data is 1500 meter per pixel in this case.


Yes, you’re right. You can use the Processing API until the dimension exceeds 2500*2500. Currently Batch Processing is only available with AWS, but there’s a future plan to add other cloud options. Please follow the thread here.


This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.


Reply