ArcGIS Desktop

  • 文档
  • 支持

  • My Profile
  • 帮助
  • Sign Out
ArcGIS Desktop

ArcGIS Online

专为贵组织打造的制图平台

ArcGIS Desktop

全面的专业性 GIS

ArcGIS Enterprise

面向企业的 GIS

ArcGIS for Developers

用于构建位置感知应用程序的工具

ArcGIS Solutions

适用于行业的免费模板地图和应用程序

ArcGIS Marketplace

获取适用于组织的应用程序和数据

  • 文档
  • 支持
Esri
  • 登录
user
  • 我的个人资料
  • 登出

ArcMap

  • 主页
  • 入门
  • 地图
  • 分析
  • 管理数据
  • 工具
  • 扩展模块

计算全色锐化权重

  • 摘要
  • 用法
  • 语法
  • 代码示例
  • 环境
  • 许可信息

摘要

为新的或自定义的传感器数据计算一组最佳的全色锐化权重。

用法

  • 此工具将计算一组最佳的全色锐化权重,这些值可用于需要全色锐化权重的其他工具。

  • 如果将栅格产品用作输入栅格,则应用栅格产品模板中的波段顺序。

语法

ComputePansharpenWeights_management (in_raster, in_panchromatic_image, {band_indexes})
参数说明数据类型
in_raster

具有全色波段的多光谱栅格。

Mosaic Dataset; Mosaic Layer; Raster Dataset; Raster Layer
in_panchromatic_image

与多光谱栅格相关联的全色波段。

Raster Layer
band_indexes
(可选)

全色锐化权重的波段顺序。

如果将栅格产品用作 in_raster 参数,则应用栅格产品模板中的波段顺序。

String

代码示例

计算全色锐化权重 (ComputePansharpenWeights) 示例 1(Python 窗口)

这是计算全色锐化权重 (ComputePansharpenWeights) 工具的 Python 示例。

import arcpy
arcpy.ComputePansharpenWeights_management(
    "c:/data/rgb.tif", "c:/data/image.tif", "3 2 1 4")
计算全色锐化权重 (ComputePansharpenWeights) 示例 2(独立脚本)

这是计算全色锐化权重 (ComputePansharpenWeights) 工具的 Python 脚本示例。

#Run Compute Pan Sharpen Weights tool using the bands 4,3,2,1 

import arcpy

InMSraster = "C:\\Landsat7\\L71046029_02920050705_MTL.txt\Multispectral" 
InPANraster = "C:\\Landsat7\\L71046029_02920050705_MTL.txt\Panchromatic"
band_index = "3 2 1 5"

arcpy.ComputePansharpenWeights_management(InMSraster, InPANraster, band_index)
计算全色锐化权重 (ComputePansharpenWeights) 示例 3(工作流脚本)

这是在其他工具中使用计算全色锐化权重 (ComputePansharpenWeights) 输出的 Python 脚本示例。

#Compute the pansharpening weights and use the results in the 
#create pansharpening tool.

try:
    import arcpy
    
    InRGBraster = "C:\\temp\\rgb.img"
    InPanraster = "C:\\temp\\pan.tif"
    
    #Compute Pan Sharpen Weights  
    out_pan_weight = arcpy.ComputePansharpenWeights_management(
        InRGBraster, InPanraster, "3 2 1 4")
    
    #Get results 
    pansharpen_weights = out_pan_weight.getOutput(0)
    
    #Split the results string for weights of each band
    pansplit = pansharpen_weights.split(";")
    
    #Run the Create pan sharpened raster dataset tool. 
    arcpy.CreatePansharpenedRasterDataset_management(
        InRGBraster, "3", "2", "1", "4", "C:\\temp\\pansharpened_raster.tif",
        InPanraster, "Gram-Schmidt", pansplit[0].split(" ")[1],  
        pansplit[1].split(" ")[1], pansplit[2].split(" ")[1],
        pansplit[3].split(" ")[1])
    
except arcpy.ExecuteError:
    print(arcpy.GetMessages())
except Exception as err:
    print(err[0])

环境

此工具不使用任何地理处理环境

许可信息

  • ArcGIS Desktop Basic: 是
  • ArcGIS Desktop Standard: 是
  • ArcGIS Desktop Advanced: 是

相关主题

  • “栅格”工具集概述
  • 栅格数据的环境设置
  • 创建全色锐化栅格数据集
  • 对 ArcMap 中的栅格图层应用全色锐化
  • 全色锐化的基础知识
  • 使用“影像分析”窗口中的“全色锐化”按钮
  • 练习 7:创建一个全色锐化的自然色镶嵌数据集

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS 平台

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

关于 Esri

  • 关于我们
  • 招贤纳士
  • 内部人员博客
  • 用户大会
  • 开发者峰会
Esri
分享您的想法。
© Copyright 2016 Environmental Systems Research Institute, Inc. | 隐私政策 | 法律声明