You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+76-22Lines changed: 76 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,11 +23,12 @@ The workflow in this repository is designed to:
23
23
24
24
1. Filter Sentinel-2 scenes by date range, AOI, tile id, and cloud cover.
25
25
2. Download and import selected scenes into GRASS GIS.
26
-
3. Compute NDVI and NDWI maps.
27
-
4. Classify NDVI/NDWI outputs using configured categories for vegetation health
28
-
assessment.
29
-
5. Export raster outputs as COG.
30
-
6. Create and publish STAC items to an existing STAC catalog/collection and
26
+
3. Use L2A cloud probability layer to mask out clouds. Cloud proabability threshold is set to 65 %. (Could be changed in `processing/templates/template_S2_download_import.json`). See also [i.sentinel.import](https://grass.osgeo.org/grass-stable/manuals/addons/i.sentinel.import.html).
27
+
4. Compute NDVI and NDWI maps.
28
+
5. Classify NDVI/NDWI outputs using configured categories for vegetation health
29
+
assessment. The threshold for the categorization is set in `processing/input/index_classification/*classes`.
30
+
6. Export raster outputs as COG.
31
+
7. Create and publish STAC items to an existing STAC catalog/collection and
31
32
update collection extent metadata.
32
33
33
34
## Main components
@@ -158,27 +159,54 @@ From repository root folder:
158
159
python processing/run_service.py
159
160
```
160
161
162
+
#### Script parameters
163
+
161
164
Important script parameters to adapt before production runs:
162
165
166
+
**Sentinel-2 query parameters:**
167
+
163
168
- Time range (`START_TIME`, `END_TIME`, or automatic time range mode) for
164
-
filtering Sentinel-2 scenes. Options:
165
-
- autmatic time range mode: Queries given STAC collection for latest item and
166
-
sets `START_TIME` accordingly and `END_TIME` to current time.
167
-
- AOI: By default, the script uses a predefined AOI for Athens in
168
-
`processing/input/athens_aoi.geojson`.
169
-
- To use a different AOI, replace this file with a new GeoJSON containing the
170
-
desired AOI geometry (and rebuild image).
171
-
- Or specify a bounding box by setting `LONMIN`, `LONMAX`, `LATMIN`, `LATMAX`.
172
-
-**Note**: Currently `-a` flag is set for `i.s2_id.filter` in process
173
-
chain. This enables AOI filtering based on predifined AOI. For bounding
174
-
box filtering `-a` flag must be removed. --> TODO: implement automatic
175
-
flag removal when bounding box parameters are set.
169
+
filtering Sentinel-2 scenes.
170
+
171
+
**Options:**
172
+
1.**manual time range:** Set `START_TIME` and `END_TIME` e.g. `START_TIME = "2026-04-05"`
173
+
and `END_TIME = "2026-04-10"`
174
+
2.**automatic time range:** Queries given STAC collection `STAC_COLLECTION_URL`
175
+
for latest item and
176
+
sets `START_TIME` accordingly and `END_TIME` to current time. For the
177
+
current settings, the collection `ndvi-ath` is used which is updated with
178
+
each workflow run. Check with names defined in `STAC_COLLECTIONS`.
176
179
-`TILE_ID`: Sentinel-2 tile identifier e.g. `34SGH` for Athens area
177
-
- Max. cloud cover threshold (`MAX_CLOUD_COVER`)
178
-
- Actinia base URL, processing endpoint and GRASS location settings
- AOI: By default, the script uses a predefined AOI for Athens in `processing/input/athens_aoi.geojson`.
182
+
- To use a different AOI, replace this file with a new GeoJSON containing the desired AOI geometry (and rebuild image).
183
+
- Or specify a bounding box by setting `LONMIN`, `LONMAX`, `LATMIN`, `LATMAX`.
184
+
-**Note:** Currently `-a` flag is set for i.s2_id.filter in process chain. This enables AOI filtering based on predifined AOI. For bounding box filtering `-a` flag must be removed. --> **TODO**: implement automatic flag removal when bounding box parameters are set.
185
+
186
+
187
+
188
+
**actinia process parameters:**
189
+
190
+
It should not be necessary to change these parameters. To be able to reach
191
+
actinia a correct actinia base URL (`ACTINIA_BASE_URL`) is required. The default
192
+
of this setup is `http://localhost:8088/`.
193
+
194
+
**STAC parameters:**
195
+
196
+
-`STAC_CATALOG_URL`: Should link to the STAC catalog `"http://pycsw:8000/stac/"`
197
+
-`STAC_COLLECTIONS`: Names of the STAC collections, where the created items are
198
+
registered.
199
+
For this workflow four collections for each product are used:
200
+
`"ndvi-ath,ndvi-cat-ath,ndwi-ath,ndwi-cat-ath"`
201
+
-`PRODUCT_NAMES`: Names used for the STAC items of the four products (same
202
+
order as `STAC_COLLECTIONS`): `"NDVI,NDVI_categorized,NDWI,NDWI_categorized"`
203
+
-`STAC_ITEM_ID_PREFIX`: Defines a prefix for the STAC item IDs: e.g.
204
+
`"athen_urban_green"` so the STAC item ID will be like this
`STAC_ITEM_TITLE`: Title for STAC item. Additionally, product name and date are
207
+
added to the title. E.g. `Urban Green Monitoring Athens- NDWI_categorized - 2026-02-18 09:10:31+00:00`
208
+
`STAC_ITEM_DESCRIPTION`: Description for STAC item. Currently it is the same
209
+
text for all products.
182
210
183
211
**Note for a local setup**: Adding STAC item to a collection only works if you
184
212
have write access to the collection.
@@ -190,6 +218,32 @@ and include:
190
218
-`dotenv`
191
219
-`jinja2`
192
220
221
+
## Output layers
222
+
223
+
The main output layers are export as Cloud Optimized GeoTIFFs (COG):
224
+
- NDVI (Normalized Difference Vegetation Index)
225
+
- Categorized NDVI
226
+
- NDWI (Normalized Difference Water Index) maps in COG format.
227
+
- Categorized NDWI
228
+
229
+
Categorization thresholds for NDVI and NDWI are defined in `processing/input/index_classification/ndvi_4_classes` and `processing/input/index_classification/ndwi_3_classes`.
0 commit comments