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

Geocode Addresses (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

Geocodes a table of addresses


Illustration

Geocode a table of addresses

Usage tips

Command line syntax
An overview of the Command Line window
GeocodeAddresses_geocoding <in_table> <address_locator> <in_address_fields> <out_feature_class> {STATIC | DYNAMIC}

Parameter Explanation Data Type
<in_table>

The address table to geocode

Table View
<address_locator>

The address locator to use to geocode the address table

Address Locator
<in_address_fields>

The mapping of input address fields used by the address locator to fields in the address table.

Each field mapping in this parameter is in the format:


   <input address field> <table field name>
where <input address field> is the name of the input address field used by the address locator, and <table field name> is the name of the corresponding field in the address table.

If you choose not to map an optional input address field used by the address locator to a field in the address table, 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_feature_class>

The output geocoded feature class or shapefile

Feature Class
{STATIC | DYNAMIC}

Indicates whether to create a static copy of the address table inside the geocoded feature class or to create a dynamically updated geocoded feature class.

  • STATIC — Creates a static copy of the fields input address table in the output feature class. This is the default.
  • DYNAMIC — (Use only with ArcEditor or ArcInfo licences) Creates a relationship class between the input address table and output feature class so that edits to the addresses in the input address table are automatically reflected in the output feature class. This option is available only if the input address table and output feature class are in the same geodatabase workspace.

Boolean
Data types for geoprocessing tool parameters


Command line example

Workspace "D:\Workspace\Madison"
GeocodeAddresses Address.dbf "Madison Streets" "Street Address" Geo_result.shp

Workspace "D:\Workspace\Madison\Madison.mdb"
GeocodeAddresses Address "D:\Workspace\Madison\Madison Streets" "Street Address" Geo_result STATIC

Workspace "D:\Workspace\Madison\Madison.gdb"
GeocodeAddresses Address "D:\Workspace\Madison\Madison Streets" "Street Address" Geo_result STATIC

Workspace "Database Connections\\mendota.Madison.sde"
GeocodeAddresses Madison.sde.ADDRESS "Database Connections\mendota.Madison.sde\SDE.Madison Streets" "Street Address" Database Connections\mendota.Madison.sde\Geo_result DYNAMIC

Workspace "D:\Workspace\Madison"
GeocodeAddresses Address.dbf "GIS Servers\\mendota\\Madison_Streets" "Street Address; Zone <None>" Geo_result.shp

Scripting syntax
About getting started with writing geoprocessing scripts
GeocodeAddresses_geocoding (in_table, address_locator, in_address_fields, out_feature_class, out_relationship_type)

Parameter Explanation Data Type
in_table (Required)

The address table to geocode

Table View
address_locator (Required)

The address locator to use to geocode the address table

Address Locator
in_address_fields (Required)

The mapping of input address fields used by the address locator to fields in the address table.

Each field mapping in this parameter is in the format:


   <input address field> <table field name>
where <input address field> is the name of the input address field used by the address locator, and <table field name> is the name of the corresponding field in the address table.

If you choose not to map an optional input address field used by the address locator to a field in the address table, 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_feature_class (Required)

The output geocoded feature class or shapefile

Feature Class
out_relationship_type (Optional)

Indicates whether to create a static copy of the address table inside the geocoded feature class or to create a dynamically updated geocoded feature class.

  • STATIC — Creates a static copy of the fields input address table in the output feature class. This is the default.
  • DYNAMIC — (Use only with ArcEditor or ArcInfo licences) Creates a relationship class between the input address table and output feature class so that edits to the addresses in the input address table are automatically reflected in the output feature class. This option is available only if the input address table and output feature class are in the same geodatabase workspace.

Boolean

Data types for geoprocessing tool parameters


Script example

# Example 1:
#   Geocode a DBF table of addresses to a new shapefile.
import arcgisscripting
GP = arcgisscripting.create()

try:
    GP.Workspace = "D:\Workspace\Madison"
    address_table = "Address.dbf"
    locator = "Madison Streets"
    address_field_map = "Street Address"
    output_shapefile = "Geo_result"
    GP.GeocodeAddresses(address_table, locator, address_field_map, output_shapefile)

except:
    print GP.GetMessages(2)

# Example 2:
#   Geocode a personal or file geodatabase table of addresses to a new feature class in the same geodatabase.
#   Create a static copy of the input address table in the output feature class.
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"
    address_table = "Address"
    locator = "D:\Workspace\Madison\Madison.mdb\Madison Streets"
    address_field_map = "Street Address"
    output_feature_class = "Geo_result"
    GP.GeocodeAddresses(address_table, locator, address_field_map, output_feature_class, "STATIC")

except:
    print GP.GetMessages(2)

# Example 3:
#   Geocode an ArcSDE table of addresses to a new feature class in the same ArcSDE database using an ArcSDE locator.
#   Create dynamic output so that edits to the address table are automatically reflected in the geocoded feature class.
import arcgisscripting
GP = arcgisscripting.create()

try:
    GP.Workspace = "Database Connections\\mendota.Madison.sde"
    address_table = "Madison.SDE.Address"
    locator = "SDE.Madison Streets"
    address_field_map = "Street Address"
    output_feature_class = "Geo_result"
    GP.GeocodeAddresses(address_table, locator, address_field_map, output_feature_class, "DYNAMIC")

except:
    print GP.GetMessages(2)

# Example 4:
#   Geocode a DBF table of addresses to a new shapefile using an ArcGIS Server Geocode Server.
#   The address table does not contain zone information, so do not map a field to the Zone input address field
#   used by the address locator.
import arcgisscripting
GP = arcgisscripting.create()

try:
    GP.Workspace = "D:\Workspace\Madison"
    address_table = "Address.dbf"
    locator = "GIS Servers\\mendota\\Madison_Streets"
    address_field_map = "Street Address; Zone <None>"
    output_shapefile = "Geo_result"
    GP.GeocodeAddresses(address_table, locator, address_field_map, output_shapefile)

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.