Repository navigation
feat(examples): outline each COG in the naip-mosaic example - #864
Merged
Merged
Conversation
A checkbox draws each COG's outline, showing that the imagery is many separate COGs mosaicked together. The outline comes from the opened source's projected bounds, so it follows the image's UTM edge rather than its WGS84 bbox. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Drawn after each item's imagery, the outlines hid one another where COGs overlap and formed an irregular pattern. One PathLayer over the mosaic, fed by onSourceLoad and onSourceUnload, draws every opened COG's outline in a subdued red. Neighboring NAIP images overlap by a few hundred meters, so each boundary is a pair of lines; the panel says so. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
before:
after:
Note
This PR was written by Claude (Claude Code), not by @kylebarron.
Change
Adds an "Outline each COG" checkbox to the naip-mosaic example, off by default. When it's on, a subdued red outline is drawn around each opened COG, above the whole mosaic. This shows that the imagery is many separate COGs mosaicked together.
Each outline is the opened source's
tilesetDescriptor.projectedBoundsprojected to WGS84, so it follows the image's real edge. NAIP COGs are in UTM, and the STACbboxwould miss that edge by more than 100 m at the mosaic's west side, where UTM grid convergence is about 1°. The app collects the outlines throughonSourceLoadandonSourceUnload, and draws them in onePathLayerover theMosaicLayer.Each NAIP image extends 300-430 m past its 3.75' quarter-quad cell, so neighboring images overlap and every boundary shows as a pair of lines. A note under the checkbox says so.
Some color changes inside one outline are not COG edges. NAIP builds each image from several aerial frames, and the seamlines between them often follow roads.
Testing
pnpm --dir examples/naip-mosaic typecheckandbiome checkpass.Closes #845
🤖 Written by Claude Code