Summary
Creates a composite address locator. A composite address locator consists of two or more individual address locators that allow addresses to be matched against the multiple address locators.
Usage
Prior to creating composite address locators, use the Create Address Locator tool to create participating address locators.
Spatial reference for a composite address locator is required. The spatial reference of the first participating address locator is used unless you specify a different output coordinate system in the tool's environment settings.
Syntax
CreateCompositeAddressLocator(in_address_locators, in_field_map, {in_selection_criteria}, out_composite_address_locator)
Parameter | Explanation | Data Type |
in_address_locators [[in_address_locator, name],...] | The order of the participating address locators determines how candidates are searched and an address is matched. When you geocode a single address, the address will be matched against all participating address locators unless the locator is specified with a selection criterion. All the found candidates will be displayed based on the order of the listed participating address locators. If you geocode a table of addresses, addresses are matched automatically to the first best candidate found from the first participating address locators. If the address fails to match, it will fall back to the subsequent locator in the list. A reference name for each participating address locator is required. This is the name of the address locator referred to by the composite address locator. The name should contain no space or special symbols. The maximum length of the name is 14 characters. | Value Table |
in_field_map | The mapping of input fields used by each participating address locator to the input fields of the composite address locator. The fields and field contents that are generated by the participating address locators. Each of the unique input fields is listed on the Field Map section, and when expanded, you will see a list of all the input field occurrences (subfields) for each participating address locator. These fields are the input fields for the composite address locator. If there are duplicate fields such as ZIP and Postcode because of the unique names populated from the participating address locators, you may group the subfields by dragging and dropping them to the appropriate Field or use the Arrow Up or Arrow Down button to move the subfield. | Field Mappings |
in_selection_criteria [[in_address_locator, selection_criteria],...] (Optional) | Selection criteria for each participating address locator. Only one selection criterion is supported for each participating address locator. Using selection criteria will disqualify participating address locators that do not meet the criteria on a particular address so that the geocoding process will be more efficient. Refer to the topic Creating a composite address locator to learn more about the use of selection criteria in the geocoding process. To specify a selection criterion, click the box under the Selection Criteria column next to the address locator want to apply the criterion. You can enter an expression such as "City" = 'Atlanta' in the text box or click the ... button to open the Specify Locator Selection Criteria dialog box and define the criteria. | Value Table |
out_composite_address_locator | The composite address locator to create. | Address Locator |
Code sample
CreateCompositeAddressLocator example (stand-alone script)
The following Python script demonstrates how to use the CreateCompositeAddressLocator function.
# Create a composite address locator using the Postal_US and Atlanta locators from the tutorial data folder.
# Import system modules
import arcpy
arcpy.env.workspace = "C:\ArcTutor\Geocoding"
# Set local variables:
Atlanta_locator = "Atlanta.loc"
US_Postal_locator = "Postal_US.loc"
Atlanta_Postal_Composite_locator = "Atlanta_Postal_Composite"
arcpy.geocoding.CreateCompositeAddressLocator(Atlanta_locator + " Atlanta;" + US_Postal_locator + " Postal_US", 'Street "Street or Intersection" true true true 100 Text 0 0,First,#,' + Atlanta_locator + ',Street,0,100;City "City or Placename" true true false 40 Text 0 0,First,#,' + Atlanta_locator + ',City,0,40;State "State" true true false 20 Text 0 0,First,#,' + Atlanta_locator + ',State,0,20;ZIP "ZIP Code" true true false 10 Text 0 0,First,#,' + Atlanta_locator + ',ZIP,0,10,' + US_Postal_locator + ',ZIP,0,10', "Atlanta #;Postal_US #", Atlanta_Postal_Composite_locator)
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes