博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
IGeometryCollection Interface
阅读量:5128 次
发布时间:2019-06-13

本文共 5190 字,大约阅读时间需要 17 分钟。

Come from ArcGIS Online

 

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

 

 

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

 

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

 

Adds references to geometries in the input collection.

 

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.

 

A reference to the ith geometry.

 

The number of geometries in this collection.

 

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

 

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

 

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

 

Removes references to some geometries from this collection.

 

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.

 

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

 

CoClasses that implement IGeometryCollection

CoClasses and Classes

Description

Its a spheroidal ellipse.

An ordered collection of objects that support the IGeometry interface.

Its a spheroidal polygon.

This is a spheroidal polyline.

A collection of surface patches.

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

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

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

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.

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

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 = 0; i < 10; i++)    {        IPoint point = new PointClass();        point.PutCoords(i * 10, i * 2);        geometryCollection.AddGeometry(point as IGeometry, ref missing, ref missing);    }    int geometryCount = geometryCollection.GeometryCount;    System.Windows.Forms.MessageBox.Show("GeometryCount = " + geometryCount);    for (int i = 0; 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);        }    }}

 

转载于:https://www.cnblogs.com/arxive/p/6120217.html

你可能感兴趣的文章
Postman-----如何导入和导出
查看>>
移动设备显示尺寸大全 CSS3媒体查询
查看>>
图片等比例缩放及图片上下剧中
查看>>
【转载】Linux screen 命令详解
查看>>
background-clip,background-origin
查看>>
Android 高级UI设计笔记12:ImageSwitcher图片切换器
查看>>
【Linux】ping命令详解
查看>>
对团队成员公开感谢博客
查看>>
java学习第三天
查看>>
python目录
查看>>
django+uwsgi+nginx+sqlite3部署+screen
查看>>
Andriod小型管理系统(Activity,SQLite库操作,ListView操作)(源代码下载)
查看>>
在Server上得到数据组装成HTML后导出到Excel。两种方法。
查看>>
浅谈项目需求变更管理
查看>>
经典算法系列一-快速排序
查看>>
设置java web工程中默认访问首页的几种方式
查看>>
ASP.NET MVC 拓展ViewResult实现word文档下载
查看>>
8、RDD持久化
查看>>
第二次团队冲刺--2
查看>>
VMware Tools安装
查看>>