Skip to content

Kyle/elevation example - #647

Draft
kylebarron wants to merge 2 commits into
mainfrom
kyle/elevation-example
Draft

Kyle/elevation example#647
kylebarron wants to merge 2 commits into
mainfrom
kyle/elevation-example

Conversation

@kylebarron

Copy link
Copy Markdown
Member

This is a vibe-coded example for rendering a terrain COG. This came from discussions at FOSS4G with @hobu.

Screenshot 2026-09-04 at 12 06 45 PM

This is a draft because I haven't read and corrected the initial claude output yet.

In particular, the hardest problem is that, as a convolutional shader, we need to fill in edge pixels from neighboring tiles, lest we want to have seams visible across tiles. Claude implemented a solution but I haven't read it yet.


Designs a 2D example that streams USGS 3DEP 1-meter lidar DEMs from the
public National Map bucket and computes hillshade, slope, and tinted
relief on the GPU, with an interactive sun angle.

Hillshade is the first convolutional shader module in the project, which
collides with per-tile independent fetching: the 3x3 Horn kernel has no
neighbors at tile edges, producing a visible seam grid. The spec resolves
this in application code with a one-texel halo — a (tileWidth + 2) square
texture — backed by a shared decoded-tile cache, so the 8 neighbors are
decoded once and shared across up to 9 halo assemblies rather than
refetched per tile.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com

kylebarron and others added 2 commits September 3, 2026 12:11
Designs a 2D example that streams USGS 3DEP 1-meter lidar DEMs from the
public National Map bucket and computes hillshade, slope, and tinted
relief on the GPU, with an interactive sun angle.

Hillshade is the first convolutional shader module in the project, which
collides with per-tile independent fetching: the 3x3 Horn kernel has no
neighbors at tile edges, producing a visible seam grid. The spec resolves
this in application code with a one-texel halo — a (tileWidth + 2) square
texture — backed by a shared decoded-tile cache, so the 8 neighbors are
decoded once and shared across up to 9 halo assemblies rather than
refetched per tile.

Verified against the bucket: CORS is open with working range GETs, the
cells are valid COGs with overviews, and internal tile size (256 vs 512),
nodata, and UTM zone all vary across vintages, so none may be hardcoded.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

1 participant