Runs the Sentinel-1 processing scripts upstream of the other apps β SAR preparation and per-field statistics.
The scripts are the existing ones from the capcon scripts/ tree; this app gives them a form, a command preview and a live log. Nothing is re-implemented: what runs is exactly the script you would run from a terminal.
| Group | Panels | Scripts |
|---|---|---|
| 1 Β· SAR Preparation | Region, SAR Preparation | sar_preparation/ |
| 2 Β· Field Statistics | Field Statistics | calc_statistic/ |
| 3 Β· CAPCON Data | β | not connected yet |
The app can be installed on a server before the processing scripts and their environments are. Overview then lists what is missing (scripts folder, interpreters, data folders), and every Run is refused with the same list. Regions can still be viewed. It is an installation task, not a fault in a step β pass the list to the platform administrator.
Select a project in the selector at the top of the sidebar. Every step works on that project's region β its tiles, zones, boundary and year, defined in PROJECTS β Region and read from the project's settings. The box under the selector names the region, or says what is missing.
is shown under it before you press Run.
pipelines/scripts/ folder; the GPU steps inside S1 composites run with the separate GPU venv (/opt/capcon/env-gpu on the server).
stop it. Jobs lists every run of the region with its log; Stop terminates the script and all its worker processes.
Use the menu on the left; each panel has its own help topic.
Keeping the shared index of the Sentinel-1 scene archive up to date. The index lists every scene of a year β path, bounding box, polarization, orbit, file size and modification time β in one parquet file per month. S1 composites read it to find the scenes a block needs, instead of opening the whole archive.
The index describes the archive, not a region: every region that reads the same archive (its scene archive region, e.g. EUROPE) shares it, and each year of the archive has its own index, whatever the selected region's year.
Nothing β a region only has to be selected, because runs are logged under it.
The table lists every year found in the archive or in the index.
many scenes are new, changed, vanished or bad. Changes nothing.
vanished ones; remade bad files leave the error list. Minutes.
for a full year of the European archive).
S1 composites update the index by themselves before clipping (and build it if the year has none), so Update by hand is only needed to check the index or to prepare it ahead of a run.
<index>/<year>/S1_index_<year>_<mm>.parquet and errors_<year>.txt (files that could not be indexed: unreadable, too small, broken symlinks, names not in the S1 format). The index folder is shown at the top of the table (CAPCON_SAR_SCENES_INDEX on the server).
not mounted; nothing was changed. Check the disk, then Update again, or Rebuild if the scenes really were removed.
The region every step of INPUTS and FARMING works on: the region of the project selected at the top of the sidebar. A region belongs to its project. Its Managers define it in PROJECTS β Region, and it is recorded in the project's settings: the standard 0.5Β° image tiles its fields need, the zones (which months, dekads and periods S1 composites computes), the boundary, and the layers the Farming algorithms read.
This panel shows the region as the steps use it, and keeps what is this app's own: the processing folders where the images and Farming results of the region are made, and deleting them.
it names the project's region, or says what is missing.
inputs/region/;
inputs/statistic/);
of every tile are made once there and reused by every project whose region lists the tile. The region sees its own tiles through links in its work folder (inputs/sar_data/<year>/<tile>, inputs/indices/<year>/<tile>, for the season and the year before), so a step never touches another project's tiles;
vrt/, results/ β¦),the temp folder and the job logs.
Edit in PROJECTS β Region opens the place where the region is changed.
Delete the processing dataβ¦ lists what would be removed β the work and temp folders and the job logs β with sizes and contents. The Delete button stays disabled until you tick the confirmation, and it is refused while a job of the region runs. The region itself (tiles, zones, Farming layers) stays in the project, and so do the tiles in the shared store β only the links to them go, never the images other projects may use.
project's S1 composites or index run is making some of this region's tiles. Wait until it ends: its tiles are then reused here, not made twice. Steps that only read tiles (mosaics, statistics) are not held up.
before the shared store existed; they are used as they are. Move them into the store by hand to share them.
β Settings β Shared tile store, writable by the service user.
tab; reload the page before running anything.
again.
Producing the Sentinel-1 statistical rasters for the selected region and its year, in pipeline order: composites, audits, VRT mosaics, indices, exports, RGB composites.
A project selected, with its region and zone attributes defined in PROJECTS β Region.
periods and dekads whose files are missing are computed, so after adding a month in the zone editor just run it again. GPU work runs in GPU-venv subprocesses started by the script itself.
With Delete corrupted files = YES, bad files are deleted so the next composites run recomputes them.
RGB composites β in that order; each skips what already exists where the script does.
the region. The output folder follows the index tag of each file (S1_XX_...): SM to results/soil_moisture/, VI (RVI4S1) to results/vegetation_indices/ (shown as Index folders on the form). A pattern that matches an index with no folder stops before exporting anything.
dekads, months, periods) the same way, into results/sar_composites/: the region's S1 data as whole-region files, e.g. to hand it over. Narrow the pattern - every layer of a season is hundreds of files.
Open Paths & tuning to change a step's worker counts and to see its folders. The folders are shown read-only: they come from the region and the server, so a run can only ever read and write the selected region's data. The command line under each form is exactly what will run.
Under the region's work folder: sar_data/<year>/<tile>/, indices/, vrt/<year>_data/, vrt/<year>_index/, rgb_raster/; audit reports audit_<year>_*.txt in sar_data/. The exports write to the region's results: soil_moisture/, vegetation_indices/ (index rasters) and sar_composites/ (S1 composite rasters).
scenes for some month β they stay incomplete and are retried on the next run.
incomplete and the run continues with the next block.
Downloading Sentinel-2 L2A images and preparing them for the other apps: per-date RGB832 pic composites with PNG thumbnails (Farming β Mowing shows them), RDVI and NDVI vegetation indices, their maximum composites over chosen months, class descriptions for the SCL mosaics, and medoid period mosaics for viewing.
The S2 store belongs to no region. Every step takes a country and (all but the download) a year in its form; the selected region only keeps the job log. Countries and their S2 tiles are listed in pipelines/scripts/msi_preparation/s2_common.py (LIT, LAT, DAN for now).
CAPCON_S2_ROOT (the S2 store) and CAPCON_S2_BOUNDARIES(country boundaries and masks) must be set; the Overview panel lists what is missing.
CAPCON_CDSE_USER andCAPCON_CDSE_PASSWORD (environment of the service, never typed in a form).
The table at the top shows, per country and year, how many products and dates are downloaded, how many pics (and missing thumbnails), RDVI/NDVI dates, max composites and SCL mosaics exist. Every step only adds what is missing, so the usual round is: Download the last two weeks, then RGB832 pic composites, then Vegetation indices.
the country between From and To with at most Max cloud cover (75 % by default), keeps the country's tiles, drops duplicates of one date and tile from another satellite, and downloads only products whose .SAFE folder is not in images_<year>/ yet. Every ZIP is unpacked there and deleted. Only search lists the products and how many are already there, downloading nothing.
(on by default) writes a _thumb.png beside each new pic; Thumbnail size is a share of the pic (0.03 = 3 %).
overwrite (e.g. in another size).
cloud mask* is off by default; with YES the cloud, shadow, cirrus and defective pixels become 0. Dates that already have an RDVI are skipped β choose overwrite to recompute them with the other mask setting.
months, e.g. S2_2026_rdvi_max_567.tif for MayβJuly.
none, 20 m, clipped by the country boundary, with the class labels and colours (QGIS style). Independent of the other steps; the parcel catalog of Farming β Mowing uses them for the cloud share.
for SCL mosaics made before SCL mosaics added them itself.
the pics: per pixel the most typical clean date (the medoid), so the colours stay natural and a single leftover cloud is outvoted. It mixes dates, so it is for looking at, not for measuring. Cloud masks: OmniCloudMask and/or SCL granule masks from granules_dsen2/ β they are made outside CAPCON (OCM takes long), so untick OCM if its masks are not there yet; the table at the top shows how many dates have each. A date without a granule of a ticked mask is skipped and named in the log. OCM: masked classes β untick thin cloud if thin clouds do not spoil the picture; SCL: masked classes β cloud, low probability (7) is off by default. With no mask ticked every pic pixel counts.
<S2 store>/images_<year>/<product>.SAFE downloaded products, all countries
<S2 store>/<CC>_<year>/merged_img_pics/ S2_L3B_10m_<date>_RGB832_pic.tif (+ _thumb.png)
<S2 store>/<CC>_<year>/S2_rdvi/, S2_ndvi/ S2_10m_<date>_rdvi.tif / _ndvi.tif, max composites
<S2 store>/<CC>_<year>/merged_scl/ S2_<date>_SCL_20m.tif (+ .qml)
<S2 store>/<CC>_<year>/mosaics/ S2_<CC>_<from>_<to>_medoid_<masks>.tif
Read, not written: <S2 store>/<CC>_<year>/granules_dsen2/<product>_ocm.tif and _scl.tif (granule cloud masks, EPSG:4326, made outside CAPCON).
ZIPs and per-date mosaics are made in the temp folder and removed.
Add an entry to COUNTRIES in s2_common.py with the S2 tile IDs that cover it. The boundary files are found by the same code in CAPCON_S2_BOUNDARIES: eu_salys_4326_buf/<CC>_4326_buf500m.gpkg, eu_salys_3035_buf/<CC>_3035_buf500m.shp and eu_salys_3035_msk_tif/<CC>_mask.tif.
download is refused before it starts.
<temp>/download/failed.txt); run the download again β what is there is skipped. A corrupted ZIP is deleted and downloaded again by the next run.
Per-field zonal statistics (exactextract, area-weighted) over the SAR composites (crop statistics, VV/VH) and the SM / RVI indices, sampled into the project's field layer and written into the project, where PROJECTS β Periods records, per algorithm and period, which crops and columns it reads.
statistics, the SM / RVI indices for the index statistics.
layer imported in PROJECTS β Fields. Every row of the output carries the field's field_id, crop_code and area_ha.
fields.db, the only choice.dekads to compute; the month button toggles a whole row.
SM and RVI to Q2.
without one the area is computed in EPSG:3035).
<project>/inputs/statistic/<year>/stat_crops/ (and stat_rvi/, stat_sm/) β one parquet file per raster layer, e.g. S1_VV_D10_Q2_AD_2026_05_26_TC4326_stat.parquet, one row per field. The folder name never changes; _source.json in it records which parcels file (path, size, modification time), which fields and which minimum area the statistics were computed from.
A corrected field layer: import it in PROJECTS β Fields, then in Region & Data List the tiles again. With skip the run here stops and says the parcels changed β the existing files belong to the old layer. Run with overwrite: the old files are deleted and the statistics are computed from the new layer.
Arable land β VV / RVI compute only LAST year's statistics (year β 1, by default the dekads of AugustβOctober) over this year's parcels, into <project>/inputs/statistic/<year β 1>/stat_vv/ and stat_rvi/. This year's VV and RVI are not computed again: they are the Crop statistics (stat_crops/, VV + VH) and RVI statistics (stat_rvi/) of this year, so the arable-land analysis reads both years. Last year's S1 composites (and RVI index) must exist in sar_data/<year β 1>/ (indices/<year β 1>/). Use the same minimum area as this year's statistics, so both years hold the same fields.
Algorithms read these tables only through their record in PROJECTS β Periods, which fingerprints them: re-sampling a table that a recorded version names makes that version unusable, and a Manager records a new one.
layer in PROJECTS β Fields.
Workers, border phase if the machine runs out of RAM on a large region.
Every processing run of the selected region, newest first β the way back to a run started from a page that has since been closed.
stopped from the console header.
outside, or the machine restarted).
Each run is a folder <regions base>/<REGION>/logs/pipelines/<job id>/ with job.json (the exact command, who started it, when), output.log and rc (exit code).