@@ -30,10 +30,15 @@ The core pygeoapi plugin registry can be found in ``pygeoapi.plugin.PLUGINS``.
3030
3131Each plugin type implements its relevant base class as the API contract:
3232
33- * data providers: ``pygeoapi.provider.base ``
34- * output formats: ``pygeoapi.formatter.base ``
35- * processes: ``pygeoapi.process.base ``
36- * process_manager: ``pygeoapi.process.manager.base ``
33+ * data providers:
34+
35+ * features/records/maps: ``pygeoapi.provider.base.BaseProvider ``
36+ * edr: ``pygeoapi.provider.base_edr.BaseEDRProvider ``
37+ * tiles: ``pygeoapi.provider.tile.BaseTileProvider ``
38+
39+ * output formats: ``pygeoapi.formatter.base.BaseFormatter ``
40+ * processes: ``pygeoapi.process.base.BaseProcessor ``
41+ * process_manager: ``pygeoapi.process.manager.base.BaseManager ``
3742
3843.. todo :: link PLUGINS to API doc
3944
@@ -150,7 +155,7 @@ option 2 above).
150155Example: custom pygeoapi vector data provider
151156---------------------------------------------
152157
153- Lets consider the steps for a vector data provider plugin:
158+ Let's consider the steps for a vector data provider plugin:
154159
155160Python code
156161^^^^^^^^^^^
@@ -223,7 +228,7 @@ Each base class documents the functions, arguments and return types required for
223228Example: custom pygeoapi raster data provider
224229---------------------------------------------
225230
226- Lets consider the steps for a raster data provider plugin:
231+ Let's consider the steps for a raster data provider plugin:
227232
228233Python code
229234^^^^^^^^^^^
@@ -278,6 +283,51 @@ Each base class documents the functions, arguments and return types required for
278283
279284.. _example-custom-pygeoapi-processing-plugin :
280285
286+ Example: custom pygeoapi EDR data provider
287+ ------------------------------------------
288+
289+ Let's consider the steps for an EDR data provider plugin:
290+
291+ Python code
292+ ^^^^^^^^^^^
293+
294+ The below template provides a minimal example (let's call the file ``mycooledrdata.py ``:
295+
296+ .. code-block :: python
297+
298+ from pygeoapi.provider.base_edr import BaseEDRProvider
299+
300+ class MyCoolEDRDataProvider (BaseEDRProvider ):
301+
302+ def __init__ (self , provider_def ):
303+ """ Inherit from the parent class"""
304+
305+ super ().__init__ (provider_def)
306+
307+ self .covjson = {... }
308+
309+ def get_instances (self ):
310+ return [' foo' , ' bar' ]
311+
312+ def get_instance (self , instance ):
313+ return instance in get_instances()
314+
315+ def position (self , ** kwargs ):
316+ return self .covjson
317+
318+ def trajectory (self , ** kwargs ):
319+ return self .covjson
320+
321+
322+ For brevity, the ``position `` function returns ``self.covjson `` which is a
323+ dictionary of a CoverageJSON representation. ``get_instances `` returns a list
324+ of instances associated with the collection/plugin, and ``get_instance `` returns
325+ a boolean of whether a given instance exists/is valid. EDR query types are subject
326+ to the query functions defined in the plugin. In the example above, the plugin
327+ implements ``position `` and ``trajectory `` queries, which will be advertised as
328+ supported query types.
329+
330+
281331Example: custom pygeoapi processing plugin
282332------------------------------------------
283333
@@ -360,6 +410,7 @@ Below is a sample process definition as a Python dictionary:
360410 ' it back as output. Intended to demonstrate a simple '
361411 ' process with a single literal input.' ,
362412 ' jobControlOptions' : [' sync-execute' , ' async-execute' ], # whether the process can be executed in sync or async mode
413+ ' outputTransmission' : [' value' , ' reference' ], # whether the process can return inline data or URL references
363414 ' keywords' : [' hello world' , ' example' , ' echo' ], # keywords associated with the process
364415 ' links' : [{ # a list of 1..n # link objects relevant to the process
365416 ' type' : ' text/html' ,
0 commit comments