ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Geometry Namespace / IGeometryEngine Interface / ReflectAboutLine Method
The input geometry.
The reflection line.
Example Version

ReflectAboutLine Method (IGeometryEngine)
Reflects the input geometry about the given line.
Syntax

Parameters

geometry
The input geometry.
reflectionLine
The reflection line.

Return Value

The reflected geometry.
Exceptions
ExceptionDescription
The input geometry or the reflection line is null.
The geometry is an envelope, and envelopes cannot be reflected.
Incompatible spatial references.
Remarks

GeometryEngine ReflectAboutLine

Example
Reflect a polygon about a line
SpatialReference sr = SpatialReferences.WGS84;

Coordinate2D start = new Coordinate2D(0, 0);
Coordinate2D end = new Coordinate2D(4, 4);
LineSegment line = LineBuilderEx.CreateLineSegment(start, end, sr);

Coordinate2D[] coords = new Coordinate2D[]
{
  new Coordinate2D(-1, 2),
  new Coordinate2D(-1, 4),
  new Coordinate2D(1, 4),
  new Coordinate2D(-1, 2)
};

Polygon polygon = PolygonBuilderEx.CreatePolygon(coords, sr);

// reflect a polygon about the line
Polygon reflectedPolygon = GeometryEngine.Instance.ReflectAboutLine(polygon, line) as Polygon;

// reflectedPolygon points are 
//    (2, -1), (4, -1), (4, 1), (2, -1)
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also