ArcGIS Desktop

  • Documentation
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Package Locator

  • Summary
  • Illustration
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

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

Legacy:

Locators should be stored in a file folder so you take advantage of new features that are not supported for locators stored in geodatabases, such as performance improvements, multithreading capabilities, and suggestions support. ArcGIS 10.4 is the last release to support storing locators in geodatabases.

Learn more about sharing your locator as a locator package

Illustration

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.

Usage

  • This tool is located in the Geocoding toolbox. For convenience, a copy of this tool also resides in the Data Management toolbox Package toolset.

  • The input locator must have a description in order for the tool to execute. To add summary and tags, click the Description tab of a locator in ArcCatalog, and click the Edit button Edit Metadata to enter the information on the Item Description window.

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

  • Beginning with version 10.4, by default, if the locator to be consolidated or packaged is a composite locator, the Composite locator only: copy participating locators in Enterprise Geodatabase instead of referencing them option is checked and the following will occur:

    • The composite locator and all its participating locators, including locators in an enterprise geodatabase, will be copied to the consolidated folder.
    • Each locator will be copied to a unique folder created in the consolidated folder.

  • The locator package file (.gcpk) can be shared with other users or can be loaded to your ArcGIS online account.

    Learn more about sharing a package

  • To unpack a locator package, drag the .gcpk file into ArcMap or right-click on the .gcpk file and click Unpack.

    Unpack will extract a package into your user profile under:

    • XPβ€”C:\Documents and Settings\username\My Documents\ArcGIS\Packages
    • Vista and Windows 7β€”C:\Users\username\My Documents\ArcGIS\Packages

    Alternatively, you can use the Extract Package tool and specify an output folder.

    Learn more about unpacking a locator package

Syntax

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

The locator or composite locator that will be packaged.

Input address locator
output_file

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

File
copy_arcsde_locator
(Optional)

Legacy:

Prior to version 10.4, this parameter allowed you to specify whether participating locators (for composite locators only) in an enterprise geodatabase will be copied to the consolidated folder or package. As of version 10.4 by default, all participating locators, including locators in an enterprise geodatabase, will be copied to the consolidated folder or package. As this is an optional parameter, it can simply not be specified. If it is specified, the value will default to COPY_ARCSDE.

  • COPY_ARCSDE β€”All participating locators, including locators in an enterprise geodatabase, 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 an enterprise geodatabase will be preserved in the composite locator.
    Legacy:

    This value will default to COPY_ARCSDE as of version 10.4

Boolean
additional_files
(Optional)

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.

File
summary
(Optional)

Adds Summary information to the properties of the package.

String
tags
(Optional)

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

String

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: PackageLocatorEx.py
# 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

# Set environment settings
arcpy.env.overwriteOutput = True
arcpy.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")

Environments

  • Current Workspace

Licensing information

  • ArcGIS Desktop Basic: Yes
  • ArcGIS Desktop Standard: Yes
  • ArcGIS Desktop Advanced: Yes

Related topics

  • An overview of the Package toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal