Washington tolls: how to maintain

Files: /srv/toll/draft/WA, last built 2026-10-10 02:14 ET · the WA toll page · map test · facts below are read from the files each time this page is built (python3 /home/geo1/system/handbuilt/maintain_pages.py WA)

Procedure for this state

Washington (WSDOT, Good To Go!): Tacoma Narrows (eastbound, fixed), SR 520 and SR 99 (time of day), SR 509 Expressway (time of day by direction); Pay By Plate = pass + $0.25, Pay By Mail = pass + $2. I-405 and SR 167 express toll lanes: told, never charged. Pacific times written in Eastern.

When to check

Rebuild

bash chain.sh WA.

Watch out

The chain every state shares

Hosts: geo1 (192.168.50.220) holds the sources, builders, drafts, map and API; b100 (192.168.50.14) is the test client. All times are Eastern.

whatwhere (geo1 unless said)
sources list/home/geo1/maps/toll/WA/urls.txt (name <tab> URL)
archived sources/home/geo1/maps/toll/WA/sources/<name>/<YYYY-MM-DD>/ (file + meta.json: url, fetched, sha256)
builder/home/geo1/system/handbuilt/wa_state.py; shared code toll_common.py
OpenStreetMap inputs/home/geo1/system/handbuilt/osm/wa_* (cut from /home/geo1/maps/osm/us-latest.osm.pbf)
outputdraft /srv/toll/draft/WA/ (the builders write here); published /srv/toll/WA/ (copied from the draft by promote.py publish). The map and the API read the published page, or the draft while it is listed for review
toll enginesource /home/geo1/maps/web/tolls.js, served copy /srv/maps/tolls.js (the API runs the served copy)
API/home/geo1/maps/api/server.mjs on 127.0.0.1:8090 behind nginx /api/; pid in logs/test.pid
regression tripsb100: ~/apitest/site/cases.json, runner ~/apitest/run.py, browser check ~/apitest/browser.mjs

1. Refresh a source

  1. Fetch into a new dated folder: python3 /home/geo1/system/handbuilt/fetch_list.py WA [name ...] (no names = every line of urls.txt). A new source: add a line to urls.txt first, then fetch it by name.
  2. A site that refuses geo1 (HTTP 403) or scripts: fetch it on b100 in headless Chrome with node ~/apitest/fetch_b100.mjs <out> <name>=<url> ..., then rsync -a <out>/ geo1@192.168.50.220:/home/geo1/maps/toll/WA/sources/. Its meta.json records that it came from b100.
  3. Compare the new file with the previous dated one (diff, pdftotext -layout for PDFs). Same content: nothing to do. Changed amounts or a new effective date: rebuild (step 2) and update the expected amounts of the affected regression trips from the operator's own figures.

1b. The corpus (NJ, PA, VA start from it; DE is published from it)

python3 /home/geo1/maps/toll/bin/tollup.py WA update fetches the adapter's sources (bin/adapters/wa.py), stores a document only when its content changes, writes one rate file per version under /home/geo1/maps/toll/WA/rates/ and appends every price change to history.csv (every run to runs.log). TOLL_WEB=/home/geo1/maps/toll/corpus python3 /home/geo1/maps/toll/bin/publish.py WA writes the corpus /home/geo1/maps/toll/corpus/WA from it (DE: plain publish.py DE writes /srv/toll/DE). Never hand-edit either. Then rebuild the draft (step 2) so it picks up the new rates.

2. Rebuild

3. Load it into the API and test from b100

  1. The API reads the toll pages and tolls.js when it starts. Restart it: cd /home/geo1/maps/api && kill $(cat logs/test.pid); (nohup /home/geo1/maps/node/bin/node server.mjs > logs/server.log 2>&1 & echo $! > logs/test.pid) (it is started by hand, not a service).
  2. From b100 only: python3 ~/apitest/run.py ~/apitest/site/cases.json. Every trip must be OK. Add a trip for every rate or rule you change, with the amount taken from the operator's own source.
  3. Engine change (tolls.js): edit /home/geo1/maps/web/tolls.js, check with /home/geo1/maps/node/bin/node --check, copy to /srv/maps/tolls.js with sudo install -o www-data -g www-data -m 644, restart the API, run the trips.

4. OpenStreetMap refresh (all states at once)

The builders match toll points to the OSM way ids the router drives, so the extracts here must come from the same us-latest.osm.pbf the router (Valhalla, /home/geo1/maps/valhalla_data) was built from (now 2026-09-27). New OSM data means: rebuild the router tiles, then for each state cut the box, rebuild its OSM inputs and run the full chain, then compare untied_toll_nodes.csv and the estimated positions below. The box for WA and the cutting commands are in the state's procedure above; the toll-node and way index comes from python3 tollnode_ways.py WA.

5. Publish

A rebuild writes the draft (/srv/toll/draft/WA); the published page (/srv/toll/WA) does not change. python3 /home/geo1/maps/toll/bin/promote.py review WA lists the draft for review: the map and the API then read it instead of the published page. Run the regression trips from b100. After approval, python3 /home/geo1/maps/toll/bin/promote.py publish WA copies the draft to /srv/toll/WA (the previous page is kept under /home/geo1/maps/toll/WA/published/<time>/) and takes it off the review list. After a change, update the coverage line for WA in the API page (/api.html, generator /home/geo1/maps/api/doc/api_page.py) and rebuild this page: python3 /home/geo1/system/handbuilt/maintain_pages.py WA.

Sources (10)

Each fetch is kept in its own dated folder under /home/geo1/maps/toll/WA/sources/<name>/; the builder always reads the newest one, so a new fetch takes effect at the next rebuild and the old one stays for comparison.

sourcefetched (newest)fetches kepthowlisted in urls.txtrows using it
wsdot_good_to_go
https://wsdot.wa.gov/travel/roads-bridges/toll-roads-bridges-tunnels/good-go-accounts-pass
2026-10-101fetch_list.pyyes
wsdot_i405_etl
https://wsdot.wa.gov/travel/roads-bridges/toll-roads-bridges-tunnels/i-405-express-toll-la
2026-10-101fetch_list.pyyes39
wsdot_sr167_etl
https://wsdot.wa.gov/travel/roads-bridges/toll-roads-bridges-tunnels/sr-167-express-toll-l
2026-10-101fetch_list.pyyes13
wsdot_sr509
https://wsdot.wa.gov/travel/roads-bridges/toll-roads-bridges-tunnels/sr-509-expressway
2026-10-101fetch_list.pyyes211
wsdot_sr520_tolling
https://wsdot.wa.gov/travel/roads-bridges/toll-roads-bridges-tunnels/sr-520-bridge-tolling
2026-10-101fetch_list.pyyes286
wsdot_sr99_tolling
https://wsdot.wa.gov/travel/roads-bridges/toll-roads-bridges-tunnels/sr-99-tunnel-tolling
2026-10-101fetch_list.pyyes241
wsdot_tnb_tolling
https://wsdot.wa.gov/travel/roads-bridges/toll-roads-bridges-tunnels/tacoma-narrows-bridge
2026-10-101fetch_list.pyyes21
wsdot_toll_bill
https://wsdot.wa.gov/travel/roads-bridges/toll-roads-bridges-tunnels/good-go-accounts-pass
2026-10-101fetch_list.pyyes
wsdot_toll_main
https://wsdot.wa.gov/travel/roads-bridges/toll-roads-bridges-tunnels
2026-10-101fetch_list.pyyes
wsdot_tolling_sr167
https://wsdot.wa.gov/travel/roads-bridges/toll-roads-bridges-tunnels/tolling-sr-167
2026-10-101fetch_list.pyyes

Facilities (6)

idfacilityoperatorpointsrate / trip rowseffective dates in the rowssource
WA-TNBTacoma Narrows BridgeWSDOT Toll Division1202026-10-10_observedwsdot_tnb_tolling
WA-SR520SR 520 bridgeWSDOT Toll Division12852026-10-10_observedwsdot_sr520_tolling
WA-SR99SR 99 tunnelWSDOT Toll Division22402026-10-10_observedwsdot_sr99_tolling
WA-SR509SR 509 ExpresswayWSDOT Toll Division22102026-10-10_observedwsdot_sr509
WA-I405XI-405 express toll lanesWSDOT Toll Division1938(none printed)wsdot_i405_etl
WA-SR167XSR 167 express toll lanesWSDOT Toll Division612(none printed)wsdot_sr167_etl

Positions placed by estimate (6): re-check when OpenStreetMap or the operator changes

pointfacilitylocationplaced onwhy
WA-SR167X-01SR 167 express toll lanesbeside: SR 167 express toll lane, northbound (lat 47.43)the northbound SR 167 general-lane carriagewayR3 estimate: a notice point on the general-lane carriageway between Renton and Sumner
WA-SR167X-02SR 167 express toll lanesbeside: SR 167 express toll lane, southbound (lat 47.43)the southbound SR 167 general-lane carriagewayR3 estimate: a notice point on the general-lane carriageway between Renton and Sumner
WA-SR167X-03SR 167 express toll lanesbeside: SR 167 express toll lane, northbound (lat 47.33)the northbound SR 167 general-lane carriagewayR3 estimate: a notice point on the general-lane carriageway between Renton and Sumner
WA-SR167X-04SR 167 express toll lanesbeside: SR 167 express toll lane, southbound (lat 47.33)the southbound SR 167 general-lane carriagewayR3 estimate: a notice point on the general-lane carriageway between Renton and Sumner
WA-SR167X-05SR 167 express toll lanesbeside: SR 167 express toll lane, northbound (lat 47.25)the northbound SR 167 general-lane carriagewayR3 estimate: a notice point on the general-lane carriageway between Renton and Sumner
WA-SR167X-06SR 167 express toll lanesbeside: SR 167 express toll lane, southbound (lat 47.25)the southbound SR 167 general-lane carriagewayR3 estimate: a notice point on the general-lane carriageway between Renton and Sumner

Decisions by rule

R2a: 23, R2b: 2, R3: 6, built: 1, direction: 6, not: 4, notice: 1, weekend: 1 (all in decisions.csv).

Open gaps (0)

None.

Untied OSM toll nodes: 0

Toll booths / gantries mapped in OpenStreetMap on or near this state's roads that no toll point claims; a route through one lists it under unpriced. After an OSM refresh, look at new ones here (untied_toll_nodes.csv): a new gantry on a priced road means a point is missing.

Regression trips for WA (6)

Run from b100 (never on geo1): python3 ~/apitest/run.py ~/apitest/site/cases.json. Every trip must come back OK; a changed amount is either a rate change (update the expected amount from the operator's own source) or a fault.

tripexpected
WA Tacoma Narrows eastbound, Good To Go (account_wa) car ($4.50)$4.50
WA Tacoma Narrows westbound: not tolled ($0)$0.00
WA SR 520 bridge Wed 7:30 a.m. PT, Good To Go car ($4.90)$4.90
WA SR 520 bridge Sat noon PT, Pay By Mail car ($4.95)$4.95
WA SR 99 tunnel northbound Wed 7:30 a.m. PT, Good To Go car ($1.85)$1.85
WA I-405 express toll lanes weekday 7:30 a.m. PT: told ($0)$0.00