Consolidate Locator (Data Management)

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

  • Locators stored in a geodatabase are not accessible. If you want to consolidate a composite locator, make sure that the participating locators are not stored in a geodatabase.

  • A warning is issued when this tool encounters an invalid locator. The invalid locator will not be packaged.

Syntax

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

The input locator or composite locator that will be consolidated.

Address Locator
output_folder

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

If the specified folder does not exist, a new folder will be created.

Folder
copy_arcsde_locator
(Optional)

This parameter has no effect in ArcGIS Pro. It remains only to support backward compatibility.

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_Management('Atlanta_composite', 'Consolidate_folder')
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

# Set environment settings
arcpy.env.overwriteOutput = True
arcpy.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_Management(loc, os.path.splitext(loc)[0])

Environments

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics