Geocoding API Methods

API methods for finding a geolocation (x,y) for addresses

Important Note: matchAddress returns the name of the address grid system name for the address. For example, "matchAddress": "10420 E Little Cottonwood Canyon, Salt Lake City" means that the address is part of the Salt Lake City address grid system. It is neither within the boundaries of Salt Lake City proper, nor is that the preferred mailing address placename.

We have compiled a group of samples in various programming languages showing how to use this API. Please look, learn, and contribute new languages if you are able. Also check out the great writeup of our web api.

Get /geocode/:street/:zone

Street and zone

Returns the geocoded address.

implemented
string required

A Utah street address. eg: 326 east south temple st. Intersections are separated by and.

string required

A Utah municipality name or 5 digit zip code.

string optional

The spatial reference of the input geographic coordinate pair. Choose any of the wkid's from the Geographic Coordinate System wkid reference or Projected Coordinate System wkid reference. 26912 is the default.

Popular WKID's
System wkid
Web Mercator 3857
Latitude/Longitude (WGS84) 4326
string optional

The format of the resulting address. esri json will easily parse into an esri.Graphic for display on a map and geojson will easily parse into a feature for use in many open source projects. If this value is omitted, normal json will be returned.

string optional

The callback function to call for cross domain javascript calls (jsonp).

number optional

Sets the score for an acceptable address match. The scale is over 0-100 with the default score being 70.

number optional

The number of suggests to return for a given geocoded address. Will return 0 suggestions if the match score for the input address is above the accept score.

number optional

How the service will attempt to locate the address. All is a combination of address points locators and road centerline locators; This will offer the best results. addressPoints will only geocode on address points and roadCenterlines will only geocode on road centerlines. Default is All.

boolean optional

How the service will handle P.O. Boxes. True will return the coordinates of the post office where the mail is delivered. False will return no match. P.O. Boxes can only be processed if the zone is a zip code. If a place name is used in the zone the geocode will return no match. Default value is false

×
Code
Post /geocode/multiple

Multiple addresses

Returns a list of geocoded addresses. Addresses that do not meet the acceptScore are omitted from the returned list.

implemented
string required

A json array of Utah addresses. Maximum addresses to be geocoded per call is 100. The json schema is

number optional

Sets the score for an acceptable address match. The scale is over 0-100 with the default score being 70.

×
Code
Get /geocode/reverse/:x/:y

Reverse geocoding

Returns the reverse geocoded address.

implemented
number required

A geographic coordinate representing the longitude or easting.

number required

A geographic coordinate representing the latitdue or northing.

string required

The spatial reference of the input geographic coordinate pair. Choose any of the wkid's from the Geographic Coordinate System wkid reference or Projected Coordinate System wkid reference. 26912 is the default.

Popular WKID's
System wkid
Web Mercator 3857
Latitude/Longitude (WGS84) 4326
number optional

Sets the distance in meters from the geographic coordinate to find a street address. Default is 5 meters.

string optional

The callback function to call for cross domain javascript calls (jsonp).

×
Code
Get /geocode/milepost/:route/:milepost

Route and Milepost

Returns a geocoded milepost on a route.

implemented
number required

The Utah highway number. eg: 15.

number required

The highway milepost. eg: 309.001. Milepost precision is up to 1/1000 of a mile (approximately 5 feet).

string optional

For divided highways only.. The side of the divided highway to match. Increasing if you are on the positive side of the divided highway (The mileposts are getting larger as you drive). Decreasing if you are on the negative side of a divided highway (the mileposts are getting smaller as you drive). Default is Increasing.

string optional

The spatial reference of the input geographic coordinate pair. Choose any of the wkid's from the Geographic Coordinate System wkid reference or Projected Coordinate System wkid reference. 26912 is the default.

Popular WKID's
System wkid
Web Mercator 3857
Latitude/Longitude (WGS84) 4326
string optional

The callback function to call for cross domain javascript calls (jsonp).

string optional

The format of the resulting milepost. esri json will easily parse into an esri.Graphic for display on a map and geojson will easily parse into a feature for use in many open source projects. If this value is omitted, normal json will be returned.

×
Code
Get /geocode/milepost/:x/:y

Reverse Route and Milepost

Returns the closest route and milepost to the input coorindate.

implemented
number required

The x coordinate.

number required

The y coorindate.

string optional

False by default. If you would like to include ramps, collectors, and federal aide routes set this to True.

number optional

The buffer radius in meters. The default is 100 meters with the maximum value being 200 meters.

string optional

The spatial reference of the input geographic coordinate pair. Choose any of the wkid's from the Geographic Coordinate System wkid reference or Projected Coordinate System wkid reference. 26912 is the default.

Popular WKID's
System wkid
Web Mercator 3857
Latitude/Longitude (WGS84) 4326
string optional

The callback function to call for cross domain javascript calls (jsonp).

string optional

The format of the resulting milepost. esri json will easily parse into an esri.Graphic for display on a map and geojson will easily parse into a feature for use in many open source projects. If this value is omitted, normal json will be returned.

×
Code

SGID Info Methods

API methods for general SGID informational querying.

Get /info/FeatureClassNames

SGID Feature Class Names

Returns a list of feature class names from the most current SGID.

implemented
string optional

Filter feature classes by SGID categories.SGID93.Boundaries.Counties. If this parameter is omitted all feature class names will be returned.

number optional

AGRC will normally run two or more versions of the SGID to cater to its users while upgrading versions of the SGID. These versions are often different in structure as AGRC makes improvments. If this parameter is omitted the most current version will be used.

×
Code
Get /info/FieldNames/:featureClass

Feature Class Attribute Names

Returns a list of attribute names for the feature class.

implemented
string required

Feature class name: Counties.

string optional

Feature category: Boundaries. This should be provided if there are multiple table name sharing the same name in different categories. It is best practice to use this field.

number optional

AGRC will normally run two or more versions of the SGID to cater to its users while upgrading versions of the SGID. These versions are often different in structure as AGRC makes improvements. If this parameter is omitted the most current version will be used.

×
Code
Get /info/FeatureCount/:featureClass

Feature Count

Returns the number of features in a feature class.

not implemented
string required

Fully qualified feature class name eg: SGID93.Boundaries.Counties.

number optional

AGRC will normally run two or more versions of the SGID to cater to its users while upgrading versions of the SGID. These versions are often different in structure as AGRC makes improvements. If this parameter is omitted the most current version will be used.

×
Code

Road Network API Methods

API methods for road netork analysis.