Converter for Spain (whole), based on the FEGA 2025+ data - #206
Open
ivorbosloper wants to merge 5 commits into
Open
Converter for Spain (whole), based on the FEGA 2025+ data#206ivorbosloper wants to merge 5 commits into
ivorbosloper wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new Spain-wide converter (es) based on FEGA 2025+ “Cultivos Declarados SIGPAC” provincial GeoPackages, while preserving existing region-specific Spain converters by extracting their shared logic into a separate base module.
Changes:
- Introduce a new national Spain converter (
fiboa_cli/datasets/es.py) with schema mappings, ID construction, layer filtering, and URL discovery. - Extract the legacy Spain base converter into
fiboa_cli/datasets/es_base.pyand update Spain region converters to import it. - Extend conversion tests and update registry ignore rules + changelog entry.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_convert.py | Adds es to the converter test matrix and provides a local test input archive. |
| fiboa_cli/registry.py | Updates ignored_datasets to ignore es_base.py instead of the former base-in-es.py. |
| fiboa_cli/datasets/es.py | Adds the new Spain-wide FEGA 2025+ converter implementation, including get_urls(). |
| fiboa_cli/datasets/es_base.py | New module holding the legacy Spain SIGPAC land-use base converter used by regional datasets. |
| fiboa_cli/datasets/es_vc.py | Updates import to use ESBaseConverter from es_base.py. |
| fiboa_cli/datasets/es_pv.py | Updates import to use ESBaseConverter from es_base.py. |
| fiboa_cli/datasets/es_nc.py | Updates import to use ESBaseConverter from es_base.py. |
| fiboa_cli/datasets/es_md.py | Updates import to use ESBaseConverter from es_base.py. |
| fiboa_cli/datasets/es_ib.py | Updates import to use ESBaseConverter from es_base.py. |
| fiboa_cli/datasets/es_ga.py | Updates import to use ESBaseConverter from es_base.py. |
| fiboa_cli/datasets/es_ex.py | Updates import to use ESBaseConverter from es_base.py. |
| fiboa_cli/datasets/es_cm.py | Updates import to use ESBaseConverter from es_base.py. |
| fiboa_cli/datasets/es_cl.py | Updates import to use ESBaseConverter from es_base.py. |
| fiboa_cli/datasets/es_cb.py | Updates import to use ESBaseConverter from es_base.py. |
| fiboa_cli/datasets/es_ar.py | Updates import to use ESBaseConverter from es_base.py. |
| fiboa_cli/datasets/es_an.py | Updates import to use ESBaseConverter from es_base.py. |
| CHANGELOG.md | Adds an Unreleased changelog entry for the Spain-wide FEGA 2025+ converter. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| class ESBaseConverter(FiboaBaseConverter): | ||
| """ | ||
| Base Converter for Spain | ||
| Asssumes a source column with the SIGPAC-Land Use code |
Comment on lines
+117
to
+121
| # The directory listing is a classic Apache-style HTML index; parse out the .zip hrefs. | ||
| zip_paths = re.findall(r'HREF="(/geopackages/[^"]+\.zip)"', response.text) | ||
| if not zip_paths: | ||
| raise RuntimeError(f"No GeoPackage archives found at {base}") | ||
| return {f"https://sigpac-hubcloud.es{p}": ["*.gpkg"] for p in zip_paths} |
Comment on lines
+1
to
4
| from .es_base import ESBaseConverter | ||
|
|
||
|
|
||
| class ESCLConverter(ESBaseConverter): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.