需求
2011-2019年3月逐日数据,提取到点属性表后再输出Excel
由于总列数超过255,故只能一年31个数据输出一次Excel,然后清空属性表开始下一次提取
代码
# -*- coding: utf-8 -*-
# 把itvdi按点提取到表格 因为table to excel工具只能支持256列 所以每一年一输出excel并且清空table
# ---------------------------------------------------------------------------
import arcpy
from arcpy.sa import *
import os
# 点shapefile
point_shp_file = r"E:\IrrigationFinal\00SHP\HNfish.shp"
# 临时shapefile
temp_shp_file = r"E:\IrrigationFinal\00SHP\HNfish_temp.shp" # 副本的名称
arcpy.CopyFeatures_management(point_shp_file, temp_shp_file)
for year in range(2011, 2020):#Python切片 含前不含后
arcpy.env.workspace = r"E:\IrrigationFinal\03iTVDI11_22"