Feature To Polygon (Data Management)

Summary

Creates a feature class containing polygons generated from areas enclosed by input line or polygon features.

Illustration

Feature To Polygon
Feature To Polygon

Usage

Syntax

FeatureToPolygon_management (in_features, out_feature_class, {cluster_tolerance}, {attributes}, {label_features})
ParameterExplanationData Type
in_features
[in_features,...]

The input features that can be line or polygon, or both.

Feature Layer
out_feature_class

The output polygon feature class.

Feature Class
cluster_tolerance
(Optional)

The minimum distance separating all feature coordinates, and the distance a coordinate can move in X, Y, or both during spatial computation. The default XY tolerance is set to 0.001 meter or its equivalent in feature units.

Linear unit
attributes
(Optional)

Specifies whether to preserve the input attribute schema or the attribures from label features in the output feature class, or omit any input attributes in the output feature class. This parameter does not work. It will not be removed for backward compatibility of scripts or models. The output attribute schema and field values for certain input combinations may be produced as described in the usage notes; most of them are unintended.

  • ATTRIBUTESPreserves the input attribute schema or the attribures from label features, if provided, in the output features. This is the default.
  • NO_ATTRIBUTESOmits any input attributes in the output feature class.
Boolean
label_features
(Optional)

The optional input point features that hold the attributes to be transferred to the output polygon features.

Feature Layer

Code Sample

FeatureToPolygon Example 1 (Python window)

The following Python window script demonstrates how to use the FeatureToPolygon function in immediate mode.

import arcpy
from arcpy import env
env.workspace = "C:/data"
arcpy.FeatureToPolygon_management(["mainroads.shp","streets.shp"],
                                  "c:/output/output.gdb/streetblocks",
                                  "", "NO_ATTRIBUTES", "")
FeatureToPolygon Example 2 (stand-alone script)

The following stand-alone script is a simple example of how to apply the FeatureToPolygon function in a scripting environment.

# Name: FeatureToPolygon_Example2.py
# Description: Use FeatureToPolygon function to construct habitat areas
#              from park boundaries and rivers.
# Author: ESRI

# import system modules 
import arcpy
from arcpy import env

# Set environment settings
env.workspace = "C:/data/parks_analysis.gdb"

# Set local parameters
inFeatures = ["park_boundaries", "rivers"]
outFeatureClass = "c:/output/output.gdb/habitat_areas"
clusTol = "0.05 Meters"

# Use the FeatureToPolygon function to form new areas
arcpy.FeatureToPolygon_management(inFeatures, outFeatureClass, clusTol,
                                  "NO_ATTRIBUTES", "")

Environments

Related Topics

Licensing Information

ArcView: No
ArcEditor: No
ArcInfo: Yes

10/27/2014