标签:bsp cursor baidu name 问题 layer sys target poi
ISpatialFilter spatialFilter = new SpatialFilterClass();
spatialFilter.Geometry = Polygon ;//设置用于筛选几何对象
patialFilter.GeometryField = featureLayer.FeatureClass.ShapfieldName; //设置筛选几何字段
spatialFilter.SpatialRel = esriSpatialRelEnum.esriSpatialRelWithin;//设置空间几何关系
IFeatureLayer featureLayer = this.axMapControl1.Map.get_Layer(8) as IFeatureLayer;
IFeatureCursor featureCursor = null;
featureCursor = featureLayer.FeatureClass.Search(spatialFilter, false);
IFeature feature = null;
feature = featureCursor.NextFeature();
while (feature != null)
{
string strName = feature.get_Value(feature.Fields.FindField("NAME")).ToString();//你要查询名称
IPoint p=feature.Shape as IPoint;
feature = featureCursor.NextFeature();
}
System.Runtime.InteropServices.Marshal.ReleaseComObject(featureCursor);
参考原文
ArcGIS C#二次开发范围内元素查询。导航障碍物提示问题
标签:bsp cursor baidu name 问题 layer sys target poi
原文地址:http://www.cnblogs.com/arxive/p/6932937.html