New Jersey tolls: how to maintain

Files: /srv/toll/draft/NJ, last built 2026-10-10 01:56 ET · the NJ 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 NJ)

Procedure for this state

nj_state.py takes the NJTA Turnpike and Parkway amounts from the NJ corpus (/home/geo1/maps/toll/corpus/NJ, 2026-10-09) and adds positions (NJTA's own GIS layers for Turnpike interchanges and Parkway plazas), the Atlantic City Expressway, the Port Authority crossings, and the Burlington and Cape May county bridges.

The corpus adapter is /home/geo1/maps/toll/bin/adapters/nj.py (rewritten 2026-10-09 after the original was overwritten by a stub on 2026-10-04): it parses the 8 Turnpike class PDFs (entry × exit matrices; cells placed in their exit column by position) and the 3 Parkway tables, and reproduced every stored price (17,581 rows) exactly. Turnpike interchanges are named from NJTA's Interchanges layer ("#10 Edison Int."). Refresh: cd /home/geo1/maps/toll && python3 bin/tollup.py NJ update && python3 bin/check.py NJ, then TOLL_WEB=/home/geo1/maps/toll/corpus python3 bin/publish.py NJ if anything changed, then rebuild the draft. The schedule URLs carry the year (2026-turnpike-class-…): for 2027 edit TPK_CLASSES / GSP_TABLES in the adapter.

When to check

Rebuild

  1. python3 tollnode_ways.py NJ (NJ's OSM files are links to the shared panj_* extract, box -80.6,38.9,-73.88,42.3).
  2. Full chain with NJ. NJTA ArcGIS layers can be re-paged with python3 fetch_layer.py NJ <name> <url>.
  3. Rebuild NJ after every NY build (NY's congestion-zone non-toll gantries leave NJ's untied list).

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/NJ/urls.txt (name <tab> URL)
archived sources/home/geo1/maps/toll/NJ/sources/<name>/<YYYY-MM-DD>/ (file + meta.json: url, fetched, sha256)
builder/home/geo1/system/handbuilt/nj_state.py; shared code toll_common.py
OpenStreetMap inputs/home/geo1/system/handbuilt/osm/nj_* (cut from /home/geo1/maps/osm/us-latest.osm.pbf)
outputdraft /srv/toll/draft/NJ/ (the builders write here); published /srv/toll/NJ/ (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 NJ [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/NJ/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 NJ update fetches the adapter's sources (bin/adapters/nj.py), stores a document only when its content changes, writes one rate file per version under /home/geo1/maps/toll/NJ/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 NJ writes the corpus /home/geo1/maps/toll/corpus/NJ 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 NJ and the cutting commands are in the state's procedure above; the toll-node and way index comes from python3 tollnode_ways.py NJ.

5. Publish

A rebuild writes the draft (/srv/toll/draft/NJ); the published page (/srv/toll/NJ) does not change. python3 /home/geo1/maps/toll/bin/promote.py review NJ 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 NJ copies the draft to /srv/toll/NJ (the previous page is kept under /home/geo1/maps/toll/NJ/published/<time>/) and takes it off the review list. After a change, update the coverage line for NJ 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 NJ.

Sources (24)

Each fetch is kept in its own dated folder under /home/geo1/maps/toll/NJ/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
bcbc_toll_rates
https://www.bcbridges.org/toll-rates-e-zpass/
2026-10-081fetch_list.pyno6
cmcbc_all_electronic
https://capemaycountynj.gov/1700/All-Electronic-Tolling
2026-10-091b100 (192.168.50.14), headless Chrome, rendered page: the site refuses scripts (Cloudflare)yes
cmcbc_bridge_history
https://capemaycountynj.gov/653/Bridge-History
2026-10-101fetched on b100 (192.168.50.14)yes
cmcbc_faq
https://capemaycountynj.gov/1701/FAQ
2026-10-091b100 (192.168.50.14), headless Chrome, rendered page: the site refuses scripts (Cloudflare)yes
cmcbc_toll_schedule
https://capemaycountynj.gov/657/Toll-Schedule
2026-10-091b100 (192.168.50.14), headless Chrome, rendered page: the site refuses scripts (Cloudflare)yes95
ezpassnj_facilities
https://www.ezpassnj.com/en/about/facilities.shtml
2026-10-081fetch_list.pyno2
njta_class_definitions
https://www.njta.gov/nj-e-zpass-class-definitions/
2026-10-092fetch_list.pyno
njta_gsp_cash
https://www.njta.gov/document/2026-parkway-cash-rates/
2026-10-031fetch_list.pyno400
njta_gsp_ezpass
https://www.njta.gov/document/2026-parkway-nj-e-zpass-rates/
2026-10-031fetch_list.pyno400
njta_gsp_mile_markers
https://services8.arcgis.com/MPQF7rHwqDJmPgGV/arcgis/rest/services/MileMarkers/FeatureServ
2026-10-031fetch_list.pyno
njta_gsp_truck_offpeak
https://www.njta.gov/document/2026-parkway-truck-off-peak-nj-e-zpass/
2026-10-031fetch_list.pyno205
njta_toll_discounts
https://www.njta.gov/toll-discounts/
2026-10-092fetch_list.pyno
njta_tpk_class1
https://www.njta.gov/document/2026-turnpike-class-1-passenger-cars-2-axles/
2026-10-031fetch_list.pyno2072
njta_tpk_class2
https://www.njta.gov/document/2026-turnpike-class-2-2-axle-trucks/
2026-10-031fetch_list.pyno2072
njta_tpk_class3
https://www.njta.gov/document/2026-turnpike-class-3-3-axle-trucks/
2026-10-031fetch_list.pyno2072
njta_tpk_class4
https://www.njta.gov/document/2026-turnpike-class-4-4-axle-trucks/
2026-10-031fetch_list.pyno2072
njta_tpk_class5
https://www.njta.gov/document/2026-turnpike-class-5-5-axle-trucks/
2026-10-031fetch_list.pyno2072
njta_tpk_class6
https://www.njta.gov/document/2026-turnpike-class-6-6-axle-trucks/
2026-10-031fetch_list.pyno2072
njta_tpk_classb2
https://www.njta.gov/document/2026-turnpike-class-b2-2-axle-buses/
2026-10-031fetch_list.pyno2072
njta_tpk_classb3
https://www.njta.gov/document/2026-turnpike-class-b3-3-axle-buses/
2026-10-031fetch_list.pyno2072
njta_tpk_interchanges
https://services8.arcgis.com/MPQF7rHwqDJmPgGV/arcgis/rest/services/Interchanges/FeatureSer
2026-10-031fetch_list.pyno
panynj_tolls
https://www.panynj.gov/bridges-tunnels/en/tolls.html
2026-10-081fetch_list.pyno54
sjta_ace_rate_charts
https://irp.cdn-website.com/fbd4c0ac/files/uploaded/2026+EZPass+Toll+Rate+Chart.pdf
2026-10-081fetch_list.pyno
sjta_ace_toll_calculator
https://www.sjta.com/all-electronic-tolling
2026-10-081fetch_list.pyno1876

Facilities (16)

idfacilityoperatorpointsrate / trip rowseffective dates in the rowssource
NJ-NJTPNew Jersey TurnpikeNew Jersey Turnpike Authority (NJTA)30165762026-10-03_observedezpassnj_facilities
NJ-GSPGarden State ParkwayNew Jersey Turnpike Authority (NJTA)3410052026-10-03_observedezpassnj_facilities
NJ-ACEAtlantic City ExpresswaySouth Jersey Transportation Authority (SJTA)1618752026-01-04sjta_ace_toll_calculator
NJ-CMCBC-OCLOcean City-Longport BridgeCape May County Bridge Commission1182026-10-09_observedcmcbc_toll_schedule
NJ-CMCBC-CICorson's Inlet BridgeCape May County Bridge Commission1182026-10-09_observedcmcbc_toll_schedule
NJ-CMCBC-TITownsends Inlet BridgeCape May County Bridge Commission1182026-10-09_observedcmcbc_toll_schedule
NJ-CMCBC-GSGrassy Sound BridgeCape May County Bridge Commission1182026-10-09_observedcmcbc_toll_schedule
NJ-CMCBC-MTMiddle Thorofare BridgeCape May County Bridge Commission1182026-10-09_observedcmcbc_toll_schedule
NJ-BCBC-TPTacony-Palmyra BridgeBurlington County Bridge Commission122026-10-08_observedbcbc_toll_rates
NJ-BCBC-BBBurlington-Bristol BridgeBurlington County Bridge Commission122026-10-08_observedbcbc_toll_rates
NJ-PANYNJ-GWBGeorge Washington BridgePort Authority of New York and New Jersey182026-07-12panynj_tolls
NJ-PANYNJ-LTLincoln TunnelPort Authority of New York and New Jersey182026-07-12panynj_tolls
NJ-PANYNJ-HTHolland TunnelPort Authority of New York and New Jersey182026-07-12panynj_tolls
NJ-PANYNJ-BBBayonne BridgePort Authority of New York and New Jersey182026-07-12panynj_tolls
NJ-PANYNJ-GBGoethals BridgePort Authority of New York and New Jersey182026-07-12panynj_tolls
NJ-PANYNJ-OCOuterbridge CrossingPort Authority of New York and New Jersey182026-07-12panynj_tolls

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

None: every position comes from an official layer or a mapped toll node.

Decisions by rule

R1: 63, R2b: 20, R2d: 10, one: 5 (all in decisions.csv).

Open gaps (0)

None.

Untied OSM toll nodes: 223

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 NJ (30)

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
GWB NJ->NY, NJ E-ZPass off-peak$14.79
GWB NJ->NY, NJ E-ZPass peak 08:00$16.79
GWB NJ->NY, DE E-ZPass$23.30
GWB NY->NJ (no toll)$0.00
Lincoln Tunnel Weehawken->Manhattan, NJ off-peak 10:30 Wed: tunnel $14.79 + zone peak $9.00 - $3.00 Lincoln credit$20.79
Holland Tunnel JC->Manhattan, mail 10:30 Wed: tunnel $23.30 + zone peak $13.50 (no credit without E-ZPass)$36.80
Goethals Elizabeth->Staten Island$14.79
Outerbridge Perth Amboy->Staten Island$14.79
Bayonne Bridge Bayonne->Staten Island$14.79
Tacony-Palmyra NJ->PA$3.00
Tacony-Palmyra PA->NJ (no toll)$0.00
Burlington-Bristol NJ->PA$3.00
Ocean City-Longport$2.50
NJTP 9->13A NJ E-ZPass off-peak$3.45
NJTP 9->13A NJ E-ZPass peak 08:00$4.60
ACE AC->Turnersville (0->44)$6.49
ACE AC->Hammonton (0->28)$6.49
ACE Mays Landing->AC (12->0)$2.98
ACE Hammonton->Williamstown (28->38)$1.49
ACE Pleasantville(5)->AC$1.49
GWB NJ->NY, NY E-ZPass off-peak (NY/NJ E-ZPass rate $14.79)$14.79
GWB NJ->NY, account_nj (NJ toll account = NJ E-ZPass) $14.79$14.79
GWB NJ->NY, account_ga (E-ZPass network, not NY/NJ) = mail rate $23.30$23.30
GWB NJ->NY, account_tx (not E-ZPass network: not accepted) = bill by mail $23.30$23.30
NJ Ocean City-Longport Bridge, Toll-by-Plate car ($2.50, Cape May County schedule)$2.50
NJ Ocean City-Longport Bridge southbound, E-ZPass 5-axle truck ($16.50, Class 15)$16.50
NJ Ocean City-Longport Bridge southbound (Longport -> Ocean City), E-ZPass NJ car: charged$2.50
NJ Ocean City-Longport Bridge northbound (Ocean City -> Longport), E-ZPass NJ car: free$0.00
NJ Townsends Inlet Bridge southbound (Sea Isle -> Avalon), E-ZPass NJ car: charged$2.50
NJ Townsends Inlet Bridge northbound (Avalon -> Sea Isle), E-ZPass NJ car: free$0.00