要素类属性

摘要

Describe 函数可返回要素类的以下属性。同时还支持表属性数据集属性

要素类可返回“FeatureClass”dataType

属性

属性说明数据类型
featureType
(只读)

The feature type of the feature class.

  • SimplePolygons, 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.
  • SimpleJunctionSimple junction feature in a geometric network representing point objects, such as a fuse, service point, or telephone pole.
  • SimpleEdgeSimple edge feature in a geometric network representing polyline objects, such as primary or secondary overheads.
  • ComplexEdgeComplex 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.
  • AnnotationPlace or object names or identifiers, such as street names, hydrant ID numbers, land values, or elevation.
  • CoverageAnnotationPlace 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.
  • DimensionMeasurements, such as distances, lengths, widths, and depths.
  • RasterCatalogItemA raster dataset in a raster catalog that has information, such as footprints, names, metadata, and any other user-defined attributes.
String
hasM
(只读)

Indicates if the geometry is m-value enabled.

Boolean
hasZ
(只读)

Indicates if the geometry is z-value enabled.

Boolean
hasSpatialIndex
(只读)

Indicates if the feature class has a spatial index.

Boolean
shapeFieldName
(只读)

The name of the Shape field.

String
shapeType
(只读)

The geometry shape type.

  • Polygon
  • Polyline
  • Point
  • MultiPoint
  • MultiPatch
String

代码示例

FeatureClass properties example (stand-alone script)

The following stand-alone script displays some feature class properties.

import arcpy

# Create a Describe object from the feature class
#
desc = arcpy.Describe("C:/data/arch.dgn/Point")

# Print some feature class properties
#
print "Feature Type:  " + desc.featureType
print "Shape Type :   " + desc.shapeType
print "Spatial Index: " + str(desc.hasSpatialIndex)


7/10/2012