Align Marker To Stroke Or Fill (Cartography)

Summary

Aligns the marker symbol layers of a point feature class to the nearest stroke or fill symbol layers in a line or polygon feature class within a specified search distance.

Illustration

Align Marker To Stroke Or Fill tool examples
Markers within the search distance are aligned perpendicularly to or parallel to a red stroke.

Usage

  • Symbols are aligned by storing an angle in the attribute connected to the angle property of the marker symbol layer. This must be connected to a single field with no expression applied.

  • The search distance is the measurement from the graphical edge of the point symbol to the graphical edge of the nearest line or polygon symbol. Point symbols beyond the search distance will not be rotated. A search distance of zero aligns only marker layers that are coincident to a line or polygon symbol.

  • Rotating markers may introduce graphic conflicts. The Detect Graphic Conflict tool can be used to identify these areas.

  • Processing large datasets may exceed memory limitations. In this case, consider processing input data by partition by identifying a relevant polygon feature class in the Cartographic Partitions environment setting. Portions of the data, defined by partition boundaries, will be processed sequentially. The result will be seamless and consistent at partition edges.

Parameters

LabelExplanationData Type
Input Point Features

The input point feature layer containing point symbols to be aligned to nearby lines or polygons. Symbols are aligned by storing an angle in the attribute connected to the angle property of the marker symbol layer. This must be connected to a single field with no expression applied.

Layer
Input Line or Polygon Features

The input line or polygon feature layer to which the input point symbols will be aligned.

Layer
Search Distance

The search distance from graphical marker edge to graphical stroke or fill edge. A distance greater than or equal to zero must be specified.

Linear Unit
Marker Orientation
(Optional)

Specifies how the marker symbol layer will be oriented relative to the stroke or fill symbol layer's edge.

  • Perpendicular — Marker symbol layers will be aligned perpendicularly to the stroke or fill edge. This is the default.
  • Parallel — Marker symbol layers will be aligned parallel to the stroke or fill edge.
String

Derived Output

LabelExplanationData Type
Updated Input Layer

The updated input point feature layer.

Layer

arcpy.cartography.AlignMarkerToStrokeOrFill(in_point_features, in_line_or_polygon_features, search_distance, {marker_orientation})
NameExplanationData Type
in_point_features

The input point feature layer containing point symbols to be aligned to nearby lines or polygons. Symbols are aligned by storing an angle in the attribute connected to the angle property of the marker symbol layer. This must be connected to a single field with no expression applied.

Layer
in_line_or_polygon_features

The input line or polygon feature layer to which the input point symbols will be aligned.

Layer
search_distance

The search distance from graphical marker edge to graphical stroke or fill edge. A distance greater than or equal to zero must be specified.

Linear Unit
marker_orientation
(Optional)

Specifies how the marker symbol layer will be oriented relative to the stroke or fill symbol layer's edge.

  • PERPENDICULARMarker symbol layers will be aligned perpendicularly to the stroke or fill edge. This is the default.
  • PARALLELMarker symbol layers will be aligned parallel to the stroke or fill edge.
String

Derived Output

NameExplanationData Type
out_representations

The updated input point feature layer.

Layer

Code sample

AlignMarkerToStrokeOrFill example (Python window)

This stand-alone script shows an example of using the AlignMarkerToStrokeOrFill function.

import arcpy
arcpy.env.workspace = "C:/data"
arcpy.env.referenceScale = "50000"
arcpy.AlignMarkerToStrokeOrFill_cartography("buildings.lyr", "roads.lyr", 
                                            "2 Points", "PERPENDICULAR")
AlignMarkerToStrokeOrFill example (stand-alone script)

This stand-alone script shows an example of using the AlignMarkerToStrokeOrFill function.

# Name: AlignMarkerToStrokeOrFill_standalone_script.py
# Description: Aligns the marker symbol layers of a point feature class to the 
#              nearest stroke or fill symbol layers in a line or polygon 
#              feature class within a specified search distance

# Import system modules
import arcpy

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

# Set local variables
in_point_features = "buildings_points.lyrx"
in_line_or_polygon_features = "roads.lyrx"
search_distance = "2 Points"
marker_orientation = "PERPENDICULAR"

# Execute Align Marker To Stroke Or Fill
arcpy.AlignMarkerToStrokeOrFill_cartography(in_point_features, 
                                            in_line_or_polygon_features, 
                                            search_distance, 
                                            marker_orientation)

Licensing information

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

Related topics