Geocode Addresses (Geocoding)
Summary
Geocodes a table of addresses. This process requires a table that stores the addresses you want to geocode and an address locator or a composite address locator. This tool matches the addresses against the address locator and saves the result for each input record in a new point feature class.
Illustration
Usage
-
The output feature class is saved in the same spatial reference as the address locator. Changing the spatial reference of the output feature class is possible by setting a different output coordinate system in the tool's environment settings.
The output feature class, by default, stores a copy of input address and additional information such as score, status, and matched address of each record. The addresses can be rematched either using the Rematch Addresses tool or the Interactive Rematch dialog box in ArcMap. Editing addresses in the input address table will not change the result in the output feature class once the matching process finishes and the feature class is created.
-
Set the Dynamic Output Feature Class parameter to true (checked) if you want the matching result in the output feature class to be updated automatically when the input address table is updated. A relationship class is created for the input table and the output feature class. When an address in the input table is changed in an editing session in ArcMap, the address will be geocoded again immediately and the related record in the output feature class will be updated with the new geocoding result. The automatic update is also supported for adding a new record or deleting an existing record in the input table.
Note:This option is only available if the input address table and output feature class are in the same geodatabase workspace.
License:This option is disabled if you are using an ArcGIS for Desktop Basic license, as relationship classes cannot be generated with a Basic licence.
Syntax
Parameter | Explanation | Data Type |
in_table |
The table of addresses to geocode. | Table View |
address_locator |
The address locator to use to geocode the table of addresses. | Address Locator |
in_address_fields |
The mapping of address fields used by the address locator to fields in the input table of addresses. 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 table of addresses. If you choose not to map an optional input address field used by the address locator to a field in the input table of addresses, 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 section is the field's alias name. | Field Info |
out_feature_class |
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.
| Boolean |
Code Sample
The following Python window script demonstrates how to use the GeocodeAddress function in immediate mode.
# Import system modules
import arcpy
from arcpy import env
env.workspace = "C:/ArcTutor/Geocoding/atlanta.gdb"
# Set local variables:
address_table = "customers"
address_locator = "Atlanta_AddressLocator"
geocode_result = "geocode_result"
arcpy.GeocodeAddresses_geocoding(address_table, address_locator, "Address Address VISIBLE NONE;City CITY VISIBLE NONE;State State VISIBLE NONE;Zip Zip VISIBLE NONE", geocode_result, STATIC)