Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Geocoding toolbox > Tools

Create Address Locator (Geocoding)

Release 9.2
Last modified March 30, 2008
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

Creates an address locator


Usage tips

Command line syntax
An overview of the Command Line window
CreateAddressLocator_geocoding <in_address_locator_style> <Reference Data {Role};Reference Data {Role}...> <in_field_map> <out_address_locator> {Enter the command line parameter expression here. For example, the parameter name is data_type, but the parameter expression is POINT|LINE|POLY - type POINT|LINE|POLY here - without the brackets. If there is no expression, just leave this field as is, or blank}

Parameter Explanation Data Type
<in_address_locator_style>

The address locator style on which to base the new address locator. When you specify an ArcSDE address locator style, the output address locator must be stored in the same ArcSDE database. You must also fully qualify an ArcSDE locator style with its workspace, as shown in the example below.

Address Locator Style
<Reference Data {Role};Reference Data {Role}...>

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

  • Primary table — The primary reference data feature class used by the address locator, such as a street centerline feature class.
  • Alternate Name table — An alternate street name table.
  • Alias table — A place name alias table.

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

(Table View String; Table View String;...)
<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>

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.

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, as shown in the example below.

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. If you choose an ArcSDE address locator style, you must store the locator in the same ArcSDE database. You must also fully qualify the output address locator with its workspace, as shown in the example below.

Address Locator
{Enter the command line parameter expression here. For example, the parameter name is data_type, but the parameter expression is POINT|LINE|POLY - type POINT|LINE|POLY here - without the brackets. If there is no expression, just leave this field as is, or blank}

The configuration keyword that determines the storage parameters of the table in a Relational Database Management System (RDBMS) - ArcSDE only.

String
Data types for geoprocessing tool parameters


Command line example

Workspace "D:\Workspace\Madison"
CreateAddressLocator "US Streets" "MadisonStreets.shp 'Primary table'" "'House From Left' L_F_ADD;'House To Left' L_T_ADD;'House From Right' R_F_ADD;'House To Right' R_T_ADD;'Prefix Direction' PREFIX;'Prefix Type' PRE_TYPE;'Street Name' NAME;'Street Type' TYPE;'Suffix Direction'  SUFFIX" "Madison Streets"

Workspace "D:\Workspace\Madison\Madison.mdb"
CreateAddressLocator "US Streets" "MadisonStreetNetwork 'Primary table'" "'House From Left' LEFT_FROM_ADDR;'House To Left' LEFT_TO_ADDR;'House From Right' RIGHT_FROM_ADDR;'House To Right' RIGHT_TO_ADDR;'Prefix Direction' PREFIX;'Prefix Type' PRE_TYPE;'Street Name' NAME;'Street Type' TYPE;'Suffix Direction'  SUFFIX" "D:\Workspace\Madison\Madison.mdb\Madison Streets"

Workspace "D:\Workspace\Madison\Madison.gdb"
CreateAddressLocator "US Streets" "MadisonStreetNetwork 'Primary table'" "'House From Left' LEFT_FROM_ADDR;'House To Left' LEFT_TO_ADDR;'House From Right' RIGHT_FROM_ADDR;'House To Right' RIGHT_TO_ADDR;'Prefix Direction' PREFIX;'Prefix Type' PRE_TYPE;'Street Name' NAME;'Street Type' TYPE;'Suffix Direction'  SUFFIX" "D:\Workspace\Madison\Madison.gdb\Madison Streets"

Workspace "Database Connections\mendota.geoprocessing.sde"
CreateAddressLocator "Database Connections\mendota.geoprocessing.sde\Address Locator Styles\SDE.US Streets (A)" "Madison.SDE.STREET_NETWORK 'Primary table';Madison.sde.ALT_STREETNAME 'Alternate Name table'" "'Primary table:House From Left' Madison.SDE.STREET_NETWORK:LEFT_FROM_ADDR;'Primary table:House To Left' Madison.SDE.STREET_NETWORK:LEFT_TO_ADDR;'Primary table:House From Right' Madison.SDE.STREET_NETWORK:RIGHT_FROM_ADDR;'Primary table:House To Right' Madison.SDE.STREET_NETWORK:RIGHT_TO_ADDR;'Primary table:Prefix Direction' <None>;'Primary table:Prefix Type' <None>;'Primary table:Street Name' Madison.SDE.STREET_NETWORK:STREET_NAME;'Primary table:Street Type' Madison.SDE.STREET_NETWORK:STREET_TYPE;'Primary table:Suffix Direction' Madison.SDE.STREET_NETWORK:SUFFIX;'Primary table:Join ID' Madison.SDE.STREET_NETWORK:JOINID;'Alternate Name table:Prefix Direction' Madison.sde.ALT_STREETNAME:PREFIX;'Alternate Name table:Prefix Type' Madison.sde.ALT_STREETNAME:PRE_TYPE;'Alternate Name table:Alternate Street Name' Madison.sde.ALT_STREETNAME:NAME;'Alternate Name table:Street Type' Madison.sde.ALT_STREETNAME:TYPE;'Alternate Name table:Suffix Direction' Madison.sde.ALT_STREETNAME:SUFFIX;'Alternate Name table:Join ID' Madison.sde.ALT_STREETNAME:JOINID" "Database Connections\mendota.Madison.sde\Madison Streets"

Scripting syntax
About getting started with writing geoprocessing scripts
CreateAddressLocator_geocoding (in_address_locator_style, in_reference_data, in_field_map, out_address_locator, config_keyword)

Parameter Explanation Data Type
in_address_locator_style (Required)

The address locator style on which to base the new address locator. When you specify an ArcSDE address locator style, the output address locator must be stored in the same ArcSDE database. You must also fully qualify an ArcSDE locator style with its workspace, as shown in the example below.

Address Locator Style
in_reference_data (Required)

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

  • Primary table — The primary reference data feature class used by the address locator, such as a street centerline feature class.
  • Alternate Name table — An alternate street name table.
  • Alias table — A place name alias table.

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

(Table View String; Table View String;...)
in_field_map (Required)

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>

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.

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, as shown in the example below.

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 (Required)

The address locator to create. If you choose an ArcSDE address locator style, you must store the locator in the same ArcSDE database. You must also fully qualify the output address locator with its workspace, as shown in the example below.

Address Locator
config_keyword (Optional)

The configuration keyword that determines the storage parameters of the table in a Relational Database Management System (RDBMS) - ArcSDE only.

String

Data types for geoprocessing tool parameters


Script example

# Example 1:
#   Create a US Streets address locator using a street centerline shapefile as reference data.
#   The new address locator will be created in the folder that contains the shapefile.
import arcgisscripting
GP = arcgisscripting.create()

try:
    GP.Workspace = "D:\Workspace\Madison"
    locator_style = "US Streets"
    reference_data = "MadisonStreets.shp 'Primary table'"
    reference_data_field_map = "'House From Left' L_F_ADD;'House To Left' L_T_ADD;'House From Right' R_F_ADD;'House To Right' R_T_ADD;"                                "'Prefix Direction' PREFIX;'Prefix Type' PRE_TYPE;'Street Name' NAME;'Street Type' TYPE;"                                "'Suffix Direction'  SUFFIX"
    output_locator = "Madison Streets"
    GP.CreateAddressLocator(locator_style, reference_data, reference_data_field_map, output_locator)

except:
    print GP.GetMessages(2)

# Example 2:
#   Create a US Streets address locator using a street centerline feature class in a personal or file geodatabase as reference data.
#   The new address locator will be created inside the same personal or file geodatabase.
import arcgisscripting
GP = arcgisscripting.create()

try:
    # Modify the following line to specify a file geodatabase workspace such as "D:\Workspace\Madison\Madison.gdb"
    GP.Workspace = "D:\Workspace\Madison\Madison.mdb"
    locator_style = "US Streets"
    reference_data = "MadisonStreetNetwork 'Primary table'"
    reference_data_field_map = "'House From Left' LEFT_FROM_ADDR;'House To Left' LEFT_TO_ADDR;'House From Right' RIGHT_FROM_ADDR;"                                "'House To Right' RIGHT_TO_ADDR;'Prefix Direction' PREFIX;'Prefix Type' PRE_TYPE;'Street Name' NAME;"                                "'Street Type' TYPE;'Suffix Direction' SUFFIX"
    output_locator = "D:\Workspace\Madison\Madison.mdb\Madison Streets"
    GP.CreateAddressLocator(locator_style, reference_data, reference_data_field_map, output_locator)

except:
    print GP.GetMessages(2)

# Example 3:
#   Create a US Streets with Alternate Name address locator using a street centerline feature class and an alternate street name.
#   table in an ArcSDE geodatabase as reference data. The new address locator will be created in the ArcSDE database.
import arcgisscripting
GP = arcgisscripting.create()

try:
    GP.Workspace = "Database Connections\mendota.Madison.sde"
    locator_style = "Database Connections\\mendota.Madison.sde\\Address Locator Styles\\SDE.US Streets (A)"
    reference_data = "Madison.sde.STREET_NETWORK 'Primary table';Madison.sde.ALT_STREETNAME 'Alternate Name table'"
    reference_data_field_map = "'Primary table:House From Left' Madison.sde.STREET_NETWORK:LEFT_FROM_ADDR;"                                "'Primary table:House To Left' Madison.sde.STREET_NETWORK:LEFT_TO_ADDR;"                                "'Primary table:House From Right' Madison.sde.STREET_NETWORK:RIGHT_FROM_ADDR;"                                "'Primary table:House To Right' Madison.sde.STREET_NETWORK:RIGHT_TO_ADDR;"                                "'Primary table:Prefix Direction' PREFIX;"                                "'Primary table:Prefix Type' <None>;"                                "'Primary table:Street Name' Madison.sde.STREET_NETWORK:STREET_NAME;"                                "'Primary table:Street Type' Madison.sde.STREET_NETWORK:STREET_TYPE;"                                "'Primary table:Suffix Direction' Madison.sde.STREET_NETWORK:SUFFIX;"                                "'Alternate Name table:Prefix Direction' Madison.sde.ALT_STREETNAME:PREFIX;"                                "'Alternate Name table:Prefix Type' Madison.sde.ALT_STREETNAME:PRE_TYPE;"                                "'Alternate Name table:Alternate Street Name' Madison.sde.ALT_STREETNAME:NAME;"                                "'Alternate Name table:Street Type' Madison.sde.ALT_STREETNAME:TYPE;"                                "'Alternate Name table:Suffix Direction' Madison.sde.ALT_STREETNAME:SUFFIX;"                                "'Alternate Name table:Join ID' Madison.sde.ALT_STREETNAME:JOINID"
    output_locator = "Database Connections\\mendota.Madison.sde\\Madison Streets"
    GP.CreateAddressLocator(locator_style, reference_data, reference_data_field_map, output_locator)

except:
    print GP.GetMessages(2)

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.