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. Go-new和make

    new返回指向struct的指针,new仅分配内存,而不对对象的值进行初始化 make返回到strcut的对象,而不是指针,只能创建map,slice,channel对象 make([]string, ...

  2. javascript操作json

    for (var i = 0; i < selectedPartList.length; i++) { if (selectedPartList[i].vpart_code == jsonRow ...

  3. 安卓获取线程id

    错误的做法: @Override public void onCreate() { mContext = getApplicationContext(); mHandler = new Handler ...

  4. cpu、内存、缓存、硬盘使用率

    1.cpu ./bunsan2.sh uptime < servers.txt | awk '{print $11 }' |sed 's/,//g' #!/bin/bash cpu_load=$ ...

  5. dfs Codeforces Round #356 (Div. 2) D

    http://codeforces.com/contest/680/problem/D 题目大意:给你一个大小为X的空间(X<=m),在该空间内,我们要尽量的放一个体积为a*a*a的立方体,且每 ...

  6. 编译在android 平台上跑的C应用程序

    Android 用的是 Bionic C, 而不是通常的glibc,因此简单使用交叉工具链并不能够编译出适合运行在android 设备上的 C/C++ 程序. 交叉工具链可以很轻松在 Android ...

  7. DataGridView直接导出EXCEL

    1public void DataToExcel(DataGridView m_DataView) { SaveFileDialog kk = new SaveFileDialog(); kk.Tit ...

  8. 【转】linux ls -l的详解

    原文:http://blog.csdn.net/sjzs5590/article/details/8254527 以root的家目录为例: 可以看到,用ls -l命令查看某一个目录会得到一个7个字段的 ...

  9. java设计模式案例详解:工厂模式

    1.简单工厂模式 在不考虑扩展的情况下还是很好用的,其实我们写代码也很经常用到,其主要理解在于传入不同参数则构建不同对象,只有一个工厂,如需添加产品涉及到扩展需要修改比较多的东西,不符合开闭原则,如下 ...

  10. 《CSS设计指南》阅读笔记

    一.HTML实体 HTML实体常用于生成那些键盘上没有的印刷字符.以一个和号(&)开头,一个分号(:)结尾,二者之间是表示实体的字符串. 如:“左引号(")     ”右引号(&qu ...