Field Reference¶
Complete listing of every output column produced by the three parsers, and
of the analytical columns the peat decay adds to the final map.
Fields are written to the output_review PostgreSQL table and are also
returned by the REST API endpoints.
Siffer — Soil Type Codes¶
These 7 columns are produced by the Siffer parser for every polygon row.
| Field | Type | Values / range | Meaning | Example |
|---|---|---|---|---|
siffer_1 |
str | Any valid siffer code or "" |
First (dominant) soil-type code, standardised | "Ko" |
siffer_2 |
str | Any valid siffer code or "" |
Second soil-type code | "LP" |
siffer_3 |
str | Any valid siffer code or "" |
Third soil-type code | "D" |
siffer_4 |
str | Any valid siffer code or "" |
Fourth soil-type code | "" |
n_siffers |
int | 0–4 | Number of soil-type codes found in this polygon | 3 |
parse_ok_s |
bool | True / False | True if all codes were recognised by the grammar |
True |
parse_error |
str | Error text or "" |
Description of unrecognised tokens; empty on success | "" |
Codes
siffer_1…siffer_4are populated sequentially from left. Unused slots are empty strings, neverNULL.Column
parse_ok_s— together withparse_ok_landparse_ok_h— drives the map viewer error-review style (SLD), determining which polygons are coloured as errors or successes.
Loimis — Soil Texture Layers¶
These columns are produced by the Loimis parser. Texture properties are repeated
for up to 4 depth layers (suffix 1–4).
Layer boundaries¶
| Field | Type | Unit | Meaning | Example |
|---|---|---|---|---|
nlayers |
int | — | Number of distinct texture layers described (1–4) | 2 |
ZMX |
float or NaN | cm | Total encoded profile depth. NaN if no layer had a thickness encoded at all |
70.0 |
Z1 |
float or NaN | cm | Lower boundary of layer 1. NaN if the thickness was not encoded |
40.0 |
Z2 |
float or NaN | cm | Lower boundary of layer 2. NaN if < 2 layers or the thickness was not encoded |
70.0 |
Z3 |
float or NaN | cm | Lower boundary of layer 3. NaN if < 3 layers or the thickness was not encoded |
NaN |
Z4 |
float or NaN | cm | Lower boundary of layer 4. NaN if < 4 layers or the thickness was not encoded |
NaN |
zmx_model |
float or NaN | cm | For modellers, not scientists. Total modelled profile depth. NaN only if the polygon has no layers at all (nlayers = 0, e.g. texture no_info) |
100.0 |
z1_model |
float or NaN | cm | Modelled lower boundary of layer 1; NaN if the polygon has no layers |
40.0 |
z2_model |
float or NaN | cm | Modelled lower boundary of layer 2; 0 if < 2 layers, NaN if the polygon has no layers |
100.0 |
z3_model |
float or NaN | cm | Modelled lower boundary of layer 3; 0 if < 3 layers, NaN if the polygon has no layers |
0.0 |
z4_model |
float or NaN | cm | Modelled lower boundary of layer 4; 0 if < 4 layers, NaN if the polygon has no layers |
0.0 |
Per-layer texture (n = 1 to 4)¶
| Field | Type | Values | Meaning | Example |
|---|---|---|---|---|
EST_TXTn |
str | l, pl, sl, ls, s, tsl, tls, dk, … |
Estonian texture classification code for layer n | "sl" |
EST_CRSn |
str | r, v, k, kb, p, lu, ck, or "" |
Coarse fraction (skeleton) type for layer n; empty if no skeleton | "r" |
LXTYPEn |
str | SAND, FINE_SAND, LOAM, SANDY_CLAY, CLAY, PEAT, GRAVELS, … |
International / WRB texture class for layer n | "LOAM" |
CLAYn |
float or NaN | 0–100 % | Clay fraction for layer n. NaN for GRAVELS, PEAT and HUMUS layers. |
15.0 |
SILTn |
float or NaN | 0–100 % | Silt fraction for layer n. NaN for GRAVELS, PEAT and HUMUS layers. |
20.0 |
SANDn |
float or NaN | 0–100 % | Sand fraction for layer n. NaN for GRAVELS, PEAT and HUMUS layers. |
65.0 |
ROCKn |
float or NaN | 0–100 % | Rock / skeleton fragment fraction for layer n | 0.0 |
KARBn |
int | 0 / 1 | Carbonate flag: 1 if layer n is marked calcareous with +, either before the texture code (+ls₁) or before a depth number (s+70), or if its kores is r, kb or lu (r₂ls) |
1 |
KARB_Zn |
float or NaN | cm | Depth at which carbonates start in layer n: the number written after + (s+70 → 70; for a range sl+60-90 the lower number, 60). NaN if the formula gives no such depth, also when KARBn is 1 |
70.0 |
Diagnostic fields¶
| Field | Type | Values | Meaning |
|---|---|---|---|
parse_ok_l |
bool | True / False | True if all layers were parsed; used by the map viewer error-review style |
parse_info |
str | "successful", "empty_loimis", "partial_no_info", "parse_error" |
Detailed parse outcome |
has_no_info |
bool | True / False | True if ≥ 1 layer could not be parsed |
loimis_grammar |
dict | Nested dict | Full structured parse result (stored in DB but excluded from map viewer popup) |
fix_applied |
str or NULL | rule:action labels joined with \| |
What was corrected on this polygon outside the parsers. 60:uid_fix:Siffer / 60:uid_fix:Loimis1: a per-polygon correction by the soil scientists was applied to the raw value before parsing (60:uid_fix_skipped:… if the raw value no longer matched what the correction expected); 60:add_prim, 65:add_prim, 65:absorbed:<uid>, 60:manual_review: the peat-soil prim and geometry fixes, detailed in the geofix_log layer |
loimis_search |
dict | Nested dict | Internal search-parameter snapshot (stored in DB but excluded from map viewer popup) |
NaN in texture fractions: Gravel-/rock-dominated layers where
LXTYPE = "GRAVELS"haveNaNfor clay, silt, and sand. Always checkLXTYPEorROCKbefore summing fractions.Unused layer slots:
EST_TXT2–EST_TXT4etc. are""(notNaN) whennlayers < n. Checknlayersfirst.Z2–Z4/zN_modelfollow their own rules below.
Z1–Z4/ZMX— NULL means no value,nlayerstells you why: these areNaN(SQLNULL) both when n >nlayers(no such layer) and when n ≤nlayersbut the source encoded no thickness for that layer — none is invented for these columns. They are cumulative lower boundaries, so one unencoded layer makes every deeper boundaryNaNtoo;ZMXsums only encoded thicknesses and isNaNonly when no layer had one.What does not count as an encoded thickness: a number in brackets is the depth of the layer's base (
s(50-90)), and a number after+is the depth at which carbonates start (s+70, reported inKARB_Zn). Neither is a thickness, so such a layer hasNaNboundaries like any other layer without one. An unbracketed thickness before a bracket is still used (r₁ls₁20-30(35)→ 25 cm), and>100/üle100on peat means a thickness of at least 100 cm and is kept as 100.
zmx_model/z1_model–z4_model— for modellers, not scientists: reproduce the EstSoil-EH behaviour of spreading the remaining depth over layers with no encoded thickness, so a 2-layer profile with one unencoded layer reportsz1_model=50, z2_model=100rather thanNaN. Always numeric up tonlayers,0beyond it; all five areNaN(SQLNULL) when the polygon has no layers at all. Do not use these for texture-fraction weighting or anything scientist-facing — useZ1–Z4.Peat thickness from the prims: for peat soils (
siffer_1AM, M, S or R with prims) whose formula starts with a peat layer without a thickness, the model columns take the peat thickness from the prims instead of the even spread: one prim 40 cm, two 75 cm, three 100 cm. Layers below share what is left of 100 cm (M’witht/ls→z1_model=40, z2_model=100;M’’’witht₃/ls→100, 100, since nothing is mapped below 100 cm). This uses the final siffer, including prims added by the geometry fixes, and never changesZ1–Z4. Polygons without any texture information stay empty.
Huumus — Organic Horizon¶
These ~96 columns are produced by the Huumus parser. Per-unit fields are repeated
for up to 4 soil units (suffix _1–_4).
Quality and provenance¶
| Field | Type | Values | Meaning | Example |
|---|---|---|---|---|
n_siffers |
int | 0–n | Number of space-separated soil units in this polygon. Reports the true count; only the first 4 get flat columns, so n_siffers > 4 flags a truncated row. |
2 |
parse_ok_h |
bool | True / False | True if every token in all units was recognised; used by the map viewer error-review style |
True |
parse_error |
str | Error text or "" |
Semicolon-separated unrecognised tokens; empty on success | "" |
Backward-compatible per-unit fields (n = 1 to 4)¶
| Field | Type | Values | Meaning | Example |
|---|---|---|---|---|
h_raw_n |
str | Any string or "" |
Verbatim input string for unit n, exactly as in the soil map | "th15/h5" |
h_has_split_n |
bool | True / False | True if this unit contains a / split |
True |
h_type_n |
str | see below | Dominant organic horizon type for unit n (pooled across all depth layers) | "th" |
h_depth_min_n |
float | cm or NaN | Shallowest horizon boundary in cm; NaN if no depth recorded |
15.0 |
h_depth_max_n |
float | cm or NaN | Deepest horizon boundary in cm; equals h_depth_min for single values |
15.0 |
h_type values:
| Value | Meaning |
|---|---|
"th" |
Toorhuumus — raw/mor humus; strongly acidic, poorly decomposed |
"peat" |
Turvas — peat, any decomposition degree (I–III). Class-level on purpose: h_type pools units that may differ in aste, so the degree appears per unit in h_phu_type / h_lhu_type instead. |
"humus" |
Mineral humus horizon (mull) |
"litter" |
Metsakõdu — forest litter (≤ 10 cm) |
"none" |
No organic layer encoded (0) |
"mixed" |
Multiple types in this unit; dominant type by priority th > peat > humus > litter |
"unknown" |
Unrecognised token — see parse_error |
"" |
Slot not populated (fewer than n units in this row) |
Primary humus — phu (n = 1 to 4)¶
Right side of / (lower depth layer), or whole expression if no /.
| Field | Type | Values | Meaning | Example |
|---|---|---|---|---|
h_phu_type_n |
str | "th", "t1", "t2", "t3", "t", "humus", "none", "unknown", "" |
Primary humus type. Peat carries its lagunemisaste; bare "t" means no aste assigned yet in the source. |
"t2" |
h_phu_min_n |
float | cm or NaN | Minimum depth for primary humus | 5.0 |
h_phu_max_n |
float | cm or NaN | Maximum depth for primary humus | 10.0 |
Secondary humus — lhu (n = 1 to 4)¶
Left side of / (upper depth layer), if a second humus type is present.
| Field | Type | Values | Meaning | Example |
|---|---|---|---|---|
h_lhu_type_n |
str | same as phu | Secondary humus type; "" when absent |
"th" |
h_lhu_min_n |
float | cm or NaN | Minimum depth for secondary humus | 15.0 |
h_lhu_max_n |
float | cm or NaN | Maximum depth for secondary humus | 15.0 |
Litter layers O1–O3 (n = 1 to 4)¶
From left side of / in bottom-to-top order: O1 = bottom litter layer (most decomposed),
O3 = top litter layer (freshest).
| Field | Type | Values | Meaning | Example |
|---|---|---|---|---|
h_o1_deg_n |
str | "₁", "₂", "₃", "" |
Decomposition degree for O1 (bottom) | "₂" |
h_o1_min_n |
float | cm or NaN | Minimum depth for O1 | 1.0 |
h_o1_max_n |
float | cm or NaN | Maximum depth for O1 | 1.0 |
h_o2_deg_n |
str | same as O1 | Decomposition degree for O2 (middle) | "₁" |
h_o2_min_n |
float | cm or NaN | Minimum depth for O2 | 2.0 |
h_o2_max_n |
float | cm or NaN | Maximum depth for O2 | 2.0 |
h_o3_deg_n |
str | same as O1 | Decomposition degree for O3 (top) | "₃" |
h_o3_min_n |
float | cm or NaN | Minimum depth for O3 | 4.0 |
h_o3_max_n |
float | cm or NaN | Maximum depth for O3 | 4.0 |
Per-unit flags (n = 1 to 4)¶
| Field | Type | Values | Meaning |
|---|---|---|---|
h_has_depth_split_n |
bool | True / False | True when / is present — depth-layer split |
h_is_agri_forest_n |
bool | True / False | True when / (space-slash-space) legacy agri-vs-forest pattern detected |
h_depth_total_n |
float | cm or NaN | Sum of phu + lhu depth midpoints; > 40 cm flagged for manual review |
Structured detail¶
| Field | Type | Meaning |
|---|---|---|
huumus_json |
dict | Full structured parse: per-unit, per-layer detail with decomposition degree, depth bounds, depth-layer split, agri-forest flag, and structured phu/lhu/O data. Stored in DB but excluded from map viewer popup. |
Peat decay — analytical fields¶
Added by the peat decay step (processing step 3) to the final map mv_mullakaart_parsed (GeoPackage,
FlatGeobuf, PostGIS). They are not parser output: they record where the peat
soils lost thickness and why.
A row of the final map is a piece. The QGIS peat model can cut one polygon of
the base map into several pieces along the < 30 cm remaining-peat mask, so the
final map has more rows than the base map. Polygons away from the peat keep
their base geometry and attributes, and most of the columns below stay empty
(NULL) for them.
Piece identity and clipping¶
| Field | Type | Values | Meaning |
|---|---|---|---|
parent_unique_id |
str (UUID) | unique_id of the base-map polygon the piece comes from; equal to unique_id where nothing was split. Join anything keyed on base-map ids (geofix decisions, uid fixes, older exports) through this column. |
|
peat_part |
int | 0, 1, 2, … | Rank of the piece within its parent, largest first. Part 0 keeps the parent's unique_id, the others get a new UUID derived from the parent id and the rank (the same again when the model is rerun on the same geometry). |
peat_clip |
str | none, unchanged, reshaped, split, model_failed |
What the model did to the polygon. none: not near the mask, not passed through the model. unchanged: passed through, geometry the same (< 1 m² difference). reshaped: one piece, geometry changed (snapped to the mask, slivers merged). split: several pieces. model_failed: in a group the model could not process, base geometry kept, for review. |
below30_frac |
float | 0–1 | Share of the piece's area inside the < 30 cm remaining-peat mask. Only for pieces passed through the model. |
Base polygons the model merged away completely are not in the map. They are
listed in the non-spatial layer peat_clip_log together with the piece that
absorbed most of their area (absorbed_by), next to every split and reshape.
Remaining peat and land use (per piece)¶
Computed again for every piece, because the median of a split polygon is wrong
for its pieces. Only candidate pieces are computed, the rest stay NULL:
peat in the first loimis layer (EST_TXT1 t1–t3), peat in the first huumus
unit (h_type_1 = peat), or a siffer_1 the change matrix starts from
((A)M’, (A)M’’, (A)M’’’, (A)G1).
| Field | Type | Unit / values | Meaning |
|---|---|---|---|
peat_modelled |
bool | True / False | The piece is one the remaining-peat raster was computed for: EST_TXT1 t1–t3 and R, S, M or AM in siffer_1–siffer_4. Everywhere else peat_remaining_cm.tif holds 0, which means "not modelled", not "no peat". |
median_remaining_peat_cm |
float | cm | Median of peat_remaining_cm.tif over the piece (every touched pixel): the peat left after drainage and cultivation. NULL where peat_modelled is false. |
remaining_peat_npx |
float | pixels | Number of raster pixels behind that median. |
z_peat_total_cm |
float | cm | Peat thickness of the mapped profile before decay: peat layers of the loimis formula (model depth columns) plus the peat of the huumus formula, from the parent's attributes. |
peat_loss_cm |
float | cm | z_peat_total_cm − median_remaining_peat_cm. NULL where the median is. |
agri_frac |
float | 0–1 | Share of agricultural pixels (ELME2 baaskaart codes 40200, 40500) among the baaskaart pixels whose centre lies inside the piece (every touched pixel for pieces too small to hold a centre). |
landuse_npx |
float | pixels | Number of baaskaart pixels behind agri_frac. |
landuse |
str | haritav, looduslik |
haritav (cultivated) where agri_frac > 0.5, else looduslik; a tie goes to looduslik, which leaves the siffer unchanged. Grassland counts as looduslik. |
Decayed attributes¶
The decay changes only pieces with peat_modelled true and a
median_remaining_peat_cm. It overwrites the parser columns (siffer_1–4,
parse_ok_s, WRB, the Loimis1 columns, Z1–Z4, z1_model–zmx_model) with
the decayed values, so the map, the rasters and the API show the decayed soil.
Only siffer_1 and the Loimis1 columns change in content: siffer_2–siffer_4,
Loimis2 (lm2_ columns) and huumus keep the base-map values (scope note in
processing step 3).
The columns below keep what was there before and say what changed.
| Field | Type | Values | Meaning |
|---|---|---|---|
siffer_1_base |
str | siffer code | siffer_1 before the change matrix, on every row. Equal to siffer_1 where the matrix changed nothing. |
matrix_rule |
str | eg. M’’: 10-30 cm -> G1 |
Row of the change matrix (muutumisemaatriks.xlsx, sheet haritavad) that gave the new siffer_1, by soil type and remaining peat. Cultivated land (landuse = haritav) only. The A-variants read sama as …. NULL where siffer_1 did not change. Only siffer_1 changes, siffer_2–4 stay. |
decay_depth |
str | loimis, model_only, NULL |
How the depths changed. loimis: the formula has a thickness for every peat layer that loses some, so the formula is rewritten (t₃40/l → t₃15/l) and re-parsed, and Z1–Z4 change with it. model_only: the formula has no thickness to reduce (t₃/l), so only the model depth columns change, the formula and Z1–Z4 stay as mapped. NULL: depths not changed. |
peat_loimis_cm_base |
float | cm | Peat thickness of the loimis layers before decay. |
peat_loimis_cm |
float | cm | After decay: the smaller of peat_loimis_cm_base and median_remaining_peat_cm. The peat is lost from the surface down, the huumus peat first, so where the remaining peat is more than the loimis peat only huumus peat is lost and the layers stay. |
0 cm peat layers: a peat layer can lose all its thickness. It stays in the profile with type
tand 0 cm (t₃0/l); itsZand model columns are set by the decay step, because the parser reads an explicit 0 as "no thickness".
The peat decay also appends to fix_applied (see Loimis, diagnostic fields):
| Label | Meaning |
|---|---|
79:matrix:<old>-><new> |
siffer_1 changed by the change matrix, eg. 79:matrix:M’’->G1 |
77:peat_depth:loimis / 77:peat_depth:model_only |
peat layers reduced, as in decay_depth |
77:peat_layer_0cm |
at least one peat layer reduced to 0 cm |
77:huumus_peat_check |
the loss reaches the peat of the huumus formula, which is not rewritten: check |
79:buried_peat_not_reduced |
part of the loss would fall on peat below a mineral layer, which is left as it is |
79:formula_not_rewritten |
the formula has the numbers but could not be rewritten; model depths only |
80:tarn_loimis_t3 |
raw siffer Tarn: Loimis1 set to t₃ |
The layer decay_log of the final GeoPackage has one row per changed piece
with the values before and after.
Notes on joining the three output tables¶
All three parsers operate on the same set of polygon rows. The outputs are joined
by the polygon's unique identifier (unique_id). A full per-polygon record
combines columns from all three parsers:
SELECT s.unique_id,
s.siffer_1, s.siffer_2, s.n_siffers,
l.EST_TXT1, l.CLAY1, l.Z1, l.nlayers,
h.h_type_1, h.h_depth_max_1
FROM siffer_parsed s
JOIN loimis_parsed l USING (unique_id)
JOIN huumus_parsed h USING (unique_id);
The materialised view mv_mullakaart_parsed in PostgreSQL already combines
all three outputs and is what the map viewer queries.