create-stac-collection: the bbox is the extent of the geometries - #59
Open
ivorbosloper wants to merge 2 commits into
Open
ivorbosloper wants to merge 2 commits into
ivorbosloper wants to merge 2 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ivorbosloper
added a commit
to fieldsoftheworld/harmonized-field-data-catalog
that referenced
this pull request
Sep 27, 2026
…es (vecorel/cli#59) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
How much weight/time does this add on top of especially larger files? I feel like the small divergence can be okay if it adds too much overhead on top of writing and portolan might be overly rigurous here. Or we add a strict mode here as well 😅 |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved issues were identified, and regression coverage is included.
Review effort: Lite
Findings: None
What changed in this PR
Updates create-stac-collection to calculate accurate STAC bounding boxes from geometries transformed to EPSG:4326.
Changes:
- Computes geometry-based extents.
- Preserves the EPSG:4326 fast path.
- Adds regression coverage and changelog documentation.
| File | Summary |
|---|---|
vecorel_cli/create_stac.py |
Computes accurate geometry-based STAC extents. |
tests/test_create_stac.py |
Tests projected-CRS bbox behavior. |
CHANGELOG.md |
Documents the correction. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
create-stac-collectiontransformed the corners of the source bbox to EPSG:4326. In a projected CRS those corners reach beyond the data, so the collection's bbox was too wide (for Saxony in EPSG:25833 about 0.08° on the west side). It now transforms the geometries and takes their extent, skipping the transform for data already in EPSG:4326.PTL-DAT-005on the harmonized field data catalog, where the PMTiles (tippecanoe writes the true extent) disagreed with the declared bbox for every collection in a projected CRS.🤖 Generated with Claude Code