Densify (Editing)
Summary
Inserts vertices along line or polygon features. Also replaces curve segments (bezier, circular arcs, elliptical arcs) with densified line segments.
Illustration
Usage
-
Straight line segments are densified by the Distance parameter. Curve segments are simplified through densification by either the Distance , Maximum Deflection Angle, or Maximum Offset Deviation parameter.
Densification is done segment by segment.
Only one densification method can be selected each time Densify is executed.
-
The Spatial Reference of the data is very important to the result generated by this tool. Data should be densified in an appropriate coordinate system to maintain the correct shape of the features.
-
All of the segments of the output features will have vertices lying on the original input features. The start and end points for each segment are always honored and will remain the same.
When densifying by Maximum Offset Deviation, if the input geometry contains circular arcs, then an upper limit on the offset will be enforced such that the angle between two consecutive line segments in the output cannot exceed ten degrees. This angle can be exceeded if you densify by the Maximum Deflection Angle.
This tool modifies the input data. See Tools with no outputs for more information and strategies to avoid undesired data changes.
Syntax
Parameter | Explanation | Data Type |
in_features |
The polygon or line feature class to be densified. | Feature Layer |
densification_method (Optional) |
The method selected to handle feature densification.
| 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
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")
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])