将栅格数据发布到OGC API-覆盖范围

OGC API - Coverages 为栅格数据提供地理空间数据访问功能。

要向pygeoapi添加栅格数据,可以使用中的数据集示例 配置 作为基线,并进行相应修改。

提供者

下面列出了pygeoapi核心特性提供程序,以及支持的查询参数列表。

供应商

属性

子集

口技

日期时间

Rasterio

Xarray

下面是基于支持的提供程序的特定连接示例。

连接示例

拉斯特里奥

备注

需要使用Python包Rasterio

这个 Rasterio 提供程序插件读取并提取Rasterio能够处理的任何数据。

providers:
    - type: coverage
      name: rasterio
      data: tests/data/CMC_glb_TMP_TGL_2_latlon.15x.15_2020081000_P000.grib2
      options:  # optional creation options
          DATA_ENCODING: COMPLEX_PACKING
      format:
          name: GRIB
          mimetype: application/x-grib2

备注

Rasterio提供程序 format.name 指令 requires 有效的 GDAL raster driver short name

xarray

备注

需要使用Python包XARRAY

这个 Xarray 提供程序插件读取和提取 NetCDFZarr 数据。

providers:
    - type: coverage
      name: xarray
      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: coverage
      name: xarray
      data: tests/data/analysed_sst.zarr
      format:
         name: zarr
         mimetype: application/zip

备注

Zarr 文件是包含文件和子目录的目录。因此,当请求用于所述格式时,返回zip文件。

备注

在引用时 NetCDFZarr 存储在S3存储桶中的数据,请确保提供完整的S3 URL。使用fsspec打开数据集所需的任何参数都可以添加到配置文件中的 optionss3

数据访问示例

  • 列出所有集合*http://localhost:5000/collections

  • DataSet*http://localhost:5000/collections/foo概述

  • 覆盖范围类型*http://localhost:5000/collections/foo/coverage/rangetype

  • 覆盖域集*http://localhost:5000/collections/foo/coverage/domainset

  • 通过CoverageJSON访问覆盖范围(默认)*http://localhost:5000/collections/foo/coverage?f=json

  • 通过本机格式访问覆盖范围(如中所定义 provider.format.name )*http://localhost:5000/collections/foo/coverage?f=GRIB

  • 使用逗号分隔属性的Coverage Access*http://localhost:5000/collections/foo/coverage?properties=1,3

  • 带有子集的覆盖范围访问*http://localhost:5000/collections/foo/coverage?subset=lat(10:20)&subset=long(10:20)

  • 使用bbox*http://localhost:5000/collections/foo/coverage?bbox=10,10,20,20覆盖范围

  • Bbox和Bbox CRS*http://localhost:5000/collections/foo/coverage?bbox=-8794239.772668611,5311971.846945471,-8348961.809495518,5621521.486192066&bbox=crs=3857覆盖范围

备注

.../coverage 向CoverageJSON返回替代表示(提示下载)的查询将使响应文件名与集合名称和适当的文件扩展名匹配(例如 my-dataset.nc )