natcap / pygeoprocessing

Geoprocessing operations for Python
https://pygeoprocessing.readthedocs.io/en/latest/
Other
76 stars 8 forks source link

Proposal: option to output zonal_stats as vector #277

Open emlys opened 2 years ago

emlys commented 2 years ago

In several invest models, we calculate zonal statistics, then create a copy of the AOI vector and add zonal stats fields to it. I had a use for this on the morgan stanley project as well.

A variation of zonal_statistics, or a wrapper around it, would take in an additional argument that is a path to write out the result vector. The result vector would be a copy of the input vector with added fields. Instead of (or in addition to) returning the stats dictionary, it would save the stats to the vector attribute table.

emlys commented 1 year ago

In our meeting on 12/9 we decided that the next step for this will be to write a design doc.