Add more Travel IQ dot cam states
This commit is contained in:
parent
c125525413
commit
8f5803b5bc
|
@ -5,64 +5,71 @@ Many states are through one of a few providers:
|
||||||
* Castle Rock: https://www.castlerockits.com/oneweb
|
* Castle Rock: https://www.castlerockits.com/oneweb
|
||||||
* IBI Travel IQ: https://www.ibigroup.com/ibi-products/traveliq/
|
* IBI Travel IQ: https://www.ibigroup.com/ibi-products/traveliq/
|
||||||
|
|
||||||
| State | DOT Name[^name] | Online Service Name | Still | Video | Web provider | Link |
|
### State list
|
||||||
| ----- | --------------- | ------------------- | ----- | ----- | ------------ | ------------------------------- |
|
|
||||||
| AK | DOT&PF | Alaska 511 | 111 | 0 | Travel IQ | https://511.alaska.gov/ |
|
| State | DOT Name[^name] | Online Service Name | Still | Video | Web provider | Link |
|
||||||
| AL | ALDOT | algotraffic | 0 | 568 | custom | https://algotraffic.com/cameras |
|
| ----- | --------------- | ------------------- | ----- | ----- | ------------ | --------------------------------- |
|
||||||
| AR | ARDOT | | | | | |
|
| AK | DOT&PF | Alaska 511 | 111 | 0 | Travel IQ | https://511.alaska.gov/ |
|
||||||
| AZ | ADOT | | | | | |
|
| AL | ALDOT | algotraffic | 0 | 568 | custom | https://algotraffic.com/cameras |
|
||||||
| CA | Caltrans | | | | | |
|
| AR | ARDOT | | | | | |
|
||||||
| CO | CDOT | COtrip | 832 | 686 | Castle Rock | https://maps.cotrip.org/ |
|
| AZ | ADOT | AZ511 | 602 | 0 | Travel IQ | https://az511.com/ |
|
||||||
| CT | CTDOT | | | | | |
|
| CA | Caltrans | | | | | |
|
||||||
| DE | DelDOT | | | | | |
|
| CO | CDOT | COtrip | 832 | 686 | Castle Rock | https://maps.cotrip.org/ |
|
||||||
| FL | FDOT | | | | | |
|
| CT | CTDOT | CTroads | 350 | 0 | Travel IQ | https://ctroads.org/ |
|
||||||
| GA | GDOT | 511GA | 1 | 3416 | Travel IQ | https://511ga.org/ |
|
| DE | DelDOT | | | | | |
|
||||||
| HI | HDOT | | | | | |
|
| FL | FDOT | | | | | |
|
||||||
| IA | Iowa DOT | 511IA | 446 | 485 | Castle Rock | https://511ia.org/ |
|
| GA | GDOT | 511GA | 1 | 3416 | Travel IQ | https://511ga.org/ |
|
||||||
| ID | ITD | | | | | |
|
| HI | HDOT | | | | | |
|
||||||
| IL | IDOT | | | | | |
|
| IA | Iowa DOT | 511IA | 446 | 485 | Castle Rock | https://511ia.org/ |
|
||||||
| IN | IDOT | TrafficWise | 0 | 640 | Castle Rock | https://511in.org/ |
|
| ID | ITD | Idaho 511 | 274 | 0 | Travel IQ | https://511.idaho.gov/ |
|
||||||
| KS | KDOT | KanDrive | 382 | 167 | Castle Rock | https://www.kandrive.gov/ |
|
| IL | IDOT | | | | | |
|
||||||
| KY | KYTC | | | | | |
|
| IN | IDOT | TrafficWise | 0 | 640 | Castle Rock | https://511in.org/ |
|
||||||
| LA | DOTD | 511 | 0 | 288 | Travel IQ | https://www.511la.org/ |
|
| KS | KDOT | KanDrive | 382 | 167 | Castle Rock | https://www.kandrive.gov/ |
|
||||||
| MA | MassDOT | Mass511 | 20 | 225 | Castle Rock | https://mass511.com/ |
|
| KY | KYTC | | | | | |
|
||||||
| MD | MDOT | | | | | |
|
| LA | DOTD | 511 | 0 | 288 | Travel IQ | https://www.511la.org/ |
|
||||||
| ME | MaineDOT | | | | | |
|
| MA | MassDOT | Mass511 | 20 | 225 | Castle Rock | https://mass511.com/ |
|
||||||
| MI | MDOT | | | | | |
|
| MD | MDOT | | | | | |
|
||||||
| MN | MNDOT | 511MN | 647 | 1131 | Castle Rock | https://511mn.org/ |
|
| ME | MaineDOT | | | | | |
|
||||||
| MO | MoDOT | | | | | https://traveler.modot.org/map/ |
|
| MI | MDOT | | | | | |
|
||||||
| MS | MDOT | | | | | |
|
| MN | MNDOT | 511MN | 647 | 1131 | Castle Rock | https://511mn.org/ |
|
||||||
| MT | MDT | | | | | |
|
| MO | MoDOT | | | | | https://traveler.modot.org/map/ |
|
||||||
| NC | NCDOT | | | | | |
|
| MS | MDOT | | | | | |
|
||||||
| ND | NDDOT | | | | | |
|
| MT | MDT | | | | | |
|
||||||
| NE | NDOT | Nebraska 511 | 919 | 0 | Castle Rock | https://new.511.nebraska.gov/ |
|
| NC | NCDOT | | | | | |
|
||||||
| NH | NHDOT | | | | | |
|
| ND | NDDOT | | | | | |
|
||||||
| NJ | NJDOT | | | | | |
|
| NE | NDOT | Nebraska 511 | 919 | 0 | Castle Rock | https://new.511.nebraska.gov/ |
|
||||||
| NM | NMDOT | | | | | |
|
| NH | NHDOT | | | | | |
|
||||||
| NV | NDOT | Nevada 511 | 0 | 606 | Travel IQ | https://www.nvroads.com/ |
|
| NJ | NJDOT | | | | | |
|
||||||
| NY | NYSDOT | 511NY | 369 | 1272 | Travel IQ | https://www.511ny.org/ |
|
| NM | NMDOT | | | | | |
|
||||||
| OH | ODOT | | | | | |
|
| NV | NDOT | Nevada 511 | 0 | 606 | Travel IQ | https://www.nvroads.com/ |
|
||||||
| OK | ODOT | | | | | |
|
| NY | NYSDOT | 511NY | 369 | 1272 | Travel IQ | https://www.511ny.org/ |
|
||||||
| OR | ODOT | | | | | |
|
| OH | ODOT | | | | | |
|
||||||
| PA | PennDOT | | | | | |
|
| OK | ODOT | | | | | |
|
||||||
| RI | RIDOT | | | | | |
|
| OR | ODOT | | | | | |
|
||||||
| SC | SCDOT | | | | | |
|
| PA | PennDOT | | | | | |
|
||||||
| SD | SDDOT | | | | | |
|
| RI | RIDOT | | | | | |
|
||||||
| TN | TDOT | | | | | |
|
| SC | SCDOT | | | | | |
|
||||||
| TX | TxDOT | | | | | |
|
| SD | SDDOT | | | | | |
|
||||||
| UT | UDOT | | | | | |
|
| TN | TDOT | | | | | |
|
||||||
| VA | VDOT | | | | | |
|
| TX | TxDOT | | | | | |
|
||||||
| VT | VTrans | | | | | |
|
| UT | UDOT | UDOT Traffic | 0 | 1787 | Travel IQ | https://www.udottraffic.utah.gov/ |
|
||||||
| WA | WSDOT | | | | | |
|
| VA | VDOT | | | | | |
|
||||||
| WI | WisDOT | 511WI | 0 | 468 | Travel IQ | https://511wi.gov/ |
|
| VT | VTrans | | | | | |
|
||||||
| WV | WVDOT | | | | | |
|
| WA | WSDOT | | | | | |
|
||||||
| WY | WYDOT | | | | | |
|
| WI | WisDOT | 511WI | 0 | 468 | Travel IQ | https://511wi.gov/ |
|
||||||
|
| WV | WVDOT | | | | | |
|
||||||
|
| WY | WYDOT | | | | | |
|
||||||
|
|
||||||
|
|
||||||
[^name]: From https://en.wikipedia.org/wiki/Department_of_transportation#List_of_U.S._state_and_insular_area_departments_of_transportation
|
[^name]: From https://en.wikipedia.org/wiki/Department_of_transportation#List_of_U.S._state_and_insular_area_departments_of_transportation
|
||||||
|
|
||||||
|
|
||||||
|
### Non-State aligned
|
||||||
|
|
||||||
|
* New England 511 (https://newengland511.org/) consolidates Maine, New Hampshire, and Vermont into one site (341 photo/0 video/Travel IQ)
|
||||||
|
|
||||||
|
|
||||||
|
### Notes
|
||||||
|
|
||||||
https://map.wyoroad.info/wtimap/index.html
|
https://map.wyoroad.info/wtimap/index.html
|
||||||
|
|
||||||
|
@ -128,14 +135,5 @@ https://dot.ca.gov/programs/traffic-operations/traveler-information/511
|
||||||
|
|
||||||
"rr": "https://riverregion511.org" castlerock
|
"rr": "https://riverregion511.org" castlerock
|
||||||
|
|
||||||
|
|
||||||
No video, only photos ??
|
|
||||||
"ak": "https://511.alaska.gov/",
|
|
||||||
"az": "https://az511.com/",
|
|
||||||
"ct": "https://ctroads.org/",
|
|
||||||
"new england": "https://newengland511.org/",
|
|
||||||
"id": "https://511.idaho.gov/",
|
|
||||||
"ut": "https://www.udottraffic.utah.gov/",
|
|
||||||
|
|
||||||
Some kind of signature needed:
|
Some kind of signature needed:
|
||||||
"fl": "https://fl511.com/",
|
"fl": "https://fl511.com/",
|
||||||
|
|
|
@ -5,10 +5,15 @@ import json
|
||||||
|
|
||||||
states = {
|
states = {
|
||||||
"Alaska": "https://511.alaska.gov/",
|
"Alaska": "https://511.alaska.gov/",
|
||||||
|
"Arizona": "https://az511.com/",
|
||||||
|
"Connecticut": "https://ctroads.org/",
|
||||||
"Georgia": "https://511ga.org/",
|
"Georgia": "https://511ga.org/",
|
||||||
|
"Idaho": "https://511.idaho.gov/",
|
||||||
"Louisiana": "https://www.511la.org/",
|
"Louisiana": "https://www.511la.org/",
|
||||||
"Nevada": "https://www.nvroads.com/",
|
"Nevada": "https://www.nvroads.com/",
|
||||||
|
"NewEngland": "https://newengland511.org/",
|
||||||
"NewYork": "https://www.511ny.org/",
|
"NewYork": "https://www.511ny.org/",
|
||||||
|
"Utah": "https://www.udottraffic.utah.gov/",
|
||||||
"Wisconsin": "https://511wi.gov/"
|
"Wisconsin": "https://511wi.gov/"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,18 +59,23 @@ for state, baseURL in states.items():
|
||||||
available_cameras = 999_999 # lots
|
available_cameras = 999_999 # lots
|
||||||
|
|
||||||
while len(cameras) < available_cameras:
|
while len(cameras) < available_cameras:
|
||||||
res = requests.get(f"{baseURL}/List/GetData/Cameras", {
|
if state == "Connecticut":
|
||||||
"query": json.dumps(query),
|
# gotta be a special snowflake I guess?
|
||||||
"lang": "en",
|
res = requests.post(f"{baseURL}/List/GetData/Cameras", json={"draw":1,"columns":[{"data":"sortId","name":"sortId","searchable":True,"orderable":True,"search":{"value":"","regex":False}},{"data":"cityName","name":"cityName","searchable":True,"orderable":True,"search":{"value":"","regex":False}},{"data":"roadway","name":"roadway","searchable":True,"orderable":True,"search":{"value":"","regex":False}},{"data":"sortIdDisplay","name":"sortIdDisplay","searchable":True,"orderable":True,"search":{"value":"","regex":False}},{"data":"description1","name":"description1","searchable":False,"orderable":True,"search":{"value":"","regex":False}},{"data":"direction","name":"direction","searchable":False,"orderable":False,"search":{"value":"","regex":False}},{"data":6,"name":"","searchable":False,"orderable":False,"search":{"value":"","regex":False}}],"order":[{"column":0,"dir":"asc"},{"column":1,"dir":"asc"}],"start":0,"length":10,"search":{"value":"","regex":False}})
|
||||||
})
|
else:
|
||||||
|
res = requests.get(f"{baseURL}/List/GetData/Cameras", {
|
||||||
|
"query": json.dumps(query),
|
||||||
|
"lang": "en",
|
||||||
|
})
|
||||||
res.raise_for_status()
|
res.raise_for_status()
|
||||||
res = res.json()
|
res = res.json()
|
||||||
available_cameras = res['recordsTotal']
|
available_cameras = res['recordsTotal']
|
||||||
for c in res['data']:
|
for c in res['data']:
|
||||||
if isinstance(c['videoUrl'], list): # LA returns multiple (identical?) streams
|
if 'videoUrl' in c and isinstance(c['videoUrl'], list): # LA returns multiple (identical?) streams
|
||||||
src = c['videoUrl'][0]
|
src = c['videoUrl'][0]
|
||||||
video_camera_count += 1
|
video_camera_count += 1
|
||||||
elif c['videoUrl']:
|
elif 'videoUrl' in c and c['videoUrl'] and c['videoUrl'] != '0':
|
||||||
|
# Yeah, Idaho has a single camera where videoURL = '0'. Nice.
|
||||||
src = c['videoUrl']
|
src = c['videoUrl']
|
||||||
video_camera_count += 1
|
video_camera_count += 1
|
||||||
else:
|
else:
|
||||||
|
@ -81,7 +91,7 @@ for state, baseURL in states.items():
|
||||||
"properties": {
|
"properties": {
|
||||||
'name': c['displayName'],
|
'name': c['displayName'],
|
||||||
'views': [{
|
'views': [{
|
||||||
'hasVideo': bool(c['videoUrl']),
|
'hasVideo': 'videoUrl' in c and bool(c['videoUrl']),
|
||||||
'src': src,
|
'src': src,
|
||||||
}],
|
}],
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue