Read footprint polygons from remote ZIP archives - #396
Merged
Merged
Conversation
Collaborator
|
This is great! And now as a generic hook this can be quite useful for other modules/hooks as well! Quite a cool hook you've made here! |
matth-love
reviewed
Sep 13, 2026
Collaborator
There was a problem hiding this comment.
This is fine for now; but we should probably make a new directory and index for documentation on specific hooks so we don't end up with a huge list of hook specific docs alongside the more generic docs pages.
matth-love
approved these changes
Sep 13, 2026
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.
Summary
This pulls the ZIP footprint reading out of #385 into a reusable hook, following Matt's suggestion.
remote_archive_footprintreads polygon boundaries from a shapefile inside a remote ZIP without downloading the entire archive. It adds the combined outline to the Fetchez entry so later hooks can compare coverage. It also keeps the individual boundaries and their attributes for later source tracking.If an archive has more than one shapefile, you can choose which one to read. You can also choose which attribute fields to keep. Other modules serving compatible ZIP archives can use the same hook, with no new dependencies.
This keeps archive reading separate from TNM discovery and the rules for choosing between overlapping sources. The hook preserves the polygons as supplied, including holes, and converts them to WGS84.
Tests
All 12 new hook tests passed. The full repository suite passed with 137 passed and 2 skipped. Pre-commit checks also passed.
The tests use real shapefiles in ZIPs served over local HTTP. They check layer and field selection, coordinate conversion, individual feature preservation, use with
spatial_cull, and missing or invalid inputs. They also verify that the reader leaves a larger unrelated file in the ZIP unread and that the extracted attributes can be written to the audit log.Source masks and spatial metadata still varied between unchanged-base runs, consistent with the Globato issue we discussed. The attached evidence records the full Newport comparison.
The dem-devel evidence bundle includes the test results, exact commits, and comparison details.
evidence_bundle.zip