INRIX IQ logo

The INRIX GetSegmentsIn* API returns the segments that are contained within a specified geographic area or route. You may request either INRIX XD Segments (XDS) or TMC segments.

Specifically the following apis exist: GetSegmentsInBox, GetSegmentsInRadius, GetSegmentsInGeography, GetSegmentsInRoute

Segments FAQ

  1. What is a segment?
    • The basic element of a road network that we use to communicate speeds and incidents on a road.
  2. What types of segments does INRIX support?
    • XDSegment
      • XD segments are an INRIX-proprietary road segmentation sytem which have the following important characteristics:
      • XD segments break at significant intersections. Significance is determined primarily by the relative importance of the intersecting roads. For example, it is not desirable to have an XD segment, on a major arterial road, break at every minor side street or parking lot entrance.
      • XD segments are a maximum of 1,600 meters in length. Sometimes this requirement means that a segment break will occur away from any intersection.
      • The exact rules for the segmentation of road links and the classification of intersections are proprietary to INRIX.
      • Separate XD segments are generated for each direction of traffic flow on a map link. This allows INRIX to calculate and report on direction-specific behaviors on the associated road. Note that this applies to both bi-directional roadbeds on the normal street network and to the reversible roadbeds often found on major highways to expand AM/PM rush-hour traffic capacity.
    • TMCs
      • TMC segments are an encoding of TMC location tables onto the linear road network. See https://en.wikipedia.org/wiki/Traffic_message_channel for a description of the TMC system. TMC tables are created and maintained, typically at a country level, by various third-party entities. These location tables are reviewed and certified by the international standards body, TISA. Once certified, they are taken by the map vendors and encoded onto their map links for the associated roads. INRIX in turn takes those encodings and generates the INRIX TMC segment coverage, which is used as an alternative to XD segments for delivering traffic data to our customers. Because of technical limitations in the TMC spec and high resource requirements for creating the location tables, the overall TMC network is quite sparse, covering mostly major roads. This was part of the motivation for INRIX’s invention and development of the XD network, which allows greater coverage on all classes of roads.
  3. Keeping segments updated as road network changes
    • To keep up with the continual evolution of the road network, INRIX updates the map data underlying our segments frequently.
  4. How do I match INRIX XD segments to the segment IDs which my company uses?
    • INRIX provides several different ways to geospatially describe our XD segments in a map independent way which can be used to conflate XD segments to other road segmentation systems. As an example, this file contains shapefile definitions of our XD segments for both San Francisco, USA and Frankfurt, Germany. Alternately these files for San Francisco and Frankfurt contain the output of the GetSegment API calls for these locations.

/?Action=GetSegmentsInBox

GET Retrieves segments for a specified rectangular region.

Parameters

  = required
Name Located In Type Description
action Query String Use GetSegmentsInBox
Token Query String A valid authorization token returned in response to a GetSecurityToken request.
Corner1 Query String The first corner of the region in which to get data. This parameter must be specified as a pair of latitude and longitude values separated by a pipe character (|), in the form Corner1=”latitude|longitude”. The latitude and longitude values are expressed using the WGS 84 datum. Northern latitudes are positive and southern latitudes are negative. Eastern hemisphere longitudes are positive and western hemisphere longitudes are negative. Longitudes in North America are negative. The corner specified by the Corner1 parameter can be any of the four corners of the bounding rectangle.
Corner2 Query String The second corner of the region in which to get data. The Corner2 parameter is the geometric opposite of Corner1.
SegmentOutputFields Query String The segment fields to be returned in the response. This parameter can specify a single field, or multiple fields in a comma-separated list such as “RoadInfo,LocationInfo”.
If this SegmentOutputFields is not specified, only the top level segment info is returned.
Value Description
RoadInfo Returns information about the road the segment is on
LocationInfo Returns the location of the segment
All Returns all the information associated with the segment
FRCLevel Query String The Functional Road Classification code of the Segments to report. Multiple codes can be specified in a comma-delimited list.
Value Description
All (default) Report all road types.
1 First class roads, such as national highway network roads.
2 Second class roads, such as state highway network roads.
3 Third class roads, such as state interconnecting network roads.
4 Fourth class roads, such as major connecting roads.
5 Fifth class roads, such as minor roads connecting suburbs and destination and destination collector roads.
Units Query Integer Use 0 for English units, 1 for metric. Default is 0.
RoadSegmentType Query String This indicates the type of Segment to return. If RoadSegmentType is not specified, INRIX XD Segments (XDS) are returned. Multiple RoadSegmentTypes can be specified in a call as a comma separated ordered list and the ordering matters. For instance, if “TMC,XDS” is specified, TMCs will be returned for all TMC-defined road segments, and INRIX XD Segments will be returned for additional road segments not defined by the TMC Table and where traffic coverage is available. If “XDS,TMC” is specified then XD Segments will be returned where available, else TMC segments would be returned. However as XD segments in general cover all TMC locations this call would return only XD Segments.
Value Description
XDS (default) INRIX XD Segments
TMC INRIX Default TMC Tables

Requests

Example GetSegmentsInBox Request
Query
http://{serverPath}.INRIX.com/...?Action=GetSegmentsInBox&Token={token}&Corner1=47.63905031375326|-122.2366032595215&Corner2=47.63487345599106|-122.23214006372069&RoadSegmentType=TMC,XDS

Responses

200 Success
<Inrix docType="GetSegmentInBox" copyright="Copyright INRIX Inc." versionNumber="5.21" createdDate="2014-07-23T20:09:26Z" statusId="0" statusText="" responseId="d94cb652-6470-4e1d-9af6-8632bd204bb6">
  <SegmentResultSet>
    <Segment code="114+04232" type="TMC"/>
    <Segment code="114N04232" type="TMC"/>
    <Segment code="114-04231" type="TMC"/>
    <Segment code="114P04232" type="TMC"/>
    <Segment code="114+04233" type="TMC"/>
    <Segment code="114P04233" type="TMC"/>
    <Segment code="3557921" type="XDS"/>
  </SegmentResultSet>
</Inrix>

Response Elements

Property Type Description
SegmentResultSet Array Represents a collection of segments.
Property Type Description
Segment Element Represents a segment.
Property Type Description
code Attribute (string) Unique identifier for the segment. The value would be the TMC code or the INRIX XD Segment ID.
type Attribute (string) Indicates type of segment. Possible values are “TMC” and “XDS”. XDS refers to a segment type of INRIX XD segment.
Offset Attribute (integer,integer) Start and end offset on the segment in meters.
RoadInfo Element Defines the information about the road on which this segment lies.
Property Type Description
RefSpeed Attribute (integer) The free flow speed on the segment.
Length Attribute (float) Length of segment in meters.
FRCLevel Attribute (integer) The Functional Road Classification code of the Segments, as described above.
Name Element (string) Name of the road that the segment is on.
LocationInfo Element Defines the information about the road on which this segment lies.
Property Type Description
Country Element (string) Represents the country the segment is in.
Center Element (string) Represents the longitude and latitude for the center of the segment.

/?Action=GetSegmentsInRadius

GET Retrieves segments in a radius.

Parameters

  = required
Name Located In Type Description
action Query String Use GetSegmentsInRadius
Token Query String A valid authorization token returned in response to a GetSecurityToken request.
Center Query String The center of the region in which to get data. This parameter must be specified as a pair of latitude and longitude values separated by a pipe character (|), in the form Center=”latitude|longitude”. Northern latitudes are positive and southern latitudes are negative. Eastern hemisphere longitudes are positive and western hemisphere longitudes are negative. Longitudes in North America are negative. The latitude and longitude values are expressed using the WGS 84 datum.
Radius Query Double The radius of the circular bounding area from which to return data. Any features that are fully or partially enclosed within the bounding area are selected. If the Units parameter is set to Metric, the radius is measured in kilometers; if Units is set to US (the default), the radius is measured in miles.
SegmentOutputFields Query String The segment fields to be returned in the response. This parameter can specify a single field, or multiple fields in a comma-separated list such as “RoadInfo,LocationInfo”.
If this SegmentOutputFields is not specified, only the top level segment info is returned.
Value Description
RoadInfo Returns information about the road the segment is on
LocationInfo Returns the location of the segment
All Returns all the information associated with the segment
FRCLevel Query String The Functional Road Classification code of the Segments to report. Multiple codes can be specified in a comma-delimited list.
Value Description
All (default) Report all road types.
1 First class roads, such as national highway network roads.
2 Second class roads, such as state highway network roads.
3 Third class roads, such as state interconnecting network roads.
4 Fourth class roads, such as major connecting roads.
5 Fifth class roads, such as minor roads connecting suburbs and destination and destination collector roads.
Units Query Integer Use 0 for English units, 1 for metric. Default is 0.
RoadSegmentType Query String This indicates the type of Segment to return. If RoadSegmentType is not specified, INRIX XD Segments (XDS) are returned. Multiple RoadSegmentTypes can be specified in a call as a comma separated ordered list and the ordering matters. For instance, if “TMC,XDS” is specified, TMCs will be returned for all TMC-defined road segments, and INRIX XD Segments will be returned for additional road segments not defined by the TMC Table and where traffic coverage is available. If “XDS,TMC” is specified then XD Segments will be returned where available, else TMC segments would be returned. However as XD segments in general cover all TMC locations this call would return only XD Segments.
Value Description
XDS (default) INRIX XD Segments
TMC INRIX Default TMC Tables

Requests

Example GetSegmentsInRadius Request
Query
http://{serverPath}.INRIX.com/...?Action=GetSegmentsInRadius&Token={token}&Center=47.60934091460299|-122.33118867822266&Radius=1.5&RoadSegmentType=TMC,XDS

Responses

200 Success
<Inrix docType="GetSegmentInRadius" copyright="Copyright INRIX Inc." versionNumber="5.21" createdDate="2014-07-23T20:09:26Z" statusId="0" statusText="" responseId="d94cb652-6470-4e1d-9af6-8632bd204bb6">
  <SegmentResultSet>
    <Segment code="114+04232" type="TMC"/>
    <Segment code="114N04232" type="TMC"/>
    <Segment code="114-04231" type="TMC"/>
    <Segment code="114P04232" type="TMC"/>
    <Segment code="114+04233" type="TMC"/>
    <Segment code="114P04233" type="TMC"/>
    <Segment code="3557921" type="XDS"/>
  </SegmentResultSet>
</Inrix>

Response Elements

Property Type Description
SegmentResultSet Array Represents a collection of segments.
Property Type Description
Segment Element Represents a segment.
Property Type Description
code Attribute (string) Unique identifier for the segment. The value would be the TMC code or the INRIX XD Segment ID.
type Attribute (string) Indicates type of segment. Possible values are “TMC” and “XDS”. XDS refers to a segment type of INRIX XD segment.
Offset Attribute (integer,integer) Start and end offset on the segment in meters.
RoadInfo Element Defines the information about the road on which this segment lies.
Property Type Description
RefSpeed Attribute (integer) The free flow speed on the segment.
Length Attribute (float) Length of segment in meters.
FRCLevel Attribute (integer) The Functional Road Classification code of the Segments, as described above.
Name Element (string) Name of the road that the segment is on.
LocationInfo Element Defines the information about the road on which this segment lies.
Property Type Description
Country Element (string) Represents the country the segment is in.
Center Element (string) Represents the longitude and latitude for the center of the segment.

/?Action=GetSegmentsInGeography

GET Retrieves segments for a specified region.

Parameters

  = required
Name Located In Type Description
action Query String Use GetSegmentsInGeography
Token Query String A valid authorization token returned in response to a GetSecurityToken request.
GeoId Query String The ID of the specified geography. For more information on how to obtain the ID, see GetGeography. When using a custom GeoId (previously created with CreateGeography), the first call will create cached files. Once these have been created the call will return the correct information.
SegmentOutputFields Query String The segment fields to be returned in the response. This parameter can specify a single field, or multiple fields in a comma-separated list such as “RoadInfo,LocationInfo”.
If this SegmentOutputFields is not specified, only the top level segment info is returned.
Value Description
RoadInfo Returns information about the road the segment is on.
LocationInfo Returns the location of the segment.
All Returns all the information associated with the segment.
FRCLevel Query String The Functional Road Classification code of the Segments to report. Multiple codes can be specified in a comma-delimited list.
Value Description
All (default) Report all road types.
1 First class roads, such as national highway network roads.
2 Second class roads, such as state highway network roads.
3 Third class roads, such as state interconnecting network roads.
4 Fourth class roads, such as major connecting roads.
5 Fifth class roads, such as minor roads connecting suburbs and destination roads.
Units Query Integer Use 0 for English units, 1 for metric. Default is 0.
RoadSegmentType Query String This indicates the type of Segment to return. If RoadSegmentType is not specified, INRIX XD Segments (XDS) are returned. Multiple RoadSegmentTypes can be specified in a call as a comma separated ordered list and the ordering matters. For instance, if “TMC,XDS” is specified, TMCs will be returned for all TMC-defined road segments, and INRIX XD Segments will be returned for additional road segments not defined by the TMC Table and where traffic coverage is available. If “XDS,TMC” is specified then XD Segments will be returned where available, else TMC segments would be returned. However as XD segments in general cover all TMC locations this call would return only XD Segments.
Value Description
XDS (default) INRIX XD Segments
TMC INRIX Default TMC Tables

Requests

Example GetSegmentsInGeography Request
Query
http://{serverPath}.INRIX.com/...?Action=GetSegmentsInGeography&Token={token}&GeoId=237&RoadSegmentType=TMC,XDS

Responses

200 Success
<Inrix docType="GetSegmentInGeography" copyright="Copyright INRIX Inc." versionNumber="5.21" createdDate="2014-07-23T20:09:26Z" statusId="0" statusText="" responseId="d94cb652-6470-4e1d-9af6-8632bd204bb6">
  <SegmentResultSet>
    <Segment code="114+04232" type="TMC"/>
    <Segment code="114N04232" type="TMC"/>
    <Segment code="114-04231" type="TMC"/>
    <Segment code="114P04232" type="TMC"/>
    <Segment code="114+04233" type="TMC"/>
    <Segment code="114P04233" type="TMC"/>
    <Segment code="3557921" type="XDS"/>
  </SegmentResultSet>
</Inrix>

Response Elements

Property Type Description
SegmentResultSet Array Represents a collection of segments.
Property Type Description
Segment Element Represents a segment.
Property Type Description
code Attribute (string) Unique identifier for the segment. The value would be the TMC code or the INRIX XD Segment ID.
type Attribute (string) Indicates type of segment. Possible values are “TMC” and “XDS”. XDS refers to a segment type of INRIX XD segment.
Offset Attribute (integer,integer) Start and end offset on the segment in meters.
RoadInfo Element Defines the information about the road on which this segment lies.
Property Type Description
RefSpeed Attribute (integer) The free flow speed on the segment.
Length Attribute (float) Length of segment in meters.
FRCLevel Attribute (integer) The Functional Road Classification code of the Segments, as described above.
Name Element (string) Name of the road that the segment is on.
LocationInfo Element Defines the information about the road on which this segment lies.
Property Type Description
Country Element (string) Represents the country the segment is in.
Center Element (string) Represents the longitude and latitude for the center of the segment.

/?Action=GetSegmentsInRoute

GET Retrieves segments in a specified route.

Parameters

  = required
Name Located In Type Description
action Query String Use GetSegmentsInRoute
Token Query String A valid authorization token returned in response to a GetSecurityToken request.
RouteId Query String A valid route ID, returned from a previous call to FindRoute, from which to return Segments.
SegmentOutputFields Query String The segment fields to be returned in the response. This parameter can specify a single field, or multiple fields in a comma-separated list such as “RoadInfo,LocationInfo”.
If this SegmentOutputFields is not specified, only the top level segment info is returned.
Value Description
RoadInfo Returns information about the road the segment is on
LocationInfo Returns the location of the segment
All Returns all the information associated with the segment
FRCLevel Query String The Functional Road Classification code of the Segments to report. Multiple codes can be specified in a comma-delimited list.
Value Description
All (default) Report all road types.
1 First class roads, such as national highway network roads.
2 Second class roads, such as state highway network roads.
3 Third class roads, such as state interconnecting network roads.
4 Fourth class roads, such as major connecting roads.
5 Fifth class roads, such as minor roads connecting suburbs and destination roads.
Units Query Integer Use 0 for English units, 1 for metric. Default is 0.
RoadSegmentType Query String This indicates the type of Segment to return. If RoadSegmentType is not specified, INRIX XD Segments (XDS) are returned. Multiple RoadSegmentTypes can be specified in a call as a comma separated ordered list and the ordering matters. For instance, if “TMC,XDS” is specified, TMCs will be returned for all TMC-defined road segments, and INRIX XD Segments will be returned for additional road segments not defined by the TMC Table and where traffic coverage is available. If “XDS,TMC” is specified then XD Segments will be returned where available, else TMC segments would be returned. However as XD segments in general cover all TMC locations this call would return only XD Segments.
Value Description
XDS (default) INRIX XD Segments
TMC INRIX Default TMC Tables

Requests

Example GetSegmentsInRoute Request
Query
http://{serverPath}.INRIX.com/...?Action=GetSegmentsInRoute&Token={token}&RouteID=38140420&RoadSegmentType=XDS

Responses

200 Success
<Inrix docType="GetSegmentsInRoute" copyright="Copyright INRIX Inc." versionNumber="5.2" createdDate="2014-07-22T00:02:15Z" statusId="0" statusText="" responseId="f14e2705-c723-468c-8754-f5ef8300b6bf">
  <SegmentResultSet>
    <Segment code="3556698" type="XDS" offset="635,977">
      <RoadInfo refSpeed="31" length="0.635150583628844" FRCLevel="3">
        <Name>NE Points Dr|Northup Way</Name>
      </RoadInfo>
      <LocationInfo>
        <Country>US</Country>
        <Center longitude="-122.204025268555" latitude="47.6431274414063"/>
      </LocationInfo>
    </Segment>
    <Segment code="3557299" type="XDS" offset="52,103">
      <RoadInfo refSpeed="31" length="0.0646196600020101" FRCLevel="3">
        <Name>Lake Washington Blvd NE</Name>
      </RoadInfo>
      <LocationInfo>
        <Country>US</Country>
        <Center longitude="-122.201721191406" latitude="47.6437530517578"/>
      </LocationInfo>
    </Segment>
    ...
  </SegmentResultSet>
</Inrix>

Response Elements

Property Type Description
SegmentResultSet Array Represents a collection of segments.
Property Type Description
Segment Element Represents a segment.
Property Type Description
code Attribute (string) Unique identifier for the segment. The value would be the TMC code or the INRIX XD Segment ID.
type Attribute (string) Indicates type of segment. Possible values are “TMC” and “XDS”. XDS refers to a segment type of INRIX XD segment.
Offset Attribute (integer,integer) Start and end offset on the segment in meters.
RoadInfo Element Defines the information about the road on which this segment lies.
Property Type Description
RefSpeed Attribute (integer) The free flow speed on the segment.
Length Attribute (float) Length of segment in meters.
FRCLevel Attribute (integer) The Functional Road Classification code of the Segments, as described above.
Name Element (string) Name of the road that the segment is on.
LocationInfo Element Defines the information about the road on which this segment lies.
Property Type Description
Country Element (string) Represents the country the segment is in.
Center Element (string) Represents the longitude and latitude for the center of the segment.