ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS 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
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Align Marker To Stroke Or Fill

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

Summary

Aligns the representation marker symbols of a point feature class to the nearest stroke or fill representation symbols 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

  • Representation marker symbols are aligned by overriding the angle property of the representation marker symbol layer.

  • The search distance is the measurement from the graphical edge of the marker to the graphical edge of the nearest stroke or fill outline. Representation geometry (shape) overrides are honored. Representation markers beyond the search distance will not be rotated. A search distance of zero aligns only markers that are coincident to a representation stroke or fill symbol.

  • Features that have null or invalid representation rules, or that have the representation visibility property turned off, will not be aligned.

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

Syntax

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

The input point feature layer containing marker representations.

Layer
in_line_or_polygon_features

The input line or polygon feature layer containing stroke or fill representations.

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 representation marker will be oriented relative to the stroke or fill edge.

  • PERPENDICULAR —Representation markers will be aligned perpendicularly to the stroke or fill edge. This is the default.
  • PARALLEL —Representation markers 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 representation markers to nearby line or polygon features symbolized with representations
# Author: ESRI
 
# Import system modules
import arcpy
from arcpy import env

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

# Set local variables
in_point_features = "buildings.lyr"
in_line_or_polygon_features = "roads.lyr"
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)

Environments

  • Cartographic Coordinate System
  • Reference Scale

Licensing information

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

Related topics

  • An overview of the Cartographic Refinement toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal