geopython / geopython/pygeoapi

Extended echo processor for multiple output parameters

Open
#2,313 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
624
Forks
326
Avg merge
8h 25m
Merged PRs (30d)
2

Description

I found some issues on handling multiple output parameters,
and I thought an extended echo example may help to clarify, which is attached.

Starting from the `EchoProcessor` I made a new one processor, `ExtendedEchoProcessor`, which echoes multiple inputs:
- a `number`
- allowed `multiple occurrences` of single `number` (`maxOccurs>1`)
- an `array of numbers`
- allowed `multiple occurrences` of `array of numbers` (`maxOccurs>1`)
- a `string` (as text)
- a `binary string`

I left as "`not implemented`" errors cases where `inputs` and/or `outputs` are passed `by references`.
If the present exercise will be found useful I will try to extend the processor also for that cases.

I used some utility functions to `get` and `validate` the passed values.

I then prepared the outputs entities: `produced_outputs` (a copy of the inputs, but for multiple occurrences which I considered arrays).

However I was unable to complete the function `execute()`, as **it is not clear to me what the returned values should contains**,
and (as highlighted by @ricardogsilva in previous issues) the alternatives are already complex (and still is not considered the cases where `'transmissionMode'='reference'` for some or all the outputs).

I would very much appreciate if someone can help me to complete the function `execute()`.

[extended_echo.py](https://github.com/user-attachments/files/26440303/extended_echo.py)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.