ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Create Address Locator

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

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.

Legacy:

Locators should be stored in a file folder so you take advantage of new features that are not supported for locators stored in geodatabases, such as performance improvements, multithreading capabilities, and suggestions support. ArcGIS 10.4 is the last release to support storing locators in geodatabases.

Note:

Publishing locators created with this tool to ArcGIS Server 11.0 or later is not supported.

Learn more about common geocoding tasks

Usage

  • Address locators can be created in any file folder you specify.

  • The role of a reference dataset defines the role that it plays as reference data for the address locator. The address locator styles provided with ArcGIS 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 address locators cannot be created using this tool. Use the Create Composite Address Locator tool to create a composite address locator.

Syntax

arcpy.geocoding.CreateAddressLocator(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.

  • 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 where 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 Subaddress—Use when the reference data is a point or polygon feature class where 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 where 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 where 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 to be used by the address locator, along with their roles.

  • 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 a different set of roles for reference datasets.

Note:

When creating an address locator with reference data that contains millions of features, it is necessary to have at least 3 to 4 times the size of the data in free disk space on the drive containing your temp directory because 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 at some point during execution when it runs out of space. Also, keep in mind that when creating very large locators, you should have a machine with enough RAM to handle large memory-intensive processes. It is also recommended to install Background Geoprocessing (64-bit) and run the tool with background geoprocessing enabled.

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 format:

# <locator field alias> <dataset field name> VISIBLE NONE

# This shows as an example:
reference_data_field_map = """
"'Feature ID' FeatureID VISIBLE NONE;'*From Left' L_F_ADD VISIBLE NONE;
'*To Left' L_T_ADD VISIBLE NONE;'*From Right' R_F_ADD VISIBLE NONE;
'*To Right' R_T_ADD VISIBLE NONE;'Prefix Direction' PREFIX VISIBLE NONE;
'Prefix Type' PRE_TYPE VISIBLE NONE;'*Street Name' NAME VISIBLE NONE;
'Suffix Type' TYPE VISIBLE NONE;'Suffix Direction' SUFFIX VISIBLE NONE"""

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.

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.

Field Info
out_address_locator

The address locator to create. 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)

The configuration keyword that determines the storage parameters of the table in a Relational Database Management System (RDBMS)—enterprise and file geodatabases only.

String
enable_suggestions
(Optional)

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. Locators with suggestions enabled can only be saved in a file folder; they cannot be saved in a geodatabase.

  • ENABLED —Suggestions are enabled for the locator.
  • DISABLED —Suggestions are disabled for the locator. This is the default.
Boolean

Code sample

CreateAddressLocator example (stand-alone script)

The following Python script demonstrates how to use the CreateAddressLocator function.

# 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 separate file folder.

# Import system modules
import arcpy

arcpy.env.workspace = "C:/ArcTutor/Geocoding/atlanta.gdb"
Atlanta_AddressLocator_OutputPath = "C:/ArcTutor/Geocoding/Atlanta"

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

Environments

  • Current Workspace
  • Output CONFIG Keyword
  • Scratch Workspace

Licensing information

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

Related topics

  • Creating an address locator
  • Creating a composite address locator
  • Create Composite Address Locator
  • An overview of the Geocoding toolbox

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2022 Esri. | Privacy | Legal