【AE】arcgis engine中,IActiveView接口里的Selection属性和IMap接口里面IFeatureSelection属性和的区别?

el/2024/4/13 13:42:05

arcgis engine中,IMap接口里面IFeatureSelection属性和IActiveView接口里的Selection属性的区别?

纲要
ActiveView.Selection Property的帮助文档内容
IMap.FeatureSelection Property帮助文档内容
二者区别
  • ActiveView.Selection Property的帮助文档内容如下:

ArcMap has two different selection types, a feature selection and an
element selection. Two different objects represent these selections
and both implement the ISelection interface. The feature selection
object additionally implements IEnumFeature and the element selection
object IEnumElement. The ISelection interface is used for clipboard
type operations and the IEnum interfaces are used to loop through the
items in the collection. Each active view object, the PageLayout and
all Maps, have their own selection objects. Actually, the PageLayout
only has an element selection but each Map has a unique feature and
element selection. When working with selections make sure you have
the correct active view object. For a Map, only one of the selections
can be active at a time. As mentioned above, this interface
providesan ISelection reference to either an element or feature
selection depending on which one is currently active. To simplify the
matter, IMap has a FeatureSelection property which always returns an
ISelection on the feature selection, from which you can obtain an
IEnumFeaturereference. Just make sure you have the correct Map,
usually the FocusMap. To get a Map’s element selection, use
IViewManager::ElementSelection. Note: The features returned as part of
IEnumFeature are in the spatial reference of the map, so they have
the coordinate system and the resolution (1/precision) of the map.

  • IMap.FeatureSelection Property帮助文档内容如下:

ArcMap has two different selections, a feature selection and an
element selection. Two different objects represent these selections
and both implement the ISelection interface. The feature selection
object additionally implements IEnumFeature and the element selection
object IEnumElement. The ISelection interface is used for clipboard
type operations and the IEnum interfaces are used to loop through the
items in the collection. When you ask for the FeatureSelection from
IMap you are returned an ISelection but you can perform a query
interface for IEnumFeature and usually do so. However, if you get the
selection via IActiveView::Selection, the selection can either be an
element selection or a feature selection depending on which one is
currently active - only one of the selections can be active at a time.
Use FeatureSelection to ensure a reference to the correct selection.
IEnumFeature works on all of the FeatureLayers as a whole. Each
FeatureLayer has a ISelectionSet and IEnumFeature steps through all
of these as though there was only one. Because IEnumFeature works
with all the FeatureLayers, you cannot use it to loop through the
features belonging to just one FeatureLayer. Note, only the shape
field is guaranteed with the selection. This is the default and
exists for performance reasons. The IMap::FeatureSelection property
is typically used to draw the map selection, not access feature
attributes. This is particularly noticeable with shapefiles and
coverage but also in geodatabases if the selection is large enough.
Use IEnumFeatureSetup::AllFields to set a flag indicating all fields
be returned with the selection. If you want to loop through the map
selection to perform an operation, it is typically best to access
each layer’s selection rather than the entire map’s selection. See the
example for a sample of each.

  • 二者区别
ActiveView.SelectionIMap.FeatureSelection
一次只能选中一个(取决于哪个激活)每个FeatureLayer都有一个ISelectionSet
返回ISelection返回ISelection并且可以为IEnumFeature执行查询界面
使用选择时,请确保您具有正确的活动视图对。确保您具有正确的地图,通常是FocusMap
可以遍历仅属于一个FeatureLayer的功能不能遍历仅属于一个FeatureLayer的功能

欢迎大家交流讨论,如有问题,烦请指出。


http://www.ngui.cc/el/4999871.html

相关文章

【AE】esriunits的值有哪些?esriGeometryT ype有哪些?esriFieldType有哪些?

1.esriunits的值有哪些?Inches、Points、Feet、Yards、Miles、NauticalMiles、Millimeters、Centimeters、Decimeters、Meters、Kilometers、DecimalDegrees、Decimeters、UnitsLast 2.esriGeometryType有哪些?esriGeometryNull、esriGeometryPoint、esr…

【AE】学习用GP调用工具遇见的问题(工具调用网站+错误等)

1.什么是GP,GP调用buffer工具:(过程很全,可以结合2.看) https://www.cnblogs.com/liweis/p/4155941.html 2.GP调用buffer工具:(比1.简洁) https://www.cnblogs.com/zhangjun1130/arc…

【ArcGIS】实习02空间数据的表达与转换

1. 打开ArcToolboxConversion ToolsTo RasterFeature to Raster工具。 2. 输入点要素数据,字段选择Id,设置路径,栅格像元大小分别选择2、8、32。 3. 输入线要素数据,字段选择Id,设置路径,…

【ArcGIS】实习08空间数据扫描矢量化

1.解压实验数据08,在ArcMap浏览文件数据,添加扫描图栅格数据,进行配准。 2.将扫描图数据进行二值化处理。 3.在catalog中创建新的shapefile 图层。 4.利用ArcScan工具条的工具进行全自动矢量化。

【ArcGIS】实习09从谷歌地球中采集数据

打开谷歌地球,浏览。创建新的文件夹,在里面创建点数据、线数据、面数据保存数据为KML格式在ArcGIS中进行转换,成为图层同时,矢量数据文件也可以转换为KML格式在谷歌地图中显示,需要先转KML格式。

【SPSS】第1讲学习笔记——认识SPSS

SPSS统计功能十分强大,广泛应用于各个学科。 1、操作界面介绍 标题栏:文件名称 主菜单栏:分析较为常用 快捷菜单栏:打开文档、保存文档等,常用命令 单元格信息栏:左边显示坐标,右边显示属性信息 数据切换标签页:数据视图/变量视图 状态栏:程序运行情况 2.打开数据文…

【ArcGIS】实习10空间数据编辑

1. 打开catalog,浏览数据。 2. 新建shapefile,要素类型为polyline。 3. 加载到ArcMap中,点击编辑按钮打开工具条,启动编辑。 4. 输入数据,双击结束。 5. 线要素编辑完成。 6. 可以…

【SPSS】第2讲学习笔记——定义变量

1、打开SPSS界面 2、选择左下角的变量视图 3、定义变量属性 (名称、类型、宽度、小数、标签、值、缺失、列、对齐方式、测量、角色) 注意:(1)变量名称首个字符是汉字、字母、 (2)不能用数字、…

【ArcGIS】实习11属性数据输入

1. 加载浏览多边形数据 打开ArcMap,添加数据westprovince,浏览该数据;然后打开数据属性表,查看多边形面积和周长等属性数据。 2. 加载浏览表数据 在ArcMap中加载provincecode.xls的name表和provincepopu.xls的population表,右键点击表格并选择Open打开相应表格,查看各…

【SPSS】第4讲学习笔记——数据的编辑和输出

1、打开数据 2、插入和删除变量 选择数据视图——右击想插入变量位置后的那个已有变量名——插入变量——选择变量视图——编辑变量属性 选择数据视图——右击想要删除的变量列——清除 (在变量视图里同样可以进行变量的插入和删除操作,操作方法类似) 3、插入和删除个案 …