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...

Unsplit Line

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

Summary

Merges lines that have coincident endpoints and, optionally, common attribute values.

Illustration

UnsplitLine illustration

Usage

  • The attributes of the features which become aggregated by this tool can be summarized or described using a variety of statistic types. The statistic type used to summarize attributes is added to the output feature class as a single field with the following naming standard of statistic type + underscore + input field name. For example, if the input has a field named POP that is summarized, using the SUM statistics type will result in a field named SUM_POP in the output feature class.

  • The availability of physical memory may limit the amount (and complexity) of input features that can be processed and unsplit into a single output line feature. This limitation could cause an error to occur, as the unsplit process may require more memory than is available. To prevent this, Unsplit Line may divide and process the input features using an adaptive tiling algorithm. To determine the features that have been tiled, run the Frequency tool on the result of this tool, specifying the same fields used in the Dissolve Field(s) parameter for the Frequency Field(s) parameter. Any record with a frequency value of 2 has been tiled. Tile boundaries are preserved in the output features to prevent the creation of features that are too large to be used by ArcGIS.

    Caution:

    Running Unsplit Line on the output of a previous unsplit run will rarely reduce the number of features in the output when the original processing divided and processed the inputs using adaptive tiling. The maximum size of any output feature is determined by the amount of available memory at run time; therefore, output containing tiles is an indicator that unsplitting any further with the available resources would cause an out-of-memory situation or result in a feature that is unusable. Additionally, running the Unsplit Line tool a second time on output that was created this way may experience very slow performance for little to no gain and may cause an unexpected failure.

  • Null values are excluded from all statistical calculations. For example, the AVERAGE of 10, 5, and NULL is 7.5 ((10+5)/2). The COUNT tool returns the number of values included in the statistical calculation, which in this case is 2.

  • The Dissolve Field(s) parameter's Add Field button is used only in ModelBuilder. In ModelBuilder, where the preceding tool has not been run, or its derived data does not exist, the Dissolve Field(s) parameter may not be populated with field names. The Add Field button allows you to add expected fields so you can complete the tool's dialog box and continue to build your model.

Syntax

UnsplitLine_management (in_features, out_feature_class, {dissolve_field}, {statistics_fields})
ParameterExplanationData Type
in_features

The line features to be aggregrated.

Feature Layer
out_feature_class

The feature class to be created that will contain the aggregated features.

Feature Class
dissolve_field
[dissolve_field,...]
(Optional)

The field or fields on which to aggregate features.

The Add Field button, which is used only in ModelBuilder, allows you to add expected fields so you can complete the dialog box and continue to build your model.

Field
statistics_fields
[[field, {statistic_type}],...]
(Optional)

The fields and statistics with which to summarize attributes. Text attribute fields may be summarized using the statistics FIRST or LAST. Numeric attribute fields may be summarized using any statistic. Nulls are excluded from all statistical calculations.

  • FIRST—Finds the first record in the Input Features and uses its specified field value.
  • LAST—Finds the last record in the Input Features and uses its specified field value.
  • SUM—Adds the total value for the specified field.
  • MEAN—Calculates the average for the specified field.
  • MIN—Finds the smallest value for all records of the specified field.
  • MAX—Finds the largest value for all records of the specified field.
  • RANGE—Finds the range of values (MAX–MIN) for the specified field.
  • STD—Finds the standard deviation on values in the specified field.
  • COUNT—Finds the number of values included in statistical calculations. This counts each value except null values. To determine the number of null values in a field, use the COUNT statistic on the field in question, and a COUNT statistic on a different field which does not contain nulls (for example, the OID if present), then subtract the two values.
Value Table

Code sample

UnsplitLine example (Python window)

The following Python window script demonstrates how to use the UnsplitLine tool in immediate mode.

import arcpy
arcpy.env.workspace = "C:/data/Portland.gdb/Streets"
arcpy.UnsplitLine_management("streets", "C:/output/output.gdb/streets_unsplit",
                             ["STREETNAME", "PREFIX"])
UnsplitLine example 2 (stand-alone script)

The following stand-alone script demonstrates how to use the UnsplitLine tool.

# Name: UnsplitLine_Example2.py
# Description: Unsplit line features based on common attributes
 
# Import system modules
import arcpy

# Set environment settings
arcpy.env.workspace = "C:/data/Portland.gdb/Streets"
 
# Set local variables
inFeatures = "streets"
outFeatureClass = "C:/output/output.gdb/streets_unsplit"
dissolveFields = ["STREETNAME", "PREFIX"]
 
# Execute UnsplitLine using STREETNAME and PREFIX as Dissolve Fields
arcpy.UnsplitLine_management(inFeatures, outFeatureClass, dissolveFields)

Environments

  • Current Workspace
  • Scratch Workspace
  • Output Coordinate System
  • Geographic Transformations
  • Extent
  • XY Resolution
  • XY Tolerance
  • Output has M values
  • M Resolution
  • M Tolerance
  • Output has Z values
  • Default Output Z Value
  • Z Resolution
  • Z Tolerance
  • Qualified Field Names
  • Output CONFIG Keyword
  • Auto Commit
  • Output Spatial Grid 1
  • Output Spatial Grid 2
  • Output Spatial Grid 3
  • Output XY Domain
  • Output M Domain
  • Output Z Domain

Licensing information

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

Related topics

  • An overview of the Features toolset

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
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal