本文整理汇总了C#中SpatialFilterClass.set_GeometryEx方法的典型用法代码示例。如果您正苦于以下问题:C# SpatialFilterClass.set_GeometryEx方法的具体用法?C# SpatialFilterClass.set_GeometryEx怎么用?C# SpatialFilterClass.set_GeometryEx使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpatialFilterClass
的用法示例。
在下文中一共展示了SpatialFilterClass.set_GeometryEx方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HasRelationshipWithFC
/// <summary>
/// check if a shape has the specified relationship with any features in the specified feature class
/// </summary>
public static bool HasRelationshipWithFC(IGeometry GeomToCheck, esriSpatialRelEnum SpatRel,
IFeatureClass FeatureClassToSearchIn, string WhereClause)
{
ISpatialFilter ThisSpatialFilter;
IFeatureCursor ThisFeatureCursor;
IFeature CheckFeature;
bool DoesRelate = false;
ThisSpatialFilter = new SpatialFilterClass();
ThisSpatialFilter.set_GeometryEx(GeomToCheck, false);
ThisSpatialFilter.GeometryField = FeatureClassToSearchIn.ShapeFieldName;
ThisSpatialFilter.SpatialRel = SpatRel;
ThisSpatialFilter.WhereClause = WhereClause;
try
{
ThisFeatureCursor = FeatureClassToSearchIn.Search(ThisSpatialFilter, false);
CheckFeature = ThisFeatureCursor.NextFeature();
DoesRelate = CheckFeature == null ? false : true;
}
catch
{
}
ThisFeatureCursor = null;
CheckFeature = null;
return DoesRelate;
}