|
37 | 37 | from openeo.rest.rest_capabilities import RESTCapabilities
|
38 | 38 | from openeo.rest.service import Service
|
39 | 39 | from openeo.rest.udp import RESTUserDefinedProcess, Parameter
|
| 40 | +from openeo.rest.vectorcube import VectorCube |
40 | 41 | from openeo.util import ensure_list, dict_no_none, rfc3339, load_json_resource, LazyLoadCache, \
|
41 | 42 | ContextTimer, str_truncate
|
42 | 43 |
|
@@ -899,6 +900,19 @@ def _api_version(self) -> ComparableVersion:
|
899 | 900 | # TODO make this a public property (it's also useful outside the Connection class)
|
900 | 901 | return self.capabilities().api_version_check
|
901 | 902 |
|
| 903 | + def vectorcube_from_paths(self, paths:List[str], format:str, options:dict={}) -> VectorCube: |
| 904 | + """ |
| 905 | + Loads one or more files referenced by url or path that is accessible by the backend. |
| 906 | +
|
| 907 | + :param paths: The files to read. |
| 908 | + :param format: The file format to read from. It must be one of the values that the server reports as supported input file formats. |
| 909 | + :param options: The file format parameters to be used to read the files. Must correspond to the parameters that the server reports as supported parameters for the chosen format. |
| 910 | +
|
| 911 | + :return: A :py:class:`VectorCube`. |
| 912 | + """ |
| 913 | + graph = PGNode("load_uploaded_files", arguments=dict(paths=paths,format=format,options=options)) |
| 914 | + return VectorCube(graph=graph, connection=self) |
| 915 | + |
902 | 916 | def datacube_from_process(self, process_id: str, namespace: str = None, **kwargs) -> DataCube:
|
903 | 917 | """
|
904 | 918 | Load a data cube from a (custom) process.
|
|
0 commit comments