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.
Syntax
arcpy.geocoding.CreateAddressLocator(in_address_locator_style, in_reference_data, in_field_map, out_address_locator, {config_keyword}, {enable_suggestions})
Parameter | Explanation | Data 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, along with their roles, to be used by the address locator.
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:
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.
| Boolean |
Code sample
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