将元数据发布到OGC API-记录

OGC API - Records 提供对矢量数据的地理空间数据访问功能。

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

提供者

下面列出了pyGeoapi核心记录提供程序,以及支持的查询参数矩阵。

供应商

属性(筛选器)

结果类型

问:

口技

日期时间

肮脏的

属性(显示)

交易记录

ElasticsearchCatalogue

结果/命中

TinyDBCatalogue

结果/命中

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

连接示例

ElasticsearchCatalogue

备注

需要Python包ElasticSearch和ElasticSearch-DSL

备注

支持ElasticSearch 8或更高版本。

要发布Elasticsearch索引,索引中需要以下内容:

providers:
    - type: record
      name: ElasticsearchCatalogue
      data: http://localhost:9200/some_metadata_index
      id_field: identifier
      time_field: datetimefield

TinyDBCatalogue

备注

需要使用Python包tinydb

要发布TinyDB索引,您的索引中需要以下各项:

providers:
    - type: record
      editable: true|false  # optional, default is false
      name: TinyDBCatalogue
      data: /path/to/file.db
      id_field: identifier
      time_field: datetimefield

元数据搜索示例

  • 记录收集概述*http://localhost:5000/collections/metadata-records

  • 可查询*http://localhost:5000/collections/foo/queryables

  • 浏览记录*http://localhost:5000/collections/foo/items

  • 分页*http://localhost:5000/collections/foo/items?offset=10&limit=10

  • Csv输出*http://localhost:5000/collections/foo/items?f=csv

  • 查询记录(空间)*http://localhost:5000/collections/foo/items?bbox=-180,-90,180,90

  • 查询记录(属性)*http://localhost:5000/collections/foo/items?propertyname=foo

  • 查询记录(时间)*http://localhost:5000/collections/my-metadata/items?datetime=2020-04-10T14:11:00Z

  • 查询要素(时态)并按属性升序排序(如果未指定+/-,则假定为+)*http://localhost:5000/collections/my-metadata/items?datetime=2020-04-10T14:11:00Z&sortby=datetime

  • 查询要素(时态)并按属性降序排序*http://localhost:5000/collections/my-metadata/items?datetime=2020-04-10T14:11:00Z&sortby=-datetime

  • 获取特定记录*http://localhost:5000/collections/my-metadata/items/123

备注

提供者 id_field 值支持斜杠(即 my/cool/identifier )。然后,客户端请求将负责相应地对标识符进行编码(即 http://localhost:5000/collections/my-metadata/items/my%2Fcool%2Fidentifier )