Delete Polygon Fields From Locator (Geocoding)

Summary

Deletes all polygon fields from a locator that were added using the Add Polygon Fields To Locator tool.

Usage

  • The Add Polygon Fields to Locator tool provides a workflow for appending custom attributes from polygons to local locators. This tool removes all custom output fields added from a polygon layer from an existing local locator.

  • The output of this tool can be used as the input locator to other tools in the Geocoding toolbox.

  • An ArcGIS StreetMap Premium license is required to delete polygon fields from ArcGIS StreetMap Premium locators.

Parameters

LabelExplanationData Type
Input Locator

The locator (.loc file) containing the fields to be deleted.

Note:

Composite locators, locators published as a geocode service, and locators that do not contain a polygon layer are not supported.

Address Locator

Derived Output

LabelExplanationData Type
Updated Locator

The updated locator (.loc file) with the polygon output fields removed.

Address Locator

arcpy.geocoding.DeletePolygonFieldsFromLocator(in_locator)
NameExplanationData Type
in_locator

The locator (.loc file) containing the fields to be deleted.

Note:

Composite locators, locators published as a geocode service, and locators that do not contain a polygon layer are not supported.

Address Locator

Derived Output

NameExplanationData Type
out_locator

The updated locator (.loc file) with the polygon output fields removed.

Address Locator

Code sample

DeletePolygonFieldsFromLocator example (stand-alone script)

The following script demonstrates how to use the DeletePolygonFieldsFromLocator function to delete polygon fields from a local locator.

# Import system modules
import arcpy
arcpy.env.workspace = "C:/Data/USA"

# Set local variables
in_locator = "USA.loc"

arcpy.geocoding.DeletePolygonFieldsFromLocator(in_locator)

Environments

This tool does not use any geoprocessing environments.