Geocode GET Request
The GET request enables you to submit an input address and matching and/or geocoding preferences to the Geocode service and receive a response that provides the candidates object which contains the associated latitude/longitude coordinates and other matching and location information about each candidate. The preferences for a GET request are a subset of the total available with the POST request. Each key/value pair is separated by an ampersand (&).
Base URI
http://<server>:<port>/rest/GlobalGeocode/database/<DBname>/geocode[.content type]
Query Parameters
The following table defines the GET query parameters for the Geocode service. For information about the response, see GeocodeServiceResponse Object.
Parameter | Type | Description |
---|---|---|
POST: mainAddressLine GET: mainAddress |
String | Single Line input—If no other field is populated,
then the mainAddress entry will be treated as a
single line input and can be a collection of address field elements.
The input order of the address fields should reflect the normal
address formatting for your country. Optional. For example: 4750 Walnut St., Boulder CO, 80301 Multiline Input If the address fields (placeName, lastLine, postalCode, etc.) are provided separately, then the content of this field will be treated as the street address part and can include company name, house number, building names and street names. Optional. Street Intersection Input—To enter an intersection, specify the two street names separated by a double ampersand (&&). |
country | String | ISO 3166-1 alpha-3 country code. Required. For country codes, see ISO 3166-1 Country Codes. |
areaName1 | String | Specifies the largest geographic area, typically a state or province. Optional. |
areaName2 | String | Specifies the secondary geographic area, typically a county or district. Optional. |
areaName3 | String | Specifies a city or town name. Optional. |
areaName4 | String | Specifies a city subdivision or locality. Optional. |
POST: postCode1 GET: postalCode |
String | The postal code in the appropriate format for the country. Optional. |
POST: postCode2 |
String | The postal code in the appropriate format for the country. Optional. |
placeName | String | Building name, place name, Point of Interest (POI), company or
firm name associated with the input address. Optional. For example:
Precisely |
POST: addressLastLine GET: lastLine |
String | The last line of the address. Optional. |
matchMode | String | Match modes determine the leniency used to make a match between
the input address and the reference data. Select a match mode based
on the quality of your input and your desired output. The following
match modes are available:
|
fallbackGeo | Boolean | Specifies whether to attempt to determine a
geographic region centroid when an address-level geocode cannot be
determined. Optional.
|
fallbackPostal | Boolean | Specifies whether to attempt to determine a
post code centroid when an address-level geocode cannot be
determined. Optional.
|
maxCands | Integer | The maximum number of candidates to return. Optional. Must be an integer value. Default = 1. |
maxRanges | Integer | A range is a series of addresses along a street
segment. For example, 5400-5499 Main St. irepresents an address
range in the 5400 block of Main St. A range may represent just odd
or even addresses within a segment, or both. A range may also
represent a single building with multiple units, such as an
apartment building.
This option specifies the maximum number of ranges to return for each candidate. Since the geocoder returns one candidate per segment, and since a segment may contain multiple ranges, this option allows you to see the other ranges in a candidate's segment. Must be an integer value. Default = 0. |
maxRangeUnits | Integer | This option specifies the maximum number of
units (for example, apartments or suites) to return for each range.
For example, if you were to geocode an office building at 65 Main St. containing four suites, there would be a maximum of four units returned for the building's range: 65 Suite 1, 65 Suite 2, 65 Suite 3, and 65 Suite 4. If you were to specify a maximum number of units as 2, then only two units would be returned instead of all four. Must be an integer value. Default = 0. |
streetOffset | Double | The offset distance from the street segments. The distance is in
the units you specify in the streetOffsetUnits
preference. Default value = 7 meters.
The offset distance is used in street-level geocoding to prevent the geocode from being in the middle of a street. It compensates for the fact that street-level geocoding returns a latitude and longitude point in the center of the street where the address is located. For example, an offset of 50 feet means that the geocode will represent a point 50 feet back from the center of the street. The distance is calculated perpendicular to the portion of the street segment for the address. Offset is also used to prevent addresses across the street from each other from being given the same point. |
streetOffsetUnits | String | Unit of measurement for the street offset. One of the following: Feet, Meters (default). |
cornerOffset | Double | Distance to offset the street end points in street-level
matching. The distance is in the units you specify in the
cornerOffsetUnits preference. This value is
used to prevent addresses at street corners from being given the
same geocode as the intersection. Defines the offset position of the
geocoded point with respect to the corner. Default value = 7 meters.
The following diagram compares the end points of a street to offset end points. |
cornerOffsetUnits | String | Unit of measurement for the street offset. One of the following: Feet, Meters (default). |