Calculate Polygon Main Angle (Cartography)

Summary

Calculates the dominant angles of input polygon features and assigns the values to a specified field in the feature class.

Usage

Syntax

CalculatePolygonMainAngle_cartography (in_features, angle_field)
ParameterExplanationData Type
in_features

The input polygon features.

Feature Layer
angle_field

The field that will be updated with the polygon main angle values.

Field

Code Sample

CalculatePolygonMainAngle tool Example (Python Window)

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

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

arcpy.CalculatePolygonMainAngle_cartography("cities", "poly_angle")
CalculatePolygonMainAngle tool Example (Stand-alone Python script)

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

# Name: CalculatePolygonMainAngle_standalone_script.py
# Description: calculates an angle for a polygon based on the largest edge of the feature
 
# Import system modules
import arcpy
from arcpy import env

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

# Set local variables
in_features = "cities"
angle_field = "poly_angle"

# Execute Calculate Polygon Main Angle
arcpy.CalculatePolygonMainAngle_cartography(in_features, angle_field)

Environments

Related Topics

Licensing Information

ArcView: No
ArcEditor: Yes
ArcInfo: Yes

11/11/2011