How to calculate statistics on NDVI images for multypoligons

Hi, I would like to calculate the statistical data from multypoligon (kml) for separate. When I upload the kml with multipolygon it’s making the graph with the full and unique image. Its is possible?
Thanks ,


Dear Laia,

if I understand you correctly you are using EO Browser and want to get statistics (NDVI mean, max…) for each of the polygons in a multipolygon-kml?!

This is unfortunately not possible. You will always get only one statistic for the whole AOI returned (there is a small issue currently in EO Browser which will be resolved soon leading to only returning statistics for the first polygon of the multipolygon)

A simple workaround would be to create a small script that splits your multipolygon into single polygons and then requests statistics for each of them using our Statistical API.


Thanks, Daniel ! I will try it !

With the latest deploy of EO Browser to v3.4.0 now the correct statistic for the whole multipolygon is returned.

Hi dthiex, i have the same problem but with python API. I try get in the same request:

  • A True color image in a bounding box.
  • NDVI values in a multiple polygons in same bounding box.

I try create this script in python using sentinelHubRequest, but only obtain a one polygon, using with this guide.

Hi @santiagoperaza

Could you please clarify if your issue is with StatisticalAPI or with ProcessAPI?

Using the following snippet:

req = SentinelHubRequest(
    input_data = [SentinelHubRequest.input_data(
    responses = [SentinelHubRequest.output_response('default', MimeType.TIFF)],
    geometry=Geometry(aois[aois.index<2].unary_union, CRS.WGS84),

creates a multi-polygon geometry (for example purposes I’ve created it by means of unary_union of two polygons) and the response contains both geometries:

Unfortunately, it is not possible to mix bbox and geometry in single request, so if you want to see true color over bounding box, and then get NDVI values just for some (multi-)polygon inside this bounding box, you’ll have to create two separate requests.

i used ProcessAPI. Your example would work for me,how use unary_union? documentation?