Reverse Geocoding

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

URL 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 locationComplex
CoordsEncapsulates the details about the longitude/latitudeComplex
RegionIndicates the region of the locationEnum0 - 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 stopstring
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

string0xztR_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.stringExact, 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 namestringOne Independence Way
CityThe name of the citystringPrinceton
StateThe two letter state abbreviationstringNJ
ZipThe postal code or zipstring08540
CountyThe county or jurisdiction.stringMercer
CountryThe name of the countrystring
SPLCThe Standard Point Location code to use in place of street/city/state/zipstring
CountryPostalFilterThe postal code filter; use this to filter zip codes by countryEnum0 - US
1- Mexico
2 - Both
AbbreviationFormatThe abbreviation format for the country code. This is not applicable for NA dataset. See Lookup table in Glossary.Enum0 - FIPS
1 - ISO2
2 - ISO3
3 - GENC2
4 - GENC3
CountryAbbreviationAbbreviated country code corresponding to requested format.string0 - FIPS (default)
1 - ISO2
2 - ISO3
3 - GENC2
4 - GENC3

Coordinates

Data ElementDescriptionData TypeValue/Example
LatLatitudestring
LonLongitudestring

SpeedLimitInfo

Data ElementDescriptionData TypeValue/Example
Speedthe posted Speed Limit of the roadinteger
SpeedTypeSpeed Limit TypeEnum0 (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.stringClosed, Interstate, InterstateNoRamps, Divided, Primary, Ferry, Secondary, Ramp, Local
UnitsThe speed unit.stringKPH, MPH

Errors

Data ElementDescriptionData TypeValue/Example
TypeIndicates whether the error is an exception or warningEnumWarning Exception
CodeError codeEnumPlease 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 March 31, 2020.