Skip to content

Commit 2568f90

Browse files
authored
docs: update documentation to describe formatters (#2325)
1 parent e8c317d commit 2568f90

3 files changed

Lines changed: 64 additions & 0 deletions

File tree

docs/source/plugins.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,8 @@ Below is a sample process definition as a Python dictionary:
466466

467467
Additional processing plugins can also be found in ``pygeoapi/process``.
468468

469+
.. _example-custom-pygeoapi-formatter:
470+
469471
Example: custom pygeoapi formatter
470472
----------------------------------
471473

docs/source/publishing/ogcapi-edr.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,36 @@ relies on using the ObservedProperty Entity to create the `parameter-name` set.
123123
EDR query type.
124124

125125

126+
Formatters
127+
----------
128+
129+
CoverageJSON is the default format provided by edr providers. Additional formats can
130+
be added to configuration using one of the pygeoapi core formatters or by building a
131+
custom formatter plugin.
132+
133+
.. note::
134+
See the :ref:`plugin documentation <example-custom-pygeoapi-formatter>` for more
135+
information on custom formatter plugins.
136+
137+
.. csv-table::
138+
:header: Formatter, format parameter value
139+
:align: left
140+
141+
:ref:`CSV <csv-formatter-edr>`,``f=csv``
142+
143+
.. _csv-formatter-edr:
144+
145+
CSV
146+
^^^
147+
148+
.. code-block:: yaml
149+
150+
formatters:
151+
- name: CSV # propagated by .../items?f=csv
152+
geom: False # whether to include geometry (default=False)
153+
attachment: True # whether to provide as an attachment (default=False)
154+
155+
126156
Data access examples
127157
--------------------
128158

docs/source/publishing/ogcapi-features.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ Connection examples
4545

4646
Below are specific connection examples based on supported providers.
4747

48+
.. _csv:
49+
4850
CSV
4951
^^^
5052

@@ -845,6 +847,36 @@ To publish a TinyDB (`see website <https://tinydb.readthedocs.io>`_) index, the
845847
846848
.. _including-extra-query-parameters:
847849

850+
Formatters
851+
----------
852+
853+
GeoJSON is the default format provided by feature providers. Additional formats can
854+
be added to configuration using one of the pygeoapi core formatters or by building a
855+
custom formatter plugin.
856+
857+
.. note::
858+
See the :ref:`plugin documentation <example-custom-pygeoapi-formatter>` for more
859+
information on custom formatter plugins.
860+
861+
.. csv-table::
862+
:header: Formatter, format parameter value
863+
:align: left
864+
865+
:ref:`CSV <csv-formatter-features>`,``f=csv``
866+
867+
.. _csv-formatter-features:
868+
869+
CSV
870+
^^^
871+
872+
.. code-block:: yaml
873+
874+
formatters:
875+
- name: CSV # propagated by .../items?f=csv
876+
geom: False # whether to include geometry (default=False)
877+
attachment: True # whether to provide as an attachment (default=False)
878+
879+
848880
Including extra query parameters
849881
--------------------------------
850882

0 commit comments

Comments
 (0)