Files
pygeoapi/docs/source/data-publishing/ogcapi-coverages.rst
T
Francesco Bartoli 4f52536051 Add tiles ogc api (#419)
* Add ogc api tiles implementation

* Add json response to tiles endpoint

* Return correct json payload

* Fix url generation

* Add vector tile layer with clickable items

* Fix typo

* Fix oafeat collection tiles link

* Add format to metadata link

* Fix almost all flake8 errors

* Fix metadata link

* Add routes to serving tiles

* Refactor tile implementation with an own module

* Add http client for mvt

* Fix visibility of tiles template

* Fix tiles in collection item page

* Change source to data coherently with stac provider

* Fix flake8 errors

* Fix test for conformance classes

* Fix flake8 errors


Fix flake8 errors

* Refactor to align with new configuration structure

* Fix MVT plugin name

* Add openapi tiles path and schemas

* Add ogc api tiles implementation

* Add json response to tiles endpoint

* Return correct json payload

* Fix url generation

* Add vector tile layer with clickable items

* Fix typo

* Fix oafeat collection tiles link

* Add format to metadata link

* Fix almost all flake8 errors

* Fix metadata link

* Add routes to serving tiles

* Refactor tile implementation with an own module

* Add http client for mvt

* Fix visibility of tiles template

* Fix tiles in collection item page

* Change source to data coherently with stac provider

* Fix flake8 errors

* Fix test for conformance classes

* Fix flake8 errors


Fix flake8 errors

* Refactor to align with new configuration structure

* Fix MVT plugin name

* Add openapi tiles path and schemas

* Fix flake errors

* Fix merge and tests

* Add test configuration and data for tiles

* Change mapbox vector tile provider name

* Fix provider inspection and filter

* Fix tiles rendering in collection page

* Add mimetype to the mvt provider

* Fix mimetype

* Rename functions accordingly to singular and plural forms

* Fix tiling schemes in tiles template

* Serve mvt through the pygeoapi route

* Refactor and add test for collection tiles

* Fix test for not being tiles

* Remove httpx dependency

* Fix missing comma

* Fix tests

* Fix flake8

* Add initial metadata implementation

* Fix route with preprocess

* Fix tiles template


Fix tiles template

* Complete tileset api and template

* Fix flake8

* Complete metadata with tilejson response

* Add support for local vector tiles

* Fix flake8

* Fix plugin tile object and provider name

* Add a todo comment

* testing alternate plugin setup, fix some HTML, add OpenAPI endpoint

* remove URI template

* add docs

* Fix failing test

* Fix flake8 error

Co-authored-by: Francesco Bartoli <francesco.bartoli@wfp.org>
Co-authored-by: Tom Kralidis <tomkralidis@gmail.com>
2020-09-20 09:50:40 -04:00

97 lines
2.8 KiB
ReStructuredText

.. _ogcapi-coverages:
Publishing raster data to OGC API - Coverages
=============================================
`OGC API - Coverages`_ provides geospatial data access functionality to raster data.
To add raster data to pygeoapi, you can use the dataset example in :ref:`configuration`
as a baseline and modify accordingly.
Providers
---------
pygeoapi core feature providers are listed below, along with a matrix of supported query
parameters.
.. csv-table::
:header: Provider, rangeSubset, subset
:align: left
rasterio,✔️,✔️
xarray,✔️,✔️
Below are specific connection examples based on supported providers.
Connection examples
-------------------
rasterio
^^^^^^^^
The `rasterio`_ provider plugin reads and extracts any data that rasterio is
capable of handling.
.. code-block:: yaml
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
.. note::
The rasterio provider ``format.name`` directive **requires** a valid
`GDAL raster driver short name`_.
xarray
^^^^^^
The `xarray`_ provider plugin reads and extracts `NetCDF`_ data.
.. code-block:: yaml
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
Data access examples
--------------------
- list all collections
- http://localhost:5000/collections
- overview of dataset
- http://localhost:5000/collections/foo
- coverage rangetype
- http://localhost:5000/collections/foo/coverage/rangetype
- coverage domainset
- http://localhost:5000/collections/foo/coverage/domainset
- coverage access via CoverageJSON (default)
- http://localhost:5000/collections/foo/coverage?f=json
- coverage access via native format (as defined in ``provider.format.name``)
- http://localhost:5000/collections/foo/coverage?f=GRIB
- coverage access with comma-separated rangeSubset
- http://localhost:5000/collections/foo/coverage?rangeSubset=1,3
- coverage access with subsetting
- http://localhost:5000/collections/foo/coverage?subset=lat(10,20)&subset=long(10,20)
.. _`OGC API - Coverages`: https://github.com/opengeospatial/ogc_api_coverages
.. _`rasterio`: https://rasterio.readthedocs.io
.. _`xarray`: https://xarray.pydata.org
.. _`NetCDF`: https://en.wikipedia.org/wiki/NetCDF
.. _`GDAL raster driver short name`: https://gdal.org/drivers/raster/index.html