DEM¶
该模块用于alos-dem数据下载
数据源: Microsoft Planetary Computer
数据目录: https://planetarycomputer.microsoft.com/api/stac/v1/
数据说明: https://www.eorc.jaxa.jp/ALOS/en/aw3d30/aw3d30v3.2_product_e_e1.2.pdf
Alos_DEM
¶
Source code in hydro_opendata/downloader/dem.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | |
add_source(source_name, url, collection_name)
¶
添加自定义stac内容
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source_name |
str
|
源名称 |
required |
url |
list
|
STAC根路径地址 |
required |
collection_name |
str
|
数据集名称 |
required |
Returns:
| Name | Type | Description |
|---|---|---|
source |
dict
|
符合条件的url地址列表 |
Source code in hydro_opendata/downloader/dem.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | |
download(save_dir='.', cover=False)
¶
下载列表中的dem数据
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
save_dir |
str
|
本地保存目录 |
'.'
|
cover |
bool
|
若文件已存在,是否覆盖 |
False
|
Source code in hydro_opendata/downloader/dem.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | |
list_sources()
¶
返回stac列表
Returns:
| Name | Type | Description |
|---|---|---|
sources |
list
|
stac列表 |
Source code in hydro_opendata/downloader/dem.py
30 31 32 33 34 35 36 37 | |
search(source='microsoft', bbox=None, intersects=None)
¶
搜索符合条件的dem,并返回url地址列表
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
catalog_url |
str
|
STAC根路径地址,默认为微软planetarycomputer |
required |
bbox |
list
|
搜索的矩形范围 |
None
|
intersects |
str
|
搜索范围,应符合GeoJSON的geometry属性格式 |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
hrefs |
list
|
符合条件的url地址列表 |
Source code in hydro_opendata/downloader/dem.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |
Last update:
2023-08-30