when TopologicalOperator.Difference Exception from HRESULT: 0x80040215

542
1
07-30-2021 09:30 AM
syedabdulrafee
New Contributor

If SelectionCount <> 0 Then
pTopologicalOperator = CType(WALL_Feature.Shape, ITopologicalOperator)
pTopologicalOperator.Simplify()
While OtherFea IsNot Nothing
Dim LayerName As String = OtherFea.Value(OtherFea.Fields.FindField("Layer")).ToString.ToUpper
If LayerName <> "WALL" Then
Dim oPolygon As IPolygon
oPolygon = OtherFea.ShapeCopy
oPolygon.SimplifyPreserveFromTo()


pTopologicalOperator = pTopologicalOperator.Difference(oPolygon) (here Exception from HRESULT: 0x80040215 )

End if

 

 

0 Kudos
1 Reply
GKmieliauskas
Esri Regular Contributor

Hi,

Your geometries have different spatial references.

E_GEOMETRY_INCONSISTANT_SPATIAL_REFERENCE533(0x80040215) Input geometries do not have same spatial reference.

 

https://developers.arcgis.com/enterprise-sdk/api-reference/net/esriGeometry/esriGeometryError/