Create Address Locator (Geocoding)

Summary

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

Legacy:

This tool is deprecated. This functionality has been replaced by the Create Locator tool.

Usage

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

  • The role of a reference dataset defines its use 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. Users can find the location using either the place-name, such as Field Museum, or the address, such as 1400 S Lakeshore Drive Chicago, IL 60605. This table is optional.
  • Feature classes and tables represented as services are not supported data types for use as reference data.

  • 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 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.

Parameters

LabelExplanationData Type
Address Locator Style

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

  • US Address-Dual Ranges—Use when the reference data is a line feature class that contains house number ranges on both sides of a street segment, and you want to search for an address on a specific side of the street or a street intersection.
  • US Address-One Range—Use when the reference data is a line feature class with one house number range for each road segment, and you want to search for an address (where side is not needed) or a street intersection.
  • US Address-Single House—Use when the reference data is a point or polygon feature class in which each feature represents a single address, and you want to search for an exact address for a parcel, building, or address point.
  • US Address-Single House Subadress—Use when the reference data is a point or polygon feature class in which each feature represents a single address with optional subaddress elements, and you want to search for apartment units, townhouses, duplexes, or stores in a shopping plaza.
  • US Address-Street Name—Use when the reference data is a line feature class, and you want to search for addresses using only the street name. Address range information is not required.
  • US Address-City State—Use when the reference data is a point or polygon feature class, and you want to search for a specific city in a state.
  • US Address-ZIP 5 Digit—Use when the reference data is a point or polygon feature class in which each feature represents a ZIP Code centroid or geographic area, and you want to search for a specific ZIP Code location.
  • General-Gazetteer—Use when the reference data is a point or polygon feature class in which each feature represents any unique feature, and you want to search for a place-name, landmark, water meter, or any unique value.
Address Locator Style
Reference Data

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

  • 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. Users can find the location using either the place-name, such as Field Museum, or the address, such as 1400 S Lakeshore Drive Chicago, IL 60605. This table is optional.

Feature classes and tables represented as services are not supported data types for use as reference data.

Custom locator styles or locator styles provided by third parties may define a different set of roles for reference datasets.

Note:

When creating a locator with reference data that contains millions of features, you must have at least three to four times the size of the data in free disk space on the drive containing your temp directory, as files used to build the locator are written to this location before the locator is copied to the output location. If you do not have enough disk space, the tool will fail when it runs out of space. Also, when creating large locators, your machine must have enough RAM to handle large memory-intensive processes.

Value Table
Field Map

The mapping of reference data fields used by the address locator style to fields in the reference datasets. Fields with an asterisk (*) next to their names are required by the address locator style.

Field Info
Output Address Locator

The locator to create in a file folder. Saving the locator to a file folder allows you to take advantage of performance improvements, multithreading capabilities, and suggestions support. Once the locator is created, additional properties and options can be modified in the locator's settings.

Address Locator
Configuration keyword
(Optional)
String
Enable suggestions
(Optional)

Specifies whether character-by-character autocomplete suggestions will be generated for user input in a client application. This capability facilitates the interactive search user experience by reducing the number of characters that must be typed before a suggested match is obtained. The idea is that a client application can provide a list of suggestions that 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 shared to your portal.

  • Checked—Suggestions are enabled for the locator.
  • Unchecked—Suggestions are not enabled for the locator. This is the default.
Boolean

arcpy.geocoding.CreateAddressLocator(in_address_locator_style, in_reference_data, in_field_map, out_address_locator, {config_keyword}, {enable_suggestions})
NameExplanationData Type
in_address_locator_style

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

  • US Address-Dual Ranges—Use when the reference data is a line feature class that contains house number ranges on both sides of a street segment, and you want to search for an address on a specific side of the street or a street intersection.
  • US Address-One Range—Use when the reference data is a line feature class with one house number range for each road segment, and you want to search for an address (where side is not needed) or a street intersection.
  • US Address-Single House—Use when the reference data is a point or polygon feature class in which each feature represents a single address, and you want to search for an exact address for a parcel, building, or address point.
  • US Address-Single House Subadress—Use when the reference data is a point or polygon feature class in which each feature represents a single address with optional subaddress elements, and you want to search for apartment units, townhouses, duplexes, or stores in a shopping plaza.
  • US Address-Street Name—Use when the reference data is a line feature class, and you want to search for addresses using only the street name. Address range information is not required.
  • US Address-City State—Use when the reference data is a point or polygon feature class, and you want to search for a specific city in a state.
  • US Address-ZIP 5 Digit—Use when the reference data is a point or polygon feature class in which each feature represents a ZIP Code centroid or geographic area, and you want to search for a specific ZIP Code location.
  • General-Gazetteer—Use when the reference data is a point or polygon feature class in which each feature represents any unique feature, and you want to search for a place-name, landmark, water meter, or any unique value.
Address Locator Style
in_reference_data
[[reference_data, {role}],...]

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

  • 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. Users can find the location using either the place-name, such as Field Museum, or the address, such as 1400 S Lakeshore Drive Chicago, IL 60605. This table is optional.

Feature classes and tables represented as services are not supported data types for use as reference data.

Custom locator styles or locator styles provided by third parties may define a different set of roles for reference datasets.

Note:

When creating a locator with reference data that contains millions of features, you must have at least three to four times the size of the data in free disk space on the drive containing your temp directory, as files used to build the locator are written to this location before the locator is copied to the output location. If you do not have enough disk space, the tool will fail when it runs out of space. Also, when creating large locators, your machine must have enough RAM to handle large memory-intensive processes.

Value Table
in_field_map

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 following 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.

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 parameter is the field's alias name.

Field Info
out_address_locator

The locator to create in a file folder. Saving the locator to a file folder allows you to take advantage of performance improvements, multithreading capabilities, and suggestions support. Once the locator is created, additional properties and options can be modified in the locator's settings.

Address Locator
config_keyword
(Optional)

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

String
enable_suggestions
(Optional)

Specifies whether character-by-character autocomplete suggestions will be generated for user input in a client application. This capability facilitates the interactive search user experience by reducing the number of characters that must be typed before a suggested match is obtained. The idea is that a client application can provide a list of suggestions that 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 shared to your portal.

  • ENABLEDSuggestions are enabled for the locator.
  • DISABLEDSuggestions are not enabled 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

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics