创建地统计图层 (地统计分析)

需要 Geostatistical Analyst 许可。

摘要

创建新的地统计图层。要为新图层填充初始值,需要使用现有的地统计图层。

使用情况

  • 地统计模型必须是地统计图层。用于创建地统计图层的数据集的完整名称存储在图层中。

  • 如果地统计模型源使用常态得分变换,则将针对输入数据集重新计算变换的参数。

  • 可以将图层输入至输入数据集参数中。如果指定某一图层,则该图层中的所选要素将用于创建地统计图层。如果指定了数据集在磁盘上的路径,则将使用该数据集中的所有要素。

  • 在 Python 脚本中,GeostatisticalDatasets ArcPy 类将用于填充输入数据集参数。

  • 对于支持空值的数据格式(如文件地理数据库要素类),使用空值表示无法对该位置做出预测或该值用作输入时应被忽略。对于不支持空值的数据格式(如 shapefile),使用值 -1.7976931348623158e+308(C++ 定义的常量 DBL_MAX 的负数)表示无法对该位置做出预测。

参数

标注说明数据类型
输入地统计模型源

要分析的地统计模型源。

File; Geostatistical Layer
输入数据集

用于创建输出图层的输入数据集的名称和字段名称。

Geostatistical Value Table
输出地统计图层

由该工具生成的地统计图层。

Geostatistical Layer

arcpy.ga.GACreateGeostatisticalLayer(in_ga_model_source, in_datasets, out_layer)
名称说明数据类型
in_ga_model_source

要分析的地统计模型源。

File; Geostatistical Layer
in_datasets

GeostatisticalDatasets 对象。

也可以是以分号分隔的元素字符串。各元素包含以下组件:

  • 数据集的目录路径与名称或当前内容表中的图层名称,后跟一个空格。
  • 一系列字段名称,各字段名称以空格分隔。如果是栅格,则使用像元值。
Geostatistical Value Table
out_layer

由该工具生成的地统计图层。

Geostatistical Layer

代码示例

CreateGeostatisticalLayer 示例 1(Python 窗口)

使用现有地统计图层创建新的地统计图层。

import arcpy
arcpy.env.workspace = "C:/gapyexamples/data"
arcpy.GACreateGeostatisticalLayer_ga("C:/gapyexamples/data/kriging.lyr", 
                                     "ca_ozone_pts.shp X=Shape Y=Shape F1=OZONE", 
                                     "outCGL")
创建地统计图层 (CreateGeostatisticalLayer) 示例 2(独立 Python 脚本)

使用现有地统计图层创建新的地统计图层。

# Name: CreateGeostatisticalLayer_Example_02.py
# Description: Uses an existing geostatistical layer to create a new layer,
#              which includes a new feature dataset or variable.
# Requirements: Geostatistical Analyst Extension

# Import system modules
import arcpy

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

# Set local variables
inLayer = "C:/gapyexamples/data/kriging.lyr"
inData = "ca_ozone_pts.shp X=Shape Y=Shape F1=OZONE"
outLayer = "outCGL"

# Execute CreateGeostatisticalLayer
arcpy.GACreateGeostatisticalLayer_ga(inLayer, inData, outLayer)

许可信息

  • Basic: 需要 Geostatistical Analyst
  • Standard: 需要 Geostatistical Analyst
  • Advanced: 需要 Geostatistical Analyst

相关主题