|
3 | 3 |
|
4 | 4 | class SaveResult(StacResource): |
5 | 5 | """ |
6 | | - Alias for :py:class:`~openeo.rest.stac_resource.StacResource`, |
7 | | - returned by methods corresponding to the openEO process ``save_result``, like |
| 6 | + Handle for a process graph that represents the return value |
| 7 | + of the openEO process ``save_result``, |
| 8 | + as returned by methods like |
8 | 9 | :py:meth:`DataCube.save_result() <openeo.rest.datacube.DataCube.save_result>` |
9 | | - and :py:meth:`VectorCube.save_result() <openeo.rest.vectorcube.VectorCube.save_result>` |
| 10 | + and :py:meth:`VectorCube.save_result() <openeo.rest.vectorcube.VectorCube.save_result>`. |
| 11 | +
|
| 12 | + .. note :: |
| 13 | + This class is practically a just direct alias for |
| 14 | + :py:class:`~openeo.rest.stac_resource.StacResource`, |
| 15 | + but with a more self-explanatory name. |
| 16 | +
|
| 17 | + Moreover, this additional abstraction layer also acts somewhat as an adapter between |
| 18 | + the incompatible return values from the ``save_result`` process |
| 19 | + in different versions of the official openeo-processes definitions: |
| 20 | +
|
| 21 | + - in openeo-processes 1.x: ``save_result`` just returned a boolean, |
| 22 | + but that was not really useful to further build upon |
| 23 | + and was never properly exposed in the openEO Python client. |
| 24 | + - in openeo-processes 2.x: ``save_result`` returns a new concept: |
| 25 | + a "STAC resource" (object with subtype "stac") |
| 26 | + which is a more useful and flexible representation of an openEO result, |
| 27 | + allowing additional operations. |
| 28 | +
|
| 29 | + The openEO Python client returns the same :py:class:`SaveResult` object |
| 30 | + in both cases however. |
| 31 | + It does that not only for simplicity, |
| 32 | + but also because it seems more useful (even in legacy openeo-processes 1.x use cases) |
| 33 | + to follow the new STAC resource based usage patterns |
| 34 | + than to strictly return some boolean wrapper nobody has use for. |
10 | 35 |
|
11 | 36 | .. versionadded:: 0.39.0 |
12 | 37 | """ |
0 commit comments