Posters from licensed sources only: kept layers, options, credits on every picture #8

Merged
mesh-tools merged 17 commits from feat/poster-layers into master 2026-11-27 14:39:52 +00:00
17 Commits
Author SHA1 Message Date
jschoubben f5257d67bb Join the picker's review-round-1 fixes
Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
2026-11-27 15:35:58 +01:00
jschoubben f8d3083fb4 Show the satellite sources' credits as the service draws them
The picker showed shorter PDOK and USGS credits than the design's lines; it now shows them word
for word, as it does IGN's and EOX's. A season photo dated by its category says so on its card,
and a candidate with no date gives no entry, since the service refuses one.

Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
2026-11-27 15:35:42 +01:00
jschoubben 1cefc6dd52 Keep asked-for texts clear of the credit band; answer review round 1
At 400 to 640 px the credit band, held to 12 px after scaling, covered the date, the circuit line, the session
label and the season's subtitle. The band is now laid out first and every bottom text, the photo inset and the
poster's dark band are lifted by as much as it would cover them, which at full size is nothing, so classic draws
as before; the bottom checker is drawn last again, over the track's end. A first render now draws from the layer
as kept, so it matches every later render of its key, and the ETag is weak all the same. A Commons file's SHA-1
is kept beside the layers and asked once, so photo pictures need no Commons request after a restart. The USGS
credit carries no prefix, and /licences names a layout switched to the map among OpenStreetMap's uses.

Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
2026-11-27 15:34:38 +01:00
jschoubben f96db9f4ac List the candidates again, every season photo dated
The run of 2026-11-27 (892 requests) changed 8 season candidates and nothing else: each had no
date of its own and now takes its season's year from its category (1969 twice, 1973, 1981, 1989,
1991, 2003, 2008). 31 of 122 layouts and 77 of 77 seasons still have a candidate.

Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
2026-11-27 15:34:22 +01:00
jschoubben 58ac9472d0 Date an undated season photo by its season
A photo filed under "<year> Formula One season cars" is of that season, and the service refuses
a pick without a date: a season candidate whose file gives none takes the season's year, marked
"date_from": "category". An undated layout candidate still stays out.

Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
2026-11-27 15:30:31 +01:00
jschoubben d32e57ec41 Write the operator's decisions and the lead's answers into the design
Since the first draft: Commons photos left bg=satellite for an explicit
bg=photo; EOX's 2016 mosaic was rejected for the newest; IGN takes its
frozen 2021-2023 mosaic; a layout can be switched to the map; photo
treatments are natural (default) or bw; a picture's licence follows its
sources; and the builders' questions (presets per frame, placement, dim,
season options, the picks' key and shape, header folding, the smallest
width) are answered where they belong.

Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
2026-11-27 15:21:24 +01:00
jschoubben 812b01b9dd Join the photo picker and the example pages into the poster layers
Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
2026-11-27 15:20:34 +01:00
jschoubben 445235ca58 Show bg=photo apart from bg=satellite, on the service's layers
The operator, after seeing real posters: EOX's 2016 mosaic is rejected, and a layout's Commons
photo now serves only an explicit bg=photo, which falls back to what bg=satellite draws. The
picker therefore puts the satellite-or-map choice first, per layout, on the layers the service
uses (PDOK HR, IGN's frozen BD ORTHO 2021-2023, USGS, EOxCloudless 2025), and offers the photos
as optional for bg=photo. One picks entry may carry a photo, "use": "map", or both, and each
choice keeps the other half. The builder and the posters page offer bg=photo; width starts at
400; the licences page sets the options in "used for" as code.

Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
2026-11-27 15:20:09 +01:00
jschoubben 4362e2d10b Draw a picked photo only with bg=photo, keep bg=satellite to aerial imagery
The operator judged the Commons-photo poster unfit as a default: its crop lands beside the circuit and shows the
track only as an inset. bg=satellite is now the national aerial photo, else EOxCloudless (or the dark map where
"use": "map" is set); the new bg=photo draws the layout's picked photo and without one falls back to what
bg=satellite draws. A picks entry may hold the photo fields, "use": "map", or both; an unknown use and incomplete
photo fields are refused at load. The smallest width is 400 px so the full credit line stays readable, and the
ASCII credit header spells out ß, æ, ø, œ and đ so names stay readable.

Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
2026-11-27 15:18:09 +01:00
jschoubben d514eb57a3 Name an unknown circuit, layout or year with a 404 instead of a 500
The circuit and track routes walked circuits.json with chained lookups, so an unknown country, locality, circuit
or layout, or a year no layout covers, raised and answered 500 (/circuits/photos.json among them). One lookup now
names the first unknown part and the API answers it 404. numpy loads only where a script uses it, so the models,
and this lookup's test, need the standard library alone.

Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
2026-11-27 15:13:34 +01:00
jschoubben db5c19f0d4 Draw posters from kept layers of licensed sources, credited on every picture
Esri's, Bing's and Google's terms forbid keeping or serving pictures made from their maps, so the posters move to
sources whose licence allows a kept copy: a picked Wikimedia Commons photo, USGS, PDOK and IGN's frozen 2021-2023
mosaic by country, else EOxCloudless's newest mosaic, and OpenStreetMap for the maps and the locator. What needs
the network is a layer fetched once and kept whole in layers/; texts, colours, size and format are drawn on every
request, and finished pictures are kept in posters/ up to 2 GB. Every picture carries its sources' credit line,
X-Credits, X-License (which follows its sources) and a link to /licences. Options are checked into a named 422;
the Kometa file states Jolpica's licence and versions its addresses so clients keep them for good. A layout whose
trace is a point (Madring) is drawn at the circuit's location instead of failing.

Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
2026-11-27 15:13:29 +01:00
jschoubben 4a9bd4464b Let the picker keep a layout's satellite or give it the map instead
EOX's newest mosaic suits some circuits and not others (the operator, 2026-11-27). Beside a
layout's Commons candidates the picker now frames its trace on what bg=satellite draws without
a photo: the country's own aerial photo (PDOK, IGN, USGS) and EOxCloudless (2016 for a layout
raced in or before 2016, else 2025), with each picture's licence, and the service's own poster
on request. "Keep the satellite" means no entry; "use the map instead" gives {"use": "map"},
from which the service draws the dark map for that layout.

Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
2026-11-27 15:13:20 +01:00
jschoubben c3c98a9a74 Show the map's satellite layer from EOxCloudless, not Esri
docs/posters.md drops Esri as a source: its terms forbid how this site uses it. The GPS-trace map
now takes its satellite layer from EOX's newest Sentinel-2 mosaic, the posters' own fallback,
credited and licensed (CC BY-NC-SA 4.0) in the map's corner; the scale moves to the top left so
the two-line credit does not cover it.

Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
2026-11-27 15:07:10 +01:00
jschoubben 49a2ebcf15 Add the photo picker, poster builder and licences pages
A pick is a repository edit, so the picker shows the Commons candidates cropped to the poster's
frame, natural or bw as the service treats them, beside the picks of the circuit's other
layouts, and gives the entry to copy (the picks file's "$comment" kept first). The builder sends
every option of docs/posters.md as a query parameter, renders only on request and shows the
answer's X-Credits and X-License. The licences page shows /licences: each source, its credit and
the licence a picture made from it gets.

Every page now carries the Formula 1 disclaimer at its foot, as F1's guidelines ask of an
unofficial site, and the posters page lists the backgrounds the design keeps (no Esri).

Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
2026-11-27 15:04:38 +01:00
jschoubben d087b8a4f3 List the Commons candidates for the photo picker
Made by tools/commons_candidates.py on 2026-11-27 with 892 requests: 31 of 122 layouts and
77 of 77 seasons have at least one candidate; 91 layouts have none, mostly layouts raced
before 1980.

Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
2026-11-27 15:01:59 +01:00
jschoubben ab9e141cdf Add a tool that lists the Commons photos a poster may use
The posters take an aerial photo per layout and a car photo per season only from Wikimedia
Commons files under CC0, public domain, CC BY or CC BY-SA (docs/posters.md, "Picking photos").
The tool reads each file's licence, author, credit, date and quality marks from the API, keeps
only aerial photos dated within a layout's years, ranks quality marks, size and landscape first,
and keeps Commons' rules: a descriptive User-Agent, one request at a time, at most five a second.

Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
2026-11-27 14:57:55 +01:00
jschoubben 4f00403e13 Design the posters: licensed sources, kept layers, options, credits
Decided with the operator on 2026-11-27 after reading every source's
terms: Esri (and Bing, Azure, Google, Mapbox, MapTiler) do not allow
keeping or serving images made from their maps, so satellite pictures
come from picked Commons photos, national open aerial photos and
EOxCloudless, maps from OpenStreetMap. Heavy layers are fetched once and
kept; options are drawn on the fly; every picture carries its sources'
credits. The design lives in docs/posters.md.

Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
2026-11-27 14:37:13 +01:00