ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Delete Dangles

Available with Production Mapping license.

  • Summary
  • Illustration
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Removes lines that are shorter than the specified length and do not connect to other features on both ends.

Illustration

Delete Dangles example

Usage

    Caution:

    This tool modifies the input data. See Tools that do not create output datasets for more information and strategies to avoid undesired data changes.

  • A warning is raised if the input features are not in a projected coordinate system. This tool relies on linear distance units, which will create unexpected results in an unprojected coordinate system. It is strongly suggested that you run this tool on data in a projected coordinate system to ensure valid results. An error is raised and the tool will not process if the coordinate system is missing or unknown.

  • Input line features that are below the minimum length and do not touch another line at both end points are deleted.

  • Features connected to any feature class listed in the Compare Features (Compare_Features) parameter are not considered dangles.

  • If this tool is run in an edit session in ArcMap, you can stop the edit session without saving changes to restore features that have been deleted.

Syntax

DeleteDangles(Input_Line_Features, Minimum_Length, {Compare_Features}, Recursive)
ParameterExplanationData Type
Input_Line_Features

The features that will be checked for dangles.

Feature Layer
Minimum_Length

The minimum length for input lines. Features shorter than this are deleted.

Linear unit
Compare_Features
[Compare_Features,...]
(Optional)

Additional features the input line features can be compared to when determining whether the feature is a dangle.

Feature Layer
Recursive

Indicates the method used to delete dangles on the line features.

  • NON_RECURSIVE —All the dangles on lines are deleted. The remaining lines are not analyzed to see if they are dangles. This is the default.
  • RECURSIVE —The dangles are deleted from the lines and the remaining lines are analyzed to see if they are considered dangles. If they do not meet the Minimum_Length value, they are considered dangles and deleted.
Boolean

Code sample

DeleteDangles example (stand-alone script)

The following stand-alone sample script demonstrates how to use DeleteDangles.

# Name: DeleteDangles_Example.py
# Description: Uses Production Mapping tool Delete Dangles to remove
#   unconnected lines less than a certain length
# Author: Esri
# Date: February 2014

# Import arcpy module
import arcpy

# Check out Production Mapping license
arcpy.CheckOutExtension("Foundation")

# set environment
arcpy.env.workspace="c:/data/LocalGovernment.gdb"

# Define variables
inFeatures="ReferenceData/RoadCenterline"
inFeaturesLyr="RoadL_Lyr"
minLength="10 Feet"

# Create an input feature layer for DeleteDangles
arcpy.MakeFeatureLayer_management(inFeatures,inFeaturesLyr)

# Execute the tool
arcpy.DeleteDangles_production(inFeaturesLyr,minLength)

Environments

  • Current Workspace
  • Scratch Workspace

Licensing information

  • ArcGIS Desktop Basic: No
  • ArcGIS Desktop Standard: No
  • ArcGIS Desktop Advanced: Requires Production Mapping

Related topics

  • An overview of the Generalization toolset
  • Increase Line Length

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2019 Esri. | Privacy | Legal