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)

Data Element Description Data Type Value/Example
Address Encapsulates the details about the location
Complex
Coords Encapsulates the details about the longitude/latitude
Complex
Region Indicates the region of the location
Enum
0 - Unknown
1 - AF
2 - AS
3 - EU
4 - NA(default)
5 - OC
6 - SA
7 - ME
Label The label to be displayed on maps and reports in association with a stop
string
PlaceName If 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 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.

string
0xztR_iLMWM0eZWyV3GACigA|||Costco #175::0x4Y4CTmYr6kauPugLT9k4zg|||Costco #265
Errors Encapsulated the details about the errors associated with the geocode location List of Complex Objects
ConfidenceLevel The confidence level of the match.
string
Exact, Good, Uncertain, Failed
DistanceFromRoad The distance from coordinate to nearest road.
double
SpeedLimitInfo Encapsulated information related to posted speed limit.
Complex
TimeZone Time zone where the geocoded result is situated within.
string
SpeedLimitHeading Heading used for reverse geocoding to properly snap to the right link.
double

Address

Data Element Description Data Type Value/Example
StreetAddress The house number and street name
string
One Independence Way
City The name of the city
string
Princeton
State The two letter state abbreviation
string
NJ
Zip The postal code or zip
string
08540
County The county or jurisdiction.
string
Mercer
Country The name of the country
string
SPLC The Standard Point Location code to use in place of street/city/state/zip
string
CountryPostalFilter The postal code filter; use this to filter zip codes by country
Enum
0 - US
1- Mexico
2 - Both
AbbreviationFormat The 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
CountryAbbreviation Abbreviated country code corresponding to requested format.
string
0 - FIPS (default)
1 - ISO2
2 - ISO3
3 - GENC2
4 - GENC3

Coordinates

Data Element Description Data Type Value/Example
Lat Latitude
string
Lon Longitude
string

SpeedLimitInfo

Data Element Description Data Type Value/Example
Speed the posted Speed Limit of the road
integer
SpeedType Speed 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)
LinkIds Unique link identifiers when includeLinkInfo supplied true in request.
integer
RoadClass The class of the Road.
string
Closed, Interstate, InterstateNoRamps, Divided, Primary, Ferry, Secondary, Ramp, Local, SubLocal, Pathway
Units The speed unit.
string
KPH, MPH

Errors

Data Element Description Data Type Value/Example
Type Indicates whether the error is an exception or warning
Enum
Warning Exception
Code Error code
Enum
Please refer to Appendix for complete list
LegacyErrorCode The legacy error code with is an integer valued code that would have been returned in PC*MILER Web Services v25 and earlier.
Int
Description The detailed error description.
string
Last updated November 16, 2020.