stac-utils / stactools

Command line utility and Python library for STAC
https://stactools.readthedocs.io/
Other
104 stars 28 forks source link

core.add_raster_to_item: Make compute statistics and histogram optional #466

Open thomas-maschler opened 1 year ago

thomas-maschler commented 1 year ago

Is your feature request related to a problem? Please describe. When adding assets to an item using core.add_raster_to_item stactools always computes statistics and histogram. None of the values are required for the raster extension. When creating many items, computing statistics, and histograms can significantly slow the process. Giving users the ability to opt out of statistics and histograms will increase user experience.

Describe the solution you'd like Add kwargs statistics:bool=True and histogram:bool=True to core.add_raster_to_item function and only compute statistics and histogram if values are set to true. This should assure backward compatibility and open up options to include additional fields in the future.