The available kinds of geometry objects.

Constant Value Description
esriGeometryNull 0 A geometry of unknown type.
esriGeometryPoint 1 A single zero dimensional geometry.
esriGeometryMultipoint 2 An ordered collection of points.
esriGeometryLine 13 A straight line segment between two points.
esriGeometryCircularArc 14 A portion of the boundary of a circle.
esriGeometryEllipticArc 16 A portion of the boundary of an ellipse.
esriGeometryBezier3Curve 15 A third degree bezier curve (four control points).
esriGeometryPath 6 A connected sequence of segments.
esriGeometryPolyline 3 An ordered collection of paths.
esriGeometryRing 11 An area bounded by one closed path.
esriGeometryPolygon 4 A collection of rings ordered by their containment relationship.
esriGeometryEnvelope 5 A rectangle indicating the spatial extent of another geometry.
esriGeometryAny 7 Any of the geometry coclass types.
esriGeometryBag 17 A collection of geometries of arbitrary type.
esriGeometryMultiPatch 9 A collection of surface patches.
esriGeometryTriangleStrip 18 A surface patch of triangles defined by three consecutive points.
esriGeometryTriangleFan 19 A surface patch of triangles defined by the first point and two consecutive points.
esriGeometryRay 20 An infinite, one-directional line extending from an origin point.
esriGeometrySphere 21 A complete 3 dimensional sphere.
esriGeometryTriangles 22 A surface patch of triangles defined by non-overlapping sets of three consecutive points each.

Product Availability

Remarks

A list of the distinct types of geometries creatable geometries.  Every geometry object belongs to and is identified as exactly one of these types (With the exception of esriGeometryAny which is true for all valid geometries.).

esriGeometryNull          = Unknown type of geometry
esriGeometryPoint = PointesriGeometryMultipoint = Multipoint (Collection of Points)
esriGeometryLine = Line (Segment)
esriGeometryCircularArc = CircularArc (Segment)
esriGeometryEllipticArc = EllipticArc (Segment)
esriGeometryBezier3Curve = BezierCurve (Segment)
esriGeometryPath = PathesriGeometryPolyline = Polyline (Collection of Paths)
esriGeometryRing = Ring (Ring / SurfacePatch)
esriGeometryPolygon = Polygon (Collection of Rings)
esriGeometryEnvelope = EnvelopeesriGeometryAny = Any valid geometry
esriGeometryBag = GeometryBag (Collection of Geometries)
esriGeometryMultiPatch = MultiPatch (Collection of SurfacePatches)
esriGeometryTriangleStrip = TriangleStrip (SurfacePatch)
esriGeometryTriangeFan = TriangleFan (SurfacePatch)
esriGeometryRay = RayesriGeometrySphere = SphereesriGeometryTriangles = Triangles (SurfacePatch)


[C#]

publicstaticvoid GeometryToString(IGeometry geometry)

{

if (geometry == null)

{

Trace.WriteLine("Geometry Is Null.");

}

else

{

Trace.WriteLine("geometry.GeometryType = " + geometry.GeometryType);

if (geometry.IsEmpty)

{

Trace.WriteLine("Geometry Is Empty.");

}

else

{

switch (geometry.GeometryType)

{

caseesriGeometryType.esriGeometryPoint:

IPoint point = geometry asIPoint;

Trace.WriteLine("point = " + PointToString(point));

break;

caseesriGeometryType.esriGeometryRay:

IRay ray = geometry asIRay;

Trace.WriteLine("ray.Origin = " + PointToString(ray.Origin));

Trace.WriteLine("ray.Vector.XComponent = " + ray.Vector.XComponent);

Trace.WriteLine("ray.Vector.YComponent = " + ray.Vector.YComponent);

Trace.WriteLine("ray.Vector.ZComponent = " + ray.Vector.ZComponent);

Trace.WriteLine("ray.Vector.Magnitude = " + ray.Vector.Magnitude);

break;

caseesriGeometryType.esriGeometryLine:

ILine line = geometry asILine;

Trace.WriteLine("line.FromPoint = " + PointToString(line.FromPoint));

Trace.WriteLine("line.ToPoint = " + PointToString(line.ToPoint));

break;

caseesriGeometryType.esriGeometryEnvelope:

IEnvelope envelope = geometry asIEnvelope;

Trace.WriteLine("envelope.XMin = " + envelope.XMin);

Trace.WriteLine("envelope.XMax = " + envelope.XMax);

Trace.WriteLine("envelope.YMin = " + envelope.YMin);

Trace.WriteLine("envelope.YMax = " + envelope.YMax);

Trace.WriteLine("envelope.ZMin = " + envelope.ZMin);

Trace.WriteLine("envelope.ZMax = " + envelope.ZMax);

break;

caseesriGeometryType.esriGeometryPolyline:

IGeometryCollection geometryCollection = geometry asIGeometryCollection;

Trace.WriteLine("polyline.PathCount = " + geometryCollection.GeometryCount);

for (int i = 0; i < geometryCollection.GeometryCount; i++)

{

Trace.WriteLine("polyline.Path[" + i + "]");

IGeometry pathGeometry = geometryCollection.get_Geometry(i);

IPointCollection pathPointCollection = pathGeometry asIPointCollection;

for (int j = 0; j < pathPointCollection.PointCount; j++)

{

Trace.WriteLine("Point[" + j + "] = " + PointToString(pathPointCollection.get_Point(j)));

}

}

break;

caseesriGeometryType.esriGeometryPolygon:

IPolygon4 polygon = geometry asIPolygon4;

IGeometryBag exteriorRingGeometryBag = polygon.ExteriorRingBag;

IGeometryCollection exteriorRingGeometryCollection = exteriorRingGeometryBag asIGeometryCollection;

Trace.WriteLine("polygon.ExteriorRingCount = " + exteriorRingGeometryCollection.GeometryCount);

for (int i = 0; i < exteriorRingGeometryCollection.GeometryCount; i++)

{

Trace.WriteLine("polygon.ExteriorRing[" + i + "]");

IGeometry exteriorRingGeometry = exteriorRingGeometryCollection.get_Geometry(i);

IPointCollection exteriorRingPointCollection = exteriorRingGeometry asIPointCollection;

for (int j = 0; j < exteriorRingPointCollection.PointCount; j++)

{

Trace.WriteLine("Point[" + j + "] = " + PointToString(exteriorRingPointCollection.get_Point(j)));

}

IGeometryBag interiorRingGeometryBag = polygon.get_InteriorRingBag(exteriorRingGeometry asIRing);

IGeometryCollection interiorRingGeometryCollection = interiorRingGeometryBag asIGeometryCollection;

Trace.WriteLine("polygon.InteriorRingCount[exteriorRing" + i + "] = " + interiorRingGeometryCollection.GeometryCount);

for (int k = 0; k < interiorRingGeometryCollection.GeometryCount; k++)

{

Trace.WriteLine("polygon.InteriorRing[" + k + "]");

IGeometry interiorRingGeometry = interiorRingGeometryCollection.get_Geometry(k);

IPointCollection interiorRingPointCollection = interiorRingGeometry asIPointCollection;

for (int m = 0; m < interiorRingPointCollection.PointCount; m++)

{

Trace.WriteLine("Point[" + m + "] = " + PointToString(interiorRingPointCollection.get_Point(m)));

}

}

}

break;

caseesriGeometryType.esriGeometryMultiPatch:

IGeometryCollection multiPatchGeometryCollection = geometry asIGeometryCollection;

Trace.WriteLine("multiPatch.PartCount = " + multiPatchGeometryCollection.GeometryCount);

for (int i = 0; i < multiPatchGeometryCollection.GeometryCount; i++)

{

IGeometry partGeometry = multiPatchGeometryCollection.get_Geometry(i);

Trace.WriteLine("multiPatch.Part[" + i + "].geometryType = " + partGeometry.GeometryType);

IPointCollection partPointCollection = partGeometry asIPointCollection;

for (int j = 0; j < partPointCollection.PointCount; j++)

{

Trace.WriteLine("Point[" + j + "] = " + PointToString(partPointCollection.get_Point(j)));

}

}

break;

default:

IPointCollection pointCollection = geometry asIPointCollection;

for (int i = 0; i < pointCollection.PointCount; i++)

{

Trace.WriteLine("Point[" + i + "] = " + PointToString(pointCollection.get_Point(i)));

}

break;

}

}

}

Trace.WriteLine(null);

}

privatestaticstring PointToString(IPoint point)

{

return (point.X + ", " + point.Y + ", " + point.Z);

可用类型的几何对象esriGeometryType Constants的更多相关文章

  1. SAP CRM 用户界面对象类型和设计对象

    在CRM中的用户界面对象类型的帮助下,我们可以做这些工作: 进行不同的视图配置 创建动态导航 从设计层控制字段标签.值帮助 控制BOL对象的属性的可视性 从导航栏访问自定义组件 一个用户界面对象类型之 ...

  2. Envelope几何对象 Curve对象几何对象 Multipatch几何对象 Geometry集合接口 IGeometryCollection接口

    Envelope是所有几何对象的外接矩形,用于表示几何对象的最小边框,所有的几何对象都有一个Envelope对象,IEnvelope是Envelope对象的主要接口,通过它可以获取几何对象的XMax, ...

  3. R语言与医学统计图形-【12】ggplot2几何对象之条图

    ggplot2绘图系统--几何对象之条图(包括误差条图) 1.条图 格式: geom_bar(mapping = , data = , stat = 'count', #统计变换默认计数 positi ...

  4. Android基于mAppWidget实现手绘地图(十三)–如何显示/隐藏任意类型的地图对象

    这个很简单,想要显示或隐藏任意类型的地图对象,首先要对地图对象进行分类.不同类型的地图对象放置到不同的地图图层上,然后控制地图图层的显示/隐藏即可. 实例: Layer sportsLayer = m ...

  5. [Effective JavaScript 笔记] 第4条:原始类型优于封闭对象

    js有5种原始值类型:布尔值.数字.字符串.null和undefined. 用typeof检测一下: typeof true; //"boolean" typeof 2; //&q ...

  6. JAVA类型信息——Class对象

    JAVA类型信息——Class对象 一.RTTI概要 1.类型信息RTTI :即对象和类的信息,例如类的名字.继承的基类.实现的接口等. 2.类型信息的作用:程序员可以在程序运行时发现和使用类型信息. ...

  7. 【javascript】详解变量,值,类型和宿主对象

    前言 我眼中的<javascript高级程序设计> 和<你不知道的javascript>是这样的:如果<javascript高级程序设计>是本教科书的话, < ...

  8. Java基础 -- 深入理解Java类型信息(Class对象)与反射机制

    一 RTTI概念 认识Claa对象之前,先来了解一个概念,RTTI(Run-Time Type Identification)运行时类型识别,对于这个词一直是 C++ 中的概念,至于Java中出现RT ...

  9. 高德地图 location字段控制台显示 为字符串类型 实际为对象

    help大神求指导 ? 高德地图new amap.PoiManager() 的 autoComplete方法 location字段控制台显示 为字符串类型 实际为对象 debugger过程入下图:

随机推荐

  1. QML中MouseArea元素的介绍

    原文:http://www.thisisqt.com/?action-viewnews-itemid-22 MouseArea元素的一个很典型的用法是和一个可视的item一起用,处理这个item的鼠标 ...

  2. windows的DOS窗口如何修改大小

    关于这个问题,其实很简单.不知道为什么网上的资料乱遭的.故自己写下来,方便有不明白的童鞋参考. 左键点击左上角的区域会弹出一个菜单,选择属性. 如下图就能轻松的修改窗口的大小了.

  3. perl中my和our的区别分析

    来源: http://www.jb51.net/article/35528.htm perl中our的用法require 5.006当版本号小于 5.006 的时候,会返回失败,从而导致模块加载失败. ...

  4. 1*Json对象声明简单,复合,对象数组

    //简单JSON对象 function btn1_click() { var json = { "id": 1001, "name": "张三&quo ...

  5. c++之模板

    . 函数模板 普通函数 void Swap(int &, int &); 模板函数 template <typename T> void Swap(T &, T & ...

  6. Food on the Plane

    Food on the Plane time limit per test 2 seconds memory limit per test 256 megabytes input standard i ...

  7. Android OpenGL ES .介绍

    引自:http://blog.csdn.net/hgl868/article/details/6971624 1.    OpenGL ES 简介 Android 3D引擎采用的是OpenGL ES. ...

  8. The Rings Akhaten

    在其他的平行宇宙中存在着一个古老的星系--Akhaten,星系中有七个世界,上面生活着Panbabylonian.Lucanian等物种,不过外界也常常把他们统称为Akhet,因为这七个世界环绕着同一 ...

  9. IMP指针

    可能大家一直看到有许多朋友在Runtime相关文章中介绍IMP指针的概念,那么IMP究竟有什么实际作用呢?让我们先从一个函数看起来. Method Swizzling 如果对Runtime有一定了解的 ...

  10. weak和assign区别

    weak比assign多了一个功能,当对象消失后自动把指针变成nil haofanazenmeban[4002:406590] controller:<SecondViewController: ...