Show / Hide Table of Contents

Method Relate

Relate(Geometry, Geometry, string)

Compares the spatial relationship of two geometries. Can compare Interior, Boundary and Exterior of two geometries based on a DE-9IM encoded string. This must be 9 characters long and contain combinations only of these characters: TF*012

Declaration
public static bool Relate(this Geometry geometry1, Geometry geometry2, string relation)
Parameters
Type Name Description
Geometry geometry1

The geometry that will be compared to geometry2 for relation

Geometry geometry2

The geometry that will be compared to geometry1 for relation

string relation

The DE-9IM encoded string.

Returns
Type Description
bool

Returns true if the relationship criteria is met otherwise returns false.

Remarks

Supports true curves.

Exceptions
Type Condition
ArgumentException

Indicates that geometry1 and geometry2 do not have equivalent spatial references.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.8
.NET100.13 - 300.0
.NET Windows100.13 - 300.0
.NET Android200.0 - 300.0
.NET iOS200.0 - 300.0
.NET Framework100.0 - 200.8
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.8
In this article
Provide feedback
Back to top Copyright © 2025 Esri.