Commit Graph
26 Commits
Author SHA1 Message Date
ulihhhhandClaude Opus 5.5 93ea088f45 docs(gbfs): note that overflow bikes can exceed dock capacity
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 22:33:57 +01:00
ulihhhhandClaude Opus 5.5 42e45e8fbe docs(changelog): add the Spanish city bike systems entry
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 22:33:57 +01:00
ulihhhhandClaude Opus 5.5 5508caa174 docs: credit and document the Spanish city bike systems
- dataCredits `gbfs`: names the seven PBSC operators, with BiciMAD's
  required "Powered by EMT de Madrid" linking to emtmadrid.es.
- dataCredits `jcdecaux-gbfs`: adds Valenbisi and Sevici.
- DATA_SOURCES.md: a BiciMAD row (Madrid's open-data catalogue publishes
  the feed under EMT's terms, attribution required), one row for the other
  six PBSC feeds (no licence published; attribution to the operator), and
  the JCDecaux row widened to Valencia and Seville.
- CURRENT-STATE.md: the Bikeshare row, and the underscore and
  geofenced-capacity rules in "GBFS upstream bounds".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 22:33:57 +01:00
ulihhhhandClaude Opus 5.5 23df776374 feat(bikeshare): add nine Spanish city bike systems
Adds the station-based public bike systems of seven Spanish cities on
PBSC and two on JCDecaux, 1,843 stations in all (live feeds, 2026-10-17):

- PBSC (`<city>.publicbikesystem.net`, GBFS v2 like Bicing): BiciMAD
  (Madrid), Bizi Zaragoza, BIKI (Valladolid), BiciCoruña, Dbizi
  (Donostia-San Sebastián), Bilbao Bizi and BicinRivas (Rivas-Vaciamadrid).
- JCDecaux (`api.cyclocity.fr/contracts/…`, like Lillestrøm): Valenbisi
  (Valencia) and Sevici (Seville).

Both hosts are already allowed by the proxy. Every system uses a 40 km
load radius; the farthest station is 11.7 km from its centre (BiciMAD).
The radius also keeps out what two feeds list away from their city:
Sevici's workshop at (0,0) and lab in Madrid, and BiciCoruña's planned
stations with no position yet.

spainCitiesSystems.test.mjs checks the registry and proxy for each feed,
that the outermost live stations activate their system and sit inside
its radius, that central Madrid activates BiciMAD and BicinRivas, that
the far-away stations are not loaded through the real ingestion path,
and that JCDecaux names arrive without underscores and PBSC capacities
as docks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 22:33:57 +01:00
ulihhhhandClaude Opus 5.5 53cda29be4 fix(gbfs): count docks, not PBSC's geofenced area, as station capacity
PBSC adds the bikes a station accepts in the geofenced area around its
docks to `capacity`, and reports that part as `geofenced_capacity`, which
is not a GBFS field. Bilbao Bizi publishes 39 docks as capacity 839 with
geofenced_capacity 800, so its stations would read as nearly empty: red,
drawn at maximum size, and carded "39 avail · 0 docks · 839 cap".
BiciMAD (671 of 678 stations, about twice the docks) and Dbizi (11 of 70)
do the same.

The shared parser now reads `capacity − geofenced_capacity` when the
extension is present and no larger than the total, so the layer, its
colour ratio and get_bike_share all see the docks. No registered system
changes: none of the 52 publishes a geofenced capacity above 0 (live
feeds, 2026-10-17, all 13,397 capacities identical).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 22:33:57 +01:00
ulihhhhandClaude Opus 5.5 ee686a3207 fix(gbfs): read underscores in station names as word breaks
JCDecaux's Spanish contracts prefix every station name with "_", and
Valenbisi joins its words with it ("_PLAZA_MUSICO_LOPEZ_CHAVARRI"), so
the card and HUD would show the raw identifier. The shared parser now
reads a run of underscores, with the spaces around it, as one word break
and trims the ends. It applies to `name`, the `short_name` fallback and
GBFS v3 localized names, so the layer and get_bike_share both read it.

No registered system changes: run over all 52 live station_information
feeds on 2026-10-17, the old and new parsers give identical names for
all 13,397 stations. Other spacing stays as the operator published it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 22:33:57 +01:00
ulihhhhandClaude Opus 5.5 dec79b6fcf test(bikeshare): pin the Barcelona load radii to their outermost stations
The map range check floors every radius at 100 km, so the station test
passed with any loadRadiusKm up to that. get_bike_share uses the radius as
registered, so assert each system's radius reaches the stations it lists.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 12:25:44 +02:00
ulihhhhandClaude Opus 5.5 194595e1b6 feat(bikeshare): add Barcelona's Bicing and AMBici
- Bicing (543 stations, PBSC) and AMBici (237 e-bike stations across the
  metropolitan area, nextbike) join the GBFS registry from the operators'
  keyless GBFS 2.3 feeds, both listed in MobilityData's systems catalogue.
- gbfs.nextbike.net joins the proxy allowlist as an exact host.
- Credits, DATA_SOURCES, CURRENT-STATE and CHANGELOG updated; a test pins
  each system's proxy reachability and the range check for its outermost
  stations.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 10:54:58 +02:00
ulihhhhandClaude Opus 5.5 da0a840b7b Merge upstream/main into feature/catalonia-cctv-cameras
Keep both: Catalonia CCTV alongside the NYC DOT TMC pack in the source
imports, README layer table and CURRENT-STATE data table, and both
CHANGELOG entries.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 10:09:28 +02:00
ulihhhh b57f2ded7f Merge remote-tracking branch 'upstream/main' into pr595-sync
# Conflicts:
#	README.md
2026-10-14 10:14:36 +02:00
ulihhhh e571f5ace1 Merge remote-tracking branch 'upstream/main' into feature/catalonia-cctv-cameras 2026-10-13 10:19:02 +02:00
ulihhhhandClaude Opus 5.5 492ecb4849 docs(cctv): state that offline Catalonia cameras show the publisher's still
The Catalonia feed has no camera status field, so an offline camera keeps
its catalog entry and SCT or Barcelona answer its frame with their own
"image unavailable" still (HTTP 200). Say so in DATA_SOURCES.md and stop
the loader comment from implying every camera returns a live frame.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-12 13:07:54 +02:00
ulihhhhandClaude Opus 5.5 97492e28fe docs: list the Catalonia pack under Unreleased and in the README
The changelog entry sat below the 0.2.0/0.2.1 release headings after those
were cut; move it to [Unreleased] beside the Norway pack. Name Catalonia in
the README's CCTV Mesh row the way the other packs are listed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-12 13:04:55 +02:00
ulihhhh fef7878e54 Merge remote-tracking branch 'upstream/main' into feature/catalonia-cctv-cameras 2026-10-12 12:29:16 +02:00
ulihhhh 9ba7cee021 Merge remote-tracking branch 'upstream/main' into feature/catalonia-cctv-cameras
# Conflicts:
#	.env.example
#	DATA_SOURCES.md
#	docs/CURRENT-STATE.md
#	scripts/format-scope.json
#	server/providers/cctv/constants.js
#	server/providers/cctv/sources.js
#	src/data/dataCredits.js
2026-10-06 20:25:00 +01:00
ulihhhh 3bae92fce7 Merge upstream/main into feature/catalonia-cctv-cameras
# Conflicts:
#	docs/CURRENT-STATE.md
2026-09-29 10:08:59 +02:00
ulihhhhandClaude Opus 5.5 320a1d6bfd fix(cctv): harden the Catalonia catalog fetch and frame-link allowlist
Address review feedback on #595:

- Reject frame links carrying userinfo (user:pass@) in
  normalizeCataloniaImageUrl, so catalog data cannot inject credentials
  into the server-side frame request on an allowlisted host.
- Fetch cameres.xml over https (verified: same 200 body, no redirect),
  refuse redirects with the unread body released, and read the body
  through readResponseTextCapped with a 1 MiB CATALONIA_MAX_CATALOG_BYTES
  cap instead of an unbounded resp.text().
- Add regression tests for userinfo links on every allowed host, the
  refused redirect, and declared and streamed oversize bodies.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-27 12:01:17 +02:00
ulihhhh 21a86c05bd Merge upstream/main into feature/catalonia-cctv-cameras 2026-09-25 12:01:51 +02:00
ulihhhhandClaude Opus 5.5 b27e8a35c8 Merge upstream/main into feature/catalonia-cctv-cameras
Keeps PR #595 current with #730-#743. Clean merge, no conflicts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-24 10:50:18 +02:00
ulihhhh 5b4931572a Merge upstream/main into feature/catalonia-cctv-cameras
Keeps PR #595's Catalonia CCTV pack in sync with upstream's DelDOT
CCTV pack (#699) and the wind/weather doc updates from #617. The
sources.js conflict was a false positive from git's line-based diff
interleaving two structurally similar but independent loader
functions (loadCataloniaSourcesFromOpenData / loadDelDOTSourcesFromOpenData);
resolved by keeping both as complete, separate functions.

Full unit suite passes (4743/4743, 1 pre-existing Node-version skip).
2026-09-23 12:12:58 +02:00
ulihhhh f7291715bd Merge remote-tracking branch 'upstream/main' into feature/catalonia-cctv-cameras 2026-09-22 10:43:12 +02:00
ulihhhh 49a322519a Merge remote-tracking branch 'upstream/main' into feature/catalonia-cctv-cameras
# Conflicts:
#	CHANGELOG.md
2026-09-21 19:00:01 +02:00
ulihhhh 7a3af0c129 Merge upstream main into feature/catalonia-cctv-cameras to resolve PR #595 conflicts
# Conflicts:
#	CHANGELOG.md
2026-09-17 12:11:10 +02:00
ulihhhhandClaude Sonnet 5 25f90692cf Merge upstream main into feature/catalonia-cctv-cameras to resolve PR #595 conflicts
Upstream added Director, Transit/GTFS-Realtime and Bhote Koshi scene work
in the same window; the only real conflict was two adjacent CHANGELOG
entries, resolved by keeping both.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-16 10:34:16 +02:00
ulihhhhandClaude Sonnet 5 ffbe98b4ac test(format-scope): register cctvCataloniaSource.test.mjs for format:check
Mechanical addition per CONTRIBUTING.md, following the existing per-pack
test-file entries (cctvCalgary.test.mjs, cctvNswSource.test.mjs, etc.).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-15 18:07:40 +02:00
ulihhhhandClaude Sonnet 5 ae661db7ab feat(cctv): add Catalonia (Servei Català de Trànsit) as a keyless CCTV source pack
One WFS/GML XML feed (~135 cameras) aggregating three publishers under a
`font` field: SCT's own highway cameras plus hotlinked Barcelona (IMI) and
Terrassa municipal cameras. Frame URLs are checked against a small host
allowlist rather than one pinned origin, and every non-SCT camera carries
its real owner as a `credit` shown beside the shared provider. The feed
carries no compass heading, so every camera loads at low heading confidence
(same as TfL and Fintraffic), and ground elevation is primed per publisher
rather than one flat prior.

SCT's own frame link needed a workaround: RenderService always 302s to a
second endpoint (TransitCamera) on a Location the upstream hardcodes as
plain http even when requested over https — refused by fetchWithinHost's
same-origin (scheme-included) redirect policy, by design (stops an upstream
steering a host-pinned request into a plaintext downgrade). Separately,
mct.gencat.cat's TLS setup fails the handshake with Node's fetch outright
(ERR_SSL_WRONG_SIGNATURE_TYPE) even though other HTTP clients complete it.
The loader builds the TransitCamera URL itself, over plain http, from
RenderService's sctidcam id, instead of registering the broken upstream
link — the only transport this host actually serves to this runtime.

Verified against the live feed and the production fetch path
(fetchCctvImageFromUpstream): all 135 cameras return real image bytes, 0
false positives. Ambient-card refresh cadence added to src/data/cctvLod.js
(3 minutes), matching the upstream update rate measured empirically (no
change inside 64s, changed within ~90-150s) — the same cadence already used
for Caltrans/TfL/Ontario/TxDOT.

CCTV_CATALONIA_MAX_SOURCES sets the cap and CCTV_CATALONIA_ENABLED=0 turns
the pack off. No overlap with any existing pack (checked catalog.js and the
git history for Spain/Catalonia/Barcelona coverage: none exists).

Verified before this commit: format, check:boundaries, unit suite (3692
tests), and build all green.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-15 18:07:40 +02:00