Skip to main content

地统计图层属性

汇总

Describe 函数返回 地统计图层 的以下属性。 还支持 图层 属性组。

对于地统计图层, Describe dataType 属性将返回 "GALayer" 的值。

属性

属性 说明 数据类型

areaOfInterest

(只读)

地统计图层的 范围

Extent

dataCollection

(只读)

用于创建地统计图层的数据集的值表。 建议改为使用 GeostatisticalDatasets 类来确定源数据集。

ValueTable

代码示例

地统计图层属性示例

以下独立脚本显示了一些地统计图层中的图层属性:

# Name: Describe_GA_Layer_Example_01.py
# Description: Print the Describe properties of a geostatistical layer.
# Requirements: Geostatistical Analyst extension

# Import system modules
import arcpy

# Set environment settings
arcpy.env.workspace = "C:/gapyexamples/data"

# Set local variables
inPointFeatures = "ca_ozone_pts.shp"
zField = "OZONE"
GALayer = "IDW_galayer"

# Run IDW
arcpy.ga.IDW(inPointFeatures, zField, GALayer)

# Describe the geostatistical layer
desc = arcpy.Describe(GALayer)

# Save extent of geostatistical layer
aoi = desc.areaOfInterest

# Save name of geostatistical layer
name = desc.nameString

# Save data type of geostatistical layer
dt = desc.dataType

# Save data sources and primary input dataset
dc = desc.dataCollection
ds = dc.getValue(0,0)

# Print describe properties
print("Layer name:       " + name)
print("Data type:        " + dt)
print("Input data:       " + ds)
print("Minimum X Extent: " + str(aoi.XMin))
print("Maximum X Extent: " + str(aoi.XMax))
print("Minimum Y Extent: " + str(aoi.YMin))
print("Maximum Y Extent: " + str(aoi.YMax))