Vector geometry error when running Urban Cooling

@Michael I have a problem to run Urban Cooling

03/26/2026 13:26:36 taskgraph.Task ERROR Something went wrong when adding task pickle cc ref stats (15), terminating taskgraph.
Traceback (most recent call last):
File “taskgraph\Task.py”, line 684, in add_task
File “taskgraph\Task.py”, line 1103, in _call
File “natcap\invest\urban_cooling_model.py”, line 1322, in pickle_zonal_stats
File “src/pygeoprocessing/geoprocessing_core.pyx”, line 77, in pygeoprocessing.geoprocessing_core.gdal_use_exceptions.wrapper
File “src/pygeoprocessing/geoprocessing_core.pyx”, line 78, in pygeoprocessing.geoprocessing_core.gdal_use_exceptions.wrapper
File “pygeoprocessing\geoprocessing.py”, line 1703, in zonal_statistics
ValueError: Vector geometry type must be Polygon or MultiPolygon

03/26/2026 13:26:36 natcap.invest.utils ERROR Exception while executing urban_cooling_model
Traceback (most recent call last):
File “natcap\invest\utils.py”, line 184, in prepare_workspace
File “invest\cli.py”, line 484, in main
File “natcap\invest\urban_cooling_model.py”, line 834, in execute
File “taskgraph\Task.py”, line 684, in add_task
File “taskgraph\Task.py”, line 1103, in _call
File “natcap\invest\urban_cooling_model.py”, line 1322, in pickle_zonal_stats
File “src/pygeoprocessing/geoprocessing_core.pyx”, line 77, in pygeoprocessing.geoprocessing_core.gdal_use_exceptions.wrapper
File “src/pygeoprocessing/geoprocessing_core.pyx”, line 78, in pygeoprocessing.geoprocessing_core.gdal_use_exceptions.wrapper
File “pygeoprocessing\geoprocessing.py”, line 1703, in zonal_statistics
ValueError: Vector geometry type must be Polygon or MultiPolygon

03/26/2026 13:26:36 natcap.invest.utils INFO Elapsed time: 9.15s
03/26/2026 13:26:36 natcap.invest.utils INFO Execution finished; version: 3.16.2”

this is the error whin i run URBAN COOLING

Hello @ankita -

I have moved your question to a new topic to help keep the forum tidy.

Thanks for posting your error. It’s really most useful if you post the entire log file (.txt file produced in your Workspace), which might contain additional useful information.

The error message says this:

ValueError: Vector geometry type must be Polygon or MultiPolygon

There are two possible vector inputs to the Urban Cooling model - the area of interest and buildings, both of which are required to be polygons, not lines or points. So, have you checked out those inputs to see if they are actually polygons? If they are not polygons, you will need to convert them to polygons, or find a different dataset that does provide polygons.

~ Stacie

1 Like

@ankita It’s quite possible that if you upgrade to the latest version of InVEST (3.18.0) you will not encounter this error. The error sounds a lot like this issue: Be less strict about polygon geometry types in zonal statistics · Issue #448 · natcap/pygeoprocessing · GitHub

@dave Thank You sir for your help