要素类属性
汇总
Describe 函数可返回要素类的以下属性。 还支持 表 和 数据集 属性组。 如果已对此要素类启用编辑者追踪,则支持 编辑者追踪 属性组。
对于要素类, Describe dataType 属性将返回 "FeatureClass" 的值。
属性
| 属性 | 说明 | 数据类型 |
|---|---|---|
|
featureType (只读) |
要素类的要素类型。
|
String |
|
hasM (只读) |
指示几何是否启用 m 值。 |
Boolean |
|
hasZ (只读) |
指示几何是否启用 z 值。 |
Boolean |
|
hasSpatialIndex (只读) |
指示要素类是否具有空间索引。 注:压缩的数据集不含 shape 列的空间索引,将返回 |
Boolean |
|
shapeFieldName (只读) |
几何字段的名称。 |
String |
|
shapeType (只读) |
几何形状类型。
|
String |
|
size (只读) |
要素类以字节为单位的大小。 |
Integer |
|
splitModel (只读) |
为要素类设置的分割模型。
|
String |
代码示例
要素类属性示例
以下独立脚本用于显示要素类属性:
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))