Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- ES-CL: the ITACyL server is https-only, the 2025 shapefiles sit in province subfolders, and C_REFREC is the identifier
- A test refuses a fixture above 5 MB, committed or merely lying in the fixture folder, because a failing convert test downloads the real source there
- ES-MD: find RECINTO.shp wherever the archive puts it
- ES-AN: CD_USO is the land-use column, with the determination date from the variant year
- Update vecorel-cli to v0.2.17:
- GeoJSON is read as UTF-8 as the format mandates, instead of the platform locale (cp1252 on Windows mangled umlauts)
- GeoJSON files with a byte order mark no longer fail to read
Expand Down
6 changes: 4 additions & 2 deletions fiboa_cli/datasets/es_an.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ class ANConverter(ESBaseConverter):
"crop:name_en": "crop:name_en",
}

use_code_attribute = "CD_USO"
area_is_in_ha = False
area_calculate_missing = True
use_variant_as_determination = True

column_additions = ESBaseConverter.column_additions | {
"determination:datetime": "2024-03-28T00:00:00Z",
column_migrations = {
"ID_RECINTO": lambda col: col.astype("int64"),
}

missing_schemas = {
Expand Down
Binary file not shown.
5 changes: 5 additions & 0 deletions tests/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"ie",
"es_cat",
"es_cl",
"es_an",
"es",
"nz",
"lt",
Expand Down Expand Up @@ -83,6 +84,10 @@ def _input_files(converter, *names):
"variant": "2025",
"input_files": {f"{test_path}/es_cl/AVILA.zip": ["replaceme.zip"]},
},
"es_an": {
"variant": "2025",
"input_files": {f"{test_path}/es_an/SP25_REC_PROV_04.zip": ["SP25_REC_04.shp"]},
},
"es_cat": _input_files("es_cat", "Cultius_DUN2023_GPKG.zip"),
"es": {"input_files": {f"{test_path}/es/1501_ALAVA_cd_2025_20250105.gpkg.zip": ["*.gpkg"]}},
"lv": _input_files("lv", "1_100.xml"),
Expand Down
Loading