Skip to content

SI: editions back to 2019, and the four ways the campaigns differ - #231

Open
ivorbosloper wants to merge 1 commit into
mainfrom
split/si
Open

SI: editions back to 2019, and the four ways the campaigns differ#231
ivorbosloper wants to merge 1 commit into
mainfrom
split/si

Conversation

@ivorbosloper

Copy link
Copy Markdown
Collaborator

One of ~30 small PRs splitting the publish-portolan branch. This one is Slovenia: the converter, its test fixture, and a CHANGELOG line.

rkg.gov.si keeps KMRS_<year>.rar from 2019 onwards (2018 and 2025 are 404), where the converter knew 2021 and later. EuroCrops lists 2019-2021 for Slovenia from this same source, so this completes the national series.

Each of the four fixes below cost a conversion before it was found:

campaign what differs
2019 shapefile nested in a KMRS_2019/ folder; the others keep it at the archive root → glob recursively, as cz does
2021 no .prj at all, so geometries arrive naive and the conversion stops at the first transform. Every other campaign declares EPSG:3794 and 2021 covers the same ground in the same numbers (easting 377373..622579 against 2020's 377373..622579), so the grid is set where the archive omits it
2019 three attributes where the rest carry seven: the field is POLJINA_ID, not ID, and there is neither an area nor a crop name → both spellings mapped, area computed from the geometry
2020 crop codes stored without the leading zeros the KMRS list uses, so 120,164 of 819,620 rows (14.66%) matched no crop. None of those unpadded codes appears in any other campaign

(2020 also spells the Latin crop name CROP_LATIN where 2021+ use CROP_LAT_E; both are mapped.)

Verified over all six editions

edition fields unique ids rows without hcat:code median field
2019 820,151 820,151 0.00% 2,789 m²
2020 819,620 819,620 0.00% 2,778 m²
2021 824,532 824,445 0.00% 2,751 m²
2022 826,354 826,354 0.00% 2,731 m²
2023 830,856 830,856 0.00% 2,678 m²
2024 809,044 809,038 0.00% 2,748 m²

The median field sizes moving smoothly across the series is the check that the areas computed for 2019, where the source publishes none, are right. (The id counts that differ by a handful are multipart parts, the same rate as elsewhere in the catalog.)

All six editions are built and published in the harmonized field data catalog.

Original commits on publish-portolan: fd9ca81, d5733d2, f8ccdb7, 643b085. The local crop-mapping fixture makes the test hermetic.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DVx9uQV2QPM8ecPAY3ZjXG

rkg.gov.si keeps KMRS_<year>.rar from 2019 onwards — 2018 and 2025 answer 404 —
where the converter knew only 2021 and later. EuroCrops lists 2019-2021 for
Slovenia from this same source, so this completes the national series.

Reading the older campaigns took four fixes, each of which cost a conversion:

- 2019 nests its shapefile in a folder of the same name; the others keep it at
  the archive root, so the target is globbed recursively now, as cz does.
- 2021 ships no .prj at all and its geometries arrive naive. Every other
  campaign declares EPSG:3794, and 2021 covers the same ground in the same
  numbers (easting 377373..622579 against 2020's 377373..622579), so the grid
  is set where the archive leaves it out.
- 2019 carries three attributes where the rest carry seven: it names the field
  POLJINA_ID rather than ID, and publishes neither an area nor a crop name.
  Both spellings are mapped, and the area is computed from the geometry.
  (2020 spells the Latin crop name CROP_LATIN, 2021 onwards CROP_LAT_E — same
  treatment.)
- 2020 stores its crop codes without the leading zeros the KMRS list uses, so
  120,164 of its 819,620 rows — 14.66% — matched no crop and would have been
  published without an HCAT code. None of those unpadded codes appears in any
  other campaign.

Built and verified over all six editions: 820,151 fields in 2019 to 809,044 in
2024, unique ids throughout, no row without an HCAT code, and median field
sizes moving smoothly from 2,789 m² to 2,748 m² — which is the check that the
areas computed for 2019 are right.

The local crop-mapping fixture makes the test hermetic.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DVx9uQV2QPM8ecPAY3ZjXG
This was referenced Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant