Feature To Point (Data Management)

License Level:BasicStandardAdvanced

Summary

Creates a feature class containing points generated from the representative locations of input features.

Illustration

Feature To Point illustration

Usage

Syntax

FeatureToPoint_management (in_features, out_feature_class, {point_location})
ParameterExplanationData Type
in_features

The input features that can be multipoint, line, polygon, or annotation.

Feature Layer
out_feature_class

The output point feature class.

Feature Class
point_location
(Optional)

Specifies whether to use representative centers of input features or locations contained by input features as the output point locations.

  • CENTROIDUses the representative center of an input feature as its output point location. This is the default. This point location may not always be contained by the input feature.
  • INSIDEUses a location contained by an input feature as its output point location.
Boolean

Code Sample

FeatureToPoint Example 1 (Python window)

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

import arcpy
from arcpy import env
env.workspace = "C:/data"
arcpy.FeatureToPoint_management("parcels.shp", "c:/data/output/parcels_center.shp", 
                                "CENTROID")
FeatureToPoint Example 2 (stand-alone script)

The following standalone script is a simple example of how to apply the FeatureToPoint function in a scripting environment.

# Name: FeatureToPoint_Example2.py
# Description: Use FeatureToPoint function to find a point inside each park
# Author: ESRI

# import system modules 
import arcpy
from arcpy import env

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

#  Set local variables
inFeatures = "parks.shp"
outFeatureClass = "c:/output/output.gdb/parks_pt"

# Use FeatureToPoint function to find a point inside each park
arcpy.FeatureToPoint_management(inFeatures, outFeatureClass, "INSIDE")

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: No
ArcGIS for Desktop Standard: No
ArcGIS for Desktop Advanced: Yes
5/7/2015