尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證One live map of everything moving through Boston - MBTA trains, buses, ferries, Amtrak, planes, and harbor traffic
翻譯準備中
正在載入完整 README。
檢視完整 README ↗One live map of transportation moving across Connecticut, Maine, Massachusetts, New Hampshire, Rhode Island, Vermont, New York, and New Jersey, plus the Philadelphia, Washington, Chicago and San Francisco Bay metro areas. Start with Greater Boston (the 128 cities and towns inside I-495), narrow to the 17-municipality MBTA core, pick one of 33 named regions such as the North Shore, Cape Cod & Islands, the Pioneer Valley, the Northeast Kingdom, Midcoast Maine, New York City, Long Island, the Hudson Valley or North Jersey, switch to a single state, zoom out to all New England, or to the whole Northeast.
New York and New Jersey cover transit first: MTA subway, Metro-North, LIRR, buses and ferries live, with NJ Transit rail, PATH and NY Waterway schedules. The four metro areas are newer still: each is its own top-level region (county-built boundaries) with its agencies' schedules in the built snapshot and live positions from every keyless feed (SEPTA, MARC, VRE, Fairfax Connector, DASH, Pottstown, Emery Go-Round). Metrorail, Metrobus, CTA, Metra and the Bay Area's 511 operators go live once their free keys are set; docs/api-keys.md lists each key, where to get it and what it unlocks. The road, aviation-reference, infrastructure and place layers below are still built for the six New England states only (see Remaining data gaps).
The map combines live and scheduled public transportation, aircraft, boats, shared mobility, traffic, road events, public traffic cameras, major roads, freight rail, and walking/cycling networks. Live points are clipped to generalized U.S. Census TIGERweb boundaries, so Greater Boston, the MBTA core, every named region, each state, and “All New England” are geographic filters rather than agency-name guesses. Every feature is labeled live, estimated, scheduled, or reference so a published route never masquerades as a moving vehicle.
| Layer | Source | Cadence |
|---|---|---|
| MBTA subway, Silver Line, buses, commuter rail, ferries | MBTA V3 API | 10 s |
| Regional buses | Agency GTFS-realtime feeds, plus public Trillium map JSON for Advance Transit, MOOver, RCT, and Tri-Valley, normalized by the gateway | 20 s |
| Peter Pan coaches | Peter Pan public tracker. One dot per GPS fix; a fix older than 20 minutes is dropped | 30 s |
| Metro-North (Hudson, Harlem, New Haven and branches) and the Long Island Rail Road | MTA GTFS-Realtime train GPS positions, trip predictions, and alerts; a train with no fresh GPS fix is estimated between stations and labeled so | 30 s |
| New York City Subway and Staten Island Railway | The eight MTA GTFS-Realtime subway feeds plus alerts. The feeds carry no GPS: each train is placed between the station it reports and the previous one on its line using typical scheduled segment times, wears its official line color, and is always labeled estimated | 20 s |
| New York buses and ferries | MTA Bus Time vehicle positions for every NYCT and MTA Bus route, joined to the six borough schedules, NYC Ferry, NY Waterway (Hudson crossings to New Jersey), TCAT Ithaca, CDTA and Suffolk County Transit GTFS-realtime | 20 s |
| Scheduled/reference bus, rail, ferry, boat, and air-service routes and stops | 114 GTFS sources plus 81 official-service corridors, including Amtrak (now with the Empire, Keystone, Adirondack, Maple Leaf and long-distance services through New York and New Jersey), Metro-North, LIRR, the NYC Subway, NJ Transit rail and light rail, PATH, Shore Line East, regional coaches, university shuttles, ferry routes, municipal water shuttles, small-island lifelines, island air taxis, and scheduled stops | built snapshot |
| Small-town, county, flex, volunteer, microtransit, and on-demand water-service catalog | 55 official-directory service markers across all six states, including MBTA The RIDE and Provincetown and Cape Ann whale watches | built snapshot |
| Taxi and cab services | 106 licensed cab companies, dispatch associations, and official airport and station taxi stands from state and municipal licensing lists, airport ground-transportation pages, and operator sites, plus 30 taxi stands. A directory, not live cab positions |
The aircraft layer no longer calls airplanes.live. That service now rejects this project with HTTP 403, and ADS-B providers do not expose browser CORS headers. The server-side aircraft relay fixes both problems without weakening browser security, fails over from ADSB.lol to adsb.fi, and uses CDN stale- while-revalidate caching to keep the last good positions during a provider interruption.
Aircraft origin and destination are resolved only after a plane is clicked. The lookup is a best-effort callsign match against ADSB.lol's route catalog; private, repositioning, and irregular flights may not have an itinerary.
The three aviation-conditions rows sit under Conditions next to airport delays
and start switched off; the Air preset turns them on. METARs come from one
AviationWeather.gov bounding-box query (the gateway sends the custom
User-Agent that service asks for, and its 5-minute edge cache keeps the map
far below the 100-requests-per-minute limit). TFR shapes come from the FAA's
TFR map service, which is undocumented and sends no cache headers, so the
gateway holds each answer for 5 minutes. Airspace is a static file rebuilt
from the FAA's ADDS feature services by scripts/build-airspace.py each
28-day cycle and downloaded only when its row is switched on. It is for
orientation: special-use areas are often active "by NOTAM", so always check
current charts and NOTAMs before flying.
Each aircraft's silhouette comes from the ADS-B emitter category it broadcasts: airliner (A3–A6), light aircraft (A1–A2), helicopter (A7), or a plain dart for gliders, balloons, drones and unknowns. Without a category the ICAO type code decides, and an unrecognized type keeps the airliner shape. An aircraft squawking 7500, 7600 or 7700, or reporting an emergency status, gets a red ring and a line in its card ("Squawking 7700 · general emergency"). Aircraft are clipped with the coastal (marine) boundary like vessels, so Logan approaches over the harbor stay on the map.
Privacy rules, applied in the relay and the page: owner/operator names are never relayed; registrations are withheld for aircraft in the FAA's PIA and LADD privacy programs; helicopters are shown by type only, without callsign, registration or hex. Nothing on the map singles out military or LADD aircraft.
The checked-in route snapshot contains more than 1,200 bus, commuter-rail, Amtrak, ferry, passenger-boat, and air-service route features plus more than 38,000 scheduled bus stops, ferry landings, T stops, and rail stations, assembled from 114 GTFS sources and 81 official-service corridors. Scheduled routes remain visible when an operator publishes no live positions. Every view except the MBTA core, Greater Boston, the North Shore, statewide Massachusetts and All New England starts with the scheduled bus layer on, and the sidebar reports scheduled route counts separately from live vehicles, so a missing realtime credential no longer makes service look absent. Rail and T stops are visible first, named ferry landings appear at harbor zoom, and tiny collision-aware bus-stop labels appear only at close street zoom. Every stop opens a source-attributed popup with its routes and published accessibility information.
Every region lives in one file, scripts/regions-config.json;
scripts/build-regions.py turns it into public/data/regions.geojson, and the
picker, the permalink, the route tags and the default layers all read from
there. The picker groups regions by state:
public/data/infrastructure.geojson and fails if the town list
drifts. MBTA core (key boston, formerly labelled Greater Boston):
Boston, Cambridge, Somerville, Brookline, Newton, Quincy, Braintree,
Chelsea, Everett, Revere, Malden, Medford, Arlington, Belmont, Watertown,
Milton, and Winthrop.Old links still open where they did: ?region=boston, a saved MBTA core
selection, and a shared hash with a camera but no r= all open the MBTA core.
Sub-regions ask the gateway for their parent state (the Upper Valley asks for
new-england) and clip the results in the browser, so the gateway still only
knows the eleven IDs listed under Gateway API.
The 3D chip beside the basemaps pitches the map, raises every building in
the CARTO basemap tiles to its recorded height (render_height from
OpenStreetMap), and draws the live vehicles as three.js
meshes in a MapLibre custom layer that shares the map camera and depth
buffer, so a bus passes behind a tower instead of over it. Trains, buses,
boats, bikes and aircraft each have their own shape; aircraft fly at their
reported altitude (capped at 3,000 m so cruising jets stay in frame); colors
and staleness match the 2D icons. Meshes are life-size at street zoom and
grow as you zoom out. The 2D vehicle icons are hidden while 3D is on, so
clicking a vehicle for its card is a 2D-mode action for now. three.js loads
only when the chip is first switched on. ?3d=1 opens a link in 3D.
Above the layer list, Default, Routes and Clear work as before.
The Show row switches on one kind of travel with the places that go with
it (Rail, Buses, Water, Air, Roads, Bike & walk, Disruptions, or All live).
The Scenes row sets a region and its layers in one tap: Boston commute,
Harbor watch, Islands by sea & air, Road trip, Maine islands, Providence,
Portland & Casco Bay, and CT shoreline rail. Presets live in src/model/presets.js as plain data; the
active preset stays highlighted until you change a layer by hand, and presets
whose layers all need the gateway are disabled rather than clearing the map.
The panel groups layers into Subway, Ground & rail, Air & water, Shared & active travel, Conditions & alerts (congestion, work zones, incidents, cameras, NWS weather alerts), and Movement infrastructure. Airport delays sit with the airports in Air & water. The map key (legend) lists the operators behind each layer.
Basemap, under Geography, switches between Dark (CARTO Dark Matter), Light
(CARTO Positron), Dark without labels, and Satellite (USGS Imagery Only, slightly
muted, with place names from CARTO Dark Matter). The panel stays dark on every
basemap. The choice is remembered, and ?basemap=light or ?basemap=satellite
opens it directly. Dark is the default and drops basemap from the URL.
Metro-North's New Haven, New Canaan, Danbury, and Waterbury lines are included
in Connecticut; connected routes are allowed to continue outside the selected
boundary so riders can see the full trip into New York City.
CTDOT's Shore Line East (New London–Old Saybrook–New Haven, with its Bridgeport
and Stamford through trips) comes from the Shore Line East agency inside
Amtrak's official GTFS. That agency publishes no track shapes, so its ribbon
follows the matching slices of Amtrak's published Northeast Corridor shapes
between Shore Line East stations and is labeled approximate. South Portland
Bus Service merged into Greater Portland METRO in December 2024; its routes 21,
24A, and 24B now come from METRO's feed, and the retired South Portland static
feed (last service 2025-10-05) is no longer built. The Current (Bellows Falls /
Brattleboro) ended service in 2022 and its area is covered by MOOver!, so it
is no longer listed.
Concord Coach's seven intercity routes use a community-maintained GTFS feed cataloged and continuously validated by Transitland. Greyhound and FlixBus use their current official U.S. GTFS feed; the build keeps only trip patterns that actually touch a New England state. Peter Pan Bus Lines uses the same New England-only trip filter on its Trillium-published GTFS, which keeps 34 of its 51 route patterns (Boston, Cape Cod, Providence, Worcester, Springfield, Hartford, the Berkshires, and their New York/Newark connections). That file is the carrier's last published schedule (feed version June 2024, nominal end date 2024-12-31), so Peter Pan ribbons are labeled scheduled corridors rather than a current timetable. Coaches that have reported to Peter Pan's public tracker in the last 20 minutes are also drawn live. Dartmouth Coach does not publish a discoverable GTFS feed, so its Upper Valley–Boston/Logan and Upper Valley–NYC corridors follow the stop order on the carrier's official schedules and link back to those schedules from the map popup. These intercity carriers are shown as schedules, not invented live vehicle positions, except for the Peter Pan coaches described above.
Small-system and campus coverage (September 2026 additions): Northeastern
Connecticut Transit District (5 routes) and Northwestern Connecticut Transit
District (6 routes) now publish static GTFS and draw as scheduled ribbons
instead of directory markers, as do Sullivan County Transportation in New
Hampshire (8 routes), Waldo Community Action Partners' Rockland and Belfast
DASH loops in Maine (2 routes), and Yankee Trails' Albany–Bennington line (1
route, kept only where it touches Vermont). University shuttles are drawn in the bus group and tagged
serviceClass: "campus": Harvard (3 drawn routes), MIT (7), Tufts (7), Boston
University (5), Boston College (13), UMass Boston (1), Brown (4), the
University of Rhode Island (3), Eastern Connecticut State University (3),
Quinnipiac (2), the University of Hartford (2), the University of New Haven
(4), Providence College (1), and Roger Williams University (6);
special-event, charter, and out-of-service patterns are filtered out. The
same tag covers the Longwood Collective's medical-area shuttles (14 routes)
and Mass General Brigham's hospital shuttles (24 routes, some of them marked
employees-only in their own route names) and the UConn Health campus shuttles
in Farmington (5 routes). EZRide, the Charles River TMA's public Cambridge
shuttle (3 routes), and Stamford's free Harbor Point Trolley (4 routes) are
drawn as ordinary buses. Nantucket WAVE is read from its own TransLoc GTFS
export rather than a catalog mirror, so its route ids match its live feed. Tri-County
Transit's North Country GTFS is reachable but its calendar ended on
2026-06-30, so its two flex routes stay directory markers until it is
re-published. In Aroostook County, ARTS's Saturday Star City Connector loop in
Presque Isle (2 route patterns) is drawn from the agency's Passio GTFS; the
rest of ARTS stays a demand-response marker. Cyr Bus Line's daily
Bangor–Caribou coach publishes no GTFS, so it follows the stop order on the
carrier's official schedule as a road-routed corridor, like Dartmouth Coach.
Winnipesaukee Transit System (Laconia, Gilford, Tilton, Franklin) publishes no
GTFS either and is listed as a directory marker.
C&J Bus Lines publishes only a two-trip GTFS stub, so its network is drawn from
the carrier's official timetables instead: Dover, Portsmouth, and Seabrook to
Boston South Station (about every two hours), to Logan Airport (every 30
minutes for most of the day), and non-stop to New York's Port Authority Bus
Terminal (two or three trips a day). The six C&J stops carry their street
addresses. Hand-built bus corridors can now list named stops in a stops
property and set roadRouteEveryLeg so that legs shorter than the usual 20 km
repair threshold also follow roads. The New York line reuses the map's
reviewed Boston–New York coach corridor, so it is drawn through Boston; C&J's
non-stop coaches may bypass downtown, and the popup says so. Go Buses' daily
Alewife–Riverside–New York coach (operated by Academy Bus) is drawn the same way
from the stops on the operator's site, with its own reviewed bus-safe controls
for the Riverside–Port Authority leg; it ends at Port Authority Gate 1, where it
moved on September 1, 2026.
Massport's GTFS draws the free on-airport shuttles and the five Logan Express
routes (Framingham, Braintree, Woburn, Danvers, Back Bay), each linked to its
own Massport page. Sixteen of its "stops" are bus announcements and timing
points that nobody can board or leave at ("Welcome to Logan", "Announcement
#1"); the feed opts into skip_non_boarding_stops, so they are not drawn.
"RF · Remote Framingham" is the Logan Airport Remote Terminal pilot, not a
public route: only ticketed Delta and JetBlue passengers ride it, after TSA
screening in Framingham, and it drops them inside security at Logan. Its popup
says so, and the terminal itself (19 Flutie Pass) is a reference point in the
Local & on-demand layer with hours, airlines, and the pilot's end date
(February 2027).
Vermont includes regional routes from every discoverable public GTFS source in
the current audit, including Green Mountain Transit, Vermont Translines, and
intercity Greyhound/FlixBus connections. Official Amtrak schedule data adds
the Vermonter and Ethan Allen Express as persistent rail-following ribbons and
all 14 Vermont stations. Burlington Union Station (BTN) is kept distinct
from Essex Junction–Burlington (ESX) because they serve different routes.
Amtraker remains the separately attributed community source for live train
positions. Lake Champlain's current Grand Isle–Plattsburgh and Charlotte–Essex
crossings are joined by the seasonal Shoreham–Ticonderoga ferry. Lake Champlain
Transportation does not currently list Burlington–Port Kent as an operating
crossing, so Burlington is not given a fictional ferry line. The map instead
marks Burlington's real Spirit of Ethan Allen and Buttercup passenger cruises,
the Inland Sea's on-demand Spring Beach Ferry, and Vermont State Parks'
restricted 2026 Kill Kare–Burton Island passenger ferry. New Hampshire
includes both public Star Island approaches, published 2026 Mount Washington
Cruises corridors, and the Sophie C island mailboat itinerary on Lake
Winnipesaukee. Maine includes the six state-ferry links plus Chebeague, Isle au
Haut, Monhegan, the Cranberry Isles, Schoodic, Eastport–Lubec, Frye Island,
Swan Island WMA, Mount Kineo, The CAT to Nova Scotia, and the Lilly B from South Freeport to Bustins Island (the 2026 off-season table runs through 13 October).
Connecticut coverage now includes all four current regional Long Island Sound
connections: New London–Orient Point, Bridgeport–Port Jefferson, New
London–Montauk, and New London–Fishers Island, plus Block Island, both state
river ferries, and municipal island/water-taxi services. Rhode Island adds
Prudence Island, Providence–Bristol–Newport, Newport–Block Island, and the
Jamestown/Newport harbor network. Massachusetts adds the non-MBTA Boston
Seaport routes, Seastreak's three South Coast/islands corridors, Island Queen,
Patriot, Pied Piper, Chappy Ferry, Harwich–Nantucket, two additional
Provincetown services, and smaller public harbor and island shuttles. Each
official-schedule popup identifies its service type and season and labels the
line as an approximate water path rather than a live vessel track. AIS may add
a live marker only when a vessel is independently broadcasting and received by
the configured provider. Every ferry line is drawn from
scripts/ferry-water-cache.json, an audited geometry cache built from, in
order of preference, the operator's GTFS shape, an OpenStreetMap
route=ferry way matched to both published landings, or hand-drawn controls.
Any stretch that crosses land is rerouted on a water grid and then simplified
and smoothed only where the result stays in water. The audit
(osm-land-v3) measures each line against OpenStreetMap coastline land
polygons minus OSM lakes, riverbanks, and docks: no interior dry run may exceed
25 metres, no dry run within 300 metres of a landing may exceed 150 metres
(landings sit on piers), no path may cross itself, and every path must be
longer than 0.15 km and at least 0.95 times its terminal-to-terminal distance.
The geometry check (npm run check) verifies every ferry feature against its
cache entry, so a feed update or manual edit cannot silently restore an
over-land line; scripts/ferry-water-report.md lists each route's source and
before/after dry metres.
The active MBTA Boat-Lynn feed supplies Lynn–Boston service directly, while
the seasonal Salem–Boston Long Wharf service is retained as an explicit
official-schedule corridor so it remains visible without live vessel data.
Bluebikes is a Greater Boston system rather than a statewide brand. Its public feed covers Arlington, Boston, Brookline, Cambridge, Chelsea, Everett, Malden, Medford, Newton, Revere, Salem, Somerville, and Watertown. The same regional layer also includes the separately operated Hartford, New Haven, and Providence systems. No discoverable public GBFS system is currently cataloged for Vermont, New Hampshire, or Maine, so the map does not fabricate stations there.
The Other bike-share systems layer (data/bikeshare-systems.geojson,
switched off by default, in the Shared & active travel section) marks the
systems that exist but publish no usable feed, one labeled marker per member
town: ValleyBike Share's nine Pioneer Valley municipalities plus UMass,
Rideable Nashua, Portland Bike Share, Newburyport's Port Bikeshare, Minuteman
Bikeshare (Acton, Concord, Lincoln, Maynard), CATMA's Bird e-bikes (Burlington,
South Burlington, Winooski), Metro Mobility's day-rental cities, the Community
Pedal Power e-bike library's three pickup points, Coast Provincetown, and Sandy
Pedals on Nantucket. CargoB's 15 cargo-bike home stations use the exact
coordinates from the operator's public station map. Town-center markers were
geocoded with Nominatim (OpenStreetMap, ODbL). Drop Mobility (ValleyBike,
Nashua) runs a GBFS server at gbfs.dropmobility.com/systems/<id>/gbfs.json,
but it answers unauthorized/missing_key, so those systems go live only once
the gateway holds a Drop key; Tandem Mobility's Movatic-app systems (Portland,
Newburyport, Minuteman) publish no feed URL at all.
The Taxi & cab services layer is a directory of who to call and where
cabs queue, because no New England taxi fleet publishes vehicle positions.
scripts/taxi-services.json holds 106 entries, each confirmed from an official
source: the Rhode Island Division of Public Utilities and Carriers' taxi list
by territory, the City of Boston's licensed-company list, town lists for
Nantucket and Stamford, New Hampshire's statewide provider directory, airport
ground-transportation pages, or the operator's own site. A company whose
garage address is not published sits on its city's center point and its popup
says so. OpenStreetMap adds 30 mapped taxi stands, cached in
scripts/taxi-osm-cache.json (refresh with
build-reference-places.py --refresh-taxi-osm). Ride-hail, limousine, and
medical-transport services are out of scope. Rebuild just this group with
py -3 -X utf8 scripts\build-reference-places.py --taxi-only.
The On-demand & community services layer fills a different gap. It currently catalogs 51 services that do not have reliable route geometry or public live positions: Maine county transportation, New Hampshire community providers (including the Winnipesaukee Transit System), Massachusetts microtransit, Connecticut's nine CTDOT microtransit programs, RIPTA Flex zones, Vermont's regional demand-response providers, and on-demand Boston Harbor and Maine coastal water taxis. These are service-area reference points with links to the official provider—not pretend bus paths.
Metro-North is different: the MTA's keyless realtime feed carries trip updates for every train of the day and a GPS position only for trains that are running. Motion shows a New Haven, New Canaan, Danbury, or Waterbury train at its reported GPS fix and labels it live. A train with no fix from the last five minutes is interpolated between its reported stations and labeled “Estimated position from MTA trip updates.”
The gateway currently knows these live vehicle-position feeds:
TransLoc tenants publish keyless GTFS-realtime at
https://<tenant>.transloc.com/subscriptions/gtfsrt/vehicles.ashx, with route
ids that match the tenant's own GTFS export.
The legacy boston gateway region (the MBTA core) serves the shuttles that
run inside it: MIT, Tufts, Boston University, Boston College, UMass
Boston, EZRide, Longwood, and Mass General Brigham.
The Swiftly-hosted providers (Merrimack Valley, Casco Bay Lines, Nashua,
and Vermont's GMT, GMCN, and Marble Valley) use Swiftly's authorized realtime
API. Advance Transit, MOOver!, RCT, and Tri-Valley are not called there; their
positions come from the public Trillium map. Swiftly issues one key but
enables it agency by agency, and only for agencies that pre-approve
third-party sharing or approve in writing. Motion's
key covers Casco Bay Lines (and RIPTA, which is read from its own keyless feed
instead). The gateway therefore sends the key only to agencies listed in
SWIFTLY_APPROVED_AGENCIES in worker/src/feeds.ts; every other Swiftly feed
reports needs-approval and is never called, and all feeds report needs-key
until SWIFTLY_API_KEY is configured. Swiftly allows 180 requests per 15
minutes, so approved feeds are cached for 30 seconds and shared by every
region.
Agencies that publish only schedules, use a closed tracker, or do not expose a
current vehicle feed still appear as scheduled route ribbons, but are not
misrepresented as live dots.
Some intercity GTFS files publish only terminal stops or incomplete shapes.
The snapshot builder replaces bus gaps longer than 20 km with a cached,
approximate road-following path from OpenStreetMap/Project OSRM. These repairs
run only at build time, remain labeled approximate in the popup, and never make
network requests from a visitor's browser. Amtrak's build uses only official
nonempty rail shapes and never substitutes straight stop-to-stop lines. A
geometry check prevents a future feed update from restoring a map-spanning
straight bus or Amtrak line. A feed that publishes no track shapes at all
(Sullivan County, Waldo DASH, Mashantucket, ARTS) is drawn stop-to-stop and
its popup says so: those ribbons carry geometryAccuracy: "approximate" with
a "Scheduled stop sequence" provider. A feed whose trips reference shape ids
that are missing from shapes.txt falls back to the same stop sequences
instead of disappearing.
Rebuild the static route snapshot after agencies update their schedules:
py -3 -X utf8 scripts\build-regions.py
py -3 -X utf8 scripts\build-regional-routes.py
py -3 -X utf8 scripts\build-airports.py
py -3 -X utf8 scripts\build-airspace.py
py -3 -X utf8 scripts\build-border-crossings.py
py -3 -X utf8 scripts\build-reference-places.py
Build regions first: the route and reference builders tag every feature with
each region it touches. After only the regions change,
py -3 -X utf8 scripts\build-reference-places.py --retag-only retags the
reference places offline.
Normal rebuilds read ferry geometry from scripts/ferry-water-cache.json and
need no water data. When a ferry feed, catalog entry, or
scripts/ferry-geometry-sources.json changes (or a new ferry is added), fetch
the OpenStreetMap water model once and refresh the cache. The fetch downloads
the ~925 MB osmdata.openstreetmap.de
land-polygon file once, keeps only New England
(west -74.2, south 40.7, east -65.8, north 47.8) in a compact
.codex-research/water-audit/osm-land-ne.wkb.json, and caches Overpass inland
water (natural=water, waterway=riverbank, waterway=dock) where ferry
corridors cross coastline land, plus all OSM route=ferry ways:
py -3 -X utf8 scripts\fetch-ferry-audit-data.py
py -3 -X utf8 scripts\build-regional-routes.py --update-ferry-cache
py -3 -X utf8 scripts\audit-ferry-water.py --cache
py -3 -X utf8 scripts\audit-ferry-water.py --report --before <old routes/<area>.geojson>
--update-ferry-cache recomputes only routes whose inputs changed (a full
--refresh-ferry-cache takes a few minutes); it needs shapely, scipy, and
pyshp. A ferry without a cache entry is still drawn from its raw source, but
the geometry check fails with instructions to run the command above.
Normal rebuilds make no road-router requests: that portion uses the checked-in cache. The builder still downloads each agency's current GTFS schedule, so the route snapshot can change when a provider updates its feed. A maintainer can explicitly fetch generic road geometry for newly discovered long gaps (at a rate limited to the public router's usage guidance), then review and commit the updated cache:
py -3 -X utf8 scripts\build-regional-routes.py --update-road-cache
Every route build also records the last date each GTFS feed publishes service
for (the latest calendar.txt end date or added calendar_dates.txt date,
falling back to feed_info.txt only when a feed has no calendar; YYYYMMDD,
M/D/YYYY, and ISO dates are accepted) in scripts/feed-freshness.json. To
refresh only that file, without rebuilding geometry, run:
py -3 -X utf8 scripts\check-feed-freshness.py
It exits non-zero and names the feed when a schedule ends within seven days.
A feed with no current replacement can carry "freshness_exempt": "<reason>"
in scripts/regional-feeds.json (currently Peter Pan's 2024 GTFS, VTA's
summer feed, and the seasonal Island Explorer, Boston Harbor Islands, Block
Island Ferry, Vineyard Fast Ferry, Freedom Cruise Line, and Thompson Island
feeds whose published seasons end in mid-October 2026; each exemption names
the date and should be removed when the next season's feed appears). A feed
can also carry "expired_note", appended to every route popup, when its last
published schedule is known to be stale (VTA's summer 2026 feed). Feeds whose
server rejects scripted downloads can set a per-feed "user_agent".
Per-route options: "route_url_map" (route id → official page; stops served
only by mapped routes link to that page, or to "shared_stop_url" when the
routes there link to different pages), "route_note_map" (route id → caveat
appended to the route popup), and "skip_non_boarding_stops" (drop stops
where every drawn trip has pickup_type and drop_off_type 1). That last one
is opt-in because Merrimack Valley, CTtransit, and RIPTA flag what look like
real street stops the same way.
Reviewed interstate controls keep New York-bound coaches off bus-restricted
Connecticut and New York parkways. Use --refresh-road-cache when those
controls or the routing method change and every cached repair must be
regenerated. The geometry check rejects long chords, loops, stale cache
entries, and excessive road detours before a release.
Approximate repaired geometry is derived from OpenStreetMap contributors using the Project OSRM route service; an operator's actual roadway may vary.
The Airports & landing facilities layer includes public and private FAA
facilities, with private sites held back until a closer zoom. Heliports draw as
a disc with an "H", seaplane bases as a ring with a wave, everything else as a
circle. Public-use facilities are in Find by name or FAA/ICAO identifier
(BOS, KBOS, logan). The air-service
ribbons distinguish scheduled Cape Air/Tradewind routes from Penobscot Island
Air's on-demand links between Knox County Regional Airport and Matinicus,
Vinalhaven, North Haven, and Islesboro. Those lines show service relationships,
not actual or live flight tracks, and start switched off so they do not obscure
surface and water routes or live aircraft.
Seasonal air corridors carry seasonStart/seasonEnd dates in
scripts/supplemental-air-routes.json, copied from the operator's own pages.
The route builder judges them on its run date (--season-date YYYY-MM-DD
overrides it): outside the season a corridor becomes a reference line with a
note such as "Seasonal · season ended September 8, 2026; 2027 dates not yet
published". The status is frozen into the snapshot, so rebuild it after a
season starts or ends, and replace the dates when the operator publishes the
next season.
The Canada border crossings layer uses the current CBSA office directory for New England's Maine, New Hampshire, and Vermont frontier. It includes ordinary roads, rail inspection points, the Campobello–Lubec crossing, and remote-traveller pilot facilities. Canadian-side control points retain their adjacent U.S. state tag, so state filters keep the correct crossings in view.
The Movement infrastructure section also carries four reference-place
layers built by scripts/build-reference-places.py into
public/data/reference-places.geojson. Heritage and scenic railroads are a
hand-curated list of operators confirmed running in 2026 (Conway Scenic, the
Cog, Hobo/Winnipesaukee, Essex, Naugatuck, Cape Cod Central, Berkshire Scenic,
Vermont Rail System's Champlain Valley Dinner Train, Maine Narrow Gauge,
Belfast & Moosehead Lake, Downeast Scenic, WW&F, Seashore Trolley, Shelburne
Falls Trolley, and the Lowell NHP trolley); ten follow the FRA rail network and
the two-foot, cog, and streetcar lines are drawn as labeled approximate paths.
Park-and-ride lots come from each state DOT's ArcGIS service, including
RIDOT's facilities layer (New Hampshire's is a 2013 inventory and its popup
says so).
Public EV charging keeps only stations with DC fast or Level 2 ports. It is
dense, so below zoom 10 it draws as a density heatmap (DC fast stations count
double) that fades into the individual stations as you zoom in. Drawbridges are the major movable
bridges whose opening rules are published in 33 CFR 117, each popup linking the
governing section. All four start switched off, are clipped to the selected
region, and are reference points rather than live status.
The Find box at the top of the console searches everything already loaded
on the page — 38,000+ stops, stations, and ferry landings, every scheduled
route ribbon, every geography, and municipalities that appear in stop
names — with no external geocoder. Arrow keys, Enter, and Esc work as in any
combobox. Picking a stop flies to it and opens its popup; picking a route
highlights the ribbon and fits it in view; picking a geography switches the
region. A result outside the selected geography switches to the smallest region
that contains it, so its live vehicles are not clipped away. Towns that exist in
more than one state are listed with their state (Salem, MA and Salem, NH). MBTA stop popups add a live "Next arrivals" block from the
MBTA V3 predictions endpoint (up to
three per route, refreshed every 15 seconds while the popup is open); other
operators publish schedules only, and their popups say so instead of
inventing an ETA. The URL hash keeps the region, camera, any layer switched
away from its default, and the data-truth filter
(#r=ct&c=-72.68,41.76&z=12&on=bike&off=commuter&s=live,scheduled), so
copying the address shares exactly the view on screen. ?region= still works
and takes second place to the hash.
Click any moving vehicle to select it: a ring marks it and a trip card opens (top right on desktop, a bottom sheet on phones). Press Follow and the map locks onto it. The followed vehicle glides across about 90% of its feed's poll interval at constant speed, so the camera pans continuously instead of jumping every 10 seconds; every other vehicle keeps the short snap. Dragging the map releases the lock but keeps the card; zooming keeps the lock and remembers the zoom; Esc or × closes it. Region changes, alert focus, layer zoom, and search fly-tos also release the lock.
The Find box matches live vehicles too: commuter-rail, Amtrak, and
Metro-North train numbers (5747), MBTA car labels, regional bus vehicle
numbers, aircraft callsigns (JBU lists every JetBlue flight), and route
names (red line, route 39). Picking a vehicle locks onto it at once. An
empty box lists recently followed vehicles that are still reporting.
The card shows what each feed actually publishes:
| Fleet | Card detail |
|---|---|
| MBTA | Next six stops with ETA, clock time, track (commuter rail), and delay against the schedule, from /predictions?filter[trip]=…, polled every 15 s only while following |
| Amtrak | Upcoming stations with ETA and early/late, from the Amtraker train record |
| Metro-North | Next stop and minutes only; position is the train's GPS fix, or an estimate between stations when the feed has none |
| Aircraft | Best-effort scheduled route for the callsign, registration (when not withheld), climbing/descending, and a red emergency line for 7500/7600/7700 squawks; helicopters by type only |
| Regional buses, vessels | Route, vehicle number, speed |
A followed vehicle adds f=<fleet>:<id> to the URL hash, so Copy link
shares a view that opens locked onto that vehicle once its feed reports it
(or explains why after 30 to 120 seconds). If a vehicle drops out of its feed,
the card waits three poll intervals before giving up. The commuter-rail train
number is the tail of the MBTA trip id (SouthBase-793096-5847), checked on
every line on 2026-09-27; the car label MBTA puts on the vehicle is not the
number riders know.
The MBTA, Amtrak, regional route, and shared-mobility layers work with only the static server:
npm install
npm run dev
# http://localhost:5500
Aircraft, public regional-bus feeds, road events, cameras, and traffic tiles
use a gateway. The public 511 sources are keyless; AIS and some optional
regional realtime adapters need provider credentials. The live site uses
the deployed gateway at
https://motion-gateway.mapzimus.workers.dev and the aircraft relay at
https://motion-aircraft-gateway.vercel.app automatically.
Copy-Item .dev.vars.example .dev.vars
# Edit .dev.vars; AIS, TomTom, Swiftly, and CARTO are all optional.
npm run gateway:dev
In a second terminal:
npm run dev
# Open http://localhost:5500/?gateway=http://localhost:8787
Local gateway overrides persist in localStorage, so they only need to be supplied once. Provider keys never enter the page URL, localStorage, or the frontend bundle.
The aircraft-gateway/ Vercel Function gives the aircraft feed separate
outbound networking because both public ADS-B providers rate-limit or block
Cloudflare's shared Worker egress. Successful responses are cached for 30
seconds and can be served stale for five minutes while a refresh retries.
The Worker has separate staging and production environments. Create secrets in the environment where they will be used:
npx wrangler login
npx wrangler secret put AISSTREAM_API_KEY --env production
npx wrangler secret put TOMTOM_API_KEY --env production
npx wrangler secret put SWIFTLY_API_KEY --env production
npx wrangler secret put CARTO_API_KEY --env production
npx wrangler deploy --env production
AISStream, TomTom, Swiftly, and CARTO are optional. Without TomTom the traffic layer
uses public New England 511 tiles. SWIFTLY_API_KEY must be the complete value expected by the
Swiftly Authorization header. CARTO_API_KEY is the free basemap key from
carto.com/basemaps/apikey. Restrict it to
the Pages host (https://mapzimus.github.io). If that dashboard will not also
allow localhost, put a second key in an uncommitted .env as
VITE_CARTO_API_KEY (see .env.example); a build env wins over the Worker.
Leave the key unset and the vector styles still load. Do not commit either
file. Add any custom production frontend origin to
ALLOWED_ORIGINS in wrangler.jsonc before deployment.
The vessel layer works without a key. When AISSTREAM_API_KEY is unset, the
same gateway relay uses Open Waters AIS (anonymous
tier, one socket, no token). Set the AISStream key when you want that upstream
instead. Open Waters stays in place for the no-key case; it does not replace
AISStream.
npx wrangler secret put AISSTREAM_API_KEY --env productionnpx wrangler deploy --env production/health. "ais":true means the relay is available,
with or without the key.How the vessel feed works:
AisHub Durable Object
(worker/src/ais-hub.ts, SQLite-backed so it runs on the Free plan) holds
one socket for the whole New England box and fans frames out to every viewer
by region. The browser talks only to /api/ais. With a key the socket is
AISStream; without one it is Open Waters (wss://ais.openwaters.io/v1/stream,
snapshot: true). Any number of viewers use that one slot.Snapshot frame with every
vessel the hub already knows in that region, stamped with the real time it
was last heard (at) and the listening time since then (quietMs), so the
map fills in immediately, old positions dim after 3 minutes, and popups and
the trip card say "Last heard 12 min ago" (or "2 h 5 min ago").wrangler deploy after this change.public/data/regions-marine.geojson
(states and All New England grown 0.2 degrees, sub-regions 0.1 degrees, the MBTA core 0.06 degrees, and
clipped to the AIS box) so ships just offshore are not cut off. Rebuild it
with py -3 scripts/build-regions.py --marine-only.Deploy the separate aircraft relay from its own project directory. It is its
own Vercel project, so merging to main does not update it: redeploy it by
hand whenever aircraft-gateway/ changes.
Set-Location aircraft-gateway
npx vercel link --yes --project motion-aircraft-gateway
npx vercel --prod --yes
| Endpoint | Purpose |
|---|---|
GET /health | Provider status without exposing secrets; a provider reads true when its last upstream fetch succeeded within 10 minutes (or has not been attempted yet) |
GET /api/planes?region=ma | Deduplicated, normalized ADS-B aircraft: position, callsign, type, track, altitude, speed, plus category, squawk, emergency, registration (null for PIA/LADD aircraft and rotorcraft), verticalRateFpm and dbFlags (Vercel relay only; the Worker no longer serves this path) |
GET /api/route?callsign=AAL108 | Best-effort aircraft origin and destination; 404 when unknown, 502 JSON when the route catalog is unreachable (Vercel relay) |
GET /api/transit?region=ct | Normalized GTFS-realtime bus positions and per-feed health |
GET /api/mnr | Metro-North active trip segments (every line) and service alerts from official MTA GTFS-Realtime |
GET /api/lirr | Long Island Rail Road trips and alerts in the same shape as /api/mnr; the LIRR publishes GPS as separate vehicle entities, joined by trip id |
GET /api/nyc-subway | Subway and Staten Island Railway trains from the eight NYCT feeds: the station each train is at or heading to, its status, next arrival and destination, plus service alerts. No GPS; the browser places trains with public/data/nyc-subway-stops.json |
GET /api/roadwork | Active/upcoming MassDOT and northern New England WZDx lines, plus CTDOT construction-project polygons (phase 05_Construction only) |
GET /api/road-events | Official New England 511 incidents, CTroads incidents and closures, and MassDOT roadway events (planned MassDOT closures are left to /api/roadwork) |
GET /api/cameras | Public camera locations from 511, CTroads, MassDOT, and RIDOT. RIDOT stills are on the feature (imageUrl); 511 images still use /api/camera-detail |
GET /api/camera-detail?provider=north&id=… | Latest public 511 camera image and official viewer details |
GET /api/traffic/{z}/{x}/{y}.png |
Supported region IDs are boston, ma, ct, ri, nh, vt, me, ny,
nj, new-england (the six states), and northeast (all eight); the browser
maps each named sub-region to its parent before calling the gateway. Browser origins are allowlisted. Provider responses are cached
briefly at the edge to avoid multiplying load.
Public browser-safe APIs ───────────────┐
MBTA · static GTFS · Amtraker · GBFS │
├─ MapLibre fleets ─ Census region filter
Cloudflare Worker gateway ─────────────┤
agency GTFS-RT · MTA MNR · 511 · WZDx · cameras · NWS · FAA · AIS│
Vercel aircraft relay ─────────────────┘
ADSB.lol · adsb.fi · route lookup
The frontend is plain JavaScript bundled with Vite; Preact signal stores in
src/stores/ feed a panel that src/ui.js still renders directly during the
component migration. The gateways are TypeScript and
run on Cloudflare Workers and Vercel Functions. Cloudflare gateway tests execute
inside the Workers runtime with Cloudflare's Vitest integration.
npm run check
npm test
npm run test:ui
npm run deploy:dry-run
py -3 -X utf8 -m doctest scripts\build-regional-routes.py
npm test also runs the aircraft relay's handlers (aircraft-gateway/api/)
in the Workers runtime, including the registration privacy rule. The doctest
covers the builder's seasonal-corridor logic.
CI (.github/workflows/ci.yml) first runs scripts/check-feed-freshness.py,
which downloads every schedule feed and fails when a non-exempt feed stops
publishing service within seven days. npm run check then applies the same
rule offline: every feed in scripts/regional-feeds.json must appear in
scripts/feed-freshness.json, and every non-exempt feed must publish service
at least seven days past that file's checkedAt date. When either fails, run
scripts\check-feed-freshness.py, replace the expired feed URL (or add a
documented freshness_exempt), and commit the refreshed feed-freshness.json.
error in /api/transit?region=ny until verified from the
deployed gateway.scripts/fetch-ferry-audit-data.py could not fetch because Overpass
was unreachable from the build sandbox; the land-polygon part of the model
was widened to New York Harbor and every other NYC Ferry and NY Waterway
route passed the water audit against it./api/transit?region=ma and ?region=me on a weekday.Built by Max Howe — github.com/mapzimus
| built snapshot |
| Amtrak | Amtrak official static GTFS for scheduled routes/stations; Amtraker community API for live trains | built snapshot + 90 s |
| Aircraft and air services | ADSB.lol with adsb.fi failover; 19 optional official Cape Air, Tradewind, New England Airlines, and Penobscot Island Air corridors | 45 s + built snapshot |
| Airports and landing facilities | 778 open airports, heliports, seaplane bases, and other facilities from the FAA NASR subscription | 28-day built snapshot |
| Harbor/coastal vessels and identifiable passenger ferries | AISStream when AISSTREAM_API_KEY is set; otherwise keyless Open Waters AIS on the same gateway relay. Each Open Waters vessel carries its source credit (AISHub, aisstream, Open Waters AIS, and the Norwegian and Finnish lines when those sources appear) | streaming |
| Bike and scooter share | GBFS feeds for Bluebikes across 13 Greater Boston municipalities, Citi Bike (New York City, Jersey City and Hoboken), Veo Hartford, Veo New Haven, and Spin Providence | 60 s |
| Other bike-share systems | 50 reference markers for ValleyBike Share, Rideable Nashua, Portland Bike Share, Port Bikeshare, Minuteman Bikeshare, CATMA's Bird e-bikes, CargoB, Metro Mobility, the Community Pedal Power library, Coast Provincetown, and Sandy Pedals — systems with no usable public GBFS feed | built snapshot |
| Work zones and construction projects | MassDOT WZDx plus the multi-state New England 511 WZDx feed for Maine, New Hampshire, and Vermont (work-zone lines). Connecticut adds CTroads lane-closure dots and CTDOT capital-project areas in the construction phase, labeled construction projects | 5 min |
| Traffic incidents | New England 511 (Maine, New Hampshire, Vermont), CTroads incidents and closures, and MassDOT Highway Division roadway events (crashes, disabled vehicles, weather closures) | 60 s |
| Public traffic cameras | New England 511, CTroads, the MassDOT CCTV asset inventory, and RIDOT highway cameras | 5 min |
| Road weather stations | New England 511 pavement and air readings for Maine, New Hampshire, and Vermont. Click a station for the latest numbers | 5 min |
| Highway message signs | New England 511 and CTroads. Click a sign for the message it is posting | 5 min |
| Snowplows | VTrans live trucks when the public file lists them (empty outside winter), City of Keene public-works trucks from the city's published live share (a fix older than a day is dropped), plus NHDOT winter plow-route lines and MassDOT snow-route beats. The lines are beats, not trucks | 60 s trucks · built snapshot routes |
| Ski lifts, gondolas, and tramways | OpenStreetMap chairlifts, gondolas, and aerial tramways. Lift lines, not live cabins | built snapshot |
| Live congestion speeds | Public 511 traffic-flow tiles through the gateway; TomTom remains an optional configured fallback | live tiles |
| Weather alerts | NWS active alerts for all eight states, drawn as severity-colored forecast-zone polygons; Extreme/Severe alerts also join the service-alert panel | 120 s (60 s edge cache) |
| Airport delays | FAA NAS airport status ground stops, ground-delay programs, arrival/departure delays, and closures, drawn as rings on the FAA airport markers; JFK, LaGuardia, Newark and the other New York and New Jersey airports are in the allowlist | 120 s (60 s edge cache) |
| Airport weather (METAR) | AviationWeather.gov observations for the weather stations in all eight states, colored by flight category (VFR green, MVFR blue, IFR red, LIFR magenta); a station's TAF forecast loads when you click it | 5 min (5 min edge cache; TAF 30 min) |
| Temporary flight restrictions | FAA TFR polygons inside New England, joined to the FAA TFR list for type and facility; altitudes and effective times load from the FAA notice when you click one | 5 min (5 min edge cache) |
| Airspace | FAA ADDS Class B, C, and D airspace and special-use airspace (MOAs, restricted, warning, prohibited areas): 69 shapes, reference only | 28-day built snapshot |
| Major roads and freight rail | U.S. Census TIGERweb primary roads and the FRA North American Rail Network | built snapshot |
| Canada border crossings | 38 road, rail, ferry, and remote-traveller facilities from the CBSA Directory of Offices | built snapshot |
| Marked walking and cycling routes | OpenStreetMap route relations via Waymarked Trails | live map tiles |
| Heritage and scenic railroads | 17 hand-curated operator routes (scripts/heritage-railroads.json), snapped to the FRA rail network where the tourist line runs on mapped track | built snapshot |
| Park-and-ride lots | MassDOT GeoDOT, CTDOT, VTrans, and MaineDOT ArcGIS services plus the NHDOT inventory republished by SWRPC | built snapshot |
| Public EV charging | NREL/NLR Alternative Fuel Stations API DC fast and Level 2 stations across all six states | built snapshot |
| Drawbridges and movable bridges | 25 hand-curated bridges with opening rules from 33 CFR 117 Subpart B | built snapshot |
| Cached public 511 congestion tile, with optional TomTom source |
GET /api/airport-status | FAA NAS status (ground stops, ground-delay programs, arrival/departure delays, closures) for New England airports |
GET /api/weather-alerts?region=ma | NWS active alerts for the region's states as GeoJSON; forecast-zone polygons are resolved, simplified, and capped per request |
GET /api/airport-weather | New England METARs from AviationWeather.gov as GeoJSON points: flight category, observation time, raw METAR, wind, visibility, ceiling (5 min edge cache) |
GET /api/airport-taf?id=KBOS | The station's latest TAF, or available: false when it issues none; id must be a four-character ICAO id (30 min edge cache) |
GET /api/tfrs | FAA TFR polygons in the New England box joined to the TFR list (type, state, facility), plus listed New England TFRs without a shape (5 min edge cache) |
GET /api/tfr-detail?id=6/7153 | Altitudes, effective times, and reason parsed from one FAA TFR notice (30 min edge cache) |
GET /api/ais?region=new-england with WebSocket upgrade | Shared vessel relay: a Snapshot frame of known vessels in the region, then live frames for that region. AISStream when AISSTREAM_API_KEY is set; otherwise Open Waters AIS. The browser stays on this gateway |
rogerwurealtime/vehiclePositionsrealtime/tripUpdateshttps://passio3.com/endicott/passioTransit/gtfs/realtime/vehiclePositionshttps://passio3.com/endicott/passioTransit/gtfs/google_transit.zipendicottroadwork()
already reads. CTDOT capital-project areas in phase 05_Construction are
construction footprints beside those dots. Rhode
Island still has no structured incident or work-zone feed.