Geocode Fallback

Using the Geocode fallback option enables the geocoder to attempt to return a less precise geocode when an address-level geocode cannot be determined.

The Geocode fallback options are as follows:

  • Fallback to Postal - Attempts to return a postal code centroid.
  • Fallback to Geographic - Attempts to return a centroid of a geographic area.

An additional fallback option can be implemented to cover the cases where either a country geocoder is not installed or a country geocoder is available but does not have a Geocode dataset installed, as follows:

  • Fallback to World - Attempts to use the World Geocoder (XWG) to return a geocode. The World Geocoder (XWG) may return either a postal or geographic geocode depending on the level of support in the XWG Geocode dataset. The following examples, show the responses for cases where the feature is enabled with and without the World Geocoder Geocode dataset installed.

    Scenario 1: World Geocoder (XWG) is installed WITHOUT data:

    • FALLBACK_TO_WORLD = false – The exception Error initializing data manager. is returned when an attempt is made to geocode for a country that does not have data installed.
    • FALLBACK_TO_WORLD = true – The exception Error initializing data manager. is returned when World Geocoder (XWG) data is not installed.

    Scenario 2: World Geocoder (XWG) is installed WITH data:

    • FALLBACK_TO_WORLD = false – The exception Error initializing data manager. is returned.
    • FALLBACK_TO_WORLD = true – If the fallback is performed, the results are returned, if possible.

Fallback to Postal

The following table provides information on how to implement the Fallback to Postal feature.

REST API Feature Implementation

Service:
Request Type:
Parameter:
Request Type:
Object:Element

Geocode
GET
fallbackPostal = true
POST
preferences : fallbackToPostal = true

For more details, see GeoCode GET Request and GeoCode POST Request.

Fallback to Geographic

The following table provides information on how to implement the Fallback to Geographic feature.

REST API Feature Implementation

Service:
Request Type:
Parameter:
Request Type:
Object:Element

Geocode
GET
fallbackGeo = true
POST
preferences: fallbackToGeographic = true

For more details, see GeoCode GET Request and GeoCode POST Request.

Fallback to World

The following tables provide information on how to implement the Fallback to World feature.

REST API Feature Implementation

Service:
Request Type:
Object:Element

Geocode
POST
customPreferences : FALLBACK_TO_WORLD = true

The customPreferences object is specified in the preferences object. For example, in a POST JSON request, it would be specified as follows:

"preferences" : {
  "customPreferences" : {
    "FALLBACK_TO_WORLD" : "true"
  }
}
For more details, see GeoCode POST Request.