地统计图层属性

摘要

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

地统计图层返回 "GALayer"dataType

属性

属性说明数据类型
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

# Check out Geostatistical Analyst extension
arcpy.CheckOutExtension("GeoStats")

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

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

# Execute IDW
arcpy.IDW_ga(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))

在本主题中