WSDOT / wsdot-website

Codebase for WSDOT's public Drupal 7 website hosted on Acquia.
0 stars 4 forks source link

Waze data feed #395

Closed bertraj closed 4 years ago

bertraj commented 6 years ago

Create a data feed for WAZE:

https://developers.google.com/waze/data-feed/overview

loganSims commented 6 years ago

Compiled some notes comparing the Waze feed to our Highway Alerts API.

Waze feed data requirements

Our highway alerts API

Highway Alert to Waze Feed mapping

incident - unique ID at least 3 characters. Highway Alert equivalent - AlertID

polyline - Latitude and longitude coordinates that describe the location of the incident. Highway Alert equivalent - StartRoadwayLocation.Latitude/Longitude Notes: If the incident only affects one direction, please include the coordinates for the start location and for a point that defines the direction

street - Specifies the name of the street on which the incident is occurring. Highway Alert equivalent - StartRoadwayLocation.RoadName

type - Describes the alert. Possible types include: ACCIDENT, CONSTRUCTION, HAZARD, and ROAD_CLOSED. Highway Alert equivalent - EventCategory Notes: Not an exact match. Would need to set up some kind of mapping between our categories and theirs.

starttime/endtime - yyyy-MM-dd'T'HH:mm:ss+HH:mm Highway Alert equivalent - StartTime/EndTime Notes: Time format isn’t the same.

description - A description of the incident. The description should be less than 40 Highway Alert equivalent - HeadlineDescription or ExtendedDescription Notes: No character limit for our descriptions. Sometimes we add links to our alerts as well, which may not work with Waze.

direction - If you provide 2 or more points, the direction should include one of these: ONE_DIRECTION or BOTH_DIRECTIONS. Highway Alert equivalent - StartRoadwayLocation.Direction Notes: Not an exact match. We provided direction in the for of "Northbound", "Southbound", etc...

reference - Identifies the organization from which the information was sourced. The reference name must be a maximum of either 10 capital letters or 12 lowercase letters. Notes: We should be okay to use WSDOT here.

loganSims commented 6 years ago

The only field that we don't really provide is the Polyline:

Latitude and longitude coordinates that describe the location of the incident. These should have at least 6 digits after the decimal point for sufficient accuracy.

If the incident only affects one direction, please include the coordinates for the start location and for a point that defines the direction; for example: the start point (y x) and a point (y1 x1) 50 meters southwest to designate the direction. If the incident affects both directions, provide the exact same coordinates twice. The following example is for a single direction.

We could calculate (y1, x1) using the StartRoadwayLocation.Direction field. The only problem is that the field doesn't always correspond to an actual compass direction.

waynedyck commented 4 years ago

Closing for now.