Come from ArcGIS Online IGeometryCollection Interface

Provides access to members that can be used for accessing, adding and removing individual geometries of a multi-part geometry (Multipoint, Polyline, Polygon, MultiPatch, and GeometryBag).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

A Collection of Geometry parts.  For Multipoints, Triangles, TriangleFans, and TriangleStrips, the Geometry parts are Points. For Polylines, the Geometry parts are Paths.  For Polygons, the Geometry parts are Rings.  For MultiPatches, the Geometry parts are Triangles, TriangleFans, TriangleStrips, or Rings.  For GeometryBags, the Geometry parts are any IGeometry object.

The GeometryCollection can be used to access, manipulate, add, insert, remove, and set specific parts of a composite geometry.

When To Use

If you are using a development language that does not support C style arrays, use IGeometryBridge instead. The IGeometryBridge interface solves that problem allowing you to pass safe arrays instead.

Members

Description

 

AddGeometries

Adds references to the specified geometries. This method is intended for internal use only.

 

AddGeometry

Adds a reference to the input geometry either at the end, or before, or after the specified index.

 

AddGeometryCollection

Adds references to geometries in the input collection.

 

GeometriesChanged

Tells this geometry collection that some of its geometries have been altered. Use this method on polylines, polygons and multipatches after directly editing one of its parts.

 

Geometry

A reference to the ith geometry.

 

GeometryCount

The number of geometries in this collection.

 

InsertGeometries

Inserts at the specified index references to some number of geometries in the input array. This method is intended for internal use only.

 

InsertGeometryCollection

Inserts at the specified index references to all if the geometries in the input collection.

 

QueryGeometries

Populates the array with references to a sub-sequence of geometries. This method is intended for internal use only.

 

RemoveGeometries

Removes references to some geometries from this collection.

 

SetGeometries

Replaces all geometries in the collection with the specified number of references to those in the input array. This method is intended for internal use only.

 

SetGeometryCollection

Replaces all geometries in the collection with references to geometries from the input collection.

CoClasses that implement IGeometryCollection

CoClasses and Classes

Description

GeoEllipse (esriDefenseSolutions)

Its a spheroidal ellipse.

GeometryBag

An ordered collection of objects that support the IGeometry interface.

GeoPolygon (esriDefenseSolutions)

Its a spheroidal polygon.

GeoPolyline (esriDefenseSolutions)

This is a spheroidal polyline.

MultiPatch

A collection of surface patches.

Multipoint

An ordered collection of points; optionally has measure, height and ID attributes.

Polygon

A collection of rings ordered by their containment relationship; optionally has measure, height and ID attributes.

Polyline

An ordered collection of paths; optionally has measure, height and ID attributes.

TriangleFan

A continuous 3D fan of triangles, where each triangle after the first shares an edge with the preceding triangle, and all triangles share a common pivot point.

Triangles

A collection of 3D triangles, where each consecutive triplet of vertices defines a new triangle

TriangleStrip

A continuous 3D strip of triangles, where each triangle after the first shares an edge with the preceding triangle.

Remarks

Every Geometry created within ArcGIS should be assigned a spatial reference. Always attach well-defined spatial references to new geometries. This improves processing efficiency, in particular, when using ITopologicalOperator on geometries that contain curved segments (circular arcs, bezier curves, elliptical arcs). New geometries include any geometry that is created in memory. It does not matter whether it will be stored in a feature class or not. Well-defined as applied to a spatial reference means that it not only has its coordinate system (projection) defined, but also its coordinate grid. The coordinate grid consists of the xy domain, xy resolution, and xy cluster tolerance properties of a spatial reference. If the Geometry includes z or m values, the z or m domains, z or m resolutions, and z or m cluster tolerance properties must also be defined. The cluster tolerance and resolutions can be quickly and easily set using SetDefault methods on ISpatialReferenceResolution and ISpatialReferenceTolerance interfaces.

//The example shows a GeometryCollection for MultiPoint.
public void ShowGeometries()
{ IGeometryCollection geometryCollection = new MultipointClass();
//add 10 points in a loop
object missing = Type.Missing; for (int i = ; i < ; i++)
{
IPoint point = new PointClass();
point.PutCoords(i * , i * );
geometryCollection.AddGeometry(point as IGeometry, ref missing, ref missing);
} int geometryCount = geometryCollection.GeometryCount;
System.Windows.Forms.MessageBox.Show("GeometryCount = " + geometryCount); for (int i = ; i < geometryCount; i++)
{
IGeometry currentGeometry = geometryCollection.get_Geometry(i);
IPoint point = currentGeometry as IPoint; //we know that there are IPoints only in the Geometrycollection.
//But this is the safe and recommended way
if (point != null)
{
System.Windows.Forms.MessageBox.Show("X = " + point.X + ", Y = " + point.Y);
} } }

IGeometryCollection Interface的更多相关文章

  1. angular2系列教程(七)Injectable、Promise、Interface、使用服务

    今天我们要讲的ng2的service这个概念,和ng1一样,service通常用于发送http请求,但其实你可以在里面封装任何你想封装的方法,有时候控制器之间的通讯也是依靠service来完成的,让我 ...

  2. 接口--interface

    “interface”(接口)关键字使抽象的概念更深入了一层.我们可将其想象为一个“纯”抽象类.它允许创建者规定一个类的基本形式:方法名.自变量列表以及返回类型,但不规定方法主体.接口也包含了基本数据 ...

  3. Configure a bridge interface over a VLAN tagged bonded interface

    SOLUTION VERIFIED February 5 2014 KB340153 Environment Red Hat Enterprise Linux 6 (All Versions) Red ...

  4. Create a bridge using a tagged vlan (8021.q) interface

    SOLUTION VERIFIED April 27 2013 KB26727 Environment Red Hat Enterprise Linux 5 Red Hat Enterprise Li ...

  5. Configure a bridged network interface for KVM using RHEL 5.4 or later?

    environment Red Hat Enterprise Linux 5.4 or later Red Hat Enterprise Linux 6.0 or later KVM virtual ...

  6. Set up VLAN (802.1q) tagging on a network interface?

    SOLUTION VERIFIED October 13 2015 KB39674 KB741413 environment Red Hat Enterprise Linux 4 Red Hat En ...

  7. 谨慎使用Marker Interface

    之所以写这篇文章,源自于组内的一些技术讨论.实际上,Effective Java的Item 37已经详细地讨论了Marker Interface.但是从整个Item的角度来看,其对于Marker In ...

  8. 浅析Go语言的Interface机制

    前几日一朋友在学GO,问了我一些interface机制的问题.试着解释发现自己也不是太清楚,所以今天下午特意查了资料和阅读GO的源码(基于go1.4),整理出了此文.如果有错误的地方还望指正. GO语 ...

  9. 如何设计一门语言(七)——闭包、lambda和interface

    人们都很喜欢讨论闭包这个概念.其实这个概念对于写代码来讲一点用都没有,写代码只需要掌握好lambda表达式和class+interface的语义就行了.基本上只有在写编译器和虚拟机的时候才需要管什么是 ...

随机推荐

  1. 什么是事件委托?jquery和js怎么去实现?

    事件委托又叫事件代理,事件委托就是利用事件冒泡,只指定一个事件处理程序,就可以管理某一类型的所有事件. js: window.onload = function(){ var oul = docume ...

  2. 03008_使用JDBC对分类表进行增删改查操作

    1.创建数据库分类表 #创建数据库 create database mybase; #使用数据库 use dmybase; ###创建分类表 create table sort( sid int PR ...

  3. eclipse- MAT安装及使用

    1.安装eclipse mat插件 1)查看当前eclipse版本 进入eclipse目录:右击eclipse图标,看到安装目录/home/zhangshuli/adt-bundle-linux-x8 ...

  4. [NowCoder]牛客OI周赛1 题解

    A.分组 首先,认识的人不超过3个,因此不存在无解的方案 考虑直接构造,先把所有点设为1,顺序扫一遍把有问题的点加入队列 每次取队头,将其颜色取反,再更新有问题的点 复杂度:考虑到每个点不会操作2次, ...

  5. java 位操作 bitwise(按位) operation bit

    java 位操作 bitwise(按位) operation bit //一篇对于 原码 反码 补码 的介绍 http://www.cnblogs.com/zhangziqiu/archive/201 ...

  6. Codeforces Round #193 (Div. 2) 部分题解

    A:直接判断前三项是否相等 int main() { //FIN; //CHEAT; int n; cin>>n; getchar(); ]; gets(a); int len = str ...

  7. (转)Tomcat调优

    问题定位 对于Tomcat的处理耗时较长的问题主要有当时的并发量.session数.内存及内存的回收等几个方面造成的.出现问题之后就要进行分析了. 1.关于Tomcat的session数目 这个可以直 ...

  8. 解决使用SecureCRT不能连接Ubuntu的问题

    一.现象 SecureCRT是远程登陆工具及串口,可以远程进行登陆Linux服务器或者串口打印数据.但我下载安装了之后想通过SecureCRT来远程登陆我的Ubuntu,出现一直连接不上. 二.问题原 ...

  9. MySQL各个版本的区别

     文章出自:http://blog.sina.com.cn/s/blog_62b37bfe0101he5t.html 感谢作者的分享 MySQL 的官网下载地址:http://www.mysql. ...

  10. 单元测试Assert类

    Assert类主要的静态成员 1. AreEqual:方法被重载了N多次,主要功能是判断两个值是否相等:如果两个值不相等,则测试失败. 2. AreNotEqual:方法被重载了N多次,主要功能是判断 ...