Skip to content

Commit ee9ff77

Browse files
committed
Add configuration docs about OGC API - Joins
1 parent e0f7ff1 commit ee9ff77

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

docs/source/configuration.rst

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ The ``server`` section provides directives on binding and high level tuning.
3535

3636
For more information related to API design rules (the ``api_rules`` property in the example below) see :ref:`API Design Rules`.
3737

38+
If you wish to enable and configure OGC API - Joins, see :ref:`OGC API - Joins`.
39+
3840
.. code-block:: yaml
3941
4042
server:
@@ -77,6 +79,12 @@ For more information related to API design rules (the ``api_rules`` property in
7779
url: https://tile.openstreetmap.org/{z}/{x}/{y}.png
7880
attribution: '&copy; <a href="https://openstreetmap.org/copyright">OpenStreetMap contributors</a>'
7981
82+
# optional OGC API - Joins support
83+
joins:
84+
source_dir: /joins # directory containing the join source files (processed CSV's)
85+
max_files: 5 # maximum number of join source files to persist (omit to disable auto-cleanup)
86+
max_days: 10 # maximum number of days to keep join source files (omit to disable auto-cleanup)
87+
8088
# optional OGC API - Processes asynchronous job management configuration
8189
manager:
8290
name: TinyDB # plugin name (see pygeoapi.plugin for supported process_manager's)
@@ -386,6 +394,43 @@ Examples:
386394
curl https://example.org/collections/foo # user can access resource normally
387395
388396
397+
.. _OGC API - Joins:
398+
399+
OGC API - Joins
400+
---------------
401+
402+
To enable `OGC API - Joins <https://ogcapi.ogc.org/joins/>`_ support, all you have to do is add a `joins` key to the `server` section of your configuration file:
403+
404+
.. code-block:: yaml
405+
server:
406+
joins:
407+
408+
This is all you need to activate the OGC API - Joins endpoints for feature collections and allow you to upload CSV files,
409+
which will be processed and stored as join sources (`.json`) in the configured temporary directory of the server (e.g. `/tmp` on Linux or `C:\Windows\Temp` on Windows).
410+
411+
If you wish to store the join source files in a *specific* directory, you can specify a `source_dir` parameter:
412+
413+
.. code-block:: yaml
414+
server:
415+
joins:
416+
source_dir: /path/to/join/sources
417+
418+
Automatic cleanup
419+
^^^^^^^^^^^^^^^^^
420+
421+
Without any further configuration, the amount of join source files could grow indefinitely.
422+
To control the number of files and/or days they are stored, you can set the following parameters:
423+
424+
- `max_files`
425+
- `max_days`
426+
427+
Both parameters can be set to an integer. If omitted, no cleanup rule will be set.
428+
Note that the settings are *not* mutually exclusive: you can also set both options.
429+
430+
The automatic cleanup is a lazy process and does not run as a scheduled background task: the process will only run
431+
when a new join source file is uploaded or when pygeoapi initializes (if OGC API - Joins is enabled).
432+
433+
389434
.. _API Design Rules:
390435

391436
API Design Rules

0 commit comments

Comments
 (0)