esriFeatureType通常用来表示数据的存储结构
esriGeometryType枚举类型详解 | ||
常量 | 值 | 对象 |
esriGeometryNull |
0 | 未知类型(Unknown) |
esriGeometryPoint | 1 | 点(Point) |
esriGeometryMultipoint | 2 | 多点(Multipoint) |
esriGeometryLine | 13 | 线段(Line) |
esriGeometryCircularArc | 14 | 圆弧(CircularArc) |
esriGeometryEllipticArc | 16 | 椭圆弧(EllipticArc) |
esriGeometryBezier3Curve | 15 | 贝兹曲线(BezierCurve) |
esriGeometryPath | 6 | 路径(Path) |
esriGeometryPolyline | 3 | 多段线(Polyline) |
esriGeometryRing | 11 | 环(Ring) |
esriGeometryPolygon | 4 | 多边形(Polygon) |
esriGeometryEnvelope | 5 | 外包(Envelope) |
esriGeometryAny | 7 | 任何类型(Any valid geometry) |
esriGeometryBag | 17 | 任意几何类型的集合(GeometryBag) |
esriGeometryMultiPatch | 9 | 表面几何(MultiPatch) |
esriGeometryTriangleStrip | 18 | 三角带(TriangleStrip) |
esriGeometryTriangleFan | 19 | 三角扇形(TriangleFan) |
esriGeometryRay | 20 | 射线(Ray) |
esriGeometrySphere | 21 | 球体(Sphere) |
esriGeometryTriangles | 22 | 三角形(Triangles) |
esriFeatureType枚举类型详解 | |||
常量 | 值 | 描述 | 对象 |
esriFTSimple |
1 | Polygons, polylines, and points representing objects or places that have area, such as water bodies; linear objects, such as rivers; and localized positions, such as houses or sample sites. |
Simple Feature. |
esriFTSimpleJunction | 7 | Simple junction feature in a geometric network representing point objects, such as a fuse, service point, or telephone pole. |
Simple Junction Feature. |
esriFTSimpleEdge | 8 | Simple edge feature in a geometric network representing polyline objects, such as primary or secondary overheads. |
Simple Edge Feature. |
esriFTComplexJunction | 9 | Complex junction feature in a geometric network, not in general use. |
Complex Junction Feature. |
esriFTComplexEdge | 10 | Complex edge feature in a geometric network representing polyline objects such as primary overheads, which have midspan connectivity. Network resources flow through complex edge without interruption by midspan connectivity. |
Complex Edge Feature. |
esriFTAnnotation | 11 | Place or object names or identifiers, such as street names, hydrant ID numbers, land values, or elevation. |
Annotation Feature. |
esriFTCoverageAnnotation | 12 | Place or object names or identifiers, such as street names, hydrant ID numbers, land values, or elevation. Not supported in geodatabases, only supported in coverage datasets. |
Coverage Annotation Feature. |
esriFTDimension | 13 | Measurements, such as distances, lengths, widths, and depths. |
Dimension Feature. |
esriFTRasterCatalogItem | 14 | A raster dataset in a raster catalog that has information, such as footprints, names, metadata, and any other user-defined attributes. |
Raster Catalog Item. |
Product Availability
Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.
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 = Point
esriGeometryMultipoint = Multipoint (Collection of Points)
esriGeometryLine = Line (Segment)
esriGeometryCircularArc = CircularArc (Segment)
esriGeometryEllipticArc = EllipticArc (Segment)
esriGeometryBezier3Curve = BezierCurve (Segment)
esriGeometryPath = Path
esriGeometryPolyline = Polyline (Collection of Paths)
esriGeometryRing = Ring (Ring / SurfacePatch)
esriGeometryPolygon = Polygon (Collection of Rings)
esriGeometryEnvelope = Envelope
esriGeometryAny = Any valid geometry
esriGeometryBag = GeometryBag (Collection of Geometries)
esriGeometryMultiPatch = MultiPatch (Collection of SurfacePatches)
esriGeometryTriangleStrip = TriangleStrip (SurfacePatch)
esriGeometryTriangeFan = TriangleFan (SurfacePatch)
esriGeometryRay = Ray
esriGeometrySphere = Sphere
esriGeometryTriangles = Triangles (SurfacePatch)
[C#]
public static void 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)
{
case esriGeometryType.esriGeometryPoint:
IPoint point = geometry as IPoint;
Trace.WriteLine("point = " + PointToString(point));
break;
case esriGeometryType.esriGeometryRay:
IRay ray = geometry as IRay;
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;
case esriGeometryType.esriGeometryLine:
ILine line = geometry as ILine;
Trace.WriteLine("line.FromPoint = " + PointToString(line.FromPoint));
Trace.WriteLine("line.ToPoint = " + PointToString(line.ToPoint));
break;
case esriGeometryType.esriGeometryEnvelope:
IEnvelope envelope = geometry as IEnvelope;
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;
case esriGeometryType.esriGeometryPolyline:
IGeometryCollection geometryCollection = geometry as IGeometryCollection;
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 as IPointCollection;
for (int j = 0; j < pathPointCollection.PointCount; j++)
{
Trace.WriteLine("Point[" + j + "] = " + PointToString(pathPointCollection.get_Point(j)));
}
}
break;
case esriGeometryType.esriGeometryPolygon:
IPolygon4 polygon = geometry as IPolygon4;
IGeometryBag exteriorRingGeometryBag = polygon.ExteriorRingBag;
IGeometryCollection exteriorRingGeometryCollection = exteriorRingGeometryBag as IGeometryCollection;
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 as IPointCollection;
for (int j = 0; j < exteriorRingPointCollection.PointCount; j++)
{
Trace.WriteLine("Point[" + j + "] = " + PointToString(exteriorRingPointCollection.get_Point(j)));
}
IGeometryBag interiorRingGeometryBag = polygon.get_InteriorRingBag(exteriorRingGeometry as IRing);
IGeometryCollection interiorRingGeometryCollection = interiorRingGeometryBag as IGeometryCollection;
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 as IPointCollection;
for (int m = 0; m < interiorRingPointCollection.PointCount; m++)
{
Trace.WriteLine("Point[" + m + "] = " + PointToString(interiorRingPointCollection.get_Point(m)));
}
}
}
break;
case esriGeometryType.esriGeometryMultiPatch:
IGeometryCollection multiPatchGeometryCollection = geometry as IGeometryCollection;
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 as IPointCollection;
for (int j = 0; j < partPointCollection.PointCount; j++)
{
Trace.WriteLine("Point[" + j + "] = " + PointToString(partPointCollection.get_Point(j)));
}
}
break;
default:
IPointCollection pointCollection = geometry as IPointCollection;
for (int i = 0; i < pointCollection.PointCount; i++)
{
Trace.WriteLine("Point[" + i + "] = " + PointToString(pointCollection.get_Point(i)));
}
break;
}
}
}
Trace.WriteLine(null);
}
private static string PointToString(IPoint point)
{
return (point.X + ", " + point.Y + ", " + point.Z);
}