一个以时空资产目录(STAC)开始的摄入适配器
项目描述
Intake-STAC
这是一个Intake数据源,用于时空资产目录(STAC)。STAC规范提供了一种通用的元数据规范、API和目录格式,用于描述地理空间资产,以便更容易地进行索引和发现。一个“时空资产”是指任何表示在特定空间和时间捕获的地球信息的文件。
Intake-STAC为用户提供了将STAC目录中的资产加载到科学Python生态系统的意见化方式。它使用intake-xarray插件,并支持多种文件格式,包括GeoTIFF、netCDF、GRIB和OpenDAP。
安装
Intake-STAC 需要一些 依赖项,例如 Intake,intake-xarray 和 pystac。Intake-stac 可以通过以下任何一种方式进行安装
我们建议使用 conda
安装最新版本
$ conda install -c conda-forge intake-stac
或者使用 pip
安装最新开发版本
$ pip install git+https://github.com/intake/intake-stac
快速入门
import intake
catalog_url = 'https://www.planet.com/data/stac/catalog.json'
cat = intake.open_stac_catalog(catalog_url)
collection = cat['planet-disaster-data']
subset = collection['hurricane-harvey']['hurricane-harvey-0831']
item = subset['Houston-East-20170831-103f-100d-0f4f-RGB']
da = item['thumbnail'].to_dask()
da
在 examples/ 目录中包含了一些 Jupyter Notebooks,展示了常见的使用流程。
STAC Index 是一个方便的网站,用于查找带有 STAC 的数据集
版本
要安装 intake-stac 的特定版本,请在安装命令中指定版本
pip install intake-stac==0.4.0
下表显示了 intake-stac 和 STAC 之间的对应版本
intake-stac | STAC |
---|---|
0.2.x | 0.6.x |
0.3.x | 1.0.0-betaX |
0.4.x | 1.0.0 |
关于
intake-stac 是在 NASA-ACCESS 项目支持下,作为 Pangeo 初始化的一部分创建的。请参阅初始的 设计文档。