Extend Polygon Sides (Production Mapping)
摘要
Extends the lengths and widths of polygon features until they meet a specified minimum value.
插图
用法
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 cannot be run on data that is registered as versioned.
-
It is recommended that this tool only be used on regular, rectangular-shaped polygons, such as buildings.
Features with a longer side smaller than the value specified in the Minimum_Length (Minimum Length) parameter will have the longer side extended until it meets the minimum value.
Features with a shorter side smaller than the value specified in the Minimum_Width (Minimum Width) parameter will have the shorter side extended until it meets the minimum value.
This tool cannot be run during an edit session.
此工具用于修改输入数据。有关详细信息以及避免数据被意外更改的策略,请参阅无输出的工具。
语法
参数 | 说明 | 数据类型 |
Input_Polygon_Features |
The polygon features that will have their lengths and widths extended. | Feature Layer |
Minimum_Length |
The minimum size of the long side of the polygon. | Linear unit |
Minimum_Width |
The minimum size of the short side of the polygon. | Linear unit |
代码实例
This script sample extends the length and width of parks until the height and width are both 1,000 feet.
# Name: ExtendPolygonSides_Example.py
# Description: Extends the sides of park polygons with an area of less than
# 10000 square feet.
# 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
inFeatures="ReferenceData/BuildingFootprint"
where="FULLADDRESS='332 FORT HILL DR'"
minLength="150 feet"
minWidth="100 feet"
# make a feature layer
inFeatureLyr=arcpy.MakeFeatureLayer_management(inFeatures,"FacilityLayer",where)
# execute the ExtendPolygonSides function - best use against more rectangular features like buildings
arcpy.ExtendPolygonSides_production(inFeatureLyr,minLength,minWidth)