ArcMap栅格数据不能分类(Classified)时,利用工具Calculate Statistics解决。
This dataset does not have valid histogram,run Caculate Statistics tool to generate histogram.
工具
This dataset does not have valid histogram,run Caculate Statistics tool to generate histogram.
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'

相关文章:

  • 2021-10-02
  • 2021-04-15
  • 2021-06-08
  • 2021-07-31
  • 2021-07-07
  • 2021-10-10
  • 2022-12-23
  • 2021-05-14
猜你喜欢
  • 2021-12-17
  • 2022-12-23
  • 2022-01-27
  • 2021-09-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案