将数据发布到OGC API-环境数据检索
这个 OGC Environmental Data Retrieval (EDR) (API) 提供一系列轻量级查询接口来访问时空数据资源。
要将时空数据添加到pyGeoapi以用于EDR查询接口,可以使用中的数据集示例 配置 作为基线,并进行相应的修改。
提供者
下面列出了pyGeoapi核心EDR提供程序,以及支持的查询参数矩阵。
供应商 |
余弦 |
参数名称 |
日期时间 |
---|---|---|---|
✅ |
✅ |
✅ |
下面是基于支持的提供程序的特定连接示例。
连接示例
xarray-EDR
备注
需要Python包xarray.
这个 xarray-edr 提供程序插件读取和提取 NetCDF 和 Zarr 数据通过 xarray 。
providers:
- type: edr
name: xarray-edr
data: tests/data/coads_sst.nc
# optionally specify x/y/time fields, else provider will attempt
# to derive automagically
x_field: lat
x_field: lon
time_field: time
format:
name: netcdf
mimetype: application/x-netcdf
providers:
- type: edr
name: xarray-edr
data: tests/data/analysed_sst.zarr
format:
name: zarr
mimetype: application/zip
providers:
- type: edr
name: xarray-edr
data: s3://power-analysis-ready-datastore/power_901_annual_meteorology_utc.zarr
format:
name: zarr
mimetype: application/zip
options:
s3:
anon: true
requester_pays: false
备注
Zarr 文件是包含文件和子目录的目录。因此,当请求用于所述格式时,返回zip文件。
备注
当引用存储在S3存储桶中的数据时,请确保提供完整的S3 URL。使用fsspec打开数据集所需的任何参数都可以添加到配置文件中的 options 和 s3 ,如上所示。
数据访问示例
列出所有集合*http://localhost:5000/collections
DataSet*http://localhost:5000/collections/foo概述
数据集位置查询*http://localhost:5000/collections/foo/position?coords=POINT(-75%2045)
特定参数的数据集位置查询*http://localhost:5000/collections/foo/position?coords=POINT(-75%2045)¶meter-name=SST
特定参数和时间步长的数据集位置查询*http://localhost:5000/collections/foo/position?coords=POINT(-75%2045)¶meter-name=SST&datetime=2000-01-16