zhaoguanhua / atmosphericcorrection Goto Github PK
View Code? Open in Web Editor NEW6s模型大气校正python版本,支持GF1、2,Landsat-8,Sentinel-2等影像
6s模型大气校正python版本,支持GF1、2,Landsat-8,Sentinel-2等影像
ERROR 4: F:\huangyandao\s2\S2A_MSIL1C_20160511T024332_N0202_R046_T50PNB_20160511T024328.SAFE\GRANULE\L1C_T50PNB_A004619_20160511T024328\IMG_DATA\T50PNB_20160511T024332_B05.jp2' not recognized as a supported file format. ERROR 4:
F:\huangyandao\s2\S2A_MSIL1C_20160511T024332_N0202_R046_T50PNB_20160511T024328.SAFE\GRANULE\L1C_T50PNB_A004619_20160511T024328\IMG_DATA\T50PNB_20160511T024332_B06.jp2' not recognized as a supported file format.
ERROR 4: `F:\huangyandao\s2\S2A_MSIL1C_20160511T024332_N0202_R046_T50PNB_20160511T024328.SAFE\GRANULE\L1C_T50PNB_A004619_20160511T024328\IMG_DATA\T50PNB_20160511T024332_B07.jp2' not recognized as a supported file format.
F:\huangyandao\s2\S2A_MSIL1C_20160511T024332_N0202_R046_T50PNB_20160511T024328.SAFE\GRANULE\L1C_T50PNB_A004619_20160511T024328\IMG_DATA\T50PNB_20160511T024332_B07.jp2数据集读取为空
F:\huangyandao\s2\S2A_MSIL1C_20160511T024332_N0202_R046_T50PNB_20160511T024328.SAFE\GRANULE\L1C_T50PNB_A004619_20160511T024328\IMG_DATA\T50PNB_20160511T024332_B08.jp2数据集读取为空
一景GF-6 WFV影像的八个波段运行6s大气校正所需的时间大概是3小时,更改nBlockSize = 1024为nBlockSize = 8192可以将时间减少一半,但还是太久。
能否在引入多线程增大CPU利用率呢?它似乎只用到了Xeon CPU 40核中的两核。如果不能,还有其它方法增大处理速度吗?
GF-1校正脚本中这句应该不用90去减吧,我直接用脚本运行出来植被的校正结果和FLAASH校正差距较大。
s.geometry.solar_z = 90-float(dom.getElementsByTagName('SolarZenith')[0].firstChild.data)
xml中给出的就是太阳天顶角吧,不是太阳高度角,应该不需要计算,直接拿来用就行,调整后差距明显减小。
还有我没有将卫星方位角和天顶角设为0,而是使用了xml中提供的角度。
我是个学生,有错误还请指正。
File "F:/数据样例/GF1pms_sample/AtmosphericCorrection-master/test.py", line 78, in Block
AtcCofa, AtcCofb, AtcCofc = AtmosphericCorrection(m, metedata, config, SatelliteID, SensorID)
File "F:/数据样例/GF1pms_sample/AtmosphericCorrection-master/test.py", line 237, in AtmosphericCorrection
s.run()
File "D:\Program Files\anaconda3\envs\AtmosphericCorrection-master\lib\site-packages\Py6S\sixs.py", line 357, in run
self.outputs = Outputs(outputs[0], outputs[1])
File "D:\Program Files\anaconda3\envs\AtmosphericCorrection-master\lib\site-packages\Py6S\outputs.py", line 65, in init
stderr = stderr.decode("utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb2 in position 13: invalid start byte
作者您好,对高分元文件天顶角实为高度角不太理解,是元文件中天顶角的单词拼写错误还是其它?是否同时包括太阳和卫星天顶角两项? 能否提供一下相关文献出处,谢谢!
我用作者的代码跑高分影响大气校正的时候,水的反射率随着辐射定标的系数变高也随之变高,结果反射率数值都很高请问是为什么
我需要做20、21年的大气校正,大佬怎么更新那个json文件呀
in base.py
# DEM分辨率 pixelWidth = geotransform[1] pixelHight = geotransform[5]# DEM起始点:左上角,X:经度,Y:纬度 originX = geotransform[0] originY = geotransform[3]
# 研究区左上角在DEM矩阵中的位置 yoffset1 = int((originY - pointUL['lat']) / pixelWidth) xoffset1 = int((pointUL['lon'] - originX) / (-pixelHight))
# 研究区右下角在DEM矩阵中的位置 yoffset2 = int((originY - pointDR['lat']) / pixelWidth) xoffset2 = int((pointDR['lon'] - originX) / (-pixelHight))
# 研究区矩阵行列数 xx = xoffset2 - xoffset1 yy = yoffset2 - yoffset1 # 读取研究区内的数据,并计算高程 DEMRasterData = DEMBand.ReadAsArray(xoffset1, yoffset1, xx, yy)<br class="Apple-interchange-newline"><!--EndFragment-->
计算出的影像区域行列起始号与行列数存在问题,建议如下写法:
geo = ds.GetGeoTransform()
inv_geo = gdal.InvGeoTransform(geo)
pointUL = dict()
pointDR = dict()
pointUL["lat"] = float(''.join(re.findall('CORNER_UL_LAT_PRODUCT.+',data2)).split("=")[1])
pointUL["lon"] = float(''.join(re.findall('CORNER_LL_LON_PRODUCT.+',data2)).split("=")[1])
pointDR["lat"] = float(''.join(re.findall('CORNER_LR_LAT_PRODUCT.+',data2)).split("=")[1])
pointDR["lon"] = float(''.join(re.findall('CORNER_UR_LON_PRODUCT.+',data2)).split("=")[1])
extent = [pointUL["lon"], pointUL["lat"], pointDR["lon"], pointDR["lat"]]
off_ulx, off_uly = map(int, gdal.ApplyGeoTransform(inv_geo, extent[0], extent[1]))
off_drx, off_dry = map(math.ceil, gdal.ApplyGeoTransform(inv_geo, extent[2], extent[3]))
columns = off_drx - off_ulx
rows = off_dry - off_uly
data = ds.GetRasterBand(1).ReadAsArray(off_ulx, off_uly, columns, rows)
这个地方有点云里雾里,可以讲解一下吗
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.