ModisDownload包中的SearchCHN模块可以对陆地观测卫星数据网站进行检索
项目源码
作者主页
控制台cmd命令下输入
pip install ModisDownload==1.6
Conda 环境下输入
pip install ModisDownload==1.6
安装完成后进入Python环境
from ModisDownload import visited
if __name__ == '__main__':
g=visited.getHtml("")
如果出现以下结果证明安装完成
名称 | 类型 | 样例 |
---|---|---|
开始日期 | 字符串 | “20220404” |
结束日期 | 字符串 | “20220404” |
传感器列表 | 列表 | [Sensors.GJ1B_PMS, Sensors.DQ1_EMI] |
ROI列表 | 列表 | [geom, geom2, geom3] |
云量 | 整数 | 60 |
产品级别 | 整数 | 1 |
CSES_TBB,CSES_EFD,CSES_SCM,CSES_HPM,CSES_LAP,CSES_PAP,CSES_GRO,CSES_HEP,CBERS2B_WFI,CBERS2B_CCD,CBERS2B_HR,DQ1_PSS,DQ1_ACDL,DQ1_WSI,DQ1_DPC,DQ1_EMI,DQ1_POSP,ZY303_PMS,ZY303_NAD,ZY303_MUX,ZY303_TLC,ZY303_FWD,ZY303_BMS,ZY303_BWD,ZY303_DLC,ZY303_DMS,ZY303_TMS,SCSY1_HIS,GFDM01_SMAC,GFDM01_PMS,ZY302_MUX,ZY302_NAD,ZY302_PMS,ZY302_TLC,ZY302_TMS,ZY302_DLC,HJ1B_CCD,HJ1B_IRS,HJ1A_CCD,HJ1A_HSI,HJ1C_SAR,ZY3_TLC,ZY3_NAD,ZY3_BWD,ZY3_MUX,ZY3_FWD,ZY1E_VNIC,ZY1E_AHSI,LT1B_SAR,LT1A_SAR,CBERS01_WFI,CBERS01_CCD,CBERS01_IRS,CBERS02_IRS,CBERS02_WFI,CBERS02_CCD,ZY1F_AHSI,ZY1F_VNIC,ZY1F_IRS,LT1AB_SAR,GF5B_DPC,GF5B_GMI,GF5B_AHSI,GF5B_VIMI,GF5B_POSP,GF5B_AAS,GF5B_PSS,GF5B_EMI,GF3C_SAR,GF3B_SAR,HJ2A_IRS,HJ2A_HSI,HJ2A_CCD,HJ2A_PSAC,CB04A_MUX,CB04A_WPM,CB04A_WFI,GF1C_PMS,GF1B_PMS,GJ1A_PMS,GF2_PMS,GF1D_PMS,GF1_PMS,GF1_WFV,HJ2B_IRS,HJ2B_HSI,HJ2B_CCD,HJ2B_PSAC,GF4_B1,GF4_B3,GF4_B2,GF4_B4,GF4_PMS,GF4_PI,GF4_PMI,GF4_IRS,GF4_B5,GJ1C_PMS,GJ1B_PMS,GF3_SAR,GF6_PMS,GF6_WFV,GF5_DPC,GF5_VIMS,GF5_AHSI,GF5_AIUS,GF5_GMI,GF5_EMI,GJ1D_PMS,GF7_DLC,GF7_BWD,GF7_LSA,CB04_MUX,CB04_P10,CB04_P5M,CB04_PM,CB04_IRS,CB04_WFI,ZY02C_PMS,ZY02C_HRC,
from ModisDownload.InitCHN import Init
from ModisDownload.PolygonUtiles import Poly
from ModisDownload.SearchCHN import SearchData,SearchChina,Login
from ModisDownload.Base import Sensors
from ModisDownload import visited
# 绘制ROI区域包括点,矩形,多边形
# 点
geom = Poly.Point(123.1231, 34.123)
# 多边形
geom2 = Poly.Polygon(
[[105.550278, 32.174096], [105.550278, 28.707072],
[109.525337, 28.707072], [109.525337, 32.174096]])
# 矩形 左上角经度,左上角纬度,右下角经度,右下角纬度
geom3 = Poly.Square(104.550278, 28.174096, 109.525337, 18.707072)
# 查询元数据
# 开始日期,结束日期,[查询载荷列表 可以手动输入字符],ROI区域,云量,产品等级
searchData = SearchData("2021-05-11", "2022-05-21",
[Sensors.GJ1B_PMS, Sensors.DQ1_EMI,
Sensors.GF1B_PMS, Sensors.LT1B_SAR, Sensors.GF4_B3,
Sensors.ZY302_NAD, Sensors.GF5_EMI, Sensors.CSES_GRO]
, [geom, geom2, geom3], 60, 1)
# 登录
login = Login(username, password)
# 查询元数据
# 开始日期,结束日期,[查询载荷列表 可以手动输入字符],ROI区域,云量,产品等级
searchData = SearchData("2020-05-11", "2022-05-21",
[Sensors.HJ2A_HSI,Sensors.HJ2A_CCD]
, [geom,geom2,geom3], 100, 1,login=login)
# 初始化查询
search = SearchChina(searchData, False)
# 查询
search.search()
# 保存结果
search.save_ans("ans.csv")
# 答应
print("查询完成")
from ModisDownload.InitCHN import Init
from ModisDownload.PolygonUtiles import Poly
from ModisDownload.SearchCHN import SearchData,SearchChina,Login
from ModisDownload.Base import Sensors
from ModisDownload import visited
if __name__ == '__main__':
Init(False)
login = loginTest("***", "****")
geom = Poly.Point(114.220090, 30.305615)
geom2 = Poly.Polygon(
[[105.550278, 32.174096], [105.550278, 28.707072], [109.525337, 28.707072], [109.525337, 32.174096]])
geom3 = Poly.Square(104.550278, 28.174096, 109.525337, 18.707072)
searchData = SearchData("2020-05-11", "2022-05-21",
[Sensors.HJ2A_HSI,Sensors.HJ2A_CCD]
, [geom,geom2,geom3], 100, 1,login=login)
search = SearchChina(searchData, False)
search.search()
search.save_ans("ans.csv")
return
# 更新传感器相关信息
from InitCHN import Init
Init(True)