学习python努力gogogo 2022-09-06 17:55 采纳率: 100%
浏览 32
已结题

影像正射处理出现错误,tiff文件太大不能生成,请问怎么解决

问题遇到的现象和发生背景

利用python对影像正射校正,利用在网上找到的代码试了一下出现了”ERROR 6: A 31688 pixels x 31962 lines x 4 bands UInt16 image would be larger than 4GB but this is the largest size a TIFF can be, and BigTIFF is unavailable. Creation failed.“的错误,不知道该怎么处理

问题相关代码,请勿粘贴截图
import os,glob
import time

import gdal,osr
import tarfile
import math

path = 'D:\ENVI\Data\GF1_WFV3_E115.0_N35.6_20190614_L1A0004059202'
os.chdir(path)

tif_files = glob.glob('*.tiff')
##print(tif_files)
filename = os.path.basename(path)
##print(filename)
lon = float(filename.split('_')[2][1:])
zone_ = int(math.ceil(lon / 6)) + 30
zone = int ("326" + str(zone_))
##print(zone)

inputfile = gdal.Open(tif_files[0])   #读取输入数据
outputfile = tif_files[0][:-5] + '_orrho.tiff'    ##定义输出路径
denfile = {"RPC_DEM = D:\ENVI\Data\shiyan0614\GMTED2010.jp2"}   ##dem文件
dstSRS = osr.SpatialReference()     ##定义投影信息
dstSRS.ImportFromEPSG(zone)     ##定义投影信息
##正射校正
starttime = time.time()
process = gdal.Warp(outputfile, inputfile, format="Gtiff", xRes=8, yRes=8, dstSRS=dstSRS, rpc=True, transformerOptions=denfile)
endtime = time.time()
del inputfile, outputfile, process
print(endtime-starttime)

运行结果及报错内容
ERROR 6: A 31688 pixels x 31962 lines x 4 bands UInt16 image would be larger than 4GB but this is the largest size a TIFF can be, and BigTIFF is unavailable.  Creation failed.
  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 9月14日
    • 创建了问题 9月6日

    悬赏问题

    • ¥100 求懂行的大ge给小di解答下!
    • ¥15 pcl运行在qt msvc2019环境运行效率低于visual studio 2019
    • ¥15 MAUI,Zxing扫码,华为手机没反应。可提高悬赏
    • ¥15 python运行报错 ModuleNotFoundError: No module named 'torch'
    • ¥100 华为手机私有App后台保活
    • ¥15 sqlserver中加密的密码字段查询问题
    • ¥20 有谁能看看我coe文件到底哪儿有问题吗?
    • ¥20 我的这个coe文件到底哪儿出问题了
    • ¥15 matlab使用自定义函数时一直报错输入参数过多
    • ¥15 设计一个温度闭环控制系统