Consolidate Locator (Data Management)

License Level:BasicStandardAdvanced

Summary

Consolidate a locator or composite locator by copying all locators into a single folder.

Illustration

Locator consolidated folder
The output folder structures of a locator and a composite locator that have been consolidated.

Usage

Syntax

ConsolidateLocator_management (in_locator, output_folder, {copy_arcsde_locator})
ParameterExplanationData Type
in_locator

The input locator or composite locator that will be consolidated.

Locator
output_folder

The output folder that will contain the locator or composite locator with its participating locators.

Folder
copy_arcsde_locator
(Optional)

Specifies whether participating locators will be copied or their connection information will be preserved in the composite locator. This option only applies to composite locators.

  • COPY_ARCSDEAll participating locators, including locators in ArcSDE, will be copied to the consolidated folder or package. This is the default.
  • PRESERVE_ARCSDE Connection information of the participating locators that are stored in ArcSDE will be preserved in the composite locator.
Boolean

Code Sample

ConsolidateLocator example 1 (Python window)

The following Python script demonstrates how to use the ConsolidateLocator tool from the Python window:

import arcpy
arcpy.env.workspace = "C:/MyData/Locators" 
arcpy.ConsolidateLocator_Geocoding('Atlanta_composite', 'Consolidate_folder', "COPY_ARCSDE")
ConsolidateLocator example 2 (stand-alone script)

Finds and creates individual consolidated folders for all the locators that reside in a specified folder.

# Name: ConsolidateLocator.py
# Description:  Find all the locators that reside in a specified folder and create a consolidated folder for each locator.

# import system modules
import os
import arcpy

from arcpy import env

# Set environment settings
env.overwriteOutput = True
env.workspace = "C:/MyData/Locators"

# Loop through the workspace, find all the loc and create a consolidated folder using the same 
# name as the original locator
for loc in arcpy.ListFiles("*.loc"):
    print "Consolidating " + loc
    arcpy.ConsolidateLocator_geocoding(loc, os.path.splitext(loc)[0], "COPY_ARCSDE")

Environments

Licensing Information

ArcGIS for Desktop Basic: Yes
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
11/18/2013