Densify (Editing)

Summary

Inserts vertices along line or polygon features. Also replaces curve segments (bezier, circular arcs, elliptical arcs) with densified 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 tolerance.

Linear unit
max_deviation
(Optional)

The maximum distance the output geometry can be from the input geometry. This parameter deals specifically with the simplification of curves. The default value is the value used to convert Feature Classes to Shapefiles.

Linear unit
max_angle
(Optional)

The maximum angle that the output geometry can be from the input geometry. This parameter specifically deals with the simplification of curves. The input angle can be between 0 and 90 degrees. The default value is the value used to convert Feature Classes to Shapefiles.

Double

Code Sample

Densify Example (Python Window)

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

import arcpy
arcpy.Densify_edit("C:/data/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
# Author: ESRI

# 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
climate = "climate.shp"
climateBackup = "C:/output/Output.gdb/climateBackup"
arcpy.CopyFeatures_management(climate, 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, "DISTANCE", "10 Feet") 

# Snap climate regions feature class to  vegetation layer vertices and edge
veg = "Habitat_Analysis.gdb/vegtype"
# first, snap climate region vertices to the nearest vegetation layer vertex within 30 Feet
snapEnv1 = [veg, "VERTEX", "30 Feet"]    
# second, snap climate region vertices to the nearest vegetation layer edge within 20 Feet
snapEnv2 = [veg, "EDGE", "20 Feet"]       
arcpy.Snap_edit(climate, [snapEnv1, snapEnv2])

Environments

Related Topics

Licensing Information

ArcView: No
ArcEditor: Yes
ArcInfo: Yes

4/27/2011