Begin Main Content Area

Developer Resources Documentation/API

Introduction

This document summarizes the RCRS_Event_Data external web service of the PennDOT Road Condition Reporting System (RCRS). This service provides Statewide event and winter road condition information to outside agencies and vendors.

Audience

This document is intended for agency or vendor developers who want to obtain RCRS event information for use in external systems. It provides an introduction to using the RCRS_Event_Data service and reference material on the available parameters.

What Is Web API?

From Wikipedia.org:

A web API is an application programming interface (API) for either a web server or a web browser. It is a web development concept, usually limited to a web application's client-side (including any web frameworks being used), and thus usually does not include web server or browser implementation details such as SAPIs or web browser engine APIs unless publicly accessible by a remote web application.

Endpoints

Endpoints are important aspects of interacting with server-side web APIs, as they specify where resources lie that can be accessed by third party software. Usually the access is via a URI to which HTTP requests are posed, and from which the response is thus expected. Endpoints need to be static, otherwise the correct functioning of software that interacts with it cannot be guaranteed. If the location of a resource changes (and with it the endpoint) then previously written software will break, as the required resource can no longer be found at the same place. As API providers still want to update their web APIs, many have introduced a versioning system in the URI that points to an endpoint, for example the Clarifai API: The endpoint for the tagging functionality within the web API has the following URI: "https://api.clarifai.com/v1/tag/". The "/v1/" part of the URI specifies access to the first version of the web API. If clarifai decides to update to version two, they can do this while still maintaining support for third party software that uses the first version.

Resource vs. service

Although "web API" is sometimes considered a synonym for web service, Web 2.0 web applications have moved away from SOAP-based web services towards more cohesive collections of RESTful web resources.[5] These RESTful web APIs are accessible via standard HTTP methods by a variety of HTTP clients including browsers and mobile devices. They have advantages over web services in that they tend to be less difficult to develop and less resource intensive (and thus usually run faster) since they do not need to perform as many data conversions as required by a SOAP-based service APIs.

Requesting Access

Gaining access to the service is a two step process. The first step is to create a user account in PDAuth. The process for creating a user account in PDAuth is different for external users than internal users. Internal users are users who have a CWOPA account. Directions for creating a user account in PDAuth for internal and external users are listed below.

Step 1: Create PDAuth Account

Internal Users

Internal users that already have a CWOPA account must login to PDAuth using their CWOPA credentials. After logging into PDAuth for the first time, their user account will be automatically created using their CWOPA credentials.

External Users

External users must first create a user account in PDAuth by selecting 'Create Account' from the Log in window.

PDAuth login screen 

Enter the account information and click 'Sign Up'.

PDAuth create new account screen 

A verification email will be sent to the email address that was used to create the user account and will contain an activation link. The user account can not be used until the account is activated using the activation link. The activation link will direct users to a Password Reset window that allows them to create their password. Strong password requirements are enforced during the password creation process.

PDAuth password reset screen 

Step 2: Request Access

Once the PDAuth account has been created in step 1, access to the RCRS_Event_Data service must be requested. To request access, send an email to penndotdata@pa.gov with your PDAuth username and a brief description of your reason for access. After access has been granted, you will receive a notification email from PDAuth that your request has been approved. The PDAuth credentials can now be used to acess the RCRS_Event_Data service.

Service Limitations

Currently there are no request limitations for this service. Any limitations added in the future will be included in this section.

RCRS_Event_Data Service

The RCRS_Event_Data service is a Web API service that can be accessed from any client that can make an HTTP request and process a JSON response. Each method listed below can be accessed using a standard HTTP GET request. The format of the web service requests and responses will be described in this document.

This service uses HTTP Basic Authentication for credential authentication and authorization. User credentials must be encoded in base 64 and set in the authorization header of the service request. An example for setting the authorization header is shown below.

Secure Socket Layer (SSL) must be enabled by prepending "https://" to each service request.

Methods

MethodDescription
liveEventsProvides Pennsylvania road events which are active in RCRS at the time of the request.
plannedEventsProvides Pennsylvania road events which are planned in RCRS at the time of the request.
winterConditionsProvides Pennsylvania roadway winter conditions which are active in RCRS at the time of the request.

liveEvents Method

The liveEvents method of the RCRS_Event_Data service returns Pennsylvania road events that are active in RCRS at the time of the request.

Properties

PropertiesTypeDescription
ActualDateTimeOpenedDate/TimeThe date and time that the roadway was re-opened and the event was removed from the system in the format: YYYY-MM-DD HH:MM:SS. Once the roadway has been re-opened the event record will remain in the feed for 30 minutes with the ActualDateTimeOpened listed.
DateTimeVerifiedDate/TimeThe date and time that the event was verified in the format: YYYY-MM-DD HH:MM.
IsHazmatBooleanEvent involves a hazmat material: T = True, F = False.
HazmatPlacardIDTextList of Hazmat Placard identifiers involved in the event.
HazmatMaterialNameTextList of hazmat material involved in the event. Multiple materials may be listed and when present are generally delimited with commas.
IsFatalityBooleanEvent involves one or more fatalities: T = True, F = False.
IsSchoolBusBooleanEvent involves a school bus: T = True, F = False.
IsCommercialVehicleRolloverBooleanEvent involves a commercial vehicle rollover: T = True, F = False.
RestrictedSpeedValueNumberSpeed restriction for event in Miles Per Hour.
VehicleRestrictTextTextVehicle restrictions for event. Multiple vehicle restrictions may be returned in this element in a comma delimited list of values.
Please see the Code Table section of this document for the full list of VehicleRestrictText values.
EventIDNumberThe unique ID for the event in RCRS.
EventClassNumber
EventTypeTextText value indicating the cause of the event.

Please see the Code Tables section of this document for a full list of EventType values.
ReportOrgIDNumberThe PennDOT district associated with the event.
FacilityTextThe display name of the roadway. In the case of 4-digit, smaller county roads, the route number is not included. The facility names between Events and Winter Conditions are not in the same format. This is a product of the 511 design and may be altered in the future.
DirectionTextRoadway direction affected by the event.

Please see the Code Tables section of this document for a full list of Direction values.
FromLocTextText description of the starting location of the event. Since this data stream was designed for 511, there are some logic items to be aware of with the names of the beginning, ending, and incident locations for Events.
  • They are translated to the name the DOT has of the nearest landmark of those locations.
  • If a segment/offset is used in RCRS, the nearest exit or intersection is used and then the fields of <FromLocLatLong>, <ToLocLatLong>, and <IncidentLocLatLong> are used for each location type. If the actual location and the nearest translated location are more than a half-mile apart, then those fields are filled in to describe the distance in miles and a cardinal direction from the translated location. The Lat/Long is always the exact location, not the translated location.
FromLocLatLongTextThe Latitude and Longitude of the starting location of the event in the format: xx.xxxxxxxxxxxxx, -yy.yyyyyyyyyyyyy
FromLocMileageNumberMileage to FromLoc.
FromLocDirectionTextOrdinal direction to FromLoc.
ToLocTextText description of the ending location of the event.
ToLocLatLongTextThe Latitude and Longitude of the ending location of the event in the format: xx.xxxxxxxxxxxxx, -yy.yyyyyyyyyyyyy
ToLocMileageNumberMilage to ToLoc.
ToLocDirectionTextOrdinal direction to ToLoc.
IncidentLocTextText description of the incident location.
IncidentLocLatLongTextThe Latitude and Longitude of the incident location in the format: xx.xxxxxxxxxxxxx, -yy.yyyyyyyyyyyyy
IncidentLocMileageNumberMilage to IncidentLoc.
IncidentLocDirectionTextOrdinal direction to IncidentLoc.
DateTimeEventOccursDate/TimeIf the event originated as a planned event, then this is the date and time that the event began in the format: YYYY-MM-DD HH:MM.
CreateTimeDate/TimeThe date and time that the event was created in RCRS in the format: YYYY-MM-DD HH:MM:SS
LastUpdateDate/TimeThe last date and time this event was updated in RCRS in the format: YYYY-MM-DD HH:MM:SS.
StateTextAlways the two character State abbreviation for Pennsylvania: PA
CountyNumberThe county number associated with this event. The county numbers are not translated in the feed.

Please see the Code Table section of this document for a full list of County values.
CountyNameTextThe county name associated with this event
LaneStatusTextThe current status of the event.

Please see the Code Table section of this document for the full list of LaneStatus values.
AffectedLanesTextThe lanes or shoulders that are affected by the event.

Please see the Code Table section of this document for the full list of AffectedLanes values.
DetourInEffectBooleanDetour is in effect: T=True, F=False.
IsInterstateBooleanEvent occurs on an interstate: T=True, F=False.
DescriptionTextText description of the overall event.
DateTimeNotifiedDate/TimeThe date and time that the event was reported in the format: YYYY-MM-DD HH:MM.
IncidentMuniNameTextName of township or borough in which the incident occurred.
PoliceJurisTextTextThe police jurisdiction for the event.

Please see the Code Table section of this document for the full list of PoliceJurisText values.
Is511EventBooleanIs a 511 event: T = True, F = False.
StateRouteNoNumberThe state route number associated with the event.
CountyFromNumberThe county code associated with the beginning location of the event.
CountyFromNameTextThe county name associated with the beginning location of the event.
BeginSegPointNumberEight digit number containing the beginning segment and offset of the event.
The first four numbers are the segment number and the last four numbers are the offset.
CountyToNumberThe county code associated with the ending location of the event.
CountyToNameTextThe county name associated with the ending location of the event.
EndSegPointNumberEight digit number containing the ending segment and offset of the event.
The first four numbers are the segment number and the last four numbers are the offset.
CountyIncNumberThe county code associated with the incident location of the event.
CountyIncNameTextThe county name associated with the incident location of the event.
IncSegPointNumberEight digit number containing the incident segment and offset of the event.
The first four numbers are the segment number and the last four numbers are the offset.
HaulerRestrictionInEffectBooleanFlag indicating whether event affects haulers: T = True, F = False
NoPermitTravelBooleanFlag indicating that permitted travel is prohibited. T = True, F = False.
MaxLengthRestrictionNumberThe maximum allowable vehicle length in inches.
If no value was defined then this field will default to 0.
MaxWidthRestrictionNumberThe maximum allowable vehicle width in inches.
If no value was defined then this field will default to 0.
MaxHeightRestrictionNumberThe maximum allowable vehicle height in inches.
If no value was defined then this field will default to 0.
MaxWeightRestrictionNumberThe maximum allowable vehicle weight in pounds.
If no value was defined then this field will default to 0.
[EventRepetitionDetails] RepeitionIDTextThe ID for the Repetitive Event.
If the event is not repetitive, will reflect: "One Time Event".
[EventRepetitionDetails] OccursTextThe day(s) of the week on which the event occurs.
If the event is not repetitive, will reflect "N/A".

Please see the Code Table section of this document for the full list of Occurs values.
[EventRepetitionDetails] SkipHolidaysTextIndicates whether the event will be schedule for, and can occur on, holidays: YES/NO.
If the event is not repetitive, will reflect "N/A".
[EventRepetitionDetails] StartDateTextThe Start Date of the Repetitive Event.
If the event is not repetitive, will reflect "N/A"/
[EventRepetitionDetails] EndDateTextThe End Date of the Repetitive Event.
If the event is not repetitive, will reflect "N/A".
[EventRepetitionDetails] DailyStartTimeTextThe Start Time for each occurrence of the Repetitive Event.
If the event is not repetitive, will reflect "N/A".
[EventRepetitionDetails] DailyEndTimeTextThe End Time for each occurrence of the Repetitive Event.
If the event is not repetitive, will reflect "N/A".
DetoursJSON A listing of all detours that are in effect for the event.
Each detour will contain a detour ID, direction, vehicle type, color ID, total distance and narrative.

Example

HTTP Request

The following is a sample HTTP GET request using jQuery AJAX. The placeholders shown need to be replaced with the PDAuth credentials.

$.ajax({
    url: 'https://www.dot511.state.pa.us/RCRS_Event_Data/api/RCRS/liveEvents',
    type: 'GET',
    data: '',
    dataType: 'json',
    beforeSend: function (xhr) {
        xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + 
   password));
    },
    success: function (result, status, XMLHttpRequest) {
        //on success
    },
    error: function (XMLHttpRequest, status, error) {
        //on error
    }
});

HTTP Response

The following is a sample HTTP response from the liveEvents method.

{
    "Values": [
        {
            "ActualDateTimeOpened": "",
            "DateTimeVerified": "2012-12-12 14:41",
            "IsHazmat": "F",
            "HazmatPlacardID": "",
            "HazmatMaterialName": "",
            "IsFatality": "F",
            "IsSchoolBus": "F",
            "IsCommercialVehicleRollover": "F",
            "RestrictedSpeedValue": "",
            "VehicleRestrictText": "",
            "EventID": 4811,
            "EventClass": "1",
            "EventType": "other incident",
            "ReportOrgID": "11",
            "Facility": "WEBSTER RD",
            "Direction": "eastbound",
            "FromLoc": "Intersection of LEECHBURG RD / + LOGANS FERRY RD / + SARDIS RD in PLUM  [BORO]",
            "FromLocLatLong": "40.5249663614929,-79.7532146731821",
            "FromLocMileage": "",
            "FromLocDirection": "",
            "ToLoc": "Intersection of BORO ST in PLUM  [BORO]",
            "ToLocLatLong": "40.5341733603848,-79.7268028617706",
            "ToLocMileage": "",
            "ToLocDirection": "",
            "IncidentLoc": "",
            "IncidentLocLatLong": "",
            "IncidentLocMileage": "",
            "IncidentLocDirection": "",
            "DateTimeEventOccurs": "2007-05-18 08:00",            
            "CreateTime": "2008-07-01 09:22:42",
            "LastUpdate": "2013-12-09 15:09:21",
            "State": "PA",
            "County": "02",
            "LaneStatus": "closed",
            "AffectedLanes": "Left Lane, Center",
            "DetourInEffect": "T",
            "IsInterstate": "F",
            "Description": "Other incident on WEBSTER RD eastbound between LEECHBURG RD / + LOGANS FERRY RD / + SARDIS RD and BORO ST.  All lanes closed.",
            "DateTimeNotified": "2013-12-09 15:00",                                    
            "IncidentMuniName": "PLUM  [BORO]",
            "PoliceJurisText": "LOCAL",                       
            "Is511Event": "F",
            "StateRouteNo": "2090",
            "CountyFrom": "02",
            "BeginSegPoint": "00100000",
            "CountyTo": "02",
            "EndSegPoint": "00301500",
            "CountyInc": "",
            "IncSegPoint": "",
            "HaulerRestrictionInEffect": "F",
            "NoPermitTravel": "F",
            "MaxLengthRestriction": 0,
            "MaxWidthRestriction": 0,
            "MaxHeightRestriction": 0,
            "MaxWeightRestriction": 0,
            "EventRepetitionDetails": {
                    "RepetitionID": "One Time Event",
                    "Occurs": "N/A",
                    "SkipHolidays": "N/A",
                    "StartDate": "N/A",
                    "EndDate": "N/A",
                    "DailyStartTime": "N/A"
                    "DailyEndTime": "N/A"
                }
            "Detours": [
                {
                    "DetourID": 6982,
                    "Direction": "E",
                    "VehicleType": "B",
                    "ColorID": "4",
                    "TotalLength": 5.144,
                    "Narrative": ""
                }
            ]
        }
    ]
}

plannedEvents Method

The plannedEvents method of the RCRS_Event_Data service returns Pennsylvania road events that are planned in RCRS at the time of the request.

Properties

PropertiesTypeDescription
EventIDNumberThe unique ID for the event in RCRS.
EventClassNumber
EventTypeTextText value indicating the cause of the event.

Please see the Code Tables section of this document for a full list of EventType values.
ReportOrgIDNumberThe PennDOT district associated with the event.
FacilityTextThe display name of the roadway. In the case of 4-digit, smaller county roads, the route number is not included. The facility names between Events and Winter Conditions are not in the same format. This is a product of the 511 design and may be altered in the future.
DirectionTextRoadway direction affected by the event.

Please see the Code Tables section of this document for a full list of Direction values.
FromLocTextText description of the starting location of the event. Since this data stream was designed for 511, there are some logic items to be aware of with the names of the beginning, ending, and incident locations for Events.
  • They are translated to the name the DOT has of the nearest landmark of those locations.
  • If a segment/offset is used in RCRS, the nearest exit or intersection is used and then the fields of <FromLocLatLong>, <ToLocLatLong>, and <IncidentLocLatLong> are used for each location type. If the actual location and the nearest translated location are more than a half-mile apart, then those fields are filled in to describe the distance in miles and a cardinal direction from the translated location. The Lat/Long is always the exact location, not the translated location.
FromLocLatLongTextThe Latitude and Longitude of the starting location of the event in the format: xx.xxxxxxxxxxxxx, -yy.yyyyyyyyyyyyy
FromLocMileageNumberMileage to FromLoc.
FromLocDirectionTextOrdinal direction to FromLoc.
ToLocTextText description of the ending location of the event.
ToLocLatLongTextThe Latitude and Longitude of the ending location of the event in the format: xx.xxxxxxxxxxxxx, -yy.yyyyyyyyyyyyy
ToLocMileageNumberMilage to ToLoc.
ToLocDirectionTextOrdinal direction to ToLoc.
IncidentLocTextText description of the incident location.
IncidentLocLatLongTextThe Latitude and Longitude of the incident location in the format: xx.xxxxxxxxxxxxx, -yy.yyyyyyyyyyyyy
IncidentLocMileageNumberMilage to IncidentLoc.
IncidentLocDirectionTextOrdinal direction to IncidentLoc.
DateTimeEventOccursDate/TimeThe date and time that the event is scheduled to begin in the format: YYYY-MM-DD HH:MM.
CreateTimeDate/TimeThe date and time that the event was created in RCRS in the format: YYYY-MM-DD HH:MM:SS
LastUpdateDate/TimeThe last date and time this event was updated in RCRS in the format: YYYY-MM-DD HH:MM:SS.
StateTextAlways the two character State abbreviation for Pennsylvania: PA
CountyNumberThe county number associated with this event. The county numbers are not translated in the feed.

Please see the Code Table section of this document for a full list of County values.
CountyNameTextThe county name associated with this event.
LaneStatusTextThe current status of the event.

Please see the Code Table section of this document for the full list of LaneStatus values.
AffectedLanesTextThe lanes or shoulders that are affected by the event.

Please see the Code Table section of this document for the full list of AffectedLanes values.
DetourInEffectBooleanDetour is in effect: T=True, F=False.
IsInterstateBooleanEvent occurs on an interstate: T = True, F = False.
DescriptionTextText description of the overall event.
DateTimeNotifiedDate/TimeThe date and time that the event was reported in the format: YYYY-MM-DD HH:MM.
IncidentMuniNameTextName of township or borough in which the incident occurred.
PoliceJurisTextTextThe police jurisdiction for the event.

Please see the Code Table section of this document for the full list of PoliceJurisText values.
Is511EventBooleanIs a 511 event: T = True, F = False
StateRouteNoNumberThe state route number associated with the event.
CountyFromNumberThe county code associated with the beginning location of the event.
CountyFromNameTextThe county name associated with the beginning location of the event.
BeginSegPointNumberEight digit number containing the beginning segment and offset of the event.
The first four numbers are the segment number and the last four numbers are the offset.
CountyToNumberThe county code associated with the ending location of the event.
CountyToNameTextThe county name associated with the ending location of the event.
EndSegPointNumberEight digit number containing the ending segment and offset of the event.
The first four numbers are the segment number and the last four numbers are the offset.
CountyIncNumberThe county code associated with the incident location of the event.
CountyIncNameTextThe county name associated with the incident location of the event.
IncSegPointNumberEight digit number containing the incident segment and offset of the event.
The first four numbers are the segment number and the last four numbers are the offset.
HaulerRestrictionInEffectBooleanFlag indicating whether event affects haulers: T = True, F = False
NoPermitTravelBooleanFlag indicating that permitted travel is prohibited. T = True, F = False.
MaxLengthRestrictionNumberThe maximum allowable vehicle length in inches.
If no value was defined then this field will default to 0.
MaxWidthRestrictionNumberThe maximum allowable vehicle width in inches.
If no value was defined then this field will default to 0.
MaxHeightRestrictionNumberThe maximum allowable vehicle height in inches.
If no value was defined then this field will default to 0.
MaxWeightRestrictionNumberThe maximum allowable vehicle weight in pounds.
If no value was defined then this field will default to 0.
[EventRepetitionDetails] RepeitionIDTextThe ID for the Repetitive Event.
If the event is not repetitive, will reflect: "One Time Event".
[EventRepetitionDetails] OccursTextThe day(s) of the week on which the event occurs.
If the event is not repetitive, will reflect "N/A".

Please see the Code Table section of this document for the full list of Occurs values.
[EventRepetitionDetails] SkipHolidaysTextIndicates whether the event will be schedule for, and can occur on, holidays: YES/NO.
If the event is not repetitive, will reflect "N/A".
[EventRepetitionDetails] StartDateTextThe Start Date of the Repetitive Event.
If the event is not repetitive, will reflect "N/A"/
[EventRepetitionDetails] EndDateTextThe End Date of the Repetitive Event.
If the event is not repetitive, will reflect "N/A".
[EventRepetitionDetails] DailyStartTimeTextThe Start Time for each occurrence of the Repetitive Event.
If the event is not repetitive, will reflect "N/A".
[EventRepetitionDetails] DailyEndTimeTextThe End Time for each occurrence of the Repetitive Event.
If the event is not repetitive, will reflect "N/A".
DetoursJSON A listing of all detours that are in effect for the event.
Each detour will contain a detour ID, direction, vehicle type, color ID, total distance and narrative.

Example

HTTP Request

The following is a sample HTTP GET request using jQuery AJAX. The placeholders shown need to be replaced with the PDAuth credentials.

$.ajax({
    url: 'https://www.dot511.state.pa.us/RCRS_Event_Data/api/RCRS/plannedEvents',
    type: 'GET',
    data: '',
    dataType: 'json',
    beforeSend: function (xhr) {
        xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + 
   password));
    },
    success: function (result, status, XMLHttpRequest) {
        //on success
    },
    error: function (XMLHttpRequest, status, error) {
        //on error
    }
});

HTTP Response

The following is a sample HTTP response from the plannedEvents method.

{
    "Values": [
        {
            "EventID": 276684,
            "EventClass": "14",
            "EventType": "special event",
            "ReportOrgID": "04",
            "Facility": "PA - 093",
            "Direction": "both directions",
            "FromLoc": "Intersection of DEWEY ST in NESCOPECK  [BORO]",
            "FromLocLatLong": "41.0523311193851,-76.215080887329",
            "FromLocMileage": "",
            "FromLocDirection": "",
            "ToLoc": "Intersection of MONTGOMERY ST in NESCOPECK  [BORO]",
            "ToLocLatLong": "41.0521299646895,-76.224771669308",
            "ToLocMileage": "",
            "ToLocDirection": "",
            "IncidentLoc": "",
            "IncidentLocLatLong": "",
            "IncidentLocMileage": "",
            "IncidentLocDirection": "",
            "DateTimeEventOccurs": "2016-08-20 15:00",            
            "CreateTime": "2016-07-28 08:02:33",
            "LastUpdate": "2016-07-28 08:02:33",
            "State": "PA",
            "County": "40",
            "LaneStatus": "closed",
            "AffectedLanes": "Left Lane, Center",            
            "DetourInEffect": "F",
            "IsInterstate": "F",
            "Description": "Special event on PA 93 both directions between DEWEY ST and MONTGOMERY ST.  All lanes closed.",
            "DateTimeNotified": "2016-07-28 07:54",            
            "DetourDescription": "",
            "IncidentMuniName": "NESCOPECK  [BORO]",
            "PoliceJurisText": "",
            "Is511Event": "F",
            "StateRouteNo": "0093",
            "CountyFrom": "40",
            "BeginSegPoint": "03900496",
            "CountyTo": "40",
            "EndSegPoint": "04000000",
            "CountyInc": "",
            "IncSegPoint": "",
            "HaulerRestrictionInEffect": "F",
            "NoPermitTravel": "F",
            "MaxLengthRestriction": 0,
            "MaxWidthRestriction": 0,
            "MaxHeightRestriction": 0,
            "MaxWeightRestriction": 0,
            "EventRepetitionDetails": {
                    "RepetitionID": "One Time Event",
                    "Occurs": "N/A",
                    "SkipHolidays": "N/A",
                    "StartDate": "N/A",
                    "EndDate": "N/A",
                    "DailyStartTime": "N/A"
                    "DailyEndTime": "N/A"
                },
            "Detours": [
                {
                    "DetourID": 6982,
                    "Direction": "E",
                    "VehicleType": "B",
                    "ColorID": "4",
                    "TotalLength": 5.144,
                    "Narrative": ""
                }
            ]
        }
    ]
}

winterConditions Method

The winterConditions method of the RCRS_Event_Data service returns Pennsylvania roadway winter condition information active in RCRS at the time of the request.

Properties

Properties Type Description
PropertiesTypeDescription
RoadSectionIDNumberThe unique ID for the road section.
CountyNumberThe county number associated with this road condition. The county numbers are not translated in the feed.

Please see the Code Table section of this document for a full list of County values.
CountyNameTextThe county name associated with this road condition.
ReportOrgIDNumberThe PennDOT district associated with the road condition.
FacilityTextThe display name of the roadway. In the case of 4-digit, smaller county roads, the route number is not included. The facility names between Events and Winter Conditions are not in the same format. This is a product of the 511 design and may be altered in the future.
StateTextAlways the two character State abbreviation for Pennsylvania: PA
FromLocTextText description of the starting location of the road condition. Since this data stream was designed for 511, there are some logic items to be aware of with the names of the beginning, ending, and incident locations for road conditions.
  • They are translated to the name the DOT has of the nearest landmark of those locations.
  • If a segment/offset is used in RCRS, the nearest exit or intersection is used and then the fields of <FromLocLatLong>, <ToLocLatLong>, and <IncidentLocLatLong> are used for each location type. If the actual location and the nearest translated location are more than a half-mile apart, then those fields are filled in to describe the distance in miles and a cardinal direction from the translated location. The Lat/Long is always the exact location, not the translated location.
FromLocLatLongTextThe Latitude and Longitude of the starting location of the road condition in the format: xx.xxxxxxxxxxxxx, -yy.yyyyyyyyyyyyy
ToLocTextText description of the ending location of the road condition.
ToLocLatLongTextThe Latitude and Longitude of the ending location of the road condition in the format: xx.xxxxxxxxxxxxx, -yy.yyyyyyyyyyyyy
ConditionIDNumberNumeric value that indicates the condition of the roadway.

Please see the Code Table section of this document for the full list of ConditionID values.
ConditionTextShort text description value that indicates the condition of the roadway.

Please see the Code Table section of this document for the full list of Condition text values.
LastUpdateDate/TimeThe last date and time this road condition was updated in RCRS in the format: YYYY-MM-DD HH:MM.

Example

HTTP Request

The following is a sample HTTP GET request using jQuery AJAX. The placeholders shown need to be replaced with the PDAuth credentials.

$.ajax({
    url: 'https://www.dot511.state.pa.us/RCRS_Event_Data/api/RCRS/winterConditions',
    type: 'GET',
    data: '',
    dataType: 'json',
    beforeSend: function (xhr) {
        xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + 
   password));
    },
    success: function (result, status, XMLHttpRequest) {
        //on success
    },
    error: function (XMLHttpRequest, status, error) {
        //on error
    }
});

HTTP Response

The following is a sample HTTP response from the winterConditions method.

{
    "Values": [
        {
            "RoadSectionID": 233,
            "County": "09",
            "ReportOrgID": "06",
            "Facility": "0001  (US - 001)",
            "State": "PA",
            "FromLoc": "Intersection of LC TO OLD LINCOLN HW in BENSALEM  [2TWP]",
            "FromLocLatLong": "40.121135439041,-74.9779317190033",
            "ToLoc": "New Jersey State Line",
            "ToLocLatLong": "40.2060970735319,-74.7740916763213",
            "ConditionID": 1,
            "Condition": "Clear",
            "LastUpdate": "04/10/2016 08:21 AM"
        }
    ]
}

Code Tables

ConditionID

ConditionIDConditionDescription
1ClearNo snow or ice is bonded or accumulated on the road surface. Bare pavement surface is maintained at all times.
2Wet with Freezing ConditionsBare/wet pavement surface is the general condition. There are occasional areas having snow or ice accumulations resulting from drifting, sheltering, cold spots, frozen melt-water, etc.
3Snow and/or Slush CoveredAccumulations of loose snow or slush ranging up to (2 in.) are found on the pavement surface. Packed and bonded snow and ice are not present.
4Snow Packed/Significant Snow CoverThe pavement surface has continuous stretches of packed snow with or without loose snow on top of the packed snow or ice.
5IcyThe pavement surface is completely covered with packed snow and/or ice. There may be loose snow on top of the icy or packed snow surface.
6ImpassableThe road is temporarily impassable. This may be the result of severe weather (low visibility, etc.) or road conditions (drifting, excessive unplowed snow, avalanche potential or actuality, glare ice, accidents, vehicles stuck on the road, etc.).

County

Code Description
CodeDescription
1ADAMS
2ALLEGHENY
3ARMSTRONG
4BEAVER
5BEDFORD
6BERKS
7BLAIR
8BRADFORD
9BUCKS
10BUTLER
11CAMBRIA
12CAMERON
13CARBON
14CENTRE
15CHESTER
16CLARION
17CLEARFIELD
18CLINTON
19COLUMBIA
20CRAWFORD
21CUMBERLAND
22DAUPHIN
23DELAWARE
24ELK
25ERIE
26FAYETTE
27FOREST
28FRANKLIN
29FULTON
30GREENE
31HUNTINGDON
32INDIANA
33JEFFERSON
34JUNIATA
35LACKAWANNA
36LANCASTER
37LAWRENCE
38LEBANON
39LEHIGH
40LUZERNE
41LYCOMING
42MCKEAN
43MERCER
44MIFFLIN
45MONROE
46MONTGOMERY
47MONTOUR
48NORTHAMPTON
49NORTHUMBERLAND
50PERRY
51PIKE
52POTTER
53SCHUYLKILL
54SNYDER
55SOMERSET
56SULLIVAN
57SUSQUEHANNA
58TIOGA
59UNION
60VENANGO
61WARREN
62WASHINGTON
63WAYNE
64WESTMORELAND
65WYOMING
66YORK
67PHILADELPHIA

Direction

CodeDescription
northboundEvent affected north bound lane(s).
southboundEvent affected south bound lane(s).
eastboundEvent affected east bound lane(s).
westboundEvent affected west bound lane(s).
both directionsEvent affected lanes in both directions of the roadway.
all directionsEvent affected all directions or direction is not applicable for event.

EventType

CodeDescription
crashCRASH (Event Class: 1)
debris on roadwayDEBRIS ON ROADWAY (Event Class: 1)
winter weatherWINTER WEATHER (Event Class: 1)
special eventSPECIAL EVENT (Event Class: 14)
other incidentOTHER (Event Class: 1)
roadworkROADWORK (Event Class: 3)
floodingFLOODING (Event Class: 1)
bridge outageBRIDGE OUTAGE (Event Class: 1)
downed utilityDOWNED UTILITY (Event Class: 1)
downed treeDOWNED TREE (Event Class: 1)
bridge precautionBRIDGE PRECAUTION (Event Class: 1)
multi vehicle crashCRASH (Multi-vehicle) (Event Class: 1)
disabled vehicleDISABLED VEHICLE (Event Class: 1)
slow vehicleSLOW VEHICLE (Event Class: 1)
vehicle fireVEHICLE FIRE (Event Class: 1)
police department activityPOLICE ACTIVITY (Event Class: 1)

LaneStatus

CodeDescription
openAll lanes are open and event is cleared from system and roadway.
closedAll lanes of traffic are closed.
lane restrictionOne or more lanes of a roadway are closed, but at least one is still open to traffic.
shoulder closedAn incident is on the side of road, not blocking any lanes of traffic.
traffic disruptionAll other incidents and issues that do no closed or restrict part of the roadway.
ramp closureIndicates a ramp as closed, but it is depicted on the road exiting from, not the ramp itself.
ramp restrictionIndicates a ramp as restricted but open to traffic, but it is depicted on the road exiting from, not the ramp itself.
speed restrictionIndicates a restriction in the speed limit on a roadway.
vehicle restrictionIndicates a restriction for the types of vehicles on a roadway.
no entry accessIndicates a roadway`s vehicle entry points are closed, leaving the roadway open to traffic currently on it.

PoliceJurisText

CodeDescription
PSPPennsylvania State Police
LOCALLocal Police

ReportOrgID

CodeDescription
01District 01: Erie,Crawford,Forest,Mercer,Venango,Warren
02District 02: Cameron,Centre,Clearfield,Clinton,Elk,Juniata,McKean,Mifflin,Potter
03District 03: Bradford,Columbia,Lycoming,Montour,Northumberland,Snyder,Sullivan,Tioga,Union
04District 04: Lackawanna,Luzerne,Pike,Susquehanna,Wayne,Wyoming
05District 05: Berks,Carbon,Lehigh,Monroe,Northampton,Schuylkill
06District 06: Bucks,Chester,Delaware,Montgomery,City and County of Philadelphia
07NOT USED
08District 08: Adams,Cumberland,Dauphin,Franklin,Lancaster,Lebanon,Perry,York
09District 09: Bedford,Blair,Cambria,Fulton,Huntingdon,Somerset
10District 10: Armstrong,Butler,Clarion,Indiana,Jefferson
11District 11: Allegheny,Beaver,Lawrence
12District 12: Greene,Fayette,Washington,Westmoreland

VehicleRestrictText

CodeDescription
ALL COMMERCIAL VEHICLESRestriction applies to all commercial vehicles.
COMBINATION LOADSRestriction applies to vehicles towing combination loads.
EMPTY TRAILER TRUCKSRestriction applies to empty trailer trucks.
MOTORCYCLESRestriction applies to motorcycles.
PERMITTED LOADSRestriction applies to permitted loads.
RV/CAMPERSRestriction applies to recreation or camper vehicles.
STRAIGHT TRAILERRestriction applies to straight trailers.
TWIN TRAILERRestriction applies to vehicles towing twin trailers.
VEHICLES WITH TOW BEHIND TRAILERSRestriction applies to vehicles with tow behind trailers.

AffectedLanes

CodeDescription
Left ShoulderLeft shoulder is closed/restricted.
Left LaneLeft lane is closed/restricted.
Left CenterLeft center is closed/restricted.
CenterCenter is closed/restricted.
Right CenterRight center is closed/restricted.
Right LaneRight lane is closed/restricted.
Right ShoulderRight shoulder is closed/restricted.
NoneNo lane/shoulder is closed/restricted.

Occurs

CodeDescription
DailyRepetitive Event will occur every day of the week.
WeekdaysRepetitive Event will occur on weekdays, Monday Through Friday.
WeekendsRepetitive Event will occur on weekends, Saturday and Sunday.
[Other]The day of the week, or a list of days, that the Repetitive Event will occur (e.g., "Monday, Wednesday and Friday" or "Tuesday and Thursday").

Last updated Feb. 1, 2019