将切片发布到OGC API-Tiles

OGC API - Tiles 以平铺(地图、矢量、覆盖等)的形式提供对地理空间数据的访问。

Pygeapi可以发布来自本地或远程数据源(包括云对象存储或切片服务)的切片。要集成本地数据源中的分片,假设已在磁盘上创建了静态分片的目录树。瓷砖生成软件的示例包括(但不限于):

提供者

下面列出了pygeoapi核心磁贴提供程序以及支持的存储类型。

供应商

地方的

遥远的

MVT

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

连接示例

MVT

MVT提供程序插件提供对 Mapbox Vector Tiles .

通过提供URL模板,远程数据源可以是任何外部服务(即Elasticearch)。

备注

目前,该提供程序中的URL模板支持以下格式: /{z}/{x}/{y} or /{z}/{y}/{x}. For additional formats: feel free to file an issue

此代码块显示如何配置pygeapi以从磁盘或URL读取Mapbox向量分片。

providers:
    - type: tile
      name: MVT
      data: tests/data/tiles/ne_110m_lakes  # local directory tree
      # data: http://localhost:9000/ne_110m_lakes/{z}/{x}/{y}.pbf # tiles stored on a MinIO bucket
      options:
          metadata_format: default # default | tilejson
          zoom:
              min: 0
              max: 5
          schemes:
              - WorldCRS84Quad
      format:
          name: pbf
          mimetype: application/vnd.mapbox-vector-tile

此代码块演示如何配置pygeapi以从 Elasticsearch 终结点。

providers:
    - type: tile
      name: MVT
      data: http://localhost:9200/ne_110m_populated_places_simple2/_mvt/geometry/{z}/{x}/{y}?grid_precision=0
      # if you don't use precision 0, you will be requesting for aggregations which are not supported in the
      # free version of elastic
      options:
          metadata_format: default # default | tilejson
          zoom:
              min: 0
              max: 5
          schemes:
              - WorldCRS84Quad
      format:
          name: pbf
          mimetype: application/vnd.mapbox-vector-tile

此代码块演示如何配置pygeapi以从 pg_tileserv 终结点。

providers:
    - type: tile
      name: MVT
      data: http://localhost:7800/public.ne_50m_admin_0_countries/{z}/{x}/{y}.pbf
      options:
        metadata_format: default # default | tilejson
        zoom:
            min: 0
            max: 16
        schemes:
            - WorldCRS84Quad
      format:
            name: pbf
            mimetype: application/vnd.mapbox-vector-tile

数据访问示例