Label | Explanation | Data Type |
Input Locator
| The locator (.loc file) that will be clipped. Note:Geocode services or composite locators that contain geocode services, including services from ArcGIS Enterprise or ArcGIS Online, as participating locators are not supported. If the service is a participating locator in a composite locator it will not be clipped. | Address Locator |
Output Locator
| The clipped output locator (.loc file). | Address Locator |
Area of Interest
(Optional) | The polygon layer that defines an area of interest that will be used to clip the locator. This parameter overrides the Extent parameter. | Feature Layer |
Extent
(Optional) | Specifies the extent that will be used to clip the locator.
| Extent |
Summary
Clips a locator based on an area of interest or extent and creates a locator with a smaller extent and size.
Usage
This tool can clip a locator based on features in a layer, selected features in a layer, or an extent. The output is a new locator with a smaller extent.
When geocoding places in a targeted study area, use this tool to clip the locator to that area to reduce the locator's size and to only return geocode results within the smaller extent. When the locator is clipped, the reference data indexed in the locator will also be clipped. No results will be returned when searching for addresses outside of the extent of the clipped locator.
A ArcGIS StreetMap Premium license is required to clip ArcGIS StreetMap Premium locators.
If the Input Locator value is a composite locator, the participating locators of a composite locator will be clipped and saved to a subfolder of the output location. The composite locator will be saved to the output location.
Geocode services that are participating locators in a composite locator will not be clipped.
Parameters
arcpy.geocoding.ClipLocator(in_locator, out_locator, {area_of_interest}, {extent})
Name | Explanation | Data Type |
in_locator | The locator (.loc file) that will be clipped. Note:Geocode services or composite locators that contain geocode services, including services from ArcGIS Enterprise or ArcGIS Online, as participating locators are not supported. If the service is a participating locator in a composite locator it will not be clipped. | Address Locator |
out_locator | The clipped output locator (.loc file). | Address Locator |
area_of_interest (Optional) | The polygon layer that defines an area of interest that will be used to clip the locator. This parameter overrides the extent parameter. | Feature Layer |
extent (Optional) | Specifies the extent that will be used to clip the locator.
| Extent |
Code sample
Clip the USA locator using a county polygon.
import arcpy
usa_locator = r"C:\Data\USA.loc"
my_clipped_locator = r"C:\Data\SanDiego.loc"
my_san_diego_polygon_layer = r"C:\Data\SanDiegoCounty.shp"
# Run ClipLocator
arcpy.geocoding.ClipLocator(usa_locator, my_clipped_locator, my_san_diego_polygon_layer)
Clip the USA locator using an extent.
import arcpy
usa_locator = r"C:\Data\USA.loc"
my_clipped_locator = r"C:\Data\SanDiego.loc"
# Define the extent using an arcpy Extent object
my_san_diego_extent = arcpy.Extent(
-13115569.084655, 3826591.24577018, -12897364.810527, 3969918.09780486,
spatial_reference=arcpy.SpatialReference('WGS 1984 Web Mercator (auxiliary sphere)'))
# Run ClipLocator
arcpy.geocoding.ClipLocator(usa_locator, my_clipped_locator, None, my_san_diego_extent)
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes