﻿ Boundary Method (GeometryEngine)—ArcGIS Pro
ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Geometry Namespace / GeometryEngine Class / Boundary Method
Specifies the input geometry.
Example

In This Topic
Boundary Method (GeometryEngine)
In This Topic
Calculates the boundary of the input geometry.
Syntax
```public Geometry Boundary(
Geometry geometry
)```
```Public Function Boundary( _
ByVal geometry As Geometry _
) As Geometry```

#### Parameters

geometry
Specifies the input geometry.

#### Return Value

The geometry that represents the boundary of the input geometry. For Point - returns an empty point. For Multipoint - returns an empty point. For Envelope - returns a polyline, that bounds the envelope. For Polyline - returns a multipoint, using OGC specification (includes path endpoints, using mod 2 rule). For Polygon - returns a polyline that bounds the polygon by adding all rings of the polygon to a polyline.
Exceptions
ExceptionDescription
Geometry is null or empty.
The method is not implemented for GeometryBag.
Remarks
If the input geometry is not known-simple, then the operation will be performed on a simplified copy of the geometry.

Example
Determine the boundary of a multi-part Polygon
```// create a donut polygon.  Must use the PolygonBuilderEx object

List<Coordinate2D> outerPts = new List<Coordinate2D>();

List<Coordinate2D> innerPts = new List<Coordinate2D>();

Polygon donut = null;

PolygonBuilderEx pb = new PolygonBuilderEx(outerPts);
// add the inner points (note they are defined anticlockwise)
// get the polygon
donut = pb.ToGeometry();

// get the boundary
Geometry g = GeometryEngine.Instance.Boundary(donut);
Polyline boundary = g as Polyline;
```
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.