ArcEngine SpatialRelDescription


ArcEngine disjoint elements deleted by SpatialRelDescription

http://www.cnblogs.com/janehlp/p/4154958.html



ISpatialFilter.SpatialRel set esriSpatialRelRelate, and set SpatialRelDescription as a string. The method of construction of the string:
the length of the string 9, "*********"; each "*" may be changed to "T" or "F", T indicates True, F for False . Specifically how to construct according to the specific needs. This is equivalent to a customized spatial relationships. Each character from left to right corresponding to what are relations
. 1 Interior Interior 
2 Interior boundary 
. 3 Interior Exterior 
. 4 Interior boundary 
. 5 boundary boundary 
. 6 Exterior boundary 
. 7 Interior Exterior 
. 8 Exterior boundary 
. 9 Exterior Exterior 

nine respectively, from the relationship between the internal geometry, boundary, external to distinguish, topological relationships between all geometric relationship nothing more than the nine combinations.

Delete disjoint elements of the relationship is: F * T *** T **

1
2
3
4
5
ISpatialFilter spatialFilter =  new  SpatialFilterClass();<br>spatialFilter.Geometry = baseGeom;
spatialFilter.SpatialRel = esriSpatialRelEnum.esriSpatialRelRelation;
spatialFilter.SpatialRelDescription =  "F*T***T**" ;
 
(fc  as  ITable).DeleteSearchedRows(spatialFilter);

  


发布了49 篇原创文章 · 获赞 2 · 访问量 6万+

Guess you like

Origin blog.csdn.net/Chen_cs/article/details/51224874