Generate Symbol Rotation Attribute Rule (Data Management)

Summary

Generates an attribute rule specific to symbol rotation logic. The tool outputs a .csv file containing an ArcGIS Arcade attribute rule based on the inputs provided.

Usage

  • The Output Folder parameter specifies where a folder will be created using the name of the input feature class. The output .csv file will use the Rotation Field parameter value. If the tool is run multiple times, additional .csv files will be added to the folder.

  • After the tool has been run, import the attribute rule and apply it to the dataset. If the dataset is in an enterprise geodatabase, you must be the data owner to apply the output template attribute rule.

    Learn more about importing attribute rules

Parameters

LabelExplanationData Type
Input Table

The point feature class that the new rule will be applied to.

Feature Layer
Output Folder

The folder where the output .csv file will be saved. The name of the file will be the same as the Input Table parameter value.

String
Rotation Field

The name of an existing field to which the rule will be applied.

Field
Intersecting Line Classes

The line feature classes that will be used to intersect the point feature class. The orientation field is a numeric field that is used as a tie breaker when there are multiple intersecting lines.

Value Table
Expression
(Optional)

A SQL expression that limits the features the attribute rule will be applied to.

SQL Expression
Rotation Options
(Optional)

The rotation options for the point feature class.

Rotation option components are as follows:

  • Point Class Expression—A SQL query that will further limit the features the attribute rule will be applied to. The default is none.
  • Rotation Style—Specifies how the direction will be measured.
    • Arithmetic—The rotation will start at zero in the east direction and is calculated counterclockwise. This is the default.
    • Geographic—The rotation will start at zero in the north direction and is calculated clockwise.
  • Rotate Towards—Specifies whether the feature will be oriented toward the maximum or minimum value.
    • Minimum—The feature will be oriented toward the minimum value. This is the default.
    • Maximum—The feature will be oriented toward the maximum value.
  • Additional Rotation—The rotation value that will be added to the calculated rotation value. The default is 0.

Value Table

Derived Output

LabelExplanationData Type
Output CSV File

The output .csv file containing the template attribute rule.

File

arcpy.management.GenerateSymbolRotationAttributeRule(in_table, out_folder, field, line_classes, {where_clause}, {rotation_options})
NameExplanationData Type
in_table

The point feature class that the new rule will be applied to.

Feature Layer
out_folder

The folder where the output .csv file will be saved. The name of the file will be the same as the in_table parameter value.

String
field

The name of an existing field to which the rule will be applied.

Field
line_classes
[[Line Class, Orientation Field],...]

The line feature classes that will be used to intersect the point feature class. The orientation field is a numeric field that is used as a tie breaker when there are multiple intersecting lines.

Value Table
where_clause
(Optional)

A SQL expression that limits the features the attribute rule will be applied to.

SQL Expression
rotation_options
[[Point Class Expression, Rotation Style, Rotate Towards, Additional Rotation],...]
(Optional)

The rotation options for the point feature class.

Rotation option components are as follows:

  • Point Class Expression—A SQL query that will further limit the features the attribute rule will be applied to. The default is none.
  • Rotation Style—Specifies how the direction will be measured.
    • ARITHMETIC—The rotation will start at zero in the east direction and is calculated counterclockwise. This is the default.
    • GEOGRAPHIC—The rotation will start at zero in the north direction and is calculated clockwise.
  • Rotate Towards—Specifies whether the feature will be oriented toward the maximum or minimum value.
    • MIN—The feature will be oriented toward the minimum value. This is the default.
    • MAX—The feature will be oriented toward the maximum value.
  • Additional Rotation—The rotation value that will be added to the calculated rotation value. The default is 0.

Value Table

Derived Output

NameExplanationData Type
out_rule_csv

The output .csv file containing the template attribute rule.

File

Code sample

GenerateSymbolRotationAttributeRule example (stand-alone script)

The following stand-alone script is an example of how to use the GenerateSymbolRotation function in a scripting environment.


# Description: GenerateSymbolRotationAttributeRule of a template attribute rule in a file geodatabase

# Import the system modules
import arcpy

# Set local variables
in_table = "C:/data/data.gdb"
out_folder = "C:/out/"
field = "symbolRotation"
line_classes = [['C:/data/state.gdb/roads', 'OBJECTID']]

arcpy.management.GenerateSymbolRotationAttributeRule(
   in_table,
   out_folder,
   field,
   line_classes
)

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics