Summary Statistic Issue - ValueError: Vector geometry type must be Polygon or MultiPolygon

Hi, Natural capital team.

I’m using the INVEST (Habitat Risk Assessment-HRA) model for habitat risk assessment for my study area. In which I got all the outputs except Summary statistics table. The error file attached below:
Error_file.csv (16.4 KB)

Thank you,
Shikha

Hello @Shikha and welcome to the forums!

Based on the logs you provided, the error message looks like the model is failing because the AOI vector F:\Risk_assessment\Habitat\Valid.shp may have some features that do not have a polygon or multipolygon geometry. Could you make sure that all features in F:\Risk_assessment\Habitat\Valid.shp have geometries that are either polygons or multipolygons? If you are sure of this, please share the vector with us here so we can debug this further.

Thanks!

James

Thank you Natural capital team for your reply. Here I attached my study area shape file.
Valid.zip (49.2 KB)

Thank you,
Shikha

Indeed, Valid.shp is a 3D Polygon, which is currently not a supported geometry type for the zonal statistics operation that generates the summary statistics. @Shikha Please try exporting your shapefile with Polygon geometries instead. And we will consider updating our function to allow 3D Polygons in the future.

ogrinfo -so -al Valid.shp
INFO: Open of `Valid.shp'
      using driver `ESRI Shapefile' successful.

Layer name: Valid
Metadata:
  DBF_DATE_LAST_UPDATE=2025-10-04
Geometry: 3D Polygon
Feature Count: 1
Extent: (546833.285519, 2936975.685265) - (670327.882670, 2997958.464404)

Hi, NC team thank you for your valuable time. I resolve the problem by creating buffer along the study area in QGIS and run the model after that I got the summary statistical table.

Thank you,
Shikha

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