ArcGIS IQueryFilter接口


樱木  原文 IQueryFilter

1、IQueryFilter::SubFields
(1)默认值为“*”,即查询时返回整行数据,如果只需要某一个字段数据(比如“Country”字段),则可以指定SubFields = “Country”,这样可以提高查询效率;查询多个字段时使用 SubFields = “Country,Date”;
(2)需要编辑数据时,应该将SubFields字段设为“*”;

2、ISpatialFilter
(1)继承自IQueryFilter,扩展部分包括Geometry,GeometryField,SpatialRel,SpatialRelDescription
(2)使用举例   

ISpatialFilter pSpatialFilter = new SpatialFilterClass();
pSpatialFilter.Geometry = pEnvelope;
pSpatialFilter.GeometryField = pFeatureClass.ShapeFieldName;
pSpatialFilter.SpatialRel = esriSpatialRelEnum.esriSpatialRelIntersects;

3、获取SelectionSet中的Feature
(1)通过游标得到  

pSelectionSet.Search(null,false,out pCursor);
(2)通过OID得到   

IRow pRow = pSelectionSet.Target.GetRow(oid);
IFeature pFeature = row as IFeature;

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM