MULD2 Soil Map Parsers¶
What is this?¶
The MULD2 project (Mullastiku 2. ülevaatuskaart — Estonian Soil Map, 2nd revision) involves updating and quality-reviewing the Estonian national soil map. The original analogue map encodes soil properties as compact alphanumeric strings in three fields:
| Field | Estonian name | What it describes |
|---|---|---|
| Siffer | Šiffer | Soil-type classification code(s) for the mapping polygon |
| Loimis | Loimis | Soil texture (particle-size composition) across up to 4 depth layers |
| Huumus | Huumus | Organic surface horizon — type, decomposition state, and thickness |
These fields were authored over decades during analogue map digitisation. They carry a wide variety of encoding conventions, delimiter styles, and data-entry artefacts that must be resolved before the data can be used in quantitative analyses or database queries.
This library provides automated parsers that convert each raw field into a set of clean, typed database columns.
The three parsers at a glance¶
| Parser | Input example | Key outputs |
|---|---|---|
| Siffer | Ko;D;LPe |
siffer_1..4, n_siffers, parse_ok |
| Loimis | l40-70/ls₂30/+ls₂ |
EST_TXT1..4, CLAY/SILT/SAND/ROCK 1..4, Z1..4 |
| Huumus | th15/h5 t₂20 |
h_type_1..4, h_depth_min/max_1..4, parse_ok |
How the pipeline works¶
Each parser follows a two-phase approach:
-
Repair — a lookup-driven pre-processing step corrects known digitisation artefacts (typos, wrong delimiters, legacy notations) before any grammar is applied.
-
Parse — a formal grammar (Arpeggio PEG parser for Siffer and Loimis; a regex classifier for Huumus) validates the repaired string and extracts structured fields.
Results are written back to the PostgreSQL output_review table and exposed through
this web application.
Live parser endpoints¶
You can test any code string directly in the browser:
| Endpoint | Route | Description |
|---|---|---|
| Swagger UI | /api/docs | Interactive API explorer |
| Siffer parser | /parse/siffer | POST {"code": "Ko;LP"} |
| Loimis parser | /parse/loimis | POST {"code": "l40/ls₂"} |
| Huumus parser | /parse/huumus | POST {"code": "th15/h5"} |
Or use the Muldade dekodeerija panel on the map page.
Where to go next¶
- Siffer parser → — soil-type codes explained
- Loimis parser → — texture notation and layer depths
- Huumus parser → — organic horizon classification
- Field reference → — every output column with its meaning
- API reference → — auto-generated from Python docstrings