dms-client/common/tools/dms.py
XinYi Song c5481ead05 1、搭建flask框架。
2、整合JPSS,葵花8,GF3,哨兵1,哨兵2,哨兵3,资源2号,环境1号,SNPP等遥感数据解析算法。
3、flask中添加扫描各个卫星扫描任务,定时扫描,数据入库
2021-12-01 14:27:49 +08:00

41 lines
1.2 KiB
Python

"""
Author : XinYi Song
Time : 2021/11/5 14:12
Desc:
"""
from util.http_util import httpUtil
def dms_login():
"""
数管系统登录
:return:
"""
res = httpUtil(url='http://192.168.2.9:8820/api/login',
params={"userName": "client1", "password": "sxy1998"}).post_param()
return res.json()['data']
def dms_task_record(token_s: str, collectionCode: str):
"""
调用数管系统获取遥感数据归档任务的接口
:param collectionCode:
:param token_s:
:return:
"""
res = httpUtil(url='http://192.168.2.9:8820/api/data-storage-task-record/get/collection-code/revision',
params={"collectionCode": collectionCode, "revision": 1}, token=token_s).get_herder()
return res.json()['data']
def dms_sensing_data(token_s: str, collectionCode: str):
"""
调用数管系统获取所有遥感数据的接口
:param collectionCode:
:param token_s:
:return:
"""
res = httpUtil(url='http://192.168.2.9:8820/api/remote-sensing-data/get/collection-code',
params={"collectionCode": collectionCode}, token=token_s).get_herder()
return res.json()['data']