Geocoding Preferences

You may need to change how the geocoder behaves or set some option that is not directly exposed. In order to do that you will need to edit the geocodePreferences.xml file located at:

hdfs:///precisely/geocoding/software/resources/config/geocodePreferences.xml.

If you do not want to store this remotely (on HDFS or S3), then it must exist on all data nodes and master nodes.

Commonly used preferences

This section describes the most commonly used preferences.
Note: To see the complete list of preferences, as well as the country-specific custom fields, refer to the Spectrum Global Geocoding SDK Developer Guide, which is also available on the Spectrum Spatial for Big Data documentation landing page.

PB_Key

Master Location Data datasets support a unique feature called PB_KEY. This is an identifier attached to every address record that facilitates data enrichment for faster and more informed decision making. To return PB_KEY, add one of the following XML elements in the geocodePreferences.xml file:

<!--   Return all geocoder custom field values in the response  -->
<returnAllAvailableCustomFields>true</returnAllAvailableCustomFields>
            
<!--   Return specific fields only  -->
<returnedCustomFieldKey>PB_KEY</returnedCustomFieldKey>

Additionally, you will still need to request PB_KEY using the outputFields parameter.

Default Coordinate System for Reverse Geocoding

If you do not specify the coordinate system when performing a reverse geocode, then the default used is WGS84 (EPSG:4326). If you want a different default to be used, then set the following XML element inside the geocodePreferences.xml file:

<returnedPointCoordinateSystem>epsg:3857</returnedPointCoordinateSystem>

Other fields

Output Fields

The output fields are specified using the geocoding-output-fields parameter set to a space-separated list of fields.

Note: For a complete list of available output fields, see the Spectrum Global Geocoding SDK Developer Guide, which is also available on the Spectrum Spatial for Big Data documentation landing page.

Errors

All input records will go to output. If a row errors then it will be put in the -output location. In the case where no candidates are found, you will get null values for all geocoding output fields. Errors will also get null values for all geocoding output fields, and you can add the error field to your output to see any error information. See Troubleshooting Errors for explanations of possible errors.