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("")
如果出現以下結果證明安裝完成
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)
出現以下內容表示檢索功能初始化完成