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

Calculate Line Caps

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

Summary

Modifies the cap type (ending style) for representation stroke symbols and stores it as a representation override.

Illustration

Calculate Line Caps

Usage

  • Representation stroke symbols that are relatively wide and drawn with multiple layers to display a "cased road" effect are often joined together at their endpoints with round line caps to prevent symbol gaps appearing at sharp angles between features. However, a round end cap is generally not desirable cartographic appearance for dead-end street (dangling line features that are not connected at their endpoint to another feature.) The line cap style is generally overriden to a butt or square style in these situations. This tool detects dangles and overrides the representation cap type of the stroke symbol.

Syntax

CalculateLineCaps_cartography (in_features, {cap_type}, {dangle_option})
ParameterExplanationData Type
in_features

The input feature layer containing line representations.

Layer
cap_type
(Optional)

Defines how the ends of representation stroke symbols are drawn. The default cap type of representation strokes is round, where the symbol is terminated with a semicircle of radius equal to stroke width is centered at the line endpoint. This tool changes cap type to BUTT or SQUARE.

  • BUTT —Specifies to end the representation stroke symbol exactly where the line geometry ends. This is the default.
  • SQUARE —Specifies to end the representation stroke symbol with closed, square caps that extend past the endpoint of the line by half of the symbol width.
String
dangle_option
(Optional)

The Dangle parameter controls how line caps are calculated for adjoining line features that share an endpoint but are drawn with different representation symbology.

  • CASED_LINE_DANGLE —Modifies the cap style for dangling lines (those not connected at their endpoints to another line) and also for the lines where a cased-line representation stroke symbol is joined at the endpoint of a single-line representation stroke symbol. This is the default.
  • TRUE_DANGLE —Modifies the cap style only for endpoints that are not connected to another feature.
String

Code Sample

CalculateLineCaps tool Example (Python Window)

The following Python Window script demonstrates how to use the CalculateLineCaps tool in immediate mode.

import arcpy
from arcpy import env
env.workspace = "C:\data"

arcpy.CalculateLineCaps_cartography("roads.lyr", "BUTT", "CASED_LINE_DANGLE")
CalculateLineCaps tool Example (Stand-alone Python script)

This stand-alone script shows an example of using the CalculateLineCaps tool.

# Name: CalculateLineCaps_standalone_script.py
# Description: calculates a value for the line cap property of a representation stroke layer
# Author: ESRI
 
# Import system modules
import arcpy
from arcpy import env

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

# Set local variables
in_features = "roads.lyr"
cap_type = "BUTT"
dangle_option = "CASED_LINE_DANGLE"

# Execute Calculate Line Caps
arcpy.CalculateLineCaps_cartography(in_features, cap_type, dangle_option)

Environments

This tool does not use any geoprocessing environments

Licensing Information

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

Related Topics

  • An overview of the Cartographic Refinement toolset
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