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. Bother

    Bother Time Limit : 1000/1000ms (Java/Other)   Memory Limit : 32768/32768K (Java/Other) Total Submis ...

  2. office2003

    key:

  3. javascript克隆一个对象

    /* * 克隆一个对象 */ com.ty.repairtech.JsonOperation.clone = function(obj) { // Handle the 3 simple types, ...

  4. Hadoop YARN ERROR 1/1 local-dirs are bad *, 1/1 log-dirs are bad *

    转 http://blog.csdn.net/u012303571/article/details/46913471   查看 nodemanager 日志发下 如下信息   2015-07-16 1 ...

  5. jenkins与rebotframework搭配

    一.下载Jenkins 下载地址:http://mirrors.jenkins-ci.org/ 贫道比较推荐下载war包的,进入上面的地址,页面里有war的链接,各种类型各种版本的release,大家 ...

  6. js调用函数的格式

    如题 onclick='alert(\""+"&#1"+"\")' onclick='alert(encodeURIComponen ...

  7. masonry框架的使用之-多个视图的均匀等间距分布

    __weak typeof(self) weakSelf = self; //对self进行weak化,否则造成循环引用无法释放controller UIView * tempView = [[UIV ...

  8. ASP.NET中使用Server.Transfer()方法在页间传值 实例

    以下代码在VS2008中测试通过 <%@ Page Language="C#" AutoEventWireup="true" CodeFile=" ...

  9. 判断是ios还是android

    //判断是ios还是androidvar system;var ua = navigator.userAgent.toLowerCase(); if (/iphone|ipad|ipod/.test( ...

  10. 【威佐夫博奕】 betty定理 poj 1067

    Description 有两堆石子,数量任意,可以不同.游戏开始由两个人轮流取石子.游戏规定,每次有两种不同的取法,一是可以在任意的一堆中取走任意多的石子:二是可以在两堆中同时取走相同数量的石子.最后 ...