Skip to main content

Reverse Geocoding

Contents

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

GET /locations/reverse

Resource URL

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

Parameters

The table below includes the most frequently used parameters. Please see the Geocoding Overview page for a full list. If you would like to test out this API, enter values in the table and scroll down the page to submit your request. Required parameters are marked with an asterisk. Check the box next to any additional parameters you would like to set.

Request

API KEY
GET

Response

Reverse Geocode Response

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 "::".

includeTrimblePlaceIdsmust 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. Read more about retrieving posted speed limits.
Complex
TimeZone Time zone where the geocoded result is situated within.
string
TimeZoneOffset The geocoded location’s time zone as an offset to Greenwich Mean Time (GMT). The format is "GMT{offset}." For example, "GMT-5:00" for Eastern Standard Time in North America or “GMT+1:00” for the Western European Time Zone.
string
GMT+1:00
SpeedLimitHeading Heading used for reverse geocoding to properly snap to the right link.
double
isDST Returns true if the location observes daily savings time.
boolean

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. 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 June 18, 2024.
API Endpoint:

Contents