ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

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
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

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

Extend Line

  • Summary
  • Illustration
  • Usage
  • Syntax
  • Code Sample
  • Environments
  • Licensing Information

Summary

This tool extends line segments to the first intersecting feature within a specified distance. If no intersecting feature is within the specified distance, the line segment will not be extended. Tool use is intended for quality control tasks such as cleaning up topology errors in features that were digitized without having set proper snapping environments.

Illustration

Extend Line illustration

Usage

    Caution:

    This tool modifies the input data. See Tools with no outputs for more information and strategies to avoid undesired data changes.

  • If no Extend Length is specified, segments will be extended to the first intersecting feature.

  • If the Extend to Extensions option is used, line segments can be extended to existing line features as well as other extended line segments within the specified extend length, forming intersections between two extensions.

  • A feature can be extended to itself, if it is the first intersecting feature.

  • If a feature layer or feature class with a selection is used as the input, only the selected features will be extended. All features within the layer or feature class will be used to assess if an extension can be performed, but only the selected features will be modified.

  • This tool will not change any feature attributes, except the managed geometry (length) fields in a personal, file, or SDE geodatabase feature class.

Syntax

ExtendLine_edit (in_features, {length}, {extend_to})
ParameterExplanationData Type
in_features

The line input features to be extended.

Feature Layer
length
(Optional)

The maximum distance a line segment can be extended to an intersecting feature.

Linear Unit
extend_to
(Optional)

Controls whether line segments can be extended to other extended line segments within the specified extend length.

  • EXTENSION —Line segments can be extended to other extended line segments as well as existing line features. This is the default.
  • FEATURE —Line segments can only be extended to existing line features.
Boolean

Code Sample

Extend Line Example (Python Window)

The following Python Window script demonstrates how to use the Extend Line tool.

import arcpy
arcpy.env.workspace = "C:/data"
arcpy.ExtendLine_edit("majorrds.shp", "15 Feet", "EXTENSION")
Extend Line Example (Stand-alone script)

Clean up street centerlines that were digitized without having set proper snapping environments

# Name: ExtendLine.py
# Description:  Clean up street centerlines that were digitized without 
#                      having set proper snapping environments

# import system modules 
import arcpy
from arcpy import env

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

# Make backup copy of streets feature class, since modification with 
#  the Editing tools below is permanent
streets = "majorrds.shp"
streetsBackup = "C:/output/Output.gdb/streetsBackup"
arcpy.CopyFeatures_management(streets, streetsBackup)

# Trim street lines to clean up dangles
arcpy.TrimLine_edit(streets, "10 Feet", "KEEP_SHORT")

# Extend street lines to clean up dangles
arcpy.ExtendLine_edit(streets, "15 Feet", "EXTENSION")

Environments

  • Extent
  • Current Workspace

Licensing Information

  • ArcGIS for Desktop Basic: No
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related Topics

  • An overview of the Editing toolbox
Feedback on this topic?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

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

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal