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. IOS 播放视频 MPMoviePlayerController

    在unity游戏的开头播放视频 , 根据需求 , 最后决定用 MPMoviePlayerController 来实现播放, 实现如下: by Tin 需要在AppController.mm的 Open ...

  2. flashbuilder mx组件 MenuBar

    来源:http://www.cuplayer.com/player/PlayerCode/Flex/2013/0118661.html <fx:Script> <![CDATA[ i ...

  3. $.data()、$().data

    两个方法很相似,但是有区别,简单说一下: $.data():jq的静态方法,也就是jQuery.data()直接调用 $().data():实例方法,先有实例,才能调用这个方法,例如:$(" ...

  4. 移植iw 到linux平台上。

    https://github.com/174high/iw-3.7-Linux-porting https://github.com/174high/libnl-1.1-stable-master-l ...

  5. C#中使用正则表达式提取超链接地址的集中方法

    一般在做爬虫或者CMS的时候经常需要提取 href链接或者是src地址.此时可以使用正则表达式轻松完成. Regex reg = new Regex(@"(?is)<a[^>]* ...

  6. C++设计模式-Singleton单例模式

    template <typename T> class Singleton { public: template <typename... Args> static T* In ...

  7. vs2010在进行数据架构比较时报'text lines should not be null'错误

    通过VS2010进行服务器数据库和本地数据库比较架构(都是sql server 2008 R2)时,弹出“text lines should be not null”错误,如下图: 解决方法:在Vis ...

  8. 关于hasnextLine()方法的一些理解

    以前对于hasnextline的理解就是 :判断是否有下一个值 今天发现了个特例,它竟然是个阻塞式的方法 看下面一个案例 这是服务器 package Service; import java.io.I ...

  9. linux的视频学习4(网络配置和rpm)

    linux的视频学习: 1.网络配置的三种方式的介绍. 第一种方式: setup 命令--选择network configuration-->配置固定ip(tab键)和自动分配IP(长空格) / ...

  10. hack,不同的IE浏览器

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...