Geocoding Fallback

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

The geocoding 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 geocoding 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 geocoding dataset. To implement this feature, you must install the World Geocoder geocoding dataset. The following examples, show the responses for cases where the feature is enabled with and without the World Geocoder geocoding dataset installed.

    Scenario 1: Using Fallback WITHOUT XWG 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: Using Fallback WITH XWG 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: Geocode
Request Type: GET
Parameter: fallbackPostal = true
Request Type: POST
Object : Element preferences : fallbackToPostal = true

For more information, 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: Geocode
Request Type: GET
Parameter: fallbackGeo = true
Request Type: POST
Object : Element preferences: fallbackToGeographic = true

For more information, see Geocode GET Request and Geocode POST Request.

Fallback to World

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

REST API Feature Implementation
Service: Geocode
Request Type: POST
Object : Element 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"
    }
} 

In a POST XML request, it would be specified as follows:

<preferences>
  <customPreferences>
    <entry>
      <key>FALLBACK_TO_WORLD</key>
      <value>true</value>
    </entry>
  </customPreferences>
</preferences>

For more information, see Geocode POST Request.