Skip to content

Fix STAC Item HTML bbox rendering - #2409

Closed
BuraakAI wants to merge 1 commit into
geopython:masterfrom
BuraakAI:fix/stac-item-html-bbox
Closed

BuraakAI wants to merge 1 commit into
geopython:masterfrom
BuraakAI:fix/stac-item-html-bbox

Conversation

@BuraakAI

Copy link
Copy Markdown

Overview

STAC Items expose their bounding box as the top-level bbox field, but the HTML template tried to read the Collection-only extent field. This caused every STAC Item HTML page to fail with a Jinja UndefinedError.

This change:

  • renders the Item map from the top-level bbox field
  • adds a regression test through get_stac_path so the complete API/template path is covered

Related Issue / discussion

Closes #2408

Additional information

The regression test failed against master with the reported missing extent error and passes with this fix.

Validation:

  • .venv/bin/pytest -q tests/api/test_stac.py — 7 passed
  • .venv/bin/flake8 tests/api/test_stac.py — passed
  • .venv/bin/pre-commit run --files pygeoapi/templates/stac/item.html tests/api/test_stac.py — passed
  • git diff --check — passed

OpenAI Codex assisted with repository research, the regression test, and the patch. I reviewed the change and validated the failing and passing behavior locally.

Dependency policy (RFC2)

  • I have ensured that this PR meets RFC2 requirements; no dependencies are changed.

Updates to public demo

  • No breaking demo configuration changes are required.

Contributions and licensing

  • I would like to contribute this STAC Item HTML bugfix to pygeoapi. I confirm that my contributions are compatible with the pygeoapi license guidelines.

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.

STAC Item HTML page fails to render (bbox issue)

2 participants