Skip To Content

Create Address Locator

Summary

Creates an address locator. The address locator can be used to find a location of an address, geocode a table of addresses, or get the address of a point location.

Usage

  • Address locators can be created in a file folder you specify. ArcGIS Pro requires locators to be stored in a file folder, not in a geodatabase.

  • The role of a reference dataset defines the role that it plays as reference data for the address locator. The locator styles provided with ArcGIS Pro use the following values to describe the roles of reference datasets:

    • Primary table—Defines the primary reference dataset feature class for a locator, such as a street centerline feature class. This is a required table.
    • Alternate City Name table—Defines an alternate city name table that contains alternate names for the city or place name. The table is required to have a JoinID that can be used to join to the primary table. This table is optional.
    • Alternate Name table—Defines an alternate street name table that contains alternate names for the street or point features. The table is required to have a JoinID that can be used to join to the primary table. This table is optional.
    • Alias table—Defines a place name alias table that contains place names and actual addresses for the names. User can find the location using either the place name such as Field Museum or the address 1400 S Lakeshore Drive Chicago, IL 60605. This table is optional.
  • Custom locator styles or locator styles provided by third parties may define different roles for reference data feature classes and tables. Refer to their documentation for information on the roles that they define for reference datasets.

  • Composite locators cannot be created using this tool. Use the Create Composite Address Locator tool to create a composite locator.

Syntax

CreateAddressLocator_geocoding (in_address_locator_style, in_reference_data, in_field_map, out_address_locator, {config_keyword}, {enable_suggestions})
ParameterExplanationData Type
in_address_locator_style

The address locator style on which to base the new address locator.

Address Locator Style
in_reference_data
[[reference_data, {role}],...]

The reference data feature classes and tables to be used by the address locator, along with their roles. Role can be

  • Primary table—Defines the primary reference dataset feature class for a locator, such as a street centerline feature class. This is a required table.
  • Alternate City Name table—Defines an alternate city name table that contains alternate names for the city or place name. The table is required to have a JoinID that can be used to join to the primary table. This table is optional
  • Alternate Name table—Defines an alternate street name table that contains alternate names for the street or point features. The table is required to have a JoinID that can be used to join to the primary table. This table is optional.
  • Alias table—Defines a place name alias table that contains place names and actual addresses for the names. User can find the location using either the place name such as Field Museum or the address 1400 S Lakeshore Drive Chicago, IL 60605. This table is optional.

Value Table
in_field_map
[locator_field, dataset_field, VISIBLE, NONE]

The mapping of reference data fields used by the address locator style to fields in the reference datasets. Each field mapping in this parameter is in the format:

# <locator field alias> <dataset field name>

# This shows as an example:
reference_data_field_map = """
"'Feature ID' FeatureID;'*From Left' L_F_ADD;
'*To Left' L_T_ADD;'*From Right' R_F_ADD;
'*To Right' R_T_ADD;'Prefix Direction' PREFIX;
'Prefix Type' PRE_TYPE;'*Street Name' NAME;
'Suffix Type' TYPE;'Suffix Direction' SUFFIX;
'Left City or Place' CITYL;'Right City or Place' 
CITYR;'Left ZIP Code' ZIPL;'Right ZIP Code' 
ZIPR;'Left State' State_Abbr;'Right State' State_Abbr"

where <locator field alias> is the alias name for the reference data field used by the address locator, and <dataset field name> is the name of the field in the reference dataset. Fields with an asterisk ("*") next to their names are required by the address locator style.

VISIBLE—Field is visible; NONE—the geometry is a copy of the original value. These parameters are optional.

If you choose not to map an optional reference data field used by the address locator style to a field in a reference dataset, specify that there is no mapping by using "<None>" in place of a field name.

To determine the alias name for a reference data field used by a locator style, open the Create Address Locator tool and choose the locator style. The name that appears in the Field Name column of the Field Map control is the field's alias name.

Field Info
out_address_locator

The address locator to create. ArcGIS Pro only supports saving locators in a file folder.

Address Locator
config_keyword
(Optional)

This parameter has no effect in ArcGIS Pro. It remains to support backward compatiblity.

String
enable_suggestions
(Optional)

Suggestions are auto-completed addresses that are generated for

Allows character-by-character auto-complete suggestions to be generated for user input in a client application. This capability facilitates the interactive search user experience by reducing the number of characters that need to be typed before a suggested match is obtained. The idea is that a client application can provide a list of suggestions which is updated with each character entered by a user until the place they are looking for is returned in the list.

Only the locator styles provided by Esri can be used to build locators with suggestions enabled. The suggestion functionality is only exposed when such a locator is published as a geocode service.

  • ENABLEDSuggestions are enabled for the locator.
  • DISABLEDSuggestions are disabled for the locator. This is the default.
Boolean

Code sample

CreateAddressLocator example (Python window)

The following Python window script demonstrates how to use the CreateAddressLocator function in immediate mode.

# Create a street address locator using a street centerline feature class 
# in a file geodatabase as reference data.
# The new address locator will be created in a file folder.

# Import system modules
import arcpy
arcpy.env.workspace = "C:/ArcTutor/Geocoding/atlanta"

arcpy.CreateAddressLocator_geocoding("US Address - Dual Ranges", "streets.shp 'Primary table'", "'Feature ID' FID;'*From Left' L_F_ADD;'*To Left' L_T_ADD;'*From Right' R_F_ADD;'*To Right' R_T_ADD;'Prefix Direction' PREFIX;'Prefix Type' PRE_TYPE;'*Street Name' NAME;'Suffix Type' TYPE;'Suffix Direction' SUFFIX;'Left City or Place' CITYL;'Right City or Place' CITYR;'Left ZIP Code' ZIPL;'Right ZIP Code' ZIPR;'Left State' State_Abbr;'Right State' State_Abbr ", "Atlanta_AddressLocator", "", "DISABLED")

Environments

Licensing information

  • ArcGIS Desktop Basic: Yes
  • ArcGIS Desktop Standard: Yes
  • ArcGIS Desktop Advanced: Yes

Related topics