Repository navigation
feat(map): satellite and hybrid imagery — open sources, per-cell archives in R2, the style hook (nothing published) - #200
Merged
Conversation
…ifest
Imagery is published as sets (one source at one vintage) cut into cells, one
dated PMTiles archive per cell; a manifest lists each set's cells as a
coverage tree, in priority order, so the archive for a tile is computed.
- lib/map/imagerySources.ts: the licence registry (ESA WorldCover 2021,
NASA Blue Marble, ICGC). Only imagery GoWay may host, re-serve and show
commercially; the build refuses anything else.
- scripts/build-satellite-set.ts: per cell, warp in parallel strips
(retried whole), gdal raster tile (512 px WebP q80), pack (streaming
PMTiles writer sharing the city writer's directories), verify every tile
with the Worker's reader, receipt. --plan prints the workflow matrix.
- scripts/build-satellite-manifest.ts: merges entries; a rebuilt cell moves
to the new stamp and the old keys are listed as retired.
- worker/satellite.js: /map/satellite/{base,detail,fine}/z/x/y.webp,
coverage.json, manifest.json, receipts. Reads through tiles.js (shared
directory memo); WebP stored as is goes out with no Content-Encoding;
1 MiB line in budget.js; check:worker-wire now covers it. Off until
MAP_SATELLITE_MANIFEST is set (commented out).
- .github/workflows/build-satellite-tiles.yml: dry run by default; publish
uploads dated keys through city-r2.sh (now prefix-generic).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…while on screen
- lib/map/style/imagery.ts: buildImageryStyle derives goway-satellite.json
(imagery alone) and goway-hybrid.json (imagery under GoWay's roads and
labels, fills dropped, roads thinned, dark halos) from the dark document;
map:style:check keeps them in step; light/dark byte-identical.
- No 3D buildings over imagery (territorial orthophotos are not true
orthophotos); the relief drapes the imagery on 3D terrain, no hillshade.
- MapCanvasProps.imagery ('satellite' | 'hybrid' | null), both canvases;
resolveMapStyleUrl(appearance, imagery); dev-only ?imagery=.
- useImageryCredits: each source's credit in the compact ⓘ credit while a
set of it is on screen; /attribution#imagery quotes every notice.
- An imagery tier's 404 (nothing finer published) never raises "Map data
unavailable".
- serve-map-build.ts --satellite=<dir>: the Worker's own satellite.js over
a local directory, for a local proof.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…planet plan docs/MAP_SATELLITE.md: the open imagery source table (licences quoted with URLs: global, Europe, rest of the world, and what is excluded), the tiers, cells and manifest, WebP measured against AVIF, the style hook and the credit, the local Catalonia proof, publish commands and costs, the ranked planet rollout and the owner's decisions. AGENTS.md: the imagery rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ean cleanly The composite keeps near-shore water (a grey-blue once stretched) and masks the open sea in blocks, which drew a stepped coastline against the style's ocean. A VRT mask band from the composite's own green and NIR bands — NDWI > 0 and NIR < 0.08 — makes every sea, lake and wide river transparent, so it is the one ocean colour at every zoom. NDWI alone also caught blue and white port roofs; the NIR ceiling keeps them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts, never under-credits Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e style engine #197's catalogue takes imagery as two styles, so the parallel hook goes: no `imagery` prop, no `goway-{satellite,hybrid}.json`, no second style URL. - catalogue.ts: `satellite`, `hybrid` (one fixed `day` light, `imagery`, `offer: 'development'` until the imagery is published; picker and embed ask `isMapStyleOffered`). - themes.ts / options.ts: their recipes, Standard's options plus `imagery` over the night palette; `buildGowayMapStyle` hands them to `applyImageryStyle`. The imagery rasters join the published layer ids. - Labels in every language; thumbnails rendered from the Catalonia proof (`map:thumbs --only=`, so the others are untouched). - Canvases read the style's `imagery` from the catalogue for the credit; relief and the native hillshade keep both Outdoors' and imagery's rules. - check:worker-wire: main's bundled Worker plus the satellite clients. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#202 moved the catalogue to packages/contracts (the ids the SDK and the embed share). Satellite and hybrid join it there with `imagery` and `offer: 'development'`; `/map/styles/index.json` lists only offered styles until the imagery is published, and the app's picker and embed ask `isMapStyleOffered`. Navigation and Monochrome kept as main has them; the imagery documents are byte-identical, so their thumbnails stand. The SDK's "unknown style" fixture uses an id that is still unknown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Satellite and hybrid maps for GoWay, built only from imagery whose licence allows hosting, re-serving and displaying publicly and commercially. Each source is credited while it is on screen. Nothing is published: the Worker route is off until
MAP_SATELLITE_MANIFESTis set, and no R2 object or Cloudflare token was created. Full write-up:docs/MAP_SATELLITE.md.Phase 1: sources (licences quoted with URLs in the doc)
Phase 2: pipeline and serving, proven on Catalonia
/map/satellite/*:tiles.js, the shared directory memo from Worker: send tiles gzipped as stored, one storage read per tile #192.check:worker-wirenow proves this in workerd: four clients, cache miss and hit.budget.js, and the parse refuses a manifest larger than that.satelliteandhybridare catalogue entries with one fixeddaylight and their ownthemes.tsrecipes.buildGowayMapStyleappliesapplyImageryStyle, and the imagery rasters join the published layer ids.offer: 'development': the picker and/frame?style=offer them only in development builds until the imagery is published. Publishing is then a one-line removal.useImageryCreditsreads/map/satellite/coverage.json. The compact ⓘ credit names every source on screen, and/attribution#imageryquotes each notice in full. A pitched view whose bounds can't be read over-credits rather than under-credits.build-satellite-tiles.ymldry-runs by default. Withpublish, it uploads dated keys throughcity-r2.sh, which is now prefix-generic.Local proof:
Each cell is verified byte for byte. It was served by
serve-map-build.ts --satelliterunning the Worker's own module. Screenshotssatellite-01…09are ingoway-videos/.Costs
Decisions for the owner
offer: 'development'from the two catalogue entries.Checks
check:worker-wiretsc/bun checkmap:style:checkvalidate:agents-mdframeBudget's terrain case is flaky under machine load. It has also failed on cleanmain.🤖 Generated with Claude Code