ISpatialFilter 空间分析 相交、相接、包含、叠加(图层级别)
空间过滤器空间关系类型 | 描述(A是待查询图形,B是过滤条件图形) |
esriSpatialRelUndefined | 未定义 |
esriSpatialRelIntersects | A与B图形相交 |
esriSpatialRelEnvelopeIntersects | A的Envelope和B的Envelope相交 |
esriSpatialRelIndexIntersects | A与B索引相交 |
esriSpatialRelTouches | A与B边界相接 |
esriSpatialRelOverlaps | A与B相叠加 |
esriSpatialRelCrosses | A与B相交(两条线相交于一点,一条线和一个面相交) |
esriSpatialRelWithin | A在B内 |
esriSpatialRelContains | A包含B |
esriSpatialRelRelation | A与B空间关联 |
//相邻运算
ISpatialFilter spatialFilter = new SpatialFilterClass
{
Geometry = feature.Shape as IGeometry, //
SpatialRel = esriSpatialRelEnum.esriSpatialRelTouches, //相接
GeometryField = featureClass.ShapeFieldName
};
IFeatureCursor featureCursor2 = featureClass.Search(spatialFilter, true);
转载自:https://blog.csdn.net/qq_33222460/article/details/87818307