Skip to content

Route and milepost geocoding

Geocoding allows you to get the geographic location (i.e., the geographical coordinates) from text. This UGRC API endpoint allows you to get the coordinates of a highway number and milepost. This endpoint uses the UDOT Roads and Highways system as its authoritative data source.

URI Format

Parameters

Required path parameters

route

A Utah highway number. Omit the interstate or state route prefix.

  • Type: number
  • Example: 15

milepost

A milepost number along the route. The precisions is 1/1000 (3 decimal places) of a mile which is approximately 5 feet.

  • Type: number
  • Example: 309.001

Optional query string parameters

side

Mileposts, on divided highways, have different locations when traveling along the route in the increasing or decreasing direction. When traveling in the increasing direction milepost values are getting larger and when traveling on the decreasing side of the divided highway, the milepost values are getting smaller.

  • Type: string
  • Default: increasing
  • Can be one of: increasing, decreasing

fullRoute

Advanced clients who know the full route name, e.g., 0015PC30554 as it is stored in the UDOT Roads and Highway system can enable this flag and search using the full route name.

  • Type: boolean
  • Default: false
  • Can be one of: true, false

spatialReference

The spatial reference defines how the coordinates will represent a location on the earth defined by how the round earth was made flat. The well known id’s (WKID) of different coordinate systems define if the coordinates will be stored as degrees of longitude and latitude, meters, feet, etc. This endpoint supports the WKIDs from the Geographic Coordinate System reference and the Projected Coordinate System reference. UTM Zone 12 N, with the WKID of 26912, is the default. This coordinate system is the most accurate reflection of Utah. It is recommended to use this coordinate system if length and area calculations are important as other coordinate systems will skew the truth.

  • Type: number
  • Default: 26912
Reference Information

format

There are three output formats for the result object. The default being empty. esrijson will parse into an esri.Graphic for mapping purposes and geojson will format as a Feature. If this value is omitted, the default json will be returned.

  • Type: string
  • Can be one of: esrijson, geojson

callback

The callback function to execute for cross domain javascript calls (jsonp). This API supports CORS and does not recommend the use of callback and jsonp.

  • Type: string

Response Shapes

{
"result": {
"source": "UDOT Roads and Highways",
"location": {
"x": 423189.63207006006,
"y": 4513941.741726235
},
"matchRoute": "Route 15P, Milepost 309.001"
},
"status": 200
}