Available with Production Mapping license.
Summary
Removes polygons that are smaller than the specified area and are connected to two or more lines. Once the polygon is deleted, the lines are extended to meet at the center point of the polygon.
Illustration
Usage
A warning is raised if the input features are not in a projected coordinate system. This tool relies on linear distance units, which will create unexpected results in an unprojected coordinate system. It is strongly suggested that you run this tool on data in a projected coordinate system to ensure valid results. An error is raised and the tool will not process if the coordinate system is missing or unknown.
This tool can be used to remove lakes that do not meet the minimum-size specifications. In this scenario, the lake would be removed and the rivers would be extended so they meet at the lake's former center point.
A polygon is only deleted when it touches two or more line features. If it only touches one line feature, neither the polygon nor the line is modified.
Adding one or more feature classes as compare features helps to ensure topology between the input feature class and the compare feature classes by copying the geometry of any deleted input features to the appropriate compare feature classes. This ensures that no holes result in the compare feature classes when the input polygon features are deleted.
For example, suppose you have a small lake connected to two rivers and it is in a vegetation area. When the lake is removed, the hole is filled by the vegetation layer and the rivers are extended to meet in the center.
If only one compare feature layer is specified, features that are below the minimum size are deleted from the current feature layer and merged with the compare feature.
When multiple compare feature layers are provided, the input feature is converted to the feature class that shares the longest boundary with the input feature. For instance, if a feature shares common boundaries with feature class A and a shorter boundary with feature class B, the feature will be merged with feature class A.
If this tool is run in an edit session in ArcMap, you can stop the edit session without saving changes to restore features that have been deleted.
Syntax
arcpy.production.DeletePolygonsAndExtendLines(Input_Line_Features, Input_Polygon_Features, Minimum_Area, {Compare_Features})
Parameter | Explanation | Data Type |
Input_Line_Features | The line features that will be extended. | Feature Layer |
Input_Polygon_Features | The polygon features that will be deleted if they are smaller than the specified size and connected to two or more lines from the line feature class. | Feature Layer |
Minimum_Area | The minimum area for polygon features. | Areal unit |
Compare_Features [Compare_Features,...] (Optional) | Features that will be used to fill the space left by the deleted polygon. The feature that has the longest common boundary with the deleted feature is used to fill the hole. | Feature Layer |
Code sample
DeletePolygonsAndExtendLines example (stand-alone script)
The following stand-alone sample script demonstrates how to use Delete Polygons And Extend Lines.
# Name: DeletePolygonAndExtendLines_Example.py
# Description: Executes the DeletePolygonAndExtendLines tool against
# LocalGovernment.gdb sample data
# Author: Esri
# Date: February 2014
# Import arcpy module
import arcpy
# Check out Production Mapping license
arcpy.CheckOutExtension("Foundation")
# set environment
arcpy.env.workspace="c:/data/LocalGovernment.gdb"
# Define variables
inLineFeatures="ReferenceData/RoadCenterline"
inPolyFeatures="ReferenceData/FacilitySite"
inLineLyr="Roadlayer"
inPolyLyr="FacilityLayer"
minArea="2000000 SquareFeet"
# create two feature layers
arcpy.MakeFeatureLayer_management(inLineFeatures,inLineLyr)
arcpy.MakeFeatureLayer_management(inPolyFeatures,inPolyLyr)
# execute Delete Polygon and Extend Lines
arcpy.DeletePolygonsAndExtendLines_production(inLineLyr,inPolyLyr,minArea)
Environments
Licensing information
- Basic: No
- Standard: No
- Advanced: Requires Production Mapping