Package Locator (Data Management)

License Level:BasicStandardAdvanced


Package a locator or composite locator to create a single compressed .gcpk file.

Learn more about sharing your locator as a locator package


Locator package structure
The folder structures of an unpacked locator package that contains a locator, and an unpacked composite locator package that contains the composite locator and its participating locators.



PackageLocator_management (In_locator, output_file, {copy_arcsde_locator}, {additional_files}, {summary}, {tags})
ParameterExplanationData Type

The locator or composite locator that will be packaged.

Input address locator

The name and location of the output locator package (.gcpk).


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.

Adds additional files to a package. Additional files, such as .doc, .txt, .pdf, and so on, are used to provide more information about the contents and purpose of the package.


Adds Summary information to the properties of the package.


Adds Tag information to the properties of the package. Multiple tags can be added or separated by a comma or semicolon.


Code Sample

PackageLocator example 1 (Python window)

The following Python script demonstrates how to use the PackageLocator tool from within the Python window.

import arcpy
arcpy.env.workspace = "C:/MyData/Locators" 
arcpy.PackageLocator_geocoding('Atlanta_composite', 'Altanta_composite.gcpk', "COPY_ARCSDE", "#","Summary of package","tag1; tag2; tag3")
PackageLocator example 2 (stand-alone Python script)

Finds and creates individual locator packages for all of the locators that reside in a specified folder.

# Name:
# Description:  Find all the locators that reside in a specified folder and create a locator package 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 locators and create a locator package using the same name as the locator.
for loc in arcpy.ListFiles("*.loc"):
    print "Packaging " + loc
    arcpy.PackageLocator_geocoding(loc, os.path.splitext(loc)[0] + '.gcpk', "COPY_ARCSDE", "#","Summary of package","tag1; tag2; tag3")


Related Topics

Licensing Information

ArcGIS for Desktop Basic: Yes
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes