# Time Series Index AIKP This AIKP is a concrete implementation of the `ocli.aikp.timeseries` base module. It calculates spectral indices (e.g., NDVI) over time and stores them in a Zarr store. ## Features - **Inheritance**: Inherits state-machine and filter logic from the base module. - **Spectral Indices**: Default implementation for NDVI using Sentinel-2. ## Configuration In addition to base parameters: - `index_kind`: Name of the index to calculate (`NDVI`, `NDWI`, `NDMI`). ## Usage 1. `ocli task template setup` - Fetch product list. 2. `ocli task template calculation` - Process products and build Zarr. Check the data `ocli task template calculation-info`. 3. `ocli task template publication` - Finalize task state. Check the data `ocli task template publication-info`. ## Publication This AIKP uses custom strategies for metadata generation and upload: 1. `ocli ai makegeojson` - Generates a `TimeSeries` document metadata. During this step, the command: - Calculates the global minimum (`domain_min`) and global maximum (`domain_max`) across all time slices (excluding non-finite values) and includes them under `properties.zarr`. - Computes slice-by-slice statistics (`min`, `max`, `std`, `mean`, `median`) for each time slice and stores them as parallel arrays of float values inside `properties.zarr.stats`. 2. `ocli ai upload` - Uploads the Zarr store and metadata to Object Storage. 3. `ocli ai publish post` - Registers the metadata in the Document Database.