Reverse Geocoding

Contents

Reverse Geocoding allows you to retrieve the nearest address for given longitude and latitude coordinates.

The response from the reverse geocode method is a JSON-formatted object that contains the longitude and latitude coordinates for the address, if the address could be geocoded.

GET /locations/reverse

Resource URL

https://pcmiler.alk.com/apis/rest/v1.0/service.svc/locations/reverse

Parameters

Below are the most frequently used parameters for this API. Please go here for a full list of request parameters.

Required parameters are highlighted in yellow.

Request

API KEY
GET

Response

Reverse Geocode Response (Similar to Geocode Response table)

must be set to true in the reverse geocoding request in order to return Places information. PlaceName will be empty if it is not set to true or if there is no Places information associated with the geocoded location.
Data ElementDescriptionData TypeValue/Example
AddressEncapsulates the details about the location
Complex
CoordsEncapsulates the details about the longitude/latitude
Complex
RegionIndicates the region of the location
Enum
0 - Unknown
1 - AF
2 - AS
3 - EU
4 - NA(default)
5 - OC
6 - SA
7 - ME
LabelThe label to be displayed on maps and reports in association with a stop
string
PlaceNameIf the geocoded coordinates fall within a Site surrounding a Custom Place or a verified Place in the Trimble MAPS database, this parameter will return the TrimblePlaceId and the name of any Places within that Site. The ID and name are separated by "|||" and multiple Places within the Site are separated by "::".

includeTrimblePlaceIds

string
0xztR_iLMWM0eZWyV3GACigA|||Costco #175::0x4Y4CTmYr6kauPugLT9k4zg|||Costco #265
ErrorsEncapsulated the details about the errors associated with the geocode locationList of Complex Objects
ConfidenceLevelThe confidence level of the match.
string
Exact, Good, Uncertain, Failed
DistanceFromRoadThe distance from coordinate to nearest road.
double
SpeedLimitInfoEncapsulated information related to posted speed limit.
Complex
TimeZoneTime zone where the geocoded result is situated within.
string
SpeedLimitHeadingHeading used for reverse geocoding to properly snap to the right link.
double

Address

Data ElementDescriptionData TypeValue/Example
StreetAddressThe house number and street name
string
One Independence Way
CityThe name of the city
string
Princeton
StateThe two letter state abbreviation
string
NJ
ZipThe postal code or zip
string
08540
CountyThe county or jurisdiction.
string
Mercer
CountryThe name of the country
string
SPLCThe Standard Point Location code to use in place of street/city/state/zip
string
CountryPostalFilterThe postal code filter; use this to filter zip codes by country
Enum
0 - US
1- Mexico
2 - Both
AbbreviationFormatThe abbreviation format for the country code. This is not applicable for NA dataset. See Lookup table in Glossary.
Enum
0 - FIPS
1 - ISO2
2 - ISO3
3 - GENC2
4 - GENC3
CountryAbbreviationAbbreviated country code corresponding to requested format.
string
0 - FIPS (default)
1 - ISO2
2 - ISO3
3 - GENC2
4 - GENC3

Coordinates

Data ElementDescriptionData TypeValue/Example
LatLatitude
string
LonLongitude
string

SpeedLimitInfo

Data ElementDescriptionData TypeValue/Example
Speedthe posted Speed Limit of the road
integer
SpeedTypeSpeed Limit Type
Enum
0 (Default road speed based on road classification)
1 (Historic road data)
2 (Premium speed data)
3 (Navteq data outside of NA)
4 (LinkBased)
LinkIdsUnique link identifiers when includeLinkInfo supplied true in request.
integer
RoadClassThe class of the Road.
string
Closed, Interstate, InterstateNoRamps, Divided, Primary, Ferry, Secondary, Ramp, Local
UnitsThe speed unit.
string
KPH, MPH

Errors

Data ElementDescriptionData TypeValue/Example
TypeIndicates whether the error is an exception or warning
Enum
Warning Exception
CodeError code
Enum
Please refer to Appendix for complete list
LegacyErrorCodeThe legacy error code with is an integer valued code that would have been returned in PC*MILER Web Services v25 and earlier.
Int
DescriptionThe detailed error description.
string
Last updated April 30, 2020.