Skip to content

fix(map): point usgs-imagery at USGSImageryOnly, USGSImageryTopo is retired - #2517

Merged
efiten merged 1 commit into
Kpa-clawbot:masterfrom
bkcraft-1:fix/remove-retired-usgs-imagerytopo
Dec 1, 2026
Merged

efiten merged 1 commit into
Kpa-clawbot:masterfrom
bkcraft-1:fix/remove-retired-usgs-imagerytopo

Conversation

@bkcraft-1

@bkcraft-1 bkcraft-1 commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The U.S. Geological Survey's The National Map has retired the USGSImageryTopo basemap service, so the USGS Imagery base map (usgs-imagery, USGS group, opt-in) shows no tiles.

  • https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryTopo/MapServer?f=json returns {"error":{"code":404,"message":"Service USGSImageryTopo/MapServer not found ","details":[]}}
  • https://basemap.nationalmap.gov/arcgis/rest/services?f=json now lists only USGSHydroCached, USGSImageryOnly, USGSShadedReliefOnly and USGSTopo
  • .../USGSImageryTopo/MapServer/tile/{z}/{y}/{x} returns 404 at zooms 0, 4, 8, 12 and 14, while USGSImageryOnly returns 200 for the same tiles (and down to zoom 16, the provider's maxZoom)

USGS announced the retirement on October 13, 2026, and the service has not been available since November 16, 2026: Imagery Topo Base Map Retirement.

This points usgs-imagery at USGSImageryOnly. The id stays the same, so a saved map pick or config that names it keeps working. The label, attribution and maxZoom are unchanged. The harness unit test URL is updated and there is a CHANGELOG line.

Testing

  • sh test-all.sh (CI's JavaScript unit test step): all suites pass
  • npm run lint: 0 errors
  • Tile URL checked with curl (200, image/jpeg)
  • Not run: the Go tests (no Go code changed) and a browser check

🤖 Generated with Claude Code

…etired

The National Map removed the USGSImageryTopo service; its tiles return 404.
USGSImageryOnly serves the same imagery and answers 200 down to zoom 16.
The usgs-imagery id is kept so saved map picks keep working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@zfouts zfouts left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for spotting and fixing.

@efiten efiten left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @bkcraft-1, and welcome. I checked it against the live service:

  • USGSImageryTopo/MapServer now answers "Service ... not found", and its tiles return 404.
  • USGSImageryOnly/MapServer exists (Web Mercator, levels 0 to 23), and tiles in the /tile/{z}/{y}/{x} order this PR uses return JPEG images up to zoom 16, the layer's maxZoom.
  • Nothing else in the tree still points at the retired service; the one test that pins the URL is updated.

One non-blocking note: the old service drew roads, place names and contours over the imagery, and the new one is imagery only. The National Map no longer offers a service with both, so this is the right replacement, but it would help to say so in the CHANGELOG line, for example "USGS Imagery now shows imagery without the topo overlay; the combined service was retired".

CI is green, approving.

@efiten
efiten merged commit 00f0b41 into Kpa-clawbot:master Dec 1, 2026
29 of 34 checks passed
zfouts added a commit to zfouts/CoreScope that referenced this pull request Dec 2, 2026
… and the advert reception changes to Postgres

Brings in 10 master commits: Kpa-clawbot#2366 (catalogue key tier), Kpa-clawbot#2497 (regions
count only received adverts), Kpa-clawbot#2498 (archived foreign-advert flags), Kpa-clawbot#2492
(observer comparison), Kpa-clawbot#2511, Kpa-clawbot#2513, Kpa-clawbot#2514, Kpa-clawbot#2517, Kpa-clawbot#2518, Kpa-clawbot#2519.

Conflicts:
- cmd/ingestor/approved_channels.go: both sides added a mutex to
  channelKeySet. One mu now serialises refresh, master's setCatalog and the
  branch's Close, and guards the users.db/Postgres accounts readers as well
  as master's approvedNames and catalogue tier.
- cmd/ingestor/db.go, nodes upsert: master's foreign_advert carry-over on
  top of the branch's qualified columns and lastSeenClampSQL. Master looked
  up the archived flag with ?1, which dbx.Rebind turns into $11 on Postgres;
  it is now a plain ? bound to the public key again, and the EXISTS is
  wrapped in CASE so Postgres stores 0/1 in the BIGINT column.
- cmd/ingestor/db.go, MoveStaleNodes: master's UPDATE that restores an
  archived foreign flag runs before the branch's portable moveStaleNodesSQL
  (not master's INSERT OR REPLACE ... SELECT *), with IS DISTINCT FROM 1
  instead of the SQLite-only IS NOT 1.

Ported to Postgres:
- catalog_keys (Kpa-clawbot#2366): pgschema migration 0004_catalog_keys.sql (same
  columns, CHECKs, defaults and key; LatestVersion 4), the table in
  sqlite_endstate.sql, and the worker's upsert sets updated_at from
  excluded.updated_at instead of strftime('%s','now').
- corescope-migrate copies catalog_keys and verify never prints
  catalog_keys.key_hex (channel secrets), for any store.
- GetNodes region filter (Kpa-clawbot#2497) and the observer comparison (Kpa-clawbot#2492) used
  IS NOT 'tx'; both use IS DISTINCT FROM 'tx'. The comparison's
  ORDER BY label COLLATE NOCASE is lower(<label expression>) on Postgres,
  which folds ASCII only under COLLATE "C", as NOCASE does.
- docs/catalogue-keys.md: the revert SQL on PostgreSQL.

Tests on both backends:
- The catalogue key tests that use a store and the Kpa-clawbot#2498 foreign-advert
  tests run on SQLite and Postgres (onBothStores; insertTx uses RETURNING).
- New dual tests for the observer comparison and the GetNodes region filter.
- pgschema: an upgrade from version 3 with data; the control migration tests
  no longer assume 3 is the latest version.

Co-Authored-By: Claude Opus 5.5 <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.

3 participants