Skip to content

Exploration: street, satellite and terrain map sources (SP-1)

Status: written 2026-10-08, spike tracker #1573 (Phase 17b spike SP-1, extended 2026-10-02 for SH-19). It answers the SP-1 row of phase-17b-walk-corrections.md under decisions K6 and K17 and D5/D15 of phase-17-revamp.md, before any basemap build. It feeds SH-2b, LK-5 and EX-7 (built by climate-lama-ui#760) and SH-19 (built by climate-lama-ui#761). This note is not code. Every licence, policy or figure below carries its source link, a command run on 2026-10-08, or an [ASSUMPTION] mark.

Today's state

Read in climate-lama-ui at 27c2361.

  • Prod bakes OpenStreetMap raster tiles in as Streets: .github/workflows/publish.yml:126-128 passes VITE_MAP_RASTER_TILES=https://tile.openstreetmap.org/{z}/{x}/{y}.png and an © OpenStreetMap contributors attribution.
  • defaultBasemap() (src/map/basemaps.ts:115-117) opens Streets whenever a street key is set, whatever the theme. That is SH-2, LK-5 and EX-7.
  • Satellite is a raster XYZ template behind VITE_SATELLITE_TILES and VITE_SATELLITE_ATTRIBUTION (src/map/basemaps.ts:61-63,105, src/map/styles/base.ts:77-79). rasterStyle() (src/map/styles/base.ts:82-98) draws any such template with tileSize: 256.
  • Terrain is registered disabled with no build key (src/map/basemaps.ts:106), and the build-key union (src/map/styles/base.ts:4-9) has no DEM key yet.
  • The offline basemap is Natural Earth 1:50m only (src/map/styles/base.ts:118), with no streets, place labels or GADM lines.

Street basemap

Question. A self-hosted vector source for light and dark styles, Latin labels and GADM admin lines, usable offline. And may prod keep tile.openstreetmap.org?

Candidate data sources

Candidate What it is Licence terms
Protomaps basemap Planetiler profile that builds one PMTiles archive from OpenStreetMap and Natural Earth Tiles ODbL, "attribute OSM". Code BSD 3-Clause. "Map design is CC0" (repo). Distributed as an ODbL Produced Work (downloads)
OpenMapTiles schema via Planetiler Planetiler (Apache 2.0, Java 21+) builds the OpenMapTiles schema to MBTiles or PMTiles (planetiler) Schema design CC-BY 4.0. Products "need to visibly credit OpenMapTiles.org" next to OSM (LICENSE)
Natural Earth only What the offline basemap already ships Public domain, "Crediting the authors is unnecessary" (terms). No streets, so it cannot answer SH-2 alone

ODbL attribution terms

  • OSM data is under the ODbL, and users must "Provide credit to OpenStreetMap by displaying our attribution notice" (copyright).
  • The guidelines accept "© OpenStreetMap contributors" or "© OpenStreetMap", in a corner of the map, lower right by tradition. Linking "OpenStreetMap" to openstreetmap.org/copyright is one way to show the data is under the ODbL (attribution guidelines).
  • The string prod already ships (publish.yml:128) meets this and carries over unchanged: &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors.
  • Protomaps needs no credit of its own (CC0 design). OpenMapTiles would add © OpenMapTiles.

Tile build recipe

  1. Take the current daily planet build. https://build-metadata.protomaps.dev/builds.json lists 20261008.pmtiles at 138,703,391,160 bytes (about 138.7 GB, version 4.15.2), and the planet covers z0 to z15 (downloads).
  2. Cut Greece and Cyprus out with the PMTiles CLI. extract takes --region=REGION.geojson (a Polygon or MultiPolygon) and --maxzoom, and reads a remote clustered archive (CLI): pmtiles extract https://build.protomaps.com/20261008.pmtiles grc-cyp.pmtiles --region=grc-cyp.geojson --maxzoom=14. The region file is a two-polygon MultiPolygon of the GRC and CYP admin-0 hulls, so western Turkey stays out.
  3. Fallback if the daily build ever lags: the Protomaps Planetiler profile builds an area locally (java -jar target/*-with-deps.jar --download --force --area=monaco, tiles/).
  4. Serve the archive same-origin over HTTP range requests and register the protocol in MapLibre (new Protocol(), maplibregl.addProtocol("pmtiles", protocol.tile), source pmtiles://https://…/grc-cyp.pmtiles) (MapLibre).
  5. Self-host glyphs and sprites from protomaps/basemaps-assets instead of protomaps.github.io, so the style needs no outside host (MapLibre).

Approximate size for Greece and Cyprus

  • Geofabrik extracts on 2026-10-08: Greece 325 MB, Cyprus 35.9 MB (greece, cyprus). The OSM planet planet-261005.osm.pbf is 95,244,184,503 bytes (curl -sIL Content-Length, https://planet.openstreetmap.org/pbf/).
  • So Greece plus Cyprus is about 0.38 % of OSM by data volume. Scaled onto the 138.7 GB planet archive that gives about 0.5 GB at z0 to z15. Protomaps says each extra zoom level "roughly doubles" the file (downloads), so about 0.25 GB at --maxzoom=14. [ASSUMPTION] tile bytes scale with OSM data volume. ui#760 records the measured size of its first extract. [ASSUMPTION] that is too large to bake into the UI image, so it is served from a mounted volume behind the same origin.

Latin labels

  • Protomaps keeps the local OSM name in name, translations in name:{code} such as name:en, and the script of each name part in script. "If script* is not present on a name, then it means that the name uses the Latin script" (localization).
  • @protomaps/basemaps builds the style per flavour and language: layers("protomaps", namedFlavor("light"), {lang: "en"}) (MapLibre). light and dark are both named flavours (flavors), so the theme switch is a flavour switch.
  • With lang: "en" a Greek place with no name:en can still fall back to its Greek name. To guarantee Latin labels, ui#760 gives the symbol layers a text field of name:en, else name only when script is absent, and drops the rest. Small places with no English name then go unlabelled, which is the price of a Latin-only map. OpenMapTiles' name:latin is read straight from the OSM tag (schema), so it gains nothing here.

GADM lines

  • The backbone already serves simplified GADM outlines: GET /v1/admin-boundaries/geometry takes level 0 to 2, a bbox and a zoom, and returns a bare GeoJSON FeatureCollection with source, version, license, citation, source_url on each feature (src/climate_lama/api/v1/admin_boundaries.py:77), the D16 admin-boundary endpoint.
  • ui#760 draws it as a GeoJSON line layer over the basemap, inserted before the first label layer so place names stay on top. The Protomaps boundaries layer (kind country, region, county, locality, kind_detail the minimum OSM admin_level, layers) is hidden below country level so the two sets of lines never double.
  • GADM terms: "Redistribution or commercial use is not allowed without prior permission" (GADM licence). This spike adds no new GADM surface, it reuses the route ADR-031 and D16 already cover, and ADR-031's follow-up ("obtain GADM's written permission or swap the source") still governs. The recorded fallback is geoBoundaries, CC BY 4.0, credited as "geoBoundaries" with a link (geoBoundaries).

May prod keep tile.openstreetmap.org?

The OSM Tile Usage Policy allows a web map that shows attribution, sends a Referer and does not prefetch. Two clauses decide it:

"Offline use is not permitted on tile.openstreetmap.org."

"Commercial services, or those that seek donations, should be especially aware that access may be withdrawn at any point"

The policy also says "Availability is best-effort: there is no SLA or guarantee" and "We may block access, without notice, if your usage degrades the service." So prod may keep OSM raster as the opt-in Streets entry SH-2 asks for, with today's attribution, but it may not be the default of an offline-capable product, and nothing may prefetch it.

Satellite imagery

Question (K17). MapTiler free tier with a key, or Esri World Imagery, under their terms.

  • EOX Sentinel-2 cloudless is excluded. Its licence page names CC BY-NC-SA 4.0 for non-commercial use and requires a separate "EOX Commercial Attribution-RestrictedUse 1.2 License" for commercial use (EOX licence).
  • MapTiler Free is "Suitable for testing, PoC, prototyping, personal, or non-commercial use", gives 5k sessions and 100k API requests a month, and "On a FREE plan service will pause until the next month without an upgrade to paid plans". It also needs the MapTiler logo on the map (pricing). Attribution is "© MapTiler" and "© OpenStreetMap contributors" (copyright). Its raster template is https://api.maptiler.com/tiles/satellite-v4/{z}/{x}/{y}?key=<key> (tiles API).
  • Esri World Imagery through an ArcGIS Location Platform account. "ArcGIS Location Platform comes with a commercial deployment license", and the monthly free tier includes 2,000,000 basemap tiles (help), then "$0.15 per 1,000 tiles" (pricing). Esri's own MapLibre tutorial uses the template below with a token, and requires a Location Platform account, not ArcGIS Online (tutorial). [ASSUMPTION] service pauses at the free tier unless pay-as-you-go is switched on, which caps the bill at zero.
  • The keyless server.arcgisonline.com endpoint still answers without a token, but Esri's MapLibre guidance (above) uses the keyed ibasemaps-api host, whose metadata answers "Token Required." without one (curl …/World_Imagery/MapServer?f=json, 2026-10-08). [ASSUMPTION] the keyless host carries no licence for a third-party app, so prod uses the keyed host.

Choice: Esri World Imagery. It is the only one of the two whose free tier allows a commercial deployment, and it is 256 px JPEG (tileInfo rows 256, cols 256, format JPEG, read from the service metadata), which rasterStyle()'s fixed tileSize: 256 draws unchanged.

Exact tile template (note the {y}/{x} order of an ArcGIS MapServer):

https://ibasemaps-api.arcgis.com/arcgis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}?token=<ARCGIS_API_KEY>

Exact attribution string for VITE_SATELLITE_ATTRIBUTION. MapLibre adds neither part itself, so the app appends "Powered by Esri" and the layer's copyrightText, separated by " | " (interactive maps). The copyrightText read from the World Imagery service on 2026-10-08 is used verbatim:

Powered by <a href="https://www.esri.com">Esri</a> | Source: Esri, Vantor, Earthstar Geographics, and the GIS User Community

[ASSUMPTION] the keyed host carries the same copyrightText as the public one it was read from. Esri asks that attribution be re-checked periodically, so ui#761 notes the read date.

The credential item it needs: credential:VITE_SATELLITE_TILES. The template above with a real key, set with gh secret set VITE_SATELLITE_TILES -R CortoMaltese3/climate-lama-ui, which ui#761 passes into publish.yml's build args. The key itself is the ops tracker climate-lama-ui#856, out of scope here. Two facts for that item, both from Esri's API key guide:

  • A build key is visible in the bundle and in every tile request, so the key is restricted by referrer: "You can also set referrers on an API key, which restrict the key to only be usable from authorized domains." The referrer is prod's UI origin.
  • "API keys are valid for up to one year", so the item is renewed at least yearly. The guide lists the basemap privileges (premium:user:basemaps, premium:user:staticbasemaptiles). [ASSUMPTION] which one unlocks World_Imagery/MapServer is confirmed when the key is made.

Terrain

Question. May the AWS Terrain Tiles (Terrarium) at s3.amazonaws.com/elevation-tiles-prod serve prod's DEM under their data licences, and with what attribution line?

  • The Registry of Open Data on AWS lists the bucket arn:aws:s3:::elevation-tiles-prod (us-east-1, plus an EU replica elevation-tiles-prod-eu in eu-central-1), "No AWS account required", managed by Mapzen, a Linux Foundation project. Its License field points to the attribution doc.
  • The Terrarium template is https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png, 256 px, to z15 (use-service). Terrarium decodes as (red * 256 + green + blue / 256) - 32768 metres (formats), which is MapLibre's encoding: "terrarium".
  • Data licences per source (attribution doc): SRTM, GMTED2010, 3DEP and ETOPO1 are public domain. EU-DEM carries a required credit. Canada (OGL Canada), UK (OGL v3), Norway and Australia (CC BY 4.0), New Zealand and Austria (CC BY 3.0) need attribution only. None is non-commercial or share-alike. EU-DEM is Copernicus data under "full, open and free access", where users "shall inform the public of the source" (CLMS data policy). [ASSUMPTION] that covers commercial display, as the page does not say so in words.
  • Which sources prod actually draws, from each tile's x-amz-meta-x-imagery-sources header on 2026-10-08: Larissa 12/2303/1555 and 10/575/388 come from eudem/…n35e020.tif, Nicosia 12/2427/1620 from eudem/…n35e030.tif, and 6/36/24 from GMTED plus ETOPO1. The bucket answers Access-Control-Allow-Origin: *, so browsers can fetch it directly.
  • One usage note, not a licence term: "The S3 tiles are meant for efficient networking with EC2 resources only", and they are "not cached using Cloudfront, but you could put your own Cloudfront or other CDN in front of them" (use-service). [ASSUMPTION] prod's traffic is small enough to fetch direct, and prod's reverse proxy can cache the path later without a UI change, since the template is a build key.

Answer: yes, prod may use the Terrarium tiles under their data licences. The attribution doc says "you are responsible for researching each project to follow their license terms" and lists these lines, which the full credit reproduces (Settings, Appearance, Map providers):

  • Europe terrain data produced using Copernicus data and information funded by the European Union - EU-DEM layers
  • United States 3DEP (formerly NED) and global GMTED2010 and SRTM terrain data courtesy of the U.S. Geological Survey
  • Global ETOPO1 terrain data U.S. National Oceanic and Atmospheric Administration
  • Canada, UK, Norway, Australia, New Zealand, Austria, Mexico and ArcticDEM lines as in the doc

The map's VITE_TERRAIN_DEM_ATTRIBUTION names the sources that cover the product's maps and links the full list:

Terrain: <a href="https://github.com/tilezen/joerd/blob/master/docs/attribution.md">Mapzen Terrain Tiles</a>, EU-DEM produced using Copernicus data and information funded by the European Union, GMTED2010 and SRTM courtesy of the U.S. Geological Survey, ETOPO1 by U.S. NOAA

[ASSUMPTION] the short line plus the link satisfies the CC BY and OGL sources, which never draw inside Greece or Cyprus.

Recommendation

  • Street: Protomaps basemap as a Greece and Cyprus PMTiles extract (light and dark flavours, Latin-only labels, backbone GADM lines on top) over tile.openstreetmap.org raster and OpenMapTiles via Planetiler — ODbL Produced Work with a CC0 design and no extra credit, servable offline from our own origin, while the OSM tile policy forbids offline use and may withdraw access — reversed by CortoMaltese3/climate-lama-ui#760
  • Satellite: Esri World Imagery via an ArcGIS Location Platform API key (credential:VITE_SATELLITE_TILES) over MapTiler Free — Esri's free tier carries a commercial deployment licence and 2M tiles a month, while MapTiler Free is non-commercial, logo-bound and pauses on overrun, and EOX is CC BY-NC-SA — reversed by CortoMaltese3/climate-lama-ui#761
  • Terrain: AWS Terrain Tiles (Terrarium, s3.amazonaws.com/elevation-tiles-prod) over a self-built DEM — public-domain and attribution-only sources, EU-DEM over Greece and Cyprus, CORS open, no key — reversed by CortoMaltese3/climate-lama-ui#761

Sources

All fetched or run on 2026-10-08.

  • https://operations.osmfoundation.org/policies/tiles/
  • https://www.openstreetmap.org/copyright
  • https://osmfoundation.org/wiki/Licence/Attribution_Guidelines
  • https://github.com/protomaps/basemaps
  • https://github.com/protomaps/basemaps/tree/main/tiles
  • https://docs.protomaps.com/basemaps/downloads
  • https://docs.protomaps.com/basemaps/localization
  • https://docs.protomaps.com/basemaps/flavors
  • https://docs.protomaps.com/basemaps/maplibre
  • https://docs.protomaps.com/basemaps/layers
  • https://docs.protomaps.com/pmtiles/cli
  • https://docs.protomaps.com/pmtiles/maplibre
  • https://build-metadata.protomaps.dev/builds.json
  • https://github.com/onthegomap/planetiler
  • https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md
  • https://openmaptiles.org/schema/
  • https://www.naturalearthdata.com/about/terms-of-use/
  • https://download.geofabrik.de/europe/greece.html
  • https://download.geofabrik.de/europe/cyprus.html
  • https://planet.openstreetmap.org/pbf/
  • https://gadm.org/license.html
  • https://www.geoboundaries.org/
  • https://cloudless.eox.at/documentation/license
  • https://www.maptiler.com/cloud/pricing/
  • https://www.maptiler.com/copyright/
  • https://docs.maptiler.com/cloud/api/tiles/
  • https://location.arcgis.com/help/
  • https://location.arcgis.com/pricing/
  • https://developers.arcgis.com/maplibre-gl-js/maps/raster-tile-basemaps/display-multiple-basemap-layers/
  • https://developers.arcgis.com/documentation/esri-and-data-attribution/interactive-maps/
  • https://developers.arcgis.com/documentation/security-and-authentication/api-key-authentication/tutorials/create-an-api-key/location-platform/
  • https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=json
  • https://registry.opendata.aws/terrain-tiles/
  • https://github.com/tilezen/joerd/blob/master/docs/attribution.md
  • https://github.com/tilezen/joerd/blob/master/docs/use-service.md
  • https://github.com/tilezen/joerd/blob/master/docs/formats.md
  • https://land.copernicus.eu/en/data-policy