perrygeo/python-rasterstats

`properties_out` option

perrygeo opened this issue · 1 comments

The current approach provides two outputs

geojson_out=False (default) gives you all requests stats as a list of dicts. None of the original properties or geometry is retained; you have to rely on the order to match them with the original vector features.

geojson_out=True gives you the data back as geojson, complete with the original geometry, original properties, and stats added as new properties.

Some use cases (outputting to a csv for example) require only the properties not the geometry itself. I propose a new properties_out flag that would yield a list of dicts containing the original properties plus stats only, no geom.

Why? The geometry can be costly to copy and store. If you just need the properties, this could be a useful optimization.

We're doing this manually but it would be great to have this out of the box for sure!