このデータセットには有効なヒストグラムがありません。CaculateStatisticsツールを実行してヒストグラムを生成してください。

ArcMapラスターデータを分類できない場合は、統計計算ツールを使用して解決します。
ここに画像の説明を挿入
ツール
ここに画像の説明を挿入
arcpy:

#!/usr/bin/python
# -*- coding: utf-8 -*-

# Calculate Statistics for single raster dataset

import arcpy
import numpy as np
from PIL import Image 

traceback_template = '''Traceback (most recent call last):
  File "%(filename)s", line %(lineno)s, in %(name)s
%(type)s: %(message)s\n'''  # Skipping the "actual line" item

out_name='D:\\nmg_data_gf1\\mss_yu\\NDVI_GF1_PMS1_E109.8_N41.1_20180329.tif'
inBand = np.array(Image.open(out_name))  #��ȡӰ��Ϊ����
rows=inBand.shape[0]    
cols=inBand.shape[1]
arcpy.CalculateStatistics_management(out_name, "1", "1")
print 'end'
リリース6元記事 ウォンの賞賛1 ビュー5463

おすすめ

転載: blog.csdn.net/aGang_Gg/article/details/86690749