Densify (Editing)

License Level:BasicStandardAdvanced

Summary

Adds vertices along line or polygon features. Also replaces curve segments (Bezier, circular arcs, and elliptical arcs) with line segments.

Illustration

The curve is densified into linear segments by either the Offset, Distance, or Angle

Usage

Syntax

Densify_edit (in_features, {densification_method}, {distance}, {max_deviation}, {max_angle})
ParameterExplanationData Type
in_features

The polygon or line feature class to be densified.

Feature Layer
densification_method
(Optional)

The method selected to handle feature densification.

  • DISTANCE The tool will apply the Distance method to curves the same as it does to straight lines. This is the default.
  • OFFSETThe tool will apply the Maximum Offset Deviation parameter to curves.
  • ANGLEThe tool will apply the Maximum Deflection Angle parameter to curves.
String
distance
(Optional)

The maximum linear distance between vertices. This distance will always be applied to line segments and to simplify curves. The default value is a function of the data's xy tolerance.

Linear unit
max_deviation
(Optional)

The maximum distance the output segment can be from the original. This parameter only affects curves. The default value is a function of the data's xy tolerance.

Linear unit
max_angle
(Optional)

The maximum angle that the output geometry can be from the input geometry. The valid range is from 0 to 90. The default value is 10. This parameter only affects curves.

Double

Code Sample

Densify example 1 (Python window)

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

import arcpy
arcpy.Densify_edit("C:/data.gdb/lines", "ANGLE","", "", "0.75")
Densify example 2 (stand-alone script)

The stand-alone script, below, shows the Densify function as part of a workflow which also utilizes the Snap editing tool.

# Name: Snap.py
# Description: Snap climate regions boundary to vegetation layer
#              boundary to ensure common boundary is coincident


# import system modules 
import arcpy

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

# Make backup copy of climate regions feature class, 
# since modification with the Editing tools below is permanent
climateBackup = "backups/climate.shp"
arcpy.CopyFeatures_management('climate.shp', climateBackup)

# Densify climate regions feature class to make sure there are enough
#vertices to match detail of vegetation layer when layers are snapped
arcpy.Densify_edit('climate.shp', "DISTANCE", "10 Feet") 

# Snap climate regions feature class to  vegetation layer vertices and edge
# first, snap climate region vertices to the nearest vegetation vertex within 30 Feet
# second, snap climate region vertices to the nearest vegetation edge within 20 Feet

snapEnv1 = ["Habitat_Analysis.gdb/vegtype", "VERTEX", "30 Feet"]    
snapEnv2 = ["Habitat_Analysis.gdb/vegtype", "EDGE",   "20 Feet"]       
arcpy.Snap_edit('climate.shp', [snapEnv1, snapEnv2])

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: No
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
6/18/2012