Skip to content

Commit

Permalink
Issue #401 WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Apr 11, 2023
1 parent 90381bc commit 93fc7d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openeo/rest/mlmodel.py
Expand Up @@ -24,6 +24,8 @@ class MlModel(_ProcessGraphAbstraction):
.. versionadded:: 0.10.0
"""

# TODO
def __init__(self, graph: PGNode, connection: 'Connection'):
super().__init__(pgnode=graph, connection=connection)

Expand Down
5 changes: 5 additions & 0 deletions openeo/rest/vectorcube.py
Expand Up @@ -90,6 +90,10 @@ def run_udf(

@openeo_process
def save_result(self, format: str = "GeoJson", options: dict = None):
# TODO?
# TODO: check format against supported formats
# TODO: should not return a VectorCube again, but bool wrapper
# TODO: should save_result also work on non-cube data types, e.g. arrays, scalars?
return self.process(
process_id="save_result",
arguments={
Expand All @@ -105,6 +109,7 @@ def execute(self) -> dict:

def download(self, outputfile: str, format: str = "GeoJSON", options: dict = None):
# TODO: only add save_result, when not already present (see DataCube.download)
# TODO
cube = self.save_result(format=format, options=options)
return self._connection.download(cube.flat_graph(), outputfile)

Expand Down

0 comments on commit 93fc7d5

Please sign in to comment.