Skip to content

ES-EX, ES-NC: the recintos FEGA publishes, since the regions do not - #292

Open
ivorbosloper wants to merge 5 commits into
split/lv-backfillfrom
split/es_ex-es_nc
Open

ivorbosloper wants to merge 5 commits into
split/lv-backfillfrom
split/es_ex-es_nc

Conversation

@ivorbosloper

Copy link
Copy Markdown
Collaborator

Neither converter could run: sitex.gobex.es (Extremadura) and sigpac.navarra.es answer nothing, from two networks, and have not since at least 2026-09-10.

FEGA publishes the same register per province — /geopackages/<year>/recintos/ on the hub the national es converter already reads — for 2025 and 2026. Extremadura is provinces 06 and 10, Navarra is 31.

  • The columns are the ones ESBaseConverter expects (uso_sigpac, dn_surface in m², provincia, municipio), so both regions keep their crop code, its name and the land-use filter.
  • The id is the cadastral key, as es.py builds it for the declared crops of the same parcels.
  • The provider changes with the source: these are FEGA's files now, which the description says.

SigpacRecintoMixin holds the shared part, so a third region that loses its portal is a two-line converter. Navarra has a fixture; Extremadura's provinces are 1.8 GB.

For fieldsoftheworld/harmonized-field-data-catalog#20.

ivorbosloper and others added 2 commits September 16, 2026 20:04
Neither converter could run: sitex.gobex.es and sigpac.navarra.es answer nothing,
from two networks, and have not since at least 2026-09-10.

FEGA publishes the same register per province, for 2025 and 2026, on the hub the
national es converter already reads. Extremadura is provinces 06 and 10, Navarra
is 31. The columns are the ones ESBaseConverter expects, so both regions keep the
crop code, its name, and the land use filter they had.

The provider changes with the source: these are FEGA's files now, which the
description says.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DVx9uQV2QPM8ecPAY3ZjXG
@ivorbosloper
ivorbosloper changed the base branch from main to split/lv-backfill September 16, 2026 18:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Variant propagation and multipart area handling can produce failed metadata generation and inaccurate areas.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Moves Navarra and Extremadura SIGPAC converters to FEGA’s national provincial releases.

Changes:

  • Adds a shared FEGA recinto mixin for downloading, filtering, and ID generation.
  • Updates both regional converters for 2025–2026 releases.
  • Adds Navarra conversion coverage and changelog documentation.
File summaries
File Description
fiboa_cli/datasets/commons/sigpac.py Adds shared FEGA conversion logic.
fiboa_cli/datasets/es_nc.py Migrates Navarra to FEGA data.
fiboa_cli/datasets/es_ex.py Migrates Extremadura to FEGA data.
tests/test_convert.py Adds Navarra fixture coverage.
CHANGELOG.md Documents the source migration.
Review details
  • Files reviewed: 5/6 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

use_variant_as_determination = True

def get_urls(self):
listing = requests.get(f"{HUB}/geopackages/{self.variant}/recintos/", timeout=120)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See also vecorel/cli#45, which may need a rebase to get into this branch.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right about the mechanism, and vecorel/cli#45 fixes it where it matters: BaseConverter.convert() now sets the variant before get_urls() runs, so a converter that overrides get_urls() does not have to default it itself. That is in v0.2.20, which this branch already pins — so no rebase is needed (thanks @m-mohr for the pointer).

The one path #45 does not cover is the one you name: Publish.make_readme() calls get_urls() outside convert(), on a converter whose variant was never set. Worth knowing that this method no longer exists on publish-portolan#214 removed it, because the catalog generates its own READMEs — and that is the branch the published data is built from, which is why the ES-EX and ES-NC builds were fine.

So it is live on this branch and dead on the one that publishes. Fixing it properly means publish.py setting self.converter.variant before calling, which would help every converter rather than this mixin; defaulting inside get_urls() would only paper over it and, as you say, document the wrong year for an explicit --variant 2025.

Comment thread fiboa_cli/datasets/commons/sigpac.py Outdated
ivorbosloper and others added 2 commits September 18, 2026 23:16
Navarra 2026 is 996,640 recintos and Badajoz 1,313,841, all Polygon, no
MultiPolygon. The numbering stays: the cadastral key repeats 19 times in
Badajoz.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DVx9uQV2QPM8ecPAY3ZjXG
@ivorbosloper
ivorbosloper requested a review from m-mohr September 19, 2026 09:12
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.

3 participants