Delphi代码
//判断对象自相交
function IsSelfCross(PGeoMetry: IGeoMetry): boolean;
var
pTopo : ITopologicalOperator2;
B : wordbool;
begin
pTopo := PGeoMetry as ITopologicalOperator2;
pTopo.Set_IsKnownSimple(False);
pTopo.Get_IsSimple(B);
result := B;
end;
C#代码
//判断对象自相交
public static bool IsSelfCross(IGeometry pGeometry)
{
ITopologicalOperator2 pTopologicalOperator2=pGeometry as ITopologicalOperator2;
pTopologicalOperator2.IsKnownSimple_2 = false;
return pTopologicalOperator2.IsSimple;
}