Delete Polygons And Extend Lines (Production Mapping)

许可等级:BasicStandardAdvanced

摘要

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.

插图

Delete Polygons and Extend Lines functionality

用法

语法

DeletePolygonsAndExtendLines_production (Input_Line_Features, Input_Polygon_Features, Minimum_Area, {Compare_Features})
参数说明数据类型
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,...]
(可选)

Feature classes 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 Class

代码实例

DeletePolygonsAndExtendLines example (stand-alone script)

This sample script removes facility features that touch two or more lines and extends the 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)

环境

相关主题

许可信息

ArcGIS for Desktop Basic: 否
ArcGIS for Desktop Standard: 需要 Production Mapping
ArcGIS for Desktop Advanced: 需要 Production Mapping
4/27/2014