From 852d626b02ef2a5bad4eac9b62ac1cf97197df17 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 29 Apr 2022 01:09:34 +0200 Subject: [PATCH 001/163] working on items endpoint --- .gitignore | 3 ++ config.yml | 7 --- config.yml.example | 14 +++++ environment.yml | 1 + tests/core/mock_datastore.py | 3 +- xcube_geodb_openeo/backend/catalog.py | 1 - xcube_geodb_openeo/core/geodb_datastore.py | 61 +++++++++++++++++++++- xcube_geodb_openeo/server/cli.py | 1 + xcube_geodb_openeo/server/context.py | 7 +-- 9 files changed, 85 insertions(+), 13 deletions(-) delete mode 100644 config.yml create mode 100644 config.yml.example diff --git a/.gitignore b/.gitignore index 2d07cd8..45145e5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# Files that may contain private data +config.yml + # IDEs .idea/ diff --git a/config.yml b/config.yml deleted file mode 100644 index 115f6e0..0000000 --- a/config.yml +++ /dev/null @@ -1,7 +0,0 @@ -api_version: 1.1.0 -stac_version: 0.9.0 -url: http://www.brockmann-consult.de/xcube-geoDB-openEO -id: xcube-geodb-openeo -title: xcube geoDB Server, openEO API -description: Catalog of geoDB collections. -datastore-class: xcube_geodb_openeo.core.GeoDBDataStore \ No newline at end of file diff --git a/config.yml.example b/config.yml.example new file mode 100644 index 0000000..32808d2 --- /dev/null +++ b/config.yml.example @@ -0,0 +1,14 @@ +# adapt to your needs and save as config.yml +api_version: 1.1.0 +stac_version: 0.9.0 +url: http://www.brockmann-consult.de/xcube-geoDB-openEO +id: xcube-geodb-openeo +title: xcube geoDB Server, openEO API +description: Catalog of geoDB collections. +datastore-class: xcube_geodb_openeo.core.geodb_datastore.GeoDBDataStore + +server_url: +server_port: +client_id: +client_secret: +auth_domain: \ No newline at end of file diff --git a/environment.yml b/environment.yml index d57f88a..013abb6 100644 --- a/environment.yml +++ b/environment.yml @@ -17,6 +17,7 @@ dependencies: - shapely >=1.6 - tornado >=6.0 - flask >=2.0 + - xcube_geodb >= 1.0.2 # Testing - flake8 >=3.7 - pytest >=4.4 diff --git a/tests/core/mock_datastore.py b/tests/core/mock_datastore.py index 75ba394..8c2aed6 100644 --- a/tests/core/mock_datastore.py +++ b/tests/core/mock_datastore.py @@ -23,12 +23,13 @@ from typing import Sequence from xcube_geodb_openeo.core.datastore import Datastore from xcube_geodb_openeo.core.vectorcube import VectorCube +from xcube_geodb_openeo.server.config import Config import importlib.resources as resources class MockDatastore(Datastore): - def __init__(self): + def __init__(self, config: Config): with resources.open_text('tests', 'mock_collections.json') as text: mock_collections = json.load(text)['_MOCK_COLLECTIONS_LIST'] self._MOCK_COLLECTIONS = {v["id"]: v for v in mock_collections} diff --git a/xcube_geodb_openeo/backend/catalog.py b/xcube_geodb_openeo/backend/catalog.py index 792ddd8..8ac073a 100644 --- a/xcube_geodb_openeo/backend/catalog.py +++ b/xcube_geodb_openeo/backend/catalog.py @@ -24,7 +24,6 @@ from xcube_geodb_openeo.core.vectorcube import VectorCube, Feature from xcube_geodb_openeo.server.context import RequestContext -from ..server.config import Config GEODB_COLLECTION_ID = "geodb" diff --git a/xcube_geodb_openeo/core/geodb_datastore.py b/xcube_geodb_openeo/core/geodb_datastore.py index 8f6adfb..62f2db2 100644 --- a/xcube_geodb_openeo/core/geodb_datastore.py +++ b/xcube_geodb_openeo/core/geodb_datastore.py @@ -19,8 +19,67 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. +from functools import cached_property + from xcube_geodb_openeo.core.datastore import Datastore +from xcube_geodb.core.geodb import GeoDBClient + +from xcube_geodb_openeo.core.vectorcube import VectorCube +from xcube_geodb_openeo.server.config import Config class GeoDBDataStore(Datastore): - pass \ No newline at end of file + + def __init__(self, config: Config): + self.config = config + + @cached_property + def geodb(self): + assert self.config + + server_url = self.config['server_url'] + server_port = self.config['server_port'] + client_id = self.config['client_id'] + client_secret = self.config['client_secret'] + auth_domain = self.config['auth_domain'] + + return GeoDBClient( + server_url=server_url, + server_port=server_port, + client_id=client_id, + client_secret=client_secret, + auth_aud=auth_domain + ) + + def get_collection_keys(self): + database_names = self.geodb.get_my_databases().get('name').array + collections = None + for n in database_names: + if collections: + collections.concat(self.geodb.get_my_collections(n)) + else: + collections = self.geodb.get_my_collections(n) + return collections.get('collection') + + def get_vector_cube(self, collection_id) -> VectorCube: + vector_cube = self.geodb.get_collection_info(collection_id) + vector_cube['id'] = collection_id + collection = self.geodb.get_collection(collection_id) + bounds = collection.bounds + # geometries = collection.to_wkt().get('geometry') + # print(geometries) + vector_cube['features'] = [] + for i, row in enumerate(collection.iterrows()): + bbox = bounds.iloc[i] + vector_cube['features'].append({ + 'stac_version': self.config['stac_version'], + 'stac_extensions': ['xcube-geodb'], + 'type': 'Feature', + 'id': collection_id, + 'bbox': [f'{bbox["minx"]:.4f}', + f'{bbox["miny"]:.4f}', + f'{bbox["maxx"]:.4f}', + f'{bbox["maxy"]:.4f}'] + }) + + return vector_cube diff --git a/xcube_geodb_openeo/server/cli.py b/xcube_geodb_openeo/server/cli.py index e1bc909..6b8dab6 100644 --- a/xcube_geodb_openeo/server/cli.py +++ b/xcube_geodb_openeo/server/cli.py @@ -60,6 +60,7 @@ def main(config_path: Optional[str], from xcube_geodb_openeo.server.config import load_config config = load_config(config_path) if config_path else {} + db_config = load_config(config_path) if config_path else {} module = importlib.import_module( f'xcube_geodb_openeo.server.app.{framework}' diff --git a/xcube_geodb_openeo/server/context.py b/xcube_geodb_openeo/server/context.py index 791b1f7..223ff0e 100644 --- a/xcube_geodb_openeo/server/context.py +++ b/xcube_geodb_openeo/server/context.py @@ -23,7 +23,9 @@ import abc import importlib import logging + from typing import Sequence +from functools import cached_property from xcube_geodb_openeo.core.vectorcube import VectorCube from xcube_geodb_openeo.core.datastore import Datastore @@ -70,7 +72,7 @@ def config(self, config: Config): assert isinstance(config, dict) self._config = dict(config) - @property + @cached_property def datastore(self) -> Datastore: if not self.config: raise RuntimeError('config not set') @@ -79,11 +81,10 @@ def datastore(self) -> Datastore: class_name = datastore_class[datastore_class.rindex('.') + 1:] module = importlib.import_module(datastore_module) cls = getattr(module, class_name) - return cls() + return cls(self.config) @property def collection_ids(self) -> Sequence[str]: - # TODO: fetch from geoDB return tuple(self.datastore.get_collection_keys()) def get_vector_cube(self, collection_id: str) -> VectorCube: From d98eafc4c5e39bc496e21f9dbeefb82f4d174c0e Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 30 Apr 2022 00:14:48 +0200 Subject: [PATCH 002/163] continued items endpoint development --- tests/core/mock_datastore.py | 21 ++++++++++++++- tests/server/app/test_data_discovery.py | 19 +++++++++++++ tests/test_config.yml | 2 +- xcube_geodb_openeo/core/datastore.py | 31 ++++++++++++++++++++++ xcube_geodb_openeo/core/geodb_datastore.py | 19 ++----------- 5 files changed, 73 insertions(+), 19 deletions(-) diff --git a/tests/core/mock_datastore.py b/tests/core/mock_datastore.py index 8c2aed6..67ff728 100644 --- a/tests/core/mock_datastore.py +++ b/tests/core/mock_datastore.py @@ -21,6 +21,10 @@ import json from typing import Sequence + +import geopandas +from shapely.geometry import Polygon + from xcube_geodb_openeo.core.datastore import Datastore from xcube_geodb_openeo.core.vectorcube import VectorCube from xcube_geodb_openeo.server.config import Config @@ -33,9 +37,24 @@ def __init__(self, config: Config): with resources.open_text('tests', 'mock_collections.json') as text: mock_collections = json.load(text)['_MOCK_COLLECTIONS_LIST'] self._MOCK_COLLECTIONS = {v["id"]: v for v in mock_collections} + self.config = config def get_collection_keys(self) -> Sequence: return list(self._MOCK_COLLECTIONS.keys()) def get_vector_cube(self, collection_id) -> VectorCube: - return self._MOCK_COLLECTIONS[collection_id] + vector_cube = {} + data = { + 'name': ['hamburg', 'paderborn'], + 'geometry': [Polygon(((9, 52), (9, 54), (11, 54), (11, 52), + (10, 53), (9.8, 53.4), (9.2, 52.1), + (9, 52))), + Polygon(((8.7, 51.3), (8.7, 51.8), (8.8, 51.8), + (8.8, 51.3), (8.7, 51.3))) + ], + 'population': [1700000, 150000] + } + collection = geopandas.GeoDataFrame(data, crs="EPSG:4326") + self.add_collection_to_vector_cube(collection, collection_id, + vector_cube, self.config) + return vector_cube diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index c18db41..8a307b1 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -70,3 +70,22 @@ def test_get_items(self): self.assertIsNotNone(items_data) self.assertEqual('FeatureCollection', items_data['type']) self.assertIsNotNone('', items_data['features']) + self.assertEqual(2, len(items_data['features'])) + self.assertEqual(['9.0000', '52.0000', '11.0000', '54.0000'], + items_data['features'][0]['bbox']) + self.assertEqual(['8.7000', '51.3000', '8.8000', '51.8000'], + items_data['features'][1]['bbox']) + + self.assertEqual('0.1.0', + items_data['features'][0]['stac_version']) + self.assertEqual(['xcube-geodb'], + items_data['features'][0]['stac_extensions']) + self.assertEqual('Feature', + items_data['features'][0]['type']) + + self.assertEqual('0.1.0', + items_data['features'][1]['stac_version']) + self.assertEqual(['xcube-geodb'], + items_data['features'][1]['stac_extensions']) + self.assertEqual('Feature', + items_data['features'][1]['type']) diff --git a/tests/test_config.yml b/tests/test_config.yml index 34d1ed2..5fe5ffd 100644 --- a/tests/test_config.yml +++ b/tests/test_config.yml @@ -1,5 +1,5 @@ api_version: 1.1.0 -stac_version: 0.9.0 +stac_version: 0.1.0 url: http://www.brockmann-consult.de/xcube-geoDB-openEO id: xcube-geodb-openeo title: xcube geoDB Server, openEO API diff --git a/xcube_geodb_openeo/core/datastore.py b/xcube_geodb_openeo/core/datastore.py index 81cd81f..69f7062 100644 --- a/xcube_geodb_openeo/core/datastore.py +++ b/xcube_geodb_openeo/core/datastore.py @@ -20,7 +20,13 @@ # DEALINGS IN THE SOFTWARE. import abc +from typing import Union + +from geopandas import GeoDataFrame +from pandas import DataFrame + from xcube_geodb_openeo.core.vectorcube import VectorCube +from xcube_geodb_openeo.server.config import Config class Datastore(abc.ABC): @@ -32,3 +38,28 @@ def get_collection_keys(self): @abc.abstractmethod def get_vector_cube(self, collection_id) -> VectorCube: pass + + @staticmethod + def add_collection_to_vector_cube( + collection: Union[GeoDataFrame, DataFrame], + collection_id: str, + vector_cube: VectorCube, + config: Config): + bounds = collection.bounds + vector_cube['id'] = collection_id + # geometries = collection.to_wkt().get('geometry') + # print(geometries) + vector_cube['features'] = [] + for i, row in enumerate(collection.iterrows()): + bbox = bounds.iloc[i] + vector_cube['features'].append({ + 'stac_version': config['stac_version'], + 'stac_extensions': ['xcube-geodb'], + 'type': 'Feature', + 'id': collection_id, + 'bbox': [f'{bbox["minx"]:.4f}', + f'{bbox["miny"]:.4f}', + f'{bbox["maxx"]:.4f}', + f'{bbox["maxy"]:.4f}'] + }) + diff --git a/xcube_geodb_openeo/core/geodb_datastore.py b/xcube_geodb_openeo/core/geodb_datastore.py index 62f2db2..f67c273 100644 --- a/xcube_geodb_openeo/core/geodb_datastore.py +++ b/xcube_geodb_openeo/core/geodb_datastore.py @@ -63,23 +63,8 @@ def get_collection_keys(self): def get_vector_cube(self, collection_id) -> VectorCube: vector_cube = self.geodb.get_collection_info(collection_id) - vector_cube['id'] = collection_id collection = self.geodb.get_collection(collection_id) - bounds = collection.bounds - # geometries = collection.to_wkt().get('geometry') - # print(geometries) - vector_cube['features'] = [] - for i, row in enumerate(collection.iterrows()): - bbox = bounds.iloc[i] - vector_cube['features'].append({ - 'stac_version': self.config['stac_version'], - 'stac_extensions': ['xcube-geodb'], - 'type': 'Feature', - 'id': collection_id, - 'bbox': [f'{bbox["minx"]:.4f}', - f'{bbox["miny"]:.4f}', - f'{bbox["maxx"]:.4f}', - f'{bbox["maxy"]:.4f}'] - }) + self.add_collection_to_vector_cube(collection, collection_id, + vector_cube, self.config) return vector_cube From 122e163e0dfe08a8c714868112b6b441d79fb99d Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 10 May 2022 21:53:46 +0200 Subject: [PATCH 003/163] adapting to changes in branch thomas_xxx_metainfo_endpoints --- tests/server/app/test_data_discovery.py | 6 +++--- tests/test_config.yml | 6 +++--- xcube_geodb_openeo/core/datastore.py | 2 +- xcube_geodb_openeo/server/context.py | 3 ++- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index 315bc6a..1a42b34 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -40,21 +40,21 @@ def test_get_items(self): items_data = json.loads(response.data) self.assertIsNotNone(items_data) self.assertEqual('FeatureCollection', items_data['type'], msg) - self.assertIsNotNone('', items_data['features'], msg) + self.assertIsNotNone(items_data['features'], msg) self.assertEqual(2, len(items_data['features']), msg) self.assertEqual(['9.0000', '52.0000', '11.0000', '54.0000'], items_data['features'][0]['bbox'], msg) self.assertEqual(['8.7000', '51.3000', '8.8000', '51.8000'], items_data['features'][1]['bbox'], msg) - self.assertEqual('0.1.0', + self.assertEqual('2.3.4', items_data['features'][0]['stac_version'], msg) self.assertEqual(['xcube-geodb'], items_data['features'][0]['stac_extensions'], msg) self.assertEqual('Feature', items_data['features'][0]['type'], msg) - self.assertEqual('0.1.0', + self.assertEqual('2.3.4', items_data['features'][1]['stac_version']) self.assertEqual(['xcube-geodb'], items_data['features'][1]['stac_extensions']) diff --git a/tests/test_config.yml b/tests/test_config.yml index 5640509..81aba9c 100644 --- a/tests/test_config.yml +++ b/tests/test_config.yml @@ -1,6 +1,6 @@ -API_VERSION: 1.1.0 -STAC_VERSION: 0.1.0 -SERVER_URL: http://www.brockmann-consult.de/xcube-geoDB-openEO +API_VERSION: 0.1.2 +STAC_VERSION: 2.3.4 +SERVER_URL: http://xcube-geoDB-openEO.de SERVER_ID: xcube-geodb-openeo SERVER_TITLE: xcube geoDB Server, openEO API SERVER_DESCRIPTION: Catalog of geoDB collections. diff --git a/xcube_geodb_openeo/core/datastore.py b/xcube_geodb_openeo/core/datastore.py index 387c528..e6ffd18 100644 --- a/xcube_geodb_openeo/core/datastore.py +++ b/xcube_geodb_openeo/core/datastore.py @@ -52,7 +52,7 @@ def add_collection_to_vector_cube( for i, row in enumerate(collection.iterrows()): bbox = bounds.iloc[i] vector_cube['features'].append({ - 'stac_version': config['stac_version'], + 'stac_version': config['STAC_VERSION'], 'stac_extensions': ['xcube-geodb'], 'type': 'Feature', 'id': collection_id, diff --git a/xcube_geodb_openeo/server/context.py b/xcube_geodb_openeo/server/context.py index bf50f07..2bb9d74 100644 --- a/xcube_geodb_openeo/server/context.py +++ b/xcube_geodb_openeo/server/context.py @@ -23,6 +23,7 @@ import abc import importlib import logging +from functools import cached_property from typing import Sequence from ..core.vectorcube import VectorCube @@ -79,7 +80,7 @@ def data_store(self) -> DataStore: class_name = data_store_class[data_store_class.rindex('.') + 1:] module = importlib.import_module(data_store_module) cls = getattr(module, class_name) - return cls() + return cls(self.config) @property def collection_ids(self) -> Sequence[str]: From d2395c0ce83bf6a6d89dfc3dcdecfe0f623c6334 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 10 May 2022 22:21:09 +0200 Subject: [PATCH 004/163] attempt to fix workflow - using random port assigned by the OS --- tests/server/app/base_test.py | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/tests/server/app/base_test.py b/tests/server/app/base_test.py index 1cbc984..3316de3 100644 --- a/tests/server/app/base_test.py +++ b/tests/server/app/base_test.py @@ -31,6 +31,17 @@ import yaml +import socket +from contextlib import closing + + +# taken from https://stackoverflow.com/a/45690594 +def find_free_port(): + with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as s: + s.bind(('localhost', 0)) + s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + return s.getsockname()[1] + class BaseTest(unittest.TestCase): servers = None @@ -41,17 +52,19 @@ class BaseTest(unittest.TestCase): def setUpClass(cls) -> None: data = pkgutil.get_data('tests', 'test_config.yml') config = yaml.safe_load(data) - cls.servers = {'flask': f'http://127.0.0.1:{cli.DEFAULT_PORT + 1}'} + flask_port = find_free_port() + cls.servers = {'flask': f'http://127.0.0.1:{flask_port}'} cls.flask = multiprocessing.Process( target=flask_server.serve, - args=(config, '127.0.0.1', cli.DEFAULT_PORT + 1, False, False) + args=(config, '127.0.0.1', flask_port, False, False) ) cls.flask.start() - cls.servers['tornado'] = f'http://127.0.0.1:{cli.DEFAULT_PORT + 2}' + tornado_port = find_free_port() + cls.servers['tornado'] = f'http://127.0.0.1:{tornado_port}' cls.tornado = multiprocessing.Process( target=tornado_server.serve, - args=(config, '127.0.0.1', cli.DEFAULT_PORT + 2, False, False) + args=(config, '127.0.0.1', tornado_port, False, False) ) cls.tornado.start() From b38651c603a19d677ee0ac257b893a04effd6dcd Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 10 May 2022 22:29:20 +0200 Subject: [PATCH 005/163] attempt to fix workflow - print debug info --- .github/workflows/workflow.yaml | 2 +- tests/server/app/base_test.py | 1 - tests/server/app/test_data_discovery.py | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index aee20d0..684a659 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -49,4 +49,4 @@ jobs: if: ${{ env.SKIP_UNITTESTS == '0' }} with: fail_ci_if_error: true - verbose: true \ No newline at end of file + verbose: false \ No newline at end of file diff --git a/tests/server/app/base_test.py b/tests/server/app/base_test.py index 3316de3..48cdf0a 100644 --- a/tests/server/app/base_test.py +++ b/tests/server/app/base_test.py @@ -23,7 +23,6 @@ import xcube_geodb_openeo.server.app.flask as flask_server import xcube_geodb_openeo.server.app.tornado as tornado_server -import xcube_geodb_openeo.server.cli as cli import urllib3 import multiprocessing diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index 1a42b34..943f1c5 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -23,6 +23,7 @@ def test_collection(self): for server_name in self.servers: base_url = self.servers[server_name] url = f'{base_url}{api.API_URL_PREFIX}/collections/collection_1' + print('test_collection: ' + url) msg = f'in server {server_name} running on {url}' response = self.http.request('GET', url) self.assertEqual(200, response.status, msg) @@ -34,6 +35,7 @@ def test_get_items(self): base_url = self.servers[server_name] url = f'{base_url}' \ f'{api.API_URL_PREFIX}/collections/collection_1/items' + print('test_get_items: ' + url) msg = f'in server {server_name} running on {url}' response = self.http.request('GET', url) self.assertEqual(200, response.status, msg) From 74f4afbb716e303ac60c80973c51ad0b4b1f36c4 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 10 May 2022 22:38:50 +0200 Subject: [PATCH 006/163] attempt to fix workflow - using localhost instead of ip address --- tests/server/app/base_test.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/server/app/base_test.py b/tests/server/app/base_test.py index 48cdf0a..4081cfe 100644 --- a/tests/server/app/base_test.py +++ b/tests/server/app/base_test.py @@ -52,18 +52,18 @@ def setUpClass(cls) -> None: data = pkgutil.get_data('tests', 'test_config.yml') config = yaml.safe_load(data) flask_port = find_free_port() - cls.servers = {'flask': f'http://127.0.0.1:{flask_port}'} + cls.servers = {'flask': f'http://localhost:{flask_port}'} cls.flask = multiprocessing.Process( target=flask_server.serve, - args=(config, '127.0.0.1', flask_port, False, False) + args=(config, 'localhost', flask_port, False, False) ) cls.flask.start() tornado_port = find_free_port() - cls.servers['tornado'] = f'http://127.0.0.1:{tornado_port}' + cls.servers['tornado'] = f'http://localhost:{tornado_port}' cls.tornado = multiprocessing.Process( target=tornado_server.serve, - args=(config, '127.0.0.1', tornado_port, False, False) + args=(config, 'localhost', tornado_port, False, False) ) cls.tornado.start() From e454dd397544ccebb80fdbdd23cd917357a1eb3d Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 10 May 2022 22:46:06 +0200 Subject: [PATCH 007/163] attempt to fix workflow - commenting out the failing tests --- tests/server/app/test_capabilities.py | 22 +++++++++++----------- tests/server/app/test_data_discovery.py | 20 ++++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/tests/server/app/test_capabilities.py b/tests/server/app/test_capabilities.py index 923ccec..47cafa0 100644 --- a/tests/server/app/test_capabilities.py +++ b/tests/server/app/test_capabilities.py @@ -48,14 +48,14 @@ def test_well_known_info(self): well_known_data['versions'][0]['api_version'], msg) - def test_conformance(self): - for server_name in self.servers: - url = self.servers[server_name] - msg = f'in server {server_name} running on {url}' - - response = self.http.request( - 'GET', f'{url}{api.API_URL_PREFIX}/conformance' - ) - self.assertEqual(200, response.status, msg) - conformance_data = json.loads(response.data) - self.assertIsNotNone(conformance_data['conformsTo'], msg) + # def test_conformance(self): + # for server_name in self.servers: + # url = self.servers[server_name] + # msg = f'in server {server_name} running on {url}' + # + # response = self.http.request( + # 'GET', f'{url}{api.API_URL_PREFIX}/conformance' + # ) + # self.assertEqual(200, response.status, msg) + # conformance_data = json.loads(response.data) + # self.assertIsNotNone(conformance_data['conformsTo'], msg) diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index 943f1c5..045787f 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -19,16 +19,16 @@ def test_collections(self): self.assertIsNotNone(collections_data['collections'], msg) self.assertIsNotNone(collections_data['links'], msg) - def test_collection(self): - for server_name in self.servers: - base_url = self.servers[server_name] - url = f'{base_url}{api.API_URL_PREFIX}/collections/collection_1' - print('test_collection: ' + url) - msg = f'in server {server_name} running on {url}' - response = self.http.request('GET', url) - self.assertEqual(200, response.status, msg) - collection_data = json.loads(response.data) - self.assertIsNotNone(collection_data, msg) + # def test_collection(self): + # for server_name in self.servers: + # base_url = self.servers[server_name] + # url = f'{base_url}{api.API_URL_PREFIX}/collections/collection_1' + # print('test_collection: ' + url) + # msg = f'in server {server_name} running on {url}' + # response = self.http.request('GET', url) + # self.assertEqual(200, response.status, msg) + # collection_data = json.loads(response.data) + # self.assertIsNotNone(collection_data, msg) def test_get_items(self): for server_name in self.servers: From f7b39d502dcd8899104b2f8ced32099c7431fe40 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 10 May 2022 23:09:59 +0200 Subject: [PATCH 008/163] attempt to fix workflow - commenting in again the failing tests --- .github/workflows/workflow.yaml | 2 +- tests/server/app/base_test.py | 4 ++-- tests/server/app/test_capabilities.py | 22 +++++++++++----------- tests/server/app/test_data_discovery.py | 20 ++++++++++---------- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 684a659..8efc4a2 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -44,7 +44,7 @@ jobs: - name: unittest-xcube-geodb-openeo if: ${{ env.SKIP_UNITTESTS == '0' }} run: | - pytest --cov=./ --cov-report=xml + pytest --cov=./ --cov-report=xml --tb=native - uses: codecov/codecov-action@v2 if: ${{ env.SKIP_UNITTESTS == '0' }} with: diff --git a/tests/server/app/base_test.py b/tests/server/app/base_test.py index 4081cfe..37452ee 100644 --- a/tests/server/app/base_test.py +++ b/tests/server/app/base_test.py @@ -55,7 +55,7 @@ def setUpClass(cls) -> None: cls.servers = {'flask': f'http://localhost:{flask_port}'} cls.flask = multiprocessing.Process( target=flask_server.serve, - args=(config, 'localhost', flask_port, False, False) + args=(config, '', flask_port, False, False) ) cls.flask.start() @@ -63,7 +63,7 @@ def setUpClass(cls) -> None: cls.servers['tornado'] = f'http://localhost:{tornado_port}' cls.tornado = multiprocessing.Process( target=tornado_server.serve, - args=(config, 'localhost', tornado_port, False, False) + args=(config, '', tornado_port, False, False) ) cls.tornado.start() diff --git a/tests/server/app/test_capabilities.py b/tests/server/app/test_capabilities.py index 47cafa0..923ccec 100644 --- a/tests/server/app/test_capabilities.py +++ b/tests/server/app/test_capabilities.py @@ -48,14 +48,14 @@ def test_well_known_info(self): well_known_data['versions'][0]['api_version'], msg) - # def test_conformance(self): - # for server_name in self.servers: - # url = self.servers[server_name] - # msg = f'in server {server_name} running on {url}' - # - # response = self.http.request( - # 'GET', f'{url}{api.API_URL_PREFIX}/conformance' - # ) - # self.assertEqual(200, response.status, msg) - # conformance_data = json.loads(response.data) - # self.assertIsNotNone(conformance_data['conformsTo'], msg) + def test_conformance(self): + for server_name in self.servers: + url = self.servers[server_name] + msg = f'in server {server_name} running on {url}' + + response = self.http.request( + 'GET', f'{url}{api.API_URL_PREFIX}/conformance' + ) + self.assertEqual(200, response.status, msg) + conformance_data = json.loads(response.data) + self.assertIsNotNone(conformance_data['conformsTo'], msg) diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index 045787f..943f1c5 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -19,16 +19,16 @@ def test_collections(self): self.assertIsNotNone(collections_data['collections'], msg) self.assertIsNotNone(collections_data['links'], msg) - # def test_collection(self): - # for server_name in self.servers: - # base_url = self.servers[server_name] - # url = f'{base_url}{api.API_URL_PREFIX}/collections/collection_1' - # print('test_collection: ' + url) - # msg = f'in server {server_name} running on {url}' - # response = self.http.request('GET', url) - # self.assertEqual(200, response.status, msg) - # collection_data = json.loads(response.data) - # self.assertIsNotNone(collection_data, msg) + def test_collection(self): + for server_name in self.servers: + base_url = self.servers[server_name] + url = f'{base_url}{api.API_URL_PREFIX}/collections/collection_1' + print('test_collection: ' + url) + msg = f'in server {server_name} running on {url}' + response = self.http.request('GET', url) + self.assertEqual(200, response.status, msg) + collection_data = json.loads(response.data) + self.assertIsNotNone(collection_data, msg) def test_get_items(self): for server_name in self.servers: From 3cdfae86ffa3224081e9d3f5c7936334a6797850 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 10 May 2022 23:13:06 +0200 Subject: [PATCH 009/163] attempt to fix workflow... --- tests/server/app/base_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/server/app/base_test.py b/tests/server/app/base_test.py index 37452ee..4081cfe 100644 --- a/tests/server/app/base_test.py +++ b/tests/server/app/base_test.py @@ -55,7 +55,7 @@ def setUpClass(cls) -> None: cls.servers = {'flask': f'http://localhost:{flask_port}'} cls.flask = multiprocessing.Process( target=flask_server.serve, - args=(config, '', flask_port, False, False) + args=(config, 'localhost', flask_port, False, False) ) cls.flask.start() @@ -63,7 +63,7 @@ def setUpClass(cls) -> None: cls.servers['tornado'] = f'http://localhost:{tornado_port}' cls.tornado = multiprocessing.Process( target=tornado_server.serve, - args=(config, '', tornado_port, False, False) + args=(config, 'localhost', tornado_port, False, False) ) cls.tornado.start() From 96b61ec8a0ed24a1dffff6959f46ecc653839e87 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 10 May 2022 23:19:16 +0200 Subject: [PATCH 010/163] attempt to fix workflow - use only tornado, not flask --- tests/server/app/base_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/server/app/base_test.py b/tests/server/app/base_test.py index 4081cfe..de25e56 100644 --- a/tests/server/app/base_test.py +++ b/tests/server/app/base_test.py @@ -52,20 +52,20 @@ def setUpClass(cls) -> None: data = pkgutil.get_data('tests', 'test_config.yml') config = yaml.safe_load(data) flask_port = find_free_port() - cls.servers = {'flask': f'http://localhost:{flask_port}'} cls.flask = multiprocessing.Process( target=flask_server.serve, args=(config, 'localhost', flask_port, False, False) ) cls.flask.start() + # cls.servers = {'flask': f'http://localhost:{flask_port}'} tornado_port = find_free_port() - cls.servers['tornado'] = f'http://localhost:{tornado_port}' cls.tornado = multiprocessing.Process( target=tornado_server.serve, args=(config, 'localhost', tornado_port, False, False) ) cls.tornado.start() + cls.servers['tornado'] = f'http://localhost:{tornado_port}' cls.http = urllib3.PoolManager() From 19e7b169f8d65007e8f96374e7ec7aa6eb4fddaf Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 10 May 2022 23:22:42 +0200 Subject: [PATCH 011/163] attempt to fix workflow... --- tests/server/app/base_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/server/app/base_test.py b/tests/server/app/base_test.py index de25e56..ead9221 100644 --- a/tests/server/app/base_test.py +++ b/tests/server/app/base_test.py @@ -58,6 +58,7 @@ def setUpClass(cls) -> None: ) cls.flask.start() # cls.servers = {'flask': f'http://localhost:{flask_port}'} + cls.servers = {} tornado_port = find_free_port() cls.tornado = multiprocessing.Process( From 3543047b7e9221fedb7d78c5743e710ea60ae6f4 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 10 May 2022 23:28:08 +0200 Subject: [PATCH 012/163] attempt to fix workflow - wait until servers are up and running --- tests/server/app/base_test.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/server/app/base_test.py b/tests/server/app/base_test.py index ead9221..c1ef869 100644 --- a/tests/server/app/base_test.py +++ b/tests/server/app/base_test.py @@ -29,6 +29,7 @@ import pkgutil import yaml +import time import socket from contextlib import closing @@ -57,8 +58,8 @@ def setUpClass(cls) -> None: args=(config, 'localhost', flask_port, False, False) ) cls.flask.start() - # cls.servers = {'flask': f'http://localhost:{flask_port}'} - cls.servers = {} + cls.servers = {'flask': f'http://localhost:{flask_port}'} + time.sleep(10) tornado_port = find_free_port() cls.tornado = multiprocessing.Process( @@ -70,6 +71,8 @@ def setUpClass(cls) -> None: cls.http = urllib3.PoolManager() + time.sleep(10) + @classmethod def tearDownClass(cls) -> None: cls.flask.terminate() From 55c7518dcca674258a958b22cde6b3e81f79f95a Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 10 May 2022 23:38:40 +0200 Subject: [PATCH 013/163] attempt to fix workflow - wait until servers are up and running, added env var --- .github/workflows/workflow.yaml | 1 + tests/server/app/base_test.py | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 8efc4a2..071befc 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -11,6 +11,7 @@ env: ORG_NAME: bcdev SKIP_UNITTESTS: "0" + WAIT_FOR_STARTUP: "1" jobs: diff --git a/tests/server/app/base_test.py b/tests/server/app/base_test.py index c1ef869..069400b 100644 --- a/tests/server/app/base_test.py +++ b/tests/server/app/base_test.py @@ -27,9 +27,9 @@ import urllib3 import multiprocessing import pkgutil - import yaml import time +import os import socket from contextlib import closing @@ -50,6 +50,9 @@ class BaseTest(unittest.TestCase): @classmethod def setUpClass(cls) -> None: + wait_for_server_startup = os.environ.get('WAIT_FOR_STARTUP', + '0') == '1' + data = pkgutil.get_data('tests', 'test_config.yml') config = yaml.safe_load(data) flask_port = find_free_port() @@ -59,7 +62,8 @@ def setUpClass(cls) -> None: ) cls.flask.start() cls.servers = {'flask': f'http://localhost:{flask_port}'} - time.sleep(10) + if wait_for_server_startup: + time.sleep(10) tornado_port = find_free_port() cls.tornado = multiprocessing.Process( @@ -71,7 +75,8 @@ def setUpClass(cls) -> None: cls.http = urllib3.PoolManager() - time.sleep(10) + if wait_for_server_startup: + time.sleep(10) @classmethod def tearDownClass(cls) -> None: From d4b02d496718734f345af92a6696fd4856e69035 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 11 May 2022 00:04:39 +0200 Subject: [PATCH 014/163] minor fixes --- config.yml | 1 - config.yml.example | 10 ++-------- xcube_geodb_openeo/core/geodb_datastore.py | 4 ++-- 3 files changed, 4 insertions(+), 11 deletions(-) delete mode 100644 config.yml diff --git a/config.yml b/config.yml deleted file mode 100644 index 27a6cd1..0000000 --- a/config.yml +++ /dev/null @@ -1 +0,0 @@ -datastore-class: xcube_geodb_openeo.core.GeoDBDataStore \ No newline at end of file diff --git a/config.yml.example b/config.yml.example index 32808d2..745814e 100644 --- a/config.yml.example +++ b/config.yml.example @@ -1,14 +1,8 @@ # adapt to your needs and save as config.yml -api_version: 1.1.0 -stac_version: 0.9.0 -url: http://www.brockmann-consult.de/xcube-geoDB-openEO -id: xcube-geodb-openeo -title: xcube geoDB Server, openEO API -description: Catalog of geoDB collections. datastore-class: xcube_geodb_openeo.core.geodb_datastore.GeoDBDataStore -server_url: -server_port: +postgrest_url: +postgrest_port: client_id: client_secret: auth_domain: \ No newline at end of file diff --git a/xcube_geodb_openeo/core/geodb_datastore.py b/xcube_geodb_openeo/core/geodb_datastore.py index 163afa2..235afea 100644 --- a/xcube_geodb_openeo/core/geodb_datastore.py +++ b/xcube_geodb_openeo/core/geodb_datastore.py @@ -37,8 +37,8 @@ def __init__(self, config: Config): def geodb(self): assert self.config - server_url = self.config['server_url'] - server_port = self.config['server_port'] + server_url = self.config['postgrest_url'] + server_port = self.config['postgrest_port'] client_id = self.config['client_id'] client_secret = self.config['client_secret'] auth_domain = self.config['auth_domain'] From 5471e3449c386f6c578f3cff2285610f429febb7 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 11 May 2022 01:00:34 +0200 Subject: [PATCH 015/163] finished first version of endpoint collections//items --- tests/core/mock_datastore.py | 1 + tests/server/app/test_data_discovery.py | 34 ++++++++++++++++++++----- xcube_geodb_openeo/core/datastore.py | 26 ++++++++++++++----- 3 files changed, 49 insertions(+), 12 deletions(-) diff --git a/tests/core/mock_datastore.py b/tests/core/mock_datastore.py index 271dc39..fcb9896 100644 --- a/tests/core/mock_datastore.py +++ b/tests/core/mock_datastore.py @@ -45,6 +45,7 @@ def get_collection_keys(self) -> Sequence: def get_vector_cube(self, collection_id) -> VectorCube: vector_cube = {} data = { + 'id': ['0', '1'], 'name': ['hamburg', 'paderborn'], 'geometry': [Polygon(((9, 52), (9, 54), (11, 54), (11, 52), (10, 53), (9.8, 53.4), (9.2, 52.1), diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index 943f1c5..1370be5 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -23,7 +23,6 @@ def test_collection(self): for server_name in self.servers: base_url = self.servers[server_name] url = f'{base_url}{api.API_URL_PREFIX}/collections/collection_1' - print('test_collection: ' + url) msg = f'in server {server_name} running on {url}' response = self.http.request('GET', url) self.assertEqual(200, response.status, msg) @@ -35,7 +34,6 @@ def test_get_items(self): base_url = self.servers[server_name] url = f'{base_url}' \ f'{api.API_URL_PREFIX}/collections/collection_1/items' - print('test_get_items: ' + url) msg = f'in server {server_name} running on {url}' response = self.http.request('GET', url) self.assertEqual(200, response.status, msg) @@ -44,10 +42,6 @@ def test_get_items(self): self.assertEqual('FeatureCollection', items_data['type'], msg) self.assertIsNotNone(items_data['features'], msg) self.assertEqual(2, len(items_data['features']), msg) - self.assertEqual(['9.0000', '52.0000', '11.0000', '54.0000'], - items_data['features'][0]['bbox'], msg) - self.assertEqual(['8.7000', '51.3000', '8.8000', '51.8000'], - items_data['features'][1]['bbox'], msg) self.assertEqual('2.3.4', items_data['features'][0]['stac_version'], msg) @@ -55,6 +49,21 @@ def test_get_items(self): items_data['features'][0]['stac_extensions'], msg) self.assertEqual('Feature', items_data['features'][0]['type'], msg) + self.assertEqual('0', + items_data['features'][0]['id'], msg) + self.assertEqual(['9.0000', '52.0000', '11.0000', '54.0000'], + items_data['features'][0]['bbox'], msg) + self.assertEqual({'type': 'Polygon', 'coordinates': [[[9, 52], + [9, 54], + [11, 54], + [11, 52], + [10, 53], + [9.8, 53.4], + [9.2, 52.1], + [9, 52]]]}, + items_data['features'][0]['geometry'], msg) + self.assertEqual({'name': 'hamburg', 'population': 1700000}, + items_data['features'][0]['properties'], msg) self.assertEqual('2.3.4', items_data['features'][1]['stac_version']) @@ -62,3 +71,16 @@ def test_get_items(self): items_data['features'][1]['stac_extensions']) self.assertEqual('Feature', items_data['features'][1]['type']) + self.assertEqual('1', + items_data['features'][1]['id'], msg) + self.assertEqual(['8.7000', '51.3000', '8.8000', '51.8000'], + items_data['features'][1]['bbox'], msg) + self.assertEqual({'type': 'Polygon', 'coordinates': [[[8.7, 51.3], + [8.7, 51.8], + [8.8, 51.8], + [8.8, 51.3], + [8.7, 51.3] + ]]}, + items_data['features'][1]['geometry'], msg) + self.assertEqual({'name': 'paderborn', 'population': 150000}, + items_data['features'][1]['properties'], msg) diff --git a/xcube_geodb_openeo/core/datastore.py b/xcube_geodb_openeo/core/datastore.py index e6ffd18..7237c8b 100644 --- a/xcube_geodb_openeo/core/datastore.py +++ b/xcube_geodb_openeo/core/datastore.py @@ -20,13 +20,23 @@ # DEALINGS IN THE SOFTWARE. import abc -from typing import Union +from typing import Union, Dict from .vectorcube import VectorCube from ..server.config import Config from geopandas import GeoDataFrame from pandas import DataFrame +import shapely.wkt +import shapely.geometry + + +def get_coords(feature: Dict) -> Dict: + geometry = feature['geometry'] + feature_wkt = shapely.wkt.loads(geometry.wkt) + coords = shapely.geometry.mapping(feature_wkt) + return coords + class DataStore(abc.ABC): @@ -46,19 +56,23 @@ def add_collection_to_vector_cube( config: Config): bounds = collection.bounds vector_cube['id'] = collection_id - # geometries = collection.to_wkt().get('geometry') - # print(geometries) vector_cube['features'] = [] for i, row in enumerate(collection.iterrows()): bbox = bounds.iloc[i] + feature = row[1] + coords = get_coords(feature) + properties = {key: feature[key] for key in feature.keys() if key + not in ['id', 'geometry']} + vector_cube['features'].append({ 'stac_version': config['STAC_VERSION'], 'stac_extensions': ['xcube-geodb'], 'type': 'Feature', - 'id': collection_id, + 'id': feature['id'], 'bbox': [f'{bbox["minx"]:.4f}', f'{bbox["miny"]:.4f}', f'{bbox["maxx"]:.4f}', - f'{bbox["maxy"]:.4f}'] + f'{bbox["maxy"]:.4f}'], + 'geometry': coords, + 'properties': properties }) - From 67623d6c841a49f0959495e74a831a98eb44e027 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 11 May 2022 11:28:53 +0200 Subject: [PATCH 016/163] implemented endpoint collections//items/ --- tests/server/app/test_data_discovery.py | 28 +++++++++++++++++++++++- xcube_geodb_openeo/backend/catalog.py | 5 ++--- xcube_geodb_openeo/core/datastore.py | 1 + xcube_geodb_openeo/server/app/flask.py | 2 +- xcube_geodb_openeo/server/app/tornado.py | 2 +- 5 files changed, 32 insertions(+), 6 deletions(-) diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index 1370be5..11c5e89 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -38,7 +38,7 @@ def test_get_items(self): response = self.http.request('GET', url) self.assertEqual(200, response.status, msg) items_data = json.loads(response.data) - self.assertIsNotNone(items_data) + self.assertIsNotNone(items_data, msg) self.assertEqual('FeatureCollection', items_data['type'], msg) self.assertIsNotNone(items_data['features'], msg) self.assertEqual(2, len(items_data['features']), msg) @@ -84,3 +84,29 @@ def test_get_items(self): items_data['features'][1]['geometry'], msg) self.assertEqual({'name': 'paderborn', 'population': 150000}, items_data['features'][1]['properties'], msg) + + def test_get_item(self): + for server_name in self.servers: + base_url = self.servers[server_name] + url = f'{base_url}' \ + f'{api.API_URL_PREFIX}/collections/collection_1/items/1' + msg = f'in server {server_name} running on {url}' + response = self.http.request('GET', url) + self.assertEqual(200, response.status, msg) + item_data = json.loads(response.data) + self.assertIsNotNone(item_data, msg) + self.assertEqual('2.3.4', item_data['stac_version']) + self.assertEqual(['xcube-geodb'], item_data['stac_extensions']) + self.assertEqual('Feature', item_data['type']) + self.assertEqual('1', item_data['id'], msg) + self.assertEqual(['8.7000', '51.3000', '8.8000', '51.8000'], + item_data['bbox'], msg) + self.assertEqual({'type': 'Polygon', 'coordinates': [[[8.7, 51.3], + [8.7, 51.8], + [8.8, 51.8], + [8.8, 51.3], + [8.7, 51.3] + ]]}, + item_data['geometry'], msg) + self.assertEqual({'name': 'paderborn', 'population': 150000}, + item_data['properties'], msg) \ No newline at end of file diff --git a/xcube_geodb_openeo/backend/catalog.py b/xcube_geodb_openeo/backend/catalog.py index 3f1957b..cb634ba 100644 --- a/xcube_geodb_openeo/backend/catalog.py +++ b/xcube_geodb_openeo/backend/catalog.py @@ -75,7 +75,7 @@ def get_collection_item(ctx: RequestContext, feature_id: str): vector_cube = _get_vector_cube(ctx, collection_id) for feature in vector_cube.get("features", []): - if feature.get("id") == feature_id: + if str(feature.get("id")) == feature_id: return _get_vector_cube_item(ctx, vector_cube, feature, @@ -150,8 +150,7 @@ def _get_vector_cube_item(ctx: RequestContext, "links": [ { "rel": "self", - 'href': ctx.get_url(f'catalog/' - f'collections/{collection_id}/' + 'href': ctx.get_url(f'collections/{collection_id}/' f'items/{feature_id}') } ], diff --git a/xcube_geodb_openeo/core/datastore.py b/xcube_geodb_openeo/core/datastore.py index 7237c8b..4424941 100644 --- a/xcube_geodb_openeo/core/datastore.py +++ b/xcube_geodb_openeo/core/datastore.py @@ -61,6 +61,7 @@ def add_collection_to_vector_cube( bbox = bounds.iloc[i] feature = row[1] coords = get_coords(feature) + # todo - unsure if this is correct properties = {key: feature[key] for key in feature.keys() if key not in ['id', 'geometry']} diff --git a/xcube_geodb_openeo/server/app/flask.py b/xcube_geodb_openeo/server/app/flask.py index 95da1c3..a2c8f50 100644 --- a/xcube_geodb_openeo/server/app/flask.py +++ b/xcube_geodb_openeo/server/app/flask.py @@ -83,7 +83,7 @@ def get_catalog_collection_items(collection_id: str): ) -@api.route('/catalog/collections//' +@api.route('/collections//' 'items/') def get_catalog_collection_item(collection_id: str, feature_id: str): return catalog.get_collection_item(ctx.for_request(flask.request.root_url), diff --git a/xcube_geodb_openeo/server/app/tornado.py b/xcube_geodb_openeo/server/app/tornado.py index 1cd0ef9..2fe88d3 100644 --- a/xcube_geodb_openeo/server/app/tornado.py +++ b/xcube_geodb_openeo/server/app/tornado.py @@ -221,7 +221,7 @@ async def get(self, collection_id: str): # noinspection PyAbstractClass,PyMethodMayBeStatic -@app.route("/catalog/collections/{collection_id}/items/{feature_id}") +@app.route("/collections/{collection_id}/items/{feature_id}") class CatalogCollectionItemHandler(BaseHandler): async def get(self, collection_id: str, feature_id: str): return await self.finish(catalog.get_collection_item( From 63a561edc5c753bc19c90048e48f12e36b4ac93c Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 11 May 2022 15:34:56 +0200 Subject: [PATCH 017/163] starting to implement paging for endpoint collections//items --- tests/core/mock_datastore.py | 4 +- tests/server/app/test_data_discovery.py | 124 +++++++++++---------- xcube_geodb_openeo/backend/catalog.py | 46 ++++++-- xcube_geodb_openeo/core/datastore.py | 3 +- xcube_geodb_openeo/core/geodb_datastore.py | 6 +- xcube_geodb_openeo/server/app/flask.py | 8 +- xcube_geodb_openeo/server/app/tornado.py | 6 +- xcube_geodb_openeo/server/context.py | 13 ++- 8 files changed, 131 insertions(+), 79 deletions(-) diff --git a/tests/core/mock_datastore.py b/tests/core/mock_datastore.py index fcb9896..cecae1d 100644 --- a/tests/core/mock_datastore.py +++ b/tests/core/mock_datastore.py @@ -42,7 +42,8 @@ def __init__(self, config: Config): def get_collection_keys(self) -> Sequence: return list(self._MOCK_COLLECTIONS.keys()) - def get_vector_cube(self, collection_id) -> VectorCube: + def get_vector_cube(self, collection_id: str, limit: int, offset: int) \ + -> VectorCube: vector_cube = {} data = { 'id': ['0', '1'], @@ -56,6 +57,7 @@ def get_vector_cube(self, collection_id) -> VectorCube: 'population': [1700000, 150000] } collection = geopandas.GeoDataFrame(data, crs="EPSG:4326") + collection = collection[offset:offset + limit] self.add_collection_to_vector_cube(collection, collection_id, vector_cube, self.config) return vector_cube diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index 11c5e89..210deb4 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -43,47 +43,8 @@ def test_get_items(self): self.assertIsNotNone(items_data['features'], msg) self.assertEqual(2, len(items_data['features']), msg) - self.assertEqual('2.3.4', - items_data['features'][0]['stac_version'], msg) - self.assertEqual(['xcube-geodb'], - items_data['features'][0]['stac_extensions'], msg) - self.assertEqual('Feature', - items_data['features'][0]['type'], msg) - self.assertEqual('0', - items_data['features'][0]['id'], msg) - self.assertEqual(['9.0000', '52.0000', '11.0000', '54.0000'], - items_data['features'][0]['bbox'], msg) - self.assertEqual({'type': 'Polygon', 'coordinates': [[[9, 52], - [9, 54], - [11, 54], - [11, 52], - [10, 53], - [9.8, 53.4], - [9.2, 52.1], - [9, 52]]]}, - items_data['features'][0]['geometry'], msg) - self.assertEqual({'name': 'hamburg', 'population': 1700000}, - items_data['features'][0]['properties'], msg) - - self.assertEqual('2.3.4', - items_data['features'][1]['stac_version']) - self.assertEqual(['xcube-geodb'], - items_data['features'][1]['stac_extensions']) - self.assertEqual('Feature', - items_data['features'][1]['type']) - self.assertEqual('1', - items_data['features'][1]['id'], msg) - self.assertEqual(['8.7000', '51.3000', '8.8000', '51.8000'], - items_data['features'][1]['bbox'], msg) - self.assertEqual({'type': 'Polygon', 'coordinates': [[[8.7, 51.3], - [8.7, 51.8], - [8.8, 51.8], - [8.8, 51.3], - [8.7, 51.3] - ]]}, - items_data['features'][1]['geometry'], msg) - self.assertEqual({'name': 'paderborn', 'population': 150000}, - items_data['features'][1]['properties'], msg) + self._assert_hamburg(items_data['features'][0], msg) + self._assert_paderborn(items_data['features'][1], msg) def test_get_item(self): for server_name in self.servers: @@ -94,19 +55,68 @@ def test_get_item(self): response = self.http.request('GET', url) self.assertEqual(200, response.status, msg) item_data = json.loads(response.data) - self.assertIsNotNone(item_data, msg) - self.assertEqual('2.3.4', item_data['stac_version']) - self.assertEqual(['xcube-geodb'], item_data['stac_extensions']) - self.assertEqual('Feature', item_data['type']) - self.assertEqual('1', item_data['id'], msg) - self.assertEqual(['8.7000', '51.3000', '8.8000', '51.8000'], - item_data['bbox'], msg) - self.assertEqual({'type': 'Polygon', 'coordinates': [[[8.7, 51.3], - [8.7, 51.8], - [8.8, 51.8], - [8.8, 51.3], - [8.7, 51.3] - ]]}, - item_data['geometry'], msg) - self.assertEqual({'name': 'paderborn', 'population': 150000}, - item_data['properties'], msg) \ No newline at end of file + self._assert_paderborn(item_data, msg) + + def test_get_items_filtered(self): + for server_name in self.servers: + base_url = self.servers[server_name] + url = f'{base_url}' \ + f'{api.API_URL_PREFIX}/collections/collection_1/items' \ + f'?limit=1&offset=1' + msg = f'in server {server_name} running on {url}' + response = self.http.request('GET', url) + self.assertEqual(200, response.status, msg) + items_data = json.loads(response.data) + self.assertIsNotNone(items_data, msg) + self.assertEqual('FeatureCollection', items_data['type'], msg) + self.assertIsNotNone(items_data['features'], msg) + self.assertEqual(1, len(items_data['features']), msg) + self._assert_paderborn(items_data['features'][0], msg) + + def test_get_items_invalid_filter(self): + for server_name in self.servers: + base_url = self.servers[server_name] + for invalid_limit in [-1, 0, 10001]: + url = f'{base_url}' \ + f'{api.API_URL_PREFIX}/collections/collection_1/items' \ + f'?limit={invalid_limit}' + msg = f'in server {server_name} running on {url}' + response = self.http.request('GET', url) + self.assertEqual(500, response.status, msg) + + def _assert_paderborn(self, item_data, msg): + self.assertIsNotNone(item_data, msg) + self.assertEqual('2.3.4', item_data['stac_version']) + self.assertEqual(['xcube-geodb'], item_data['stac_extensions']) + self.assertEqual('Feature', item_data['type']) + self.assertEqual('1', item_data['id'], msg) + self.assertEqual(['8.7000', '51.3000', '8.8000', '51.8000'], + item_data['bbox'], msg) + self.assertEqual({'type': 'Polygon', 'coordinates': [[[8.7, 51.3], + [8.7, 51.8], + [8.8, 51.8], + [8.8, 51.3], + [8.7, 51.3] + ]]}, + item_data['geometry'], msg) + self.assertEqual({'name': 'paderborn', 'population': 150000}, + item_data['properties'], msg) + + def _assert_hamburg(self, item_data, msg): + self.assertEqual('2.3.4', item_data['stac_version'], msg) + self.assertEqual(['xcube-geodb'], item_data['stac_extensions'], msg) + self.assertEqual('Feature', item_data['type'], msg) + self.assertEqual('0', item_data['id'], msg) + self.assertEqual(['9.0000', '52.0000', '11.0000', '54.0000'], + item_data['bbox'], msg) + self.assertEqual({'type': 'Polygon', 'coordinates': [[[9, 52], + [9, 54], + [11, 54], + [11, 52], + [10, 53], + [9.8, 53.4], + [9.2, 52.1], + [9, 52]]]}, + item_data['geometry'], msg) + self.assertEqual({'name': 'hamburg', 'population': 1700000}, + item_data['properties'], msg) \ No newline at end of file diff --git a/xcube_geodb_openeo/backend/catalog.py b/xcube_geodb_openeo/backend/catalog.py index cb634ba..65ed5ff 100644 --- a/xcube_geodb_openeo/backend/catalog.py +++ b/xcube_geodb_openeo/backend/catalog.py @@ -21,17 +21,23 @@ import datetime +from typing import Optional from ..core.vectorcube import VectorCube, Feature from ..server.context import RequestContext +STAC_DEFAULT_ITEMS_LIMIT = 10 +STAC_DEFAULT_COLLECTIONS_LIMIT = 10 +STAC_MAX_ITEMS_LIMIT = 10000 -def get_collections(ctx: RequestContext): + +def get_collections(ctx: RequestContext, + limit: Optional[int] = STAC_DEFAULT_COLLECTIONS_LIMIT): return { 'collections': [ - _get_vector_cube_collection(ctx, - ctx.get_vector_cube(collection_id), - details=False) + # todo - implement pagination + _get_vector_cube_collection( + ctx, ctx.get_vector_cube(collection_id, limit), details=False) for collection_id in ctx.collection_ids ], 'links': [ @@ -43,16 +49,21 @@ def get_collections(ctx: RequestContext): def get_collection(ctx: RequestContext, - collection_id: str): - vector_cube = _get_vector_cube(ctx, collection_id) + collection_id: str, + limit: Optional[int] = STAC_DEFAULT_ITEMS_LIMIT): + _validate(limit) + vector_cube = _get_vector_cube(ctx, collection_id, limit) return _get_vector_cube_collection(ctx, vector_cube, details=True) def get_collection_items(ctx: RequestContext, - collection_id: str): - vector_cube = _get_vector_cube(ctx, collection_id) + collection_id: str, + limit: Optional[int] = STAC_DEFAULT_ITEMS_LIMIT, + offset: Optional[int] = 0): + _validate(limit) + vector_cube = _get_vector_cube(ctx, collection_id, limit, offset) stac_features = [ _get_vector_cube_item(ctx, vector_cube, @@ -73,7 +84,9 @@ def get_collection_items(ctx: RequestContext, def get_collection_item(ctx: RequestContext, collection_id: str, feature_id: str): - vector_cube = _get_vector_cube(ctx, collection_id) + # todo - this currently fetches the whole vector cube and returns a single + # feature! + vector_cube = _get_vector_cube(ctx, collection_id, 10000, 0) for feature in vector_cube.get("features", []): if str(feature.get("id")) == feature_id: return _get_vector_cube_item(ctx, @@ -176,12 +189,19 @@ def _utc_now(): .isoformat() + 'Z' -def _get_vector_cube(ctx, collection_id): +def _get_vector_cube(ctx, collection_id: str, limit: int, offset: int): if collection_id not in ctx.collection_ids: raise CollectionNotFoundException( f'Unknown collection {collection_id!r}' ) - return ctx.get_vector_cube(collection_id) + return ctx.get_vector_cube(collection_id, limit, offset) + + +def _validate(limit: int): + if limit < 1 or limit > STAC_MAX_ITEMS_LIMIT: + raise InvalidParameterException(f'if specified, limit has to be ' + f'between 1 and ' + f'{STAC_MAX_ITEMS_LIMIT}') class CollectionNotFoundException(Exception): @@ -190,3 +210,7 @@ class CollectionNotFoundException(Exception): class ItemNotFoundException(Exception): pass + + +class InvalidParameterException(Exception): + pass diff --git a/xcube_geodb_openeo/core/datastore.py b/xcube_geodb_openeo/core/datastore.py index 4424941..e7bca9e 100644 --- a/xcube_geodb_openeo/core/datastore.py +++ b/xcube_geodb_openeo/core/datastore.py @@ -45,7 +45,8 @@ def get_collection_keys(self): pass @abc.abstractmethod - def get_vector_cube(self, collection_id) -> VectorCube: + def get_vector_cube(self, collection_id: str, limit: int, offset: int) \ + -> VectorCube: pass @staticmethod diff --git a/xcube_geodb_openeo/core/geodb_datastore.py b/xcube_geodb_openeo/core/geodb_datastore.py index 235afea..8783f63 100644 --- a/xcube_geodb_openeo/core/geodb_datastore.py +++ b/xcube_geodb_openeo/core/geodb_datastore.py @@ -61,9 +61,11 @@ def get_collection_keys(self): collections = self.geodb.get_my_collections(n) return collections.get('collection') - def get_vector_cube(self, collection_id) -> VectorCube: + def get_vector_cube(self, collection_id: str, limit: int, offset: int) \ + -> VectorCube: vector_cube = self.geodb.get_collection_info(collection_id) - collection = self.geodb.get_collection(collection_id) + collection = self.geodb.get_collection(collection_id, limit=limit, + offset=offset) self.add_collection_to_vector_cube(collection, collection_id, vector_cube, self.config) diff --git a/xcube_geodb_openeo/server/app/flask.py b/xcube_geodb_openeo/server/app/flask.py index a2c8f50..9b9ebb7 100644 --- a/xcube_geodb_openeo/server/app/flask.py +++ b/xcube_geodb_openeo/server/app/flask.py @@ -30,6 +30,8 @@ from ..context import AppContext from ...backend import catalog from ...backend import capabilities +from ...backend.catalog import STAC_DEFAULT_ITEMS_LIMIT + app = flask.Flask( __name__, @@ -76,10 +78,14 @@ def get_catalog_collection(collection_id: str): @api.route('/collections//items') def get_catalog_collection_items(collection_id: str): + limit = int(flask.request.args['limit']) \ + if 'limit' in flask.request.args else STAC_DEFAULT_ITEMS_LIMIT + offset = int(flask.request.args['offset']) \ + if 'offset' in flask.request.args else 0 return catalog.get_collection_items( ctx.for_request(f'{flask.request.root_url}' f'{api.url_prefix}'), - collection_id + collection_id, limit, offset ) diff --git a/xcube_geodb_openeo/server/app/tornado.py b/xcube_geodb_openeo/server/app/tornado.py index 2fe88d3..6881b6f 100644 --- a/xcube_geodb_openeo/server/app/tornado.py +++ b/xcube_geodb_openeo/server/app/tornado.py @@ -34,6 +34,7 @@ from ..context import RequestContext from ...backend import capabilities from ...backend import catalog +from ...backend.catalog import STAC_DEFAULT_ITEMS_LIMIT RequestHandlerType = Type[tornado.web.RequestHandler] @@ -214,9 +215,12 @@ async def get(self, collection_id: str): @app.route("/collections/{collection_id}/items") class CatalogCollectionItemsHandler(BaseHandler): async def get(self, collection_id: str): + limit = int(self.get_argument("limit", + str(STAC_DEFAULT_ITEMS_LIMIT), True)) + offset = int(self.get_argument("offset", '0', True)) return await self.finish(catalog.get_collection_items( _get_request_ctx(self), - collection_id + collection_id, limit, offset )) diff --git a/xcube_geodb_openeo/server/context.py b/xcube_geodb_openeo/server/context.py index 2bb9d74..2136159 100644 --- a/xcube_geodb_openeo/server/context.py +++ b/xcube_geodb_openeo/server/context.py @@ -44,7 +44,8 @@ def collection_ids(self) -> Sequence[str]: pass @abc.abstractmethod - def get_vector_cube(self, collection_id: str) -> VectorCube: + def get_vector_cube(self, collection_id: str, limit: int, offset: int) \ + -> VectorCube: pass @property @@ -86,8 +87,9 @@ def data_store(self) -> DataStore: def collection_ids(self) -> Sequence[str]: return tuple(self.data_store.get_collection_keys()) - def get_vector_cube(self, collection_id: str) -> VectorCube: - return self.data_store.get_vector_cube(collection_id) + def get_vector_cube(self, collection_id: str, limit: int, offset: int) \ + -> VectorCube: + return self.data_store.get_vector_cube(collection_id, limit, offset) @property def logger(self) -> logging.Logger: @@ -115,8 +117,9 @@ def config(self) -> Config: def collection_ids(self) -> Sequence[str]: return self._ctx.collection_ids - def get_vector_cube(self, collection_id: str) -> VectorCube: - return self._ctx.get_vector_cube(collection_id) + def get_vector_cube(self, collection_id: str, limit: int, offset: int) \ + -> VectorCube: + return self._ctx.get_vector_cube(collection_id, limit, offset) @property def logger(self) -> logging.Logger: From ebcd770bff89287586402fb3dae661992db8efb7 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 11 May 2022 16:17:37 +0200 Subject: [PATCH 018/163] allowed to not load all items when only the collection metadata is requested --- tests/core/mock_datastore.py | 10 ++++++---- xcube_geodb_openeo/backend/catalog.py | 11 +++++++---- xcube_geodb_openeo/core/datastore.py | 8 +++----- xcube_geodb_openeo/core/geodb_datastore.py | 13 ++++++++----- xcube_geodb_openeo/server/context.py | 18 ++++++++++-------- 5 files changed, 34 insertions(+), 26 deletions(-) diff --git a/tests/core/mock_datastore.py b/tests/core/mock_datastore.py index cecae1d..1ec4821 100644 --- a/tests/core/mock_datastore.py +++ b/tests/core/mock_datastore.py @@ -42,8 +42,8 @@ def __init__(self, config: Config): def get_collection_keys(self) -> Sequence: return list(self._MOCK_COLLECTIONS.keys()) - def get_vector_cube(self, collection_id: str, limit: int, offset: int) \ - -> VectorCube: + def get_vector_cube(self, collection_id: str, limit: int, offset: int, + with_items: bool) -> VectorCube: vector_cube = {} data = { 'id': ['0', '1'], @@ -58,6 +58,8 @@ def get_vector_cube(self, collection_id: str, limit: int, offset: int) \ } collection = geopandas.GeoDataFrame(data, crs="EPSG:4326") collection = collection[offset:offset + limit] - self.add_collection_to_vector_cube(collection, collection_id, - vector_cube, self.config) + vector_cube['id'] = collection_id + vector_cube['features'] = [] + if with_items: + self.add_items_to_vector_cube(collection, vector_cube, self.config) return vector_cube diff --git a/xcube_geodb_openeo/backend/catalog.py b/xcube_geodb_openeo/backend/catalog.py index 65ed5ff..00d85a0 100644 --- a/xcube_geodb_openeo/backend/catalog.py +++ b/xcube_geodb_openeo/backend/catalog.py @@ -37,7 +37,9 @@ def get_collections(ctx: RequestContext, 'collections': [ # todo - implement pagination _get_vector_cube_collection( - ctx, ctx.get_vector_cube(collection_id, limit), details=False) + ctx, _get_vector_cube(ctx, collection_id, limit, + with_items=False), + details=False) for collection_id in ctx.collection_ids ], 'links': [ @@ -52,7 +54,7 @@ def get_collection(ctx: RequestContext, collection_id: str, limit: Optional[int] = STAC_DEFAULT_ITEMS_LIMIT): _validate(limit) - vector_cube = _get_vector_cube(ctx, collection_id, limit) + vector_cube = _get_vector_cube(ctx, collection_id, limit, with_items=False) return _get_vector_cube_collection(ctx, vector_cube, details=True) @@ -189,12 +191,13 @@ def _utc_now(): .isoformat() + 'Z' -def _get_vector_cube(ctx, collection_id: str, limit: int, offset: int): +def _get_vector_cube(ctx, collection_id: str, limit: int, offset: int = 0, + with_items: bool = True): if collection_id not in ctx.collection_ids: raise CollectionNotFoundException( f'Unknown collection {collection_id!r}' ) - return ctx.get_vector_cube(collection_id, limit, offset) + return ctx.get_vector_cube(collection_id, limit, offset, with_items) def _validate(limit: int): diff --git a/xcube_geodb_openeo/core/datastore.py b/xcube_geodb_openeo/core/datastore.py index e7bca9e..e188435 100644 --- a/xcube_geodb_openeo/core/datastore.py +++ b/xcube_geodb_openeo/core/datastore.py @@ -45,19 +45,17 @@ def get_collection_keys(self): pass @abc.abstractmethod - def get_vector_cube(self, collection_id: str, limit: int, offset: int) \ + def get_vector_cube(self, collection_id: str, limit: int, offset: int, + with_items: bool) \ -> VectorCube: pass @staticmethod - def add_collection_to_vector_cube( + def add_items_to_vector_cube( collection: Union[GeoDataFrame, DataFrame], - collection_id: str, vector_cube: VectorCube, config: Config): bounds = collection.bounds - vector_cube['id'] = collection_id - vector_cube['features'] = [] for i, row in enumerate(collection.iterrows()): bbox = bounds.iloc[i] feature = row[1] diff --git a/xcube_geodb_openeo/core/geodb_datastore.py b/xcube_geodb_openeo/core/geodb_datastore.py index 8783f63..3972117 100644 --- a/xcube_geodb_openeo/core/geodb_datastore.py +++ b/xcube_geodb_openeo/core/geodb_datastore.py @@ -61,12 +61,15 @@ def get_collection_keys(self): collections = self.geodb.get_my_collections(n) return collections.get('collection') - def get_vector_cube(self, collection_id: str, limit: int, offset: int) \ + def get_vector_cube(self, collection_id: str, limit: int, offset: int, + with_items: bool) \ -> VectorCube: vector_cube = self.geodb.get_collection_info(collection_id) - collection = self.geodb.get_collection(collection_id, limit=limit, - offset=offset) - self.add_collection_to_vector_cube(collection, collection_id, - vector_cube, self.config) + vector_cube['id'] = collection_id + vector_cube['features'] = [] + items = self.geodb.get_collection(collection_id, limit=limit, + offset=offset) + if with_items: + self.add_items_to_vector_cube(items, vector_cube, self.config) return vector_cube diff --git a/xcube_geodb_openeo/server/context.py b/xcube_geodb_openeo/server/context.py index 2136159..26d7c25 100644 --- a/xcube_geodb_openeo/server/context.py +++ b/xcube_geodb_openeo/server/context.py @@ -44,8 +44,8 @@ def collection_ids(self) -> Sequence[str]: pass @abc.abstractmethod - def get_vector_cube(self, collection_id: str, limit: int, offset: int) \ - -> VectorCube: + def get_vector_cube(self, collection_id: str, limit: int, offset: int, + with_items: bool) -> VectorCube: pass @property @@ -87,9 +87,10 @@ def data_store(self) -> DataStore: def collection_ids(self) -> Sequence[str]: return tuple(self.data_store.get_collection_keys()) - def get_vector_cube(self, collection_id: str, limit: int, offset: int) \ - -> VectorCube: - return self.data_store.get_vector_cube(collection_id, limit, offset) + def get_vector_cube(self, collection_id: str, limit: int, offset: int, + with_items: bool) -> VectorCube: + return self.data_store.get_vector_cube(collection_id, limit, offset, + with_items) @property def logger(self) -> logging.Logger: @@ -117,9 +118,10 @@ def config(self) -> Config: def collection_ids(self) -> Sequence[str]: return self._ctx.collection_ids - def get_vector_cube(self, collection_id: str, limit: int, offset: int) \ - -> VectorCube: - return self._ctx.get_vector_cube(collection_id, limit, offset) + def get_vector_cube(self, collection_id: str, limit: int, offset: int, + with_items: bool) -> VectorCube: + return self._ctx.get_vector_cube(collection_id, limit, offset, + with_items) @property def logger(self) -> logging.Logger: From 73c1d645c0f5dde9beef2bdb6da88d452e799619 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 14 May 2022 01:21:27 +0200 Subject: [PATCH 019/163] Allowing to filter by bounding box --- tests/core/mock_datastore.py | 9 +++++++-- tests/server/app/test_data_discovery.py | 16 ++++++++++++++++ xcube_geodb_openeo/backend/catalog.py | 18 ++++++++++++------ xcube_geodb_openeo/core/datastore.py | 5 +++-- xcube_geodb_openeo/core/geodb_datastore.py | 14 +++++++++++--- xcube_geodb_openeo/server/app/flask.py | 8 +++++++- xcube_geodb_openeo/server/app/tornado.py | 8 +++++++- xcube_geodb_openeo/server/context.py | 15 +++++++++------ 8 files changed, 72 insertions(+), 21 deletions(-) diff --git a/tests/core/mock_datastore.py b/tests/core/mock_datastore.py index 1ec4821..8dc86dc 100644 --- a/tests/core/mock_datastore.py +++ b/tests/core/mock_datastore.py @@ -20,7 +20,7 @@ # DEALINGS IN THE SOFTWARE. import json -from typing import Sequence +from typing import Sequence, Tuple import geopandas from shapely.geometry import Polygon @@ -43,7 +43,8 @@ def get_collection_keys(self) -> Sequence: return list(self._MOCK_COLLECTIONS.keys()) def get_vector_cube(self, collection_id: str, limit: int, offset: int, - with_items: bool) -> VectorCube: + with_items: bool, + bbox: Tuple[float, float, float, float]) -> VectorCube: vector_cube = {} data = { 'id': ['0', '1'], @@ -57,6 +58,10 @@ def get_vector_cube(self, collection_id: str, limit: int, offset: int, 'population': [1700000, 150000] } collection = geopandas.GeoDataFrame(data, crs="EPSG:4326") + if bbox: + # simply dropping one entry; we don't need to implement this + # logic here + collection = collection.drop([1, 1]) collection = collection[offset:offset + limit] vector_cube['id'] = collection_id vector_cube['features'] = [] diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index 210deb4..fe23c80 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -84,6 +84,22 @@ def test_get_items_invalid_filter(self): response = self.http.request('GET', url) self.assertEqual(500, response.status, msg) + def test_get_items_by_bbox(self): + for server_name in self.servers: + base_url = self.servers[server_name] + bbox_param = '?bbox=9.01,50.01,10.01,51.01' + url = f'{base_url}' \ + f'{api.API_URL_PREFIX}/collections/collection_1/items' \ + f'{bbox_param}' + msg = f'in server {server_name} running on {url}' + response = self.http.request('GET', url) + self.assertEqual(200, response.status, msg) + items_data = json.loads(response.data) + self.assertEqual('FeatureCollection', items_data['type'], msg) + self.assertIsNotNone(items_data['features'], msg) + self.assertEqual(1, len(items_data['features']), msg) + + def _assert_paderborn(self, item_data, msg): self.assertIsNotNone(item_data, msg) self.assertEqual('2.3.4', item_data['stac_version']) diff --git a/xcube_geodb_openeo/backend/catalog.py b/xcube_geodb_openeo/backend/catalog.py index 00d85a0..fe7c982 100644 --- a/xcube_geodb_openeo/backend/catalog.py +++ b/xcube_geodb_openeo/backend/catalog.py @@ -21,7 +21,7 @@ import datetime -from typing import Optional +from typing import Optional, Tuple from ..core.vectorcube import VectorCube, Feature from ..server.context import RequestContext @@ -63,9 +63,12 @@ def get_collection(ctx: RequestContext, def get_collection_items(ctx: RequestContext, collection_id: str, limit: Optional[int] = STAC_DEFAULT_ITEMS_LIMIT, - offset: Optional[int] = 0): + offset: Optional[int] = 0, + bbox: Optional[Tuple[float, float, float, float]] = + None): _validate(limit) - vector_cube = _get_vector_cube(ctx, collection_id, limit, offset) + vector_cube = _get_vector_cube(ctx, collection_id, limit=limit, + offset=offset, bbox=bbox) stac_features = [ _get_vector_cube_item(ctx, vector_cube, @@ -78,7 +81,9 @@ def get_collection_items(ctx: RequestContext, "type": "FeatureCollection", "features": stac_features, "timeStamp": _utc_now(), - "numberMatched": len(stac_features), + "numberMatched": len(stac_features), # todo - that's not correct. + # And it's hard to determine the correct number. Maybe drop, + # it's not strictly required. "numberReturned": len(stac_features), } @@ -192,12 +197,13 @@ def _utc_now(): def _get_vector_cube(ctx, collection_id: str, limit: int, offset: int = 0, - with_items: bool = True): + with_items: bool = True, + bbox: Tuple[float, float, float, float] = None): if collection_id not in ctx.collection_ids: raise CollectionNotFoundException( f'Unknown collection {collection_id!r}' ) - return ctx.get_vector_cube(collection_id, limit, offset, with_items) + return ctx.get_vector_cube(collection_id, limit, offset, with_items, bbox) def _validate(limit: int): diff --git a/xcube_geodb_openeo/core/datastore.py b/xcube_geodb_openeo/core/datastore.py index e188435..916ce08 100644 --- a/xcube_geodb_openeo/core/datastore.py +++ b/xcube_geodb_openeo/core/datastore.py @@ -20,7 +20,7 @@ # DEALINGS IN THE SOFTWARE. import abc -from typing import Union, Dict +from typing import Union, Dict, Tuple from .vectorcube import VectorCube from ..server.config import Config @@ -46,7 +46,8 @@ def get_collection_keys(self): @abc.abstractmethod def get_vector_cube(self, collection_id: str, limit: int, offset: int, - with_items: bool) \ + with_items: bool, + bbox: Tuple[float, float, float, float]) \ -> VectorCube: pass diff --git a/xcube_geodb_openeo/core/geodb_datastore.py b/xcube_geodb_openeo/core/geodb_datastore.py index 3972117..0ebaf71 100644 --- a/xcube_geodb_openeo/core/geodb_datastore.py +++ b/xcube_geodb_openeo/core/geodb_datastore.py @@ -20,6 +20,7 @@ # DEALINGS IN THE SOFTWARE. from functools import cached_property +from typing import Tuple from .datastore import DataStore from xcube_geodb.core.geodb import GeoDBClient @@ -62,13 +63,20 @@ def get_collection_keys(self): return collections.get('collection') def get_vector_cube(self, collection_id: str, limit: int, offset: int, - with_items: bool) \ + with_items: bool, + bbox: Tuple[float, float, float, float]) \ -> VectorCube: vector_cube = self.geodb.get_collection_info(collection_id) vector_cube['id'] = collection_id vector_cube['features'] = [] - items = self.geodb.get_collection(collection_id, limit=limit, - offset=offset) + if bbox: + items = self.geodb.get_collection_by_bbox(collection_id, bbox, + limit=limit, + offset=offset) + else: + items = self.geodb.get_collection(collection_id, limit=limit, + offset=offset) + if with_items: self.add_items_to_vector_cube(items, vector_cube, self.config) diff --git a/xcube_geodb_openeo/server/app/flask.py b/xcube_geodb_openeo/server/app/flask.py index 9b9ebb7..35630f8 100644 --- a/xcube_geodb_openeo/server/app/flask.py +++ b/xcube_geodb_openeo/server/app/flask.py @@ -82,10 +82,16 @@ def get_catalog_collection_items(collection_id: str): if 'limit' in flask.request.args else STAC_DEFAULT_ITEMS_LIMIT offset = int(flask.request.args['offset']) \ if 'offset' in flask.request.args else 0 + # sample query parameter: bbox=160.6,-55.95,-170,-25.89 + if 'bbox' in flask.request.args: + query_bbox = str(flask.request.args['bbox']) + bbox = tuple(query_bbox.split(',')) + else: + bbox = None return catalog.get_collection_items( ctx.for_request(f'{flask.request.root_url}' f'{api.url_prefix}'), - collection_id, limit, offset + collection_id, limit, offset, bbox ) diff --git a/xcube_geodb_openeo/server/app/tornado.py b/xcube_geodb_openeo/server/app/tornado.py index 6881b6f..d107739 100644 --- a/xcube_geodb_openeo/server/app/tornado.py +++ b/xcube_geodb_openeo/server/app/tornado.py @@ -218,9 +218,15 @@ async def get(self, collection_id: str): limit = int(self.get_argument("limit", str(STAC_DEFAULT_ITEMS_LIMIT), True)) offset = int(self.get_argument("offset", '0', True)) + # sample query parameter: bbox=160.6,-55.95,-170,-25.89 + query_bbox = str(self.get_argument('bbox', None, True)) + if query_bbox: + bbox = tuple(query_bbox.split(',')) + else: + bbox = None return await self.finish(catalog.get_collection_items( _get_request_ctx(self), - collection_id, limit, offset + collection_id, limit, offset, bbox )) diff --git a/xcube_geodb_openeo/server/context.py b/xcube_geodb_openeo/server/context.py index 26d7c25..e1e7f90 100644 --- a/xcube_geodb_openeo/server/context.py +++ b/xcube_geodb_openeo/server/context.py @@ -24,7 +24,7 @@ import importlib import logging from functools import cached_property -from typing import Sequence +from typing import Sequence, Tuple from ..core.vectorcube import VectorCube from ..core.datastore import DataStore @@ -45,7 +45,8 @@ def collection_ids(self) -> Sequence[str]: @abc.abstractmethod def get_vector_cube(self, collection_id: str, limit: int, offset: int, - with_items: bool) -> VectorCube: + with_items: bool, + bbox: Tuple[float, float, float, float]) -> VectorCube: pass @property @@ -88,9 +89,10 @@ def collection_ids(self) -> Sequence[str]: return tuple(self.data_store.get_collection_keys()) def get_vector_cube(self, collection_id: str, limit: int, offset: int, - with_items: bool) -> VectorCube: + with_items: bool, + bbox: Tuple[float, float, float, float]) -> VectorCube: return self.data_store.get_vector_cube(collection_id, limit, offset, - with_items) + with_items, bbox) @property def logger(self) -> logging.Logger: @@ -119,9 +121,10 @@ def collection_ids(self) -> Sequence[str]: return self._ctx.collection_ids def get_vector_cube(self, collection_id: str, limit: int, offset: int, - with_items: bool) -> VectorCube: + with_items: bool, + bbox: Tuple[float, float, float, float]) -> VectorCube: return self._ctx.get_vector_cube(collection_id, limit, offset, - with_items) + with_items, bbox) @property def logger(self) -> logging.Logger: From b99d49208fef41849dee38de6bd7bef14b55b68c Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 14 May 2022 01:37:10 +0200 Subject: [PATCH 020/163] fix! --- xcube_geodb_openeo/server/app/tornado.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcube_geodb_openeo/server/app/tornado.py b/xcube_geodb_openeo/server/app/tornado.py index d107739..b285acb 100644 --- a/xcube_geodb_openeo/server/app/tornado.py +++ b/xcube_geodb_openeo/server/app/tornado.py @@ -219,7 +219,7 @@ async def get(self, collection_id: str): str(STAC_DEFAULT_ITEMS_LIMIT), True)) offset = int(self.get_argument("offset", '0', True)) # sample query parameter: bbox=160.6,-55.95,-170,-25.89 - query_bbox = str(self.get_argument('bbox', None, True)) + query_bbox = str(self.get_argument('bbox', '', True)) if query_bbox: bbox = tuple(query_bbox.split(',')) else: From ca3f187f57694bf1a3b15b752aeb6cecb48f2ebe Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 17 May 2022 15:39:10 +0200 Subject: [PATCH 021/163] minor cleanups --- tests/core/mock_datastore.py | 4 ++-- xcube_geodb_openeo/core/geodb_datastore.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/core/mock_datastore.py b/tests/core/mock_datastore.py index 8dc86dc..13cff18 100644 --- a/tests/core/mock_datastore.py +++ b/tests/core/mock_datastore.py @@ -59,8 +59,8 @@ def get_vector_cube(self, collection_id: str, limit: int, offset: int, } collection = geopandas.GeoDataFrame(data, crs="EPSG:4326") if bbox: - # simply dropping one entry; we don't need to implement this - # logic here + # simply dropping one entry; we don't need to test this + # logic here, as it is implemented within the geoDB module collection = collection.drop([1, 1]) collection = collection[offset:offset + limit] vector_cube['id'] = collection_id diff --git a/xcube_geodb_openeo/core/geodb_datastore.py b/xcube_geodb_openeo/core/geodb_datastore.py index 0ebaf71..b816e65 100644 --- a/xcube_geodb_openeo/core/geodb_datastore.py +++ b/xcube_geodb_openeo/core/geodb_datastore.py @@ -25,8 +25,8 @@ from .datastore import DataStore from xcube_geodb.core.geodb import GeoDBClient -from xcube_geodb_openeo.core.vectorcube import VectorCube -from xcube_geodb_openeo.server.config import Config +from vectorcube import VectorCube +from ..server.config import Config class GeoDBDataStore(DataStore): From e596d307fac02509032cb0c47105e7a4d27436b8 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 17 May 2022 23:32:52 +0200 Subject: [PATCH 022/163] implemented paging for collections --- tests/backend/__init__.py | 20 +++++++ tests/backend/test_catalog.py | 69 ++++++++++++++++++++++ xcube_geodb_openeo/backend/catalog.py | 50 ++++++++++++---- xcube_geodb_openeo/core/geodb_datastore.py | 7 ++- xcube_geodb_openeo/server/app/flask.py | 12 +++- 5 files changed, 142 insertions(+), 16 deletions(-) create mode 100644 tests/backend/__init__.py create mode 100644 tests/backend/test_catalog.py diff --git a/tests/backend/__init__.py b/tests/backend/__init__.py new file mode 100644 index 0000000..2f1eda6 --- /dev/null +++ b/tests/backend/__init__.py @@ -0,0 +1,20 @@ +# The MIT License (MIT) +# Copyright (c) 2021/2022 by the xcube team and contributors +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. diff --git a/tests/backend/test_catalog.py b/tests/backend/test_catalog.py new file mode 100644 index 0000000..869efa1 --- /dev/null +++ b/tests/backend/test_catalog.py @@ -0,0 +1,69 @@ +# The MIT License (MIT) +# Copyright (c) 2021/2022 by the xcube team and contributors +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +import unittest + +import xcube_geodb_openeo.backend.catalog as catalog + + +class CatalogTest(unittest.TestCase): + + + def test_get_collections_links(self): + links = catalog.get_collections_links( + 2, 6, 'http://server.hh/collections', 10) + self.assertEqual([ + {'href': 'http://server.hh/collections?limit=2&offset=8', + 'rel': 'next', + 'title': 'next'}, + {'href': 'http://server.hh/collections?limit=2&offset=4', + 'rel': 'prev', + 'title': 'prev'}, + {'href': 'http://server.hh/collections?limit=2&offset=0', + 'rel': 'first', + 'title': 'first'}, + {'href': 'http://server.hh/collections?limit=2&offset=8', + 'rel': 'last', + 'title': 'last'}], links) + + links = catalog.get_collections_links( + 3, 0, 'http://server.hh/collections', 5) + self.assertEqual([ + {'href': 'http://server.hh/collections?limit=3&offset=3', + 'rel': 'next', + 'title': 'next'}, + {'href': 'http://server.hh/collections?limit=3&offset=2', + 'rel': 'last', + 'title': 'last'}], links) + + links = catalog.get_collections_links( + 2, 8, 'http://server.hh/collections', 10) + self.assertEqual([ + {'href': 'http://server.hh/collections?limit=2&offset=6', + 'rel': 'prev', + 'title': 'prev'}, + {'href': 'http://server.hh/collections?limit=2&offset=0', + 'rel': 'first', + 'title': 'first'}], links) + + links = catalog.get_collections_links( + 10, 0, 'http://server.hh/collections', 7) + self.assertEqual([], links) diff --git a/xcube_geodb_openeo/backend/catalog.py b/xcube_geodb_openeo/backend/catalog.py index fe7c982..e8dc52b 100644 --- a/xcube_geodb_openeo/backend/catalog.py +++ b/xcube_geodb_openeo/backend/catalog.py @@ -27,27 +27,51 @@ from ..server.context import RequestContext STAC_DEFAULT_ITEMS_LIMIT = 10 -STAC_DEFAULT_COLLECTIONS_LIMIT = 10 STAC_MAX_ITEMS_LIMIT = 10000 -def get_collections(ctx: RequestContext, - limit: Optional[int] = STAC_DEFAULT_COLLECTIONS_LIMIT): - return { +def get_collections(ctx: RequestContext, url: str, limit: int, offset: int): + links = get_collections_links(limit, offset, url, len(ctx.collection_ids)) + collections = { 'collections': [ - # todo - implement pagination _get_vector_cube_collection( ctx, _get_vector_cube(ctx, collection_id, limit, - with_items=False), - details=False) - for collection_id in ctx.collection_ids + with_items=False), details=False) + for collection_id in ctx.collection_ids[offset:offset + limit] ], - 'links': [ - # todo - if too many collections are listed, implement - # pagination. See - # https://openeo.org/documentation/1.0/developers/api/reference.html#operation/list-collections - ] + 'links': links } + return collections + + +def get_collections_links(limit: int, offset: int, url: str, + collection_count: int): + links = [] + next_offset = offset + limit + next_link = {'rel': 'next', + 'href': f'{url}?limit={limit}&offset='f'{next_offset}', + 'title': 'next'} + prev_offset = offset - limit + prev_link = {'rel': 'prev', + 'href': f'{url}?limit={limit}&offset='f'{prev_offset}', + 'title': 'prev'} + first_link = {'rel': 'first', + 'href': f'{url}?limit={limit}&offset=0', + 'title': 'first'} + last_offset = collection_count - limit + last_link = {'rel': 'last', + 'href': f'{url}?limit={limit}&offset='f'{last_offset}', + 'title': 'last'} + + if next_offset < collection_count: + links.append(next_link) + if offset > 0: + links.append(prev_link) + links.append(first_link) + if limit + offset < collection_count: + links.append(last_link) + + return links def get_collection(ctx: RequestContext, diff --git a/xcube_geodb_openeo/core/geodb_datastore.py b/xcube_geodb_openeo/core/geodb_datastore.py index b816e65..14e64a8 100644 --- a/xcube_geodb_openeo/core/geodb_datastore.py +++ b/xcube_geodb_openeo/core/geodb_datastore.py @@ -25,7 +25,7 @@ from .datastore import DataStore from xcube_geodb.core.geodb import GeoDBClient -from vectorcube import VectorCube +from .vectorcube import VectorCube from ..server.config import Config @@ -70,10 +70,15 @@ def get_vector_cube(self, collection_id: str, limit: int, offset: int, vector_cube['id'] = collection_id vector_cube['features'] = [] if bbox: + vector_cube['total_feature_count'] = \ + self.geodb.count_collection_by_bbox(collection_id, bbox) items = self.geodb.get_collection_by_bbox(collection_id, bbox, limit=limit, offset=offset) else: + vector_cube['total_feature_count'] = \ + self.geodb.count_collection_by_bbox(collection_id, + (-180, 90, 180, -90)) items = self.geodb.get_collection(collection_id, limit=limit, offset=offset) diff --git a/xcube_geodb_openeo/server/app/flask.py b/xcube_geodb_openeo/server/app/flask.py index 35630f8..c0ed911 100644 --- a/xcube_geodb_openeo/server/app/flask.py +++ b/xcube_geodb_openeo/server/app/flask.py @@ -32,6 +32,8 @@ from ...backend import capabilities from ...backend.catalog import STAC_DEFAULT_ITEMS_LIMIT +STAC_DEFAULT_COLLECTIONS_LIMIT = 10 + app = flask.Flask( __name__, @@ -65,8 +67,14 @@ def get_conformance(): @api.route('/collections') def get_catalog_collections(): - return catalog.get_collections(ctx.for_request(f'{flask.request.root_url}' - f'{api.url_prefix}')) + limit = int(flask.request.args['limit']) \ + if 'limit' in flask.request.args else STAC_DEFAULT_COLLECTIONS_LIMIT + offset = int(flask.request.args['offset']) \ + if 'offset' in flask.request.args else 0 + request_ctx = ctx.for_request(f'{flask.request.root_url}{api.url_prefix}') + return catalog.get_collections(request_ctx, + request_ctx.get_url('/collections'), + limit, offset) @api.route('/collections/') From 8c5b7d2053a3ddb2eb6974ac965dc2562a133b44 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 18 May 2022 00:22:40 +0200 Subject: [PATCH 023/163] made consistent --- tests/core/mock_datastore.py | 10 +++--- xcube_geodb_openeo/backend/catalog.py | 38 ++++++++++------------ xcube_geodb_openeo/core/datastore.py | 8 ++--- xcube_geodb_openeo/core/geodb_datastore.py | 8 ++--- xcube_geodb_openeo/server/app/flask.py | 3 +- xcube_geodb_openeo/server/app/tornado.py | 6 +++- xcube_geodb_openeo/server/context.py | 31 ++++++++++-------- 7 files changed, 54 insertions(+), 50 deletions(-) diff --git a/tests/core/mock_datastore.py b/tests/core/mock_datastore.py index 13cff18..495500b 100644 --- a/tests/core/mock_datastore.py +++ b/tests/core/mock_datastore.py @@ -20,7 +20,7 @@ # DEALINGS IN THE SOFTWARE. import json -from typing import Sequence, Tuple +from typing import Sequence, Tuple, Optional import geopandas from shapely.geometry import Polygon @@ -42,9 +42,10 @@ def __init__(self, config: Config): def get_collection_keys(self) -> Sequence: return list(self._MOCK_COLLECTIONS.keys()) - def get_vector_cube(self, collection_id: str, limit: int, offset: int, - with_items: bool, - bbox: Tuple[float, float, float, float]) -> VectorCube: + def get_vector_cube(self, collection_id: str, with_items: bool, + bbox: Tuple[float, float, float, float], + limit: Optional[int] = 1, offset: Optional[int] = 0) \ + -> VectorCube: vector_cube = {} data = { 'id': ['0', '1'], @@ -65,6 +66,7 @@ def get_vector_cube(self, collection_id: str, limit: int, offset: int, collection = collection[offset:offset + limit] vector_cube['id'] = collection_id vector_cube['features'] = [] + vector_cube['total_feature_count'] = len(collection) if with_items: self.add_items_to_vector_cube(collection, vector_cube, self.config) return vector_cube diff --git a/xcube_geodb_openeo/backend/catalog.py b/xcube_geodb_openeo/backend/catalog.py index e8dc52b..eb46059 100644 --- a/xcube_geodb_openeo/backend/catalog.py +++ b/xcube_geodb_openeo/backend/catalog.py @@ -26,6 +26,7 @@ from ..core.vectorcube import VectorCube, Feature from ..server.context import RequestContext +STAC_DEFAULT_COLLECTIONS_LIMIT = 10 STAC_DEFAULT_ITEMS_LIMIT = 10 STAC_MAX_ITEMS_LIMIT = 10000 @@ -35,8 +36,8 @@ def get_collections(ctx: RequestContext, url: str, limit: int, offset: int): collections = { 'collections': [ _get_vector_cube_collection( - ctx, _get_vector_cube(ctx, collection_id, limit, - with_items=False), details=False) + ctx, _get_vector_cube(ctx, collection_id, with_items=False), + details=False) for collection_id in ctx.collection_ids[offset:offset + limit] ], 'links': links @@ -75,24 +76,20 @@ def get_collections_links(limit: int, offset: int, url: str, def get_collection(ctx: RequestContext, - collection_id: str, - limit: Optional[int] = STAC_DEFAULT_ITEMS_LIMIT): - _validate(limit) - vector_cube = _get_vector_cube(ctx, collection_id, limit, with_items=False) - return _get_vector_cube_collection(ctx, - vector_cube, - details=True) + collection_id: str): + vector_cube = _get_vector_cube(ctx, collection_id, with_items=False) + return _get_vector_cube_collection(ctx, vector_cube, details=True) def get_collection_items(ctx: RequestContext, collection_id: str, - limit: Optional[int] = STAC_DEFAULT_ITEMS_LIMIT, - offset: Optional[int] = 0, + limit: int, + offset: int, bbox: Optional[Tuple[float, float, float, float]] = None): _validate(limit) - vector_cube = _get_vector_cube(ctx, collection_id, limit=limit, - offset=offset, bbox=bbox) + vector_cube = _get_vector_cube(ctx, collection_id, with_items=True, + limit=limit, offset=offset, bbox=bbox) stac_features = [ _get_vector_cube_item(ctx, vector_cube, @@ -105,9 +102,7 @@ def get_collection_items(ctx: RequestContext, "type": "FeatureCollection", "features": stac_features, "timeStamp": _utc_now(), - "numberMatched": len(stac_features), # todo - that's not correct. - # And it's hard to determine the correct number. Maybe drop, - # it's not strictly required. + "numberMatched": vector_cube['total_feature_count'], "numberReturned": len(stac_features), } @@ -117,7 +112,8 @@ def get_collection_item(ctx: RequestContext, feature_id: str): # todo - this currently fetches the whole vector cube and returns a single # feature! - vector_cube = _get_vector_cube(ctx, collection_id, 10000, 0) + vector_cube = _get_vector_cube(ctx, collection_id, True, limit=10000, + offset=0) for feature in vector_cube.get("features", []): if str(feature.get("id")) == feature_id: return _get_vector_cube_item(ctx, @@ -220,14 +216,14 @@ def _utc_now(): .isoformat() + 'Z' -def _get_vector_cube(ctx, collection_id: str, limit: int, offset: int = 0, - with_items: bool = True, - bbox: Tuple[float, float, float, float] = None): +def _get_vector_cube(ctx, collection_id: str, with_items: bool, + bbox: Tuple[float, float, float, float] = None, + limit: Optional[int] = 1, offset: Optional[int] = 0): if collection_id not in ctx.collection_ids: raise CollectionNotFoundException( f'Unknown collection {collection_id!r}' ) - return ctx.get_vector_cube(collection_id, limit, offset, with_items, bbox) + return ctx.get_vector_cube(collection_id, with_items, bbox, limit, offset) def _validate(limit: int): diff --git a/xcube_geodb_openeo/core/datastore.py b/xcube_geodb_openeo/core/datastore.py index 916ce08..901ccee 100644 --- a/xcube_geodb_openeo/core/datastore.py +++ b/xcube_geodb_openeo/core/datastore.py @@ -20,7 +20,7 @@ # DEALINGS IN THE SOFTWARE. import abc -from typing import Union, Dict, Tuple +from typing import Union, Dict, Tuple, Optional from .vectorcube import VectorCube from ..server.config import Config @@ -45,9 +45,9 @@ def get_collection_keys(self): pass @abc.abstractmethod - def get_vector_cube(self, collection_id: str, limit: int, offset: int, - with_items: bool, - bbox: Tuple[float, float, float, float]) \ + def get_vector_cube(self, collection_id: str, with_items: bool, + bbox: Tuple[float, float, float, float], + limit: Optional[int] = 1, offset: Optional[int] = 0) \ -> VectorCube: pass diff --git a/xcube_geodb_openeo/core/geodb_datastore.py b/xcube_geodb_openeo/core/geodb_datastore.py index 14e64a8..58ca664 100644 --- a/xcube_geodb_openeo/core/geodb_datastore.py +++ b/xcube_geodb_openeo/core/geodb_datastore.py @@ -20,7 +20,7 @@ # DEALINGS IN THE SOFTWARE. from functools import cached_property -from typing import Tuple +from typing import Tuple, Optional from .datastore import DataStore from xcube_geodb.core.geodb import GeoDBClient @@ -62,9 +62,9 @@ def get_collection_keys(self): collections = self.geodb.get_my_collections(n) return collections.get('collection') - def get_vector_cube(self, collection_id: str, limit: int, offset: int, - with_items: bool, - bbox: Tuple[float, float, float, float]) \ + def get_vector_cube(self, collection_id: str, with_items: bool, + bbox: Tuple[float, float, float, float], + limit: Optional[int] = 1, offset: Optional[int] = 0) \ -> VectorCube: vector_cube = self.geodb.get_collection_info(collection_id) vector_cube['id'] = collection_id diff --git a/xcube_geodb_openeo/server/app/flask.py b/xcube_geodb_openeo/server/app/flask.py index c0ed911..65012fe 100644 --- a/xcube_geodb_openeo/server/app/flask.py +++ b/xcube_geodb_openeo/server/app/flask.py @@ -30,10 +30,9 @@ from ..context import AppContext from ...backend import catalog from ...backend import capabilities +from ...backend.catalog import STAC_DEFAULT_COLLECTIONS_LIMIT from ...backend.catalog import STAC_DEFAULT_ITEMS_LIMIT -STAC_DEFAULT_COLLECTIONS_LIMIT = 10 - app = flask.Flask( __name__, diff --git a/xcube_geodb_openeo/server/app/tornado.py b/xcube_geodb_openeo/server/app/tornado.py index b285acb..310bcb2 100644 --- a/xcube_geodb_openeo/server/app/tornado.py +++ b/xcube_geodb_openeo/server/app/tornado.py @@ -195,8 +195,12 @@ async def get(self): class CatalogCollectionsHandler(BaseHandler): async def get(self): from xcube_geodb_openeo.backend import catalog + limit = int(self.get_argument("limit", + str(STAC_DEFAULT_ITEMS_LIMIT), True)) + offset = int(self.get_argument("offset", '0', True)) + url = _get_request_ctx(self).get_url('/collections') return await self.finish(catalog.get_collections( - _get_request_ctx(self) + _get_request_ctx(self), url, limit, offset )) diff --git a/xcube_geodb_openeo/server/context.py b/xcube_geodb_openeo/server/context.py index e1e7f90..f7844a4 100644 --- a/xcube_geodb_openeo/server/context.py +++ b/xcube_geodb_openeo/server/context.py @@ -24,7 +24,7 @@ import importlib import logging from functools import cached_property -from typing import Sequence, Tuple +from typing import Sequence, Tuple, Optional from ..core.vectorcube import VectorCube from ..core.datastore import DataStore @@ -44,9 +44,10 @@ def collection_ids(self) -> Sequence[str]: pass @abc.abstractmethod - def get_vector_cube(self, collection_id: str, limit: int, offset: int, - with_items: bool, - bbox: Tuple[float, float, float, float]) -> VectorCube: + def get_vector_cube(self, collection_id: str, with_items: bool, + bbox: Tuple[float, float, float, float], + limit: Optional[int] = 1, offset: Optional[int] = 0) \ + -> VectorCube: pass @property @@ -88,11 +89,12 @@ def data_store(self) -> DataStore: def collection_ids(self) -> Sequence[str]: return tuple(self.data_store.get_collection_keys()) - def get_vector_cube(self, collection_id: str, limit: int, offset: int, - with_items: bool, - bbox: Tuple[float, float, float, float]) -> VectorCube: - return self.data_store.get_vector_cube(collection_id, limit, offset, - with_items, bbox) + def get_vector_cube(self, collection_id: str, with_items: bool, + bbox: Tuple[float, float, float, float], + limit: Optional[int] = 1, offset: Optional[int] = 0) \ + -> VectorCube: + return self.data_store.get_vector_cube(collection_id, with_items, + bbox, limit, offset) @property def logger(self) -> logging.Logger: @@ -120,11 +122,12 @@ def config(self) -> Config: def collection_ids(self) -> Sequence[str]: return self._ctx.collection_ids - def get_vector_cube(self, collection_id: str, limit: int, offset: int, - with_items: bool, - bbox: Tuple[float, float, float, float]) -> VectorCube: - return self._ctx.get_vector_cube(collection_id, limit, offset, - with_items, bbox) + def get_vector_cube(self, collection_id: str, with_items: bool, + bbox: Tuple[float, float, float, float], + limit: Optional[int] = 1, offset: Optional[int] = 0) \ + -> VectorCube: + return self._ctx.get_vector_cube(collection_id, with_items, bbox, + limit, offset) @property def logger(self) -> logging.Logger: From 3c5aacc4cd5c576a2e338a57fcb2c9e54261f6cf Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 18 May 2022 00:51:08 +0200 Subject: [PATCH 024/163] removed todo --- tests/core/mock_datastore.py | 9 +++++---- xcube_geodb_openeo/backend/catalog.py | 15 +++++++-------- xcube_geodb_openeo/core/datastore.py | 4 ++-- xcube_geodb_openeo/core/geodb_datastore.py | 5 +++-- xcube_geodb_openeo/server/context.py | 6 +++--- 5 files changed, 20 insertions(+), 19 deletions(-) diff --git a/tests/core/mock_datastore.py b/tests/core/mock_datastore.py index 495500b..f6f68df 100644 --- a/tests/core/mock_datastore.py +++ b/tests/core/mock_datastore.py @@ -43,9 +43,9 @@ def get_collection_keys(self) -> Sequence: return list(self._MOCK_COLLECTIONS.keys()) def get_vector_cube(self, collection_id: str, with_items: bool, - bbox: Tuple[float, float, float, float], - limit: Optional[int] = 1, offset: Optional[int] = 0) \ - -> VectorCube: + bbox: Tuple[float, float, float, float] = None, + limit: Optional[int] = None, offset: Optional[int] = + 0) -> VectorCube: vector_cube = {} data = { 'id': ['0', '1'], @@ -63,7 +63,8 @@ def get_vector_cube(self, collection_id: str, with_items: bool, # simply dropping one entry; we don't need to test this # logic here, as it is implemented within the geoDB module collection = collection.drop([1, 1]) - collection = collection[offset:offset + limit] + if limit: + collection = collection[offset:offset + limit] vector_cube['id'] = collection_id vector_cube['features'] = [] vector_cube['total_feature_count'] = len(collection) diff --git a/xcube_geodb_openeo/backend/catalog.py b/xcube_geodb_openeo/backend/catalog.py index eb46059..7824576 100644 --- a/xcube_geodb_openeo/backend/catalog.py +++ b/xcube_geodb_openeo/backend/catalog.py @@ -21,7 +21,7 @@ import datetime -from typing import Optional, Tuple +from typing import Optional, Tuple, Union from ..core.vectorcube import VectorCube, Feature from ..server.context import RequestContext @@ -36,7 +36,8 @@ def get_collections(ctx: RequestContext, url: str, limit: int, offset: int): collections = { 'collections': [ _get_vector_cube_collection( - ctx, _get_vector_cube(ctx, collection_id, with_items=False), + ctx, _get_vector_cube(ctx, collection_id, with_items=False, + bbox=None, limit=limit, offset=offset), details=False) for collection_id in ctx.collection_ids[offset:offset + limit] ], @@ -110,10 +111,7 @@ def get_collection_items(ctx: RequestContext, def get_collection_item(ctx: RequestContext, collection_id: str, feature_id: str): - # todo - this currently fetches the whole vector cube and returns a single - # feature! - vector_cube = _get_vector_cube(ctx, collection_id, True, limit=10000, - offset=0) + vector_cube = _get_vector_cube(ctx, collection_id, True) for feature in vector_cube.get("features", []): if str(feature.get("id")) == feature_id: return _get_vector_cube_item(ctx, @@ -217,8 +215,9 @@ def _utc_now(): def _get_vector_cube(ctx, collection_id: str, with_items: bool, - bbox: Tuple[float, float, float, float] = None, - limit: Optional[int] = 1, offset: Optional[int] = 0): + bbox: Union[Tuple[float, float, float, float], None] = + None, + limit: Optional[int] = None, offset: Optional[int] = 0): if collection_id not in ctx.collection_ids: raise CollectionNotFoundException( f'Unknown collection {collection_id!r}' diff --git a/xcube_geodb_openeo/core/datastore.py b/xcube_geodb_openeo/core/datastore.py index 901ccee..81b7ccd 100644 --- a/xcube_geodb_openeo/core/datastore.py +++ b/xcube_geodb_openeo/core/datastore.py @@ -47,8 +47,8 @@ def get_collection_keys(self): @abc.abstractmethod def get_vector_cube(self, collection_id: str, with_items: bool, bbox: Tuple[float, float, float, float], - limit: Optional[int] = 1, offset: Optional[int] = 0) \ - -> VectorCube: + limit: Optional[int] = None, + offset: Optional[int] = 0) -> VectorCube: pass @staticmethod diff --git a/xcube_geodb_openeo/core/geodb_datastore.py b/xcube_geodb_openeo/core/geodb_datastore.py index 58ca664..e747adb 100644 --- a/xcube_geodb_openeo/core/geodb_datastore.py +++ b/xcube_geodb_openeo/core/geodb_datastore.py @@ -63,8 +63,9 @@ def get_collection_keys(self): return collections.get('collection') def get_vector_cube(self, collection_id: str, with_items: bool, - bbox: Tuple[float, float, float, float], - limit: Optional[int] = 1, offset: Optional[int] = 0) \ + bbox: Tuple[float, float, float, float] = None, + limit: Optional[int] = None, offset: Optional[int] = + 0) \ -> VectorCube: vector_cube = self.geodb.get_collection_info(collection_id) vector_cube['id'] = collection_id diff --git a/xcube_geodb_openeo/server/context.py b/xcube_geodb_openeo/server/context.py index f7844a4..7a39082 100644 --- a/xcube_geodb_openeo/server/context.py +++ b/xcube_geodb_openeo/server/context.py @@ -46,7 +46,7 @@ def collection_ids(self) -> Sequence[str]: @abc.abstractmethod def get_vector_cube(self, collection_id: str, with_items: bool, bbox: Tuple[float, float, float, float], - limit: Optional[int] = 1, offset: Optional[int] = 0) \ + limit: Optional[int], offset: Optional[int]) \ -> VectorCube: pass @@ -91,7 +91,7 @@ def collection_ids(self) -> Sequence[str]: def get_vector_cube(self, collection_id: str, with_items: bool, bbox: Tuple[float, float, float, float], - limit: Optional[int] = 1, offset: Optional[int] = 0) \ + limit: Optional[int], offset: Optional[int]) \ -> VectorCube: return self.data_store.get_vector_cube(collection_id, with_items, bbox, limit, offset) @@ -124,7 +124,7 @@ def collection_ids(self) -> Sequence[str]: def get_vector_cube(self, collection_id: str, with_items: bool, bbox: Tuple[float, float, float, float], - limit: Optional[int] = 1, offset: Optional[int] = 0) \ + limit: Optional[int], offset: Optional[int]) \ -> VectorCube: return self._ctx.get_vector_cube(collection_id, with_items, bbox, limit, offset) From 7094ce742c404efadfe36060375452262273972a Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 19 May 2022 09:22:44 +0200 Subject: [PATCH 025/163] intermediate --- xcube_geodb_openeo/backend/catalog.py | 4 ++-- xcube_geodb_openeo/core/geodb_datastore.py | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/xcube_geodb_openeo/backend/catalog.py b/xcube_geodb_openeo/backend/catalog.py index 7824576..5354965 100644 --- a/xcube_geodb_openeo/backend/catalog.py +++ b/xcube_geodb_openeo/backend/catalog.py @@ -138,9 +138,9 @@ def _get_vector_cube_collection(ctx: RequestContext, "stac_version": config['STAC_VERSION'], "stac_extensions": ["xcube-geodb"], "id": vector_cube_id, - # TODO: fill in values "title": metadata.get("title", ""), - "description": metadata.get("description", ""), + "description": metadata.get("description", "No description " + "available."), "license": metadata.get("license", "proprietary"), "keywords": metadata.get("keywords", []), "providers": metadata.get("providers", []), diff --git a/xcube_geodb_openeo/core/geodb_datastore.py b/xcube_geodb_openeo/core/geodb_datastore.py index e747adb..d7a9db9 100644 --- a/xcube_geodb_openeo/core/geodb_datastore.py +++ b/xcube_geodb_openeo/core/geodb_datastore.py @@ -86,4 +86,12 @@ def get_vector_cube(self, collection_id: str, with_items: bool, if with_items: self.add_items_to_vector_cube(items, vector_cube, self.config) + vector_cube['metadata'] = { + 'title': collection_id, + 'extent': { + 'spatial': { + 'bbox': [] + } + }, + } return vector_cube From acbaa3a3f6fe4dbcb6f7578c8981272e78dcb4cf Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 20 May 2022 16:20:50 +0200 Subject: [PATCH 026/163] implemented 'extent' metadata --- xcube_geodb_openeo/core/geodb_datastore.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/xcube_geodb_openeo/core/geodb_datastore.py b/xcube_geodb_openeo/core/geodb_datastore.py index d7a9db9..605fc2f 100644 --- a/xcube_geodb_openeo/core/geodb_datastore.py +++ b/xcube_geodb_openeo/core/geodb_datastore.py @@ -18,7 +18,8 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. - +import json +import numpy as np from functools import cached_property from typing import Tuple, Optional @@ -86,11 +87,26 @@ def get_vector_cube(self, collection_id: str, with_items: bool, if with_items: self.add_items_to_vector_cube(items, vector_cube, self.config) + res = self.geodb.get_collection_bbox(collection_id) + srid = self.geodb.get_collection_srid(collection_id) + collection_bbox = list(json.loads(res)[0].values())[0][4:-1] + collection_bbox = np.fromstring(collection_bbox.replace(',', ' '), + dtype=float, sep=' ') + if srid is not None and srid != '4326': + collection_bbox = self.geodb.transform_bbox_crs( + collection_bbox, + srid, '4326', + wsg84_order='lon_lat') + vector_cube['metadata'] = { 'title': collection_id, 'extent': { 'spatial': { - 'bbox': [] + 'bbox': collection_bbox, + 'crs': 'http://www.opengis.net/def/crs/OGC/1.3/CRS84' + }, + 'temporal': { + 'interval': [['null']] } }, } From dec0970fda269d01569cc66a6d85e810d8ceb1f7 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 21 May 2022 00:30:19 +0200 Subject: [PATCH 027/163] only getting items if really needed --- xcube_geodb_openeo/core/geodb_datastore.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/xcube_geodb_openeo/core/geodb_datastore.py b/xcube_geodb_openeo/core/geodb_datastore.py index 605fc2f..a9cf432 100644 --- a/xcube_geodb_openeo/core/geodb_datastore.py +++ b/xcube_geodb_openeo/core/geodb_datastore.py @@ -74,17 +74,19 @@ def get_vector_cube(self, collection_id: str, with_items: bool, if bbox: vector_cube['total_feature_count'] = \ self.geodb.count_collection_by_bbox(collection_id, bbox) - items = self.geodb.get_collection_by_bbox(collection_id, bbox, - limit=limit, - offset=offset) else: vector_cube['total_feature_count'] = \ self.geodb.count_collection_by_bbox(collection_id, (-180, 90, 180, -90)) - items = self.geodb.get_collection(collection_id, limit=limit, - offset=offset) if with_items: + if bbox: + items = self.geodb.get_collection_by_bbox(collection_id, bbox, + limit=limit, + offset=offset) + else: + items = self.geodb.get_collection(collection_id, limit=limit, + offset=offset) self.add_items_to_vector_cube(items, vector_cube, self.config) res = self.geodb.get_collection_bbox(collection_id) From 494019c85de01a67c7f265361b69b313db429b6b Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 25 May 2022 11:44:25 +0200 Subject: [PATCH 028/163] added summaries metadata --- xcube_geodb_openeo/core/geodb_datastore.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xcube_geodb_openeo/core/geodb_datastore.py b/xcube_geodb_openeo/core/geodb_datastore.py index a9cf432..966ecf7 100644 --- a/xcube_geodb_openeo/core/geodb_datastore.py +++ b/xcube_geodb_openeo/core/geodb_datastore.py @@ -18,6 +18,7 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. + import json import numpy as np from functools import cached_property @@ -100,6 +101,12 @@ def get_vector_cube(self, collection_id: str, with_items: bool, srid, '4326', wsg84_order='lon_lat') + properties = self.geodb.get_properties(collection_id) + summaries = { + 'properties': [] + } + for p in properties['column_name'].to_list(): + summaries['properties'].append({'name': p}) vector_cube['metadata'] = { 'title': collection_id, 'extent': { @@ -111,5 +118,6 @@ def get_vector_cube(self, collection_id: str, with_items: bool, 'interval': [['null']] } }, + 'summaries': summaries } return vector_cube From 1216284570d8c8777263b6f86be58a5826cc109e Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 27 May 2022 11:24:53 +0200 Subject: [PATCH 029/163] moved sample and default config to source root --- config.yml.example => xcube_geodb_openeo/config.yml.example | 0 defaults.py => xcube_geodb_openeo/defaults.py | 0 xcube_geodb_openeo/server/config.py | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename config.yml.example => xcube_geodb_openeo/config.yml.example (100%) rename defaults.py => xcube_geodb_openeo/defaults.py (100%) diff --git a/config.yml.example b/xcube_geodb_openeo/config.yml.example similarity index 100% rename from config.yml.example rename to xcube_geodb_openeo/config.yml.example diff --git a/defaults.py b/xcube_geodb_openeo/defaults.py similarity index 100% rename from defaults.py rename to xcube_geodb_openeo/defaults.py diff --git a/xcube_geodb_openeo/server/config.py b/xcube_geodb_openeo/server/config.py index 0f615ea..ade4a7b 100644 --- a/xcube_geodb_openeo/server/config.py +++ b/xcube_geodb_openeo/server/config.py @@ -24,7 +24,7 @@ import yaml -from defaults import API_VERSION, STAC_VERSION, SERVER_URL, SERVER_ID, \ +from xcube_geodb_openeo.defaults import API_VERSION, STAC_VERSION, SERVER_URL, SERVER_ID, \ SERVER_TITLE, SERVER_DESCRIPTION Config = Dict[str, Any] From 65b91e7a5711adc89b56e40a35d3d8c09c5d76f2 Mon Sep 17 00:00:00 2001 From: Thomas Storm Date: Fri, 27 May 2022 15:05:37 +0200 Subject: [PATCH 030/163] Minor update .github/workflows/workflow.yaml Co-authored-by: Norman Fomferra --- .github/workflows/workflow.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 071befc..8174263 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -50,4 +50,4 @@ jobs: if: ${{ env.SKIP_UNITTESTS == '0' }} with: fail_ci_if_error: true - verbose: false \ No newline at end of file + verbose: false From 4cea3961393c11f654138864958e4e856ead7e77 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 27 May 2022 18:37:36 +0200 Subject: [PATCH 031/163] addressed PR review --- tests/core/mock_datastore.py | 6 ++---- tests/test_config.yml | 2 +- xcube_geodb_openeo/config.yml.example | 2 +- xcube_geodb_openeo/core/datastore.py | 17 ++++++++--------- xcube_geodb_openeo/core/geodb_datastore.py | 9 +++++---- xcube_geodb_openeo/server/cli.py | 3 +-- xcube_geodb_openeo/server/context.py | 2 +- 7 files changed, 19 insertions(+), 22 deletions(-) diff --git a/tests/core/mock_datastore.py b/tests/core/mock_datastore.py index f6f68df..d8a194c 100644 --- a/tests/core/mock_datastore.py +++ b/tests/core/mock_datastore.py @@ -27,17 +27,15 @@ from xcube_geodb_openeo.core.datastore import DataStore from xcube_geodb_openeo.core.vectorcube import VectorCube -from xcube_geodb_openeo.server.config import Config import importlib.resources as resources class MockDataStore(DataStore): - def __init__(self, config: Config): + def __init__(self): with resources.open_text('tests', 'mock_collections.json') as text: mock_collections = json.load(text)['_MOCK_COLLECTIONS_LIST'] self._MOCK_COLLECTIONS = {v["id"]: v for v in mock_collections} - self.config = config def get_collection_keys(self) -> Sequence: return list(self._MOCK_COLLECTIONS.keys()) @@ -69,5 +67,5 @@ def get_vector_cube(self, collection_id: str, with_items: bool, vector_cube['features'] = [] vector_cube['total_feature_count'] = len(collection) if with_items: - self.add_items_to_vector_cube(collection, vector_cube, self.config) + self.add_items_to_vector_cube(collection, vector_cube) return vector_cube diff --git a/tests/test_config.yml b/tests/test_config.yml index 81aba9c..b53182d 100644 --- a/tests/test_config.yml +++ b/tests/test_config.yml @@ -4,4 +4,4 @@ SERVER_URL: http://xcube-geoDB-openEO.de SERVER_ID: xcube-geodb-openeo SERVER_TITLE: xcube geoDB Server, openEO API SERVER_DESCRIPTION: Catalog of geoDB collections. -datastore-class: tests.core.mock_datastore.MockDataStore \ No newline at end of file +datastore_class: tests.core.mock_datastore.MockDataStore \ No newline at end of file diff --git a/xcube_geodb_openeo/config.yml.example b/xcube_geodb_openeo/config.yml.example index 745814e..ff30e24 100644 --- a/xcube_geodb_openeo/config.yml.example +++ b/xcube_geodb_openeo/config.yml.example @@ -1,5 +1,5 @@ # adapt to your needs and save as config.yml -datastore-class: xcube_geodb_openeo.core.geodb_datastore.GeoDBDataStore +datastore_class: xcube_geodb_openeo.core.geodb_datastore.GeoDBDataStore postgrest_url: postgrest_port: diff --git a/xcube_geodb_openeo/core/datastore.py b/xcube_geodb_openeo/core/datastore.py index 81b7ccd..cef93e2 100644 --- a/xcube_geodb_openeo/core/datastore.py +++ b/xcube_geodb_openeo/core/datastore.py @@ -23,10 +23,9 @@ from typing import Union, Dict, Tuple, Optional from .vectorcube import VectorCube -from ..server.config import Config +from ..defaults import STAC_VERSION from geopandas import GeoDataFrame -from pandas import DataFrame import shapely.wkt import shapely.geometry @@ -53,20 +52,20 @@ def get_vector_cube(self, collection_id: str, with_items: bool, @staticmethod def add_items_to_vector_cube( - collection: Union[GeoDataFrame, DataFrame], - vector_cube: VectorCube, - config: Config): + collection: GeoDataFrame, vector_cube: VectorCube): bounds = collection.bounds for i, row in enumerate(collection.iterrows()): bbox = bounds.iloc[i] feature = row[1] coords = get_coords(feature) - # todo - unsure if this is correct - properties = {key: feature[key] for key in feature.keys() if key - not in ['id', 'geometry']} + properties = {} + for k, key in enumerate(feature.keys()): + if not key == 'id' and not \ + collection.dtypes.values[k].name == 'geometry': + properties[key] = feature[key] vector_cube['features'].append({ - 'stac_version': config['STAC_VERSION'], + 'stac_version': STAC_VERSION, 'stac_extensions': ['xcube-geodb'], 'type': 'Feature', 'id': feature['id'], diff --git a/xcube_geodb_openeo/core/geodb_datastore.py b/xcube_geodb_openeo/core/geodb_datastore.py index 966ecf7..fcb5499 100644 --- a/xcube_geodb_openeo/core/geodb_datastore.py +++ b/xcube_geodb_openeo/core/geodb_datastore.py @@ -74,11 +74,12 @@ def get_vector_cube(self, collection_id: str, with_items: bool, vector_cube['features'] = [] if bbox: vector_cube['total_feature_count'] = \ - self.geodb.count_collection_by_bbox(collection_id, bbox) + int(self.geodb.count_collection_by_bbox( + collection_id, bbox)['ct'][0]) else: vector_cube['total_feature_count'] = \ - self.geodb.count_collection_by_bbox(collection_id, - (-180, 90, 180, -90)) + int(self.geodb.count_collection_by_bbox( + collection_id, (-180, 90, 180, -90))['ct'][0]) if with_items: if bbox: @@ -88,7 +89,7 @@ def get_vector_cube(self, collection_id: str, with_items: bool, else: items = self.geodb.get_collection(collection_id, limit=limit, offset=offset) - self.add_items_to_vector_cube(items, vector_cube, self.config) + self.add_items_to_vector_cube(items, vector_cube) res = self.geodb.get_collection_bbox(collection_id) srid = self.geodb.get_collection_srid(collection_id) diff --git a/xcube_geodb_openeo/server/cli.py b/xcube_geodb_openeo/server/cli.py index 6b8dab6..bc82aaa 100644 --- a/xcube_geodb_openeo/server/cli.py +++ b/xcube_geodb_openeo/server/cli.py @@ -26,7 +26,7 @@ WEB_FRAMEWORK_FLASK = 'flask' WEB_FRAMEWORKS = [WEB_FRAMEWORK_FLASK, WEB_FRAMEWORK_TORNADO] -DEFAULT_CONFIG_PATH = 'config.yml' +DEFAULT_CONFIG_PATH = 'xcube_geodb_openeo/config.yml' DEFAULT_WEB_FRAMEWORK = WEB_FRAMEWORK_FLASK DEFAULT_ADDRESS = '0.0.0.0' DEFAULT_PORT = 5000 @@ -60,7 +60,6 @@ def main(config_path: Optional[str], from xcube_geodb_openeo.server.config import load_config config = load_config(config_path) if config_path else {} - db_config = load_config(config_path) if config_path else {} module = importlib.import_module( f'xcube_geodb_openeo.server.app.{framework}' diff --git a/xcube_geodb_openeo/server/context.py b/xcube_geodb_openeo/server/context.py index 7a39082..a8d6c96 100644 --- a/xcube_geodb_openeo/server/context.py +++ b/xcube_geodb_openeo/server/context.py @@ -78,7 +78,7 @@ def config(self, config: Config): def data_store(self) -> DataStore: if not self.config: raise RuntimeError('config not set') - data_store_class = self.config['datastore-class'] + data_store_class = self.config['datastore_class'] data_store_module = data_store_class[:data_store_class.rindex('.')] class_name = data_store_class[data_store_class.rindex('.') + 1:] module = importlib.import_module(data_store_module) From 46383c5ca0731890fbc1b83bce91da9bcd6b4c8b Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 27 May 2022 18:43:53 +0200 Subject: [PATCH 032/163] fixed test run --- tests/core/mock_datastore.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/core/mock_datastore.py b/tests/core/mock_datastore.py index d8a194c..a7f29e8 100644 --- a/tests/core/mock_datastore.py +++ b/tests/core/mock_datastore.py @@ -27,12 +27,14 @@ from xcube_geodb_openeo.core.datastore import DataStore from xcube_geodb_openeo.core.vectorcube import VectorCube +from xcube_geodb_openeo.server.config import Config import importlib.resources as resources class MockDataStore(DataStore): - def __init__(self): + # noinspection PyUnusedLocal + def __init__(self, config: Config): with resources.open_text('tests', 'mock_collections.json') as text: mock_collections = json.load(text)['_MOCK_COLLECTIONS_LIST'] self._MOCK_COLLECTIONS = {v["id"]: v for v in mock_collections} From 3a33a5319278d4b1d412fd4b32704f62cc9e0dbd Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 1 Jun 2022 01:10:00 +0200 Subject: [PATCH 033/163] adapting to xcube Server NG. Intermediate commit, it's all WiP --- .gitignore | 2 + setup.cfg | 1 + setup.py | 29 +- .../{test_catalog.py => test_context.py} | 13 +- tests/core/mock_datastore.py | 9 +- xcube_geodb_openeo/api/__init__.py | 22 ++ xcube_geodb_openeo/api/api.py | 36 +++ xcube_geodb_openeo/api/context.py | 304 ++++++++++++++++++ xcube_geodb_openeo/api/routes.py | 174 ++++++++++ xcube_geodb_openeo/backend/capabilities.py | 12 +- xcube_geodb_openeo/backend/catalog.py | 220 +------------ xcube_geodb_openeo/config.yml.example | 13 +- xcube_geodb_openeo/core/datastore.py | 26 +- xcube_geodb_openeo/core/geodb_datastore.py | 18 +- xcube_geodb_openeo/defaults.py | 12 +- xcube_geodb_openeo/plugin.py | 33 ++ xcube_geodb_openeo/server/app/flask.py | 3 +- xcube_geodb_openeo/server/app/tornado.py | 3 +- xcube_geodb_openeo/server/cli.py | 3 +- xcube_geodb_openeo/server/config.py | 40 +-- xcube_geodb_openeo/server/context.py | 15 +- 21 files changed, 686 insertions(+), 302 deletions(-) rename tests/backend/{test_catalog.py => test_context.py} (90%) create mode 100644 xcube_geodb_openeo/api/__init__.py create mode 100644 xcube_geodb_openeo/api/api.py create mode 100644 xcube_geodb_openeo/api/context.py create mode 100644 xcube_geodb_openeo/api/routes.py create mode 100644 xcube_geodb_openeo/plugin.py diff --git a/.gitignore b/.gitignore index 45145e5..ae2034f 100644 --- a/.gitignore +++ b/.gitignore @@ -133,3 +133,5 @@ dmypy.json # Pyre type checker .pyre/ + +xcube_geodb_openeo.iml \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 8db9fa8..0b36358 100644 --- a/setup.cfg +++ b/setup.cfg @@ -9,3 +9,4 @@ author = xcube Team [options] packages = find: +install_requires = xcube >=0.11.3.dev0 diff --git a/setup.py b/setup.py index a4f49f9..552ba58 100644 --- a/setup.py +++ b/setup.py @@ -1,2 +1,27 @@ -import setuptools -setuptools.setup() +#!/usr/bin/env python3 + +# The MIT License (MIT) +# Copyright (c) 2022 by the xcube development team and contributors +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +from setuptools import setup + +setup() + diff --git a/tests/backend/test_catalog.py b/tests/backend/test_context.py similarity index 90% rename from tests/backend/test_catalog.py rename to tests/backend/test_context.py index 869efa1..64a8a07 100644 --- a/tests/backend/test_catalog.py +++ b/tests/backend/test_context.py @@ -21,14 +21,13 @@ import unittest -import xcube_geodb_openeo.backend.catalog as catalog +import xcube_geodb_openeo.api.context as context -class CatalogTest(unittest.TestCase): - +class ContextTest(unittest.TestCase): def test_get_collections_links(self): - links = catalog.get_collections_links( + links = context.get_collections_links( 2, 6, 'http://server.hh/collections', 10) self.assertEqual([ {'href': 'http://server.hh/collections?limit=2&offset=8', @@ -44,7 +43,7 @@ def test_get_collections_links(self): 'rel': 'last', 'title': 'last'}], links) - links = catalog.get_collections_links( + links = context.get_collections_links( 3, 0, 'http://server.hh/collections', 5) self.assertEqual([ {'href': 'http://server.hh/collections?limit=3&offset=3', @@ -54,7 +53,7 @@ def test_get_collections_links(self): 'rel': 'last', 'title': 'last'}], links) - links = catalog.get_collections_links( + links = context.get_collections_links( 2, 8, 'http://server.hh/collections', 10) self.assertEqual([ {'href': 'http://server.hh/collections?limit=2&offset=6', @@ -64,6 +63,6 @@ def test_get_collections_links(self): 'rel': 'first', 'title': 'first'}], links) - links = catalog.get_collections_links( + links = context.get_collections_links( 10, 0, 'http://server.hh/collections', 7) self.assertEqual([], links) diff --git a/tests/core/mock_datastore.py b/tests/core/mock_datastore.py index a7f29e8..e358000 100644 --- a/tests/core/mock_datastore.py +++ b/tests/core/mock_datastore.py @@ -20,21 +20,24 @@ # DEALINGS IN THE SOFTWARE. import json -from typing import Sequence, Tuple, Optional +from typing import Any +from typing import Mapping +from typing import Optional +from typing import Sequence +from typing import Tuple import geopandas from shapely.geometry import Polygon from xcube_geodb_openeo.core.datastore import DataStore from xcube_geodb_openeo.core.vectorcube import VectorCube -from xcube_geodb_openeo.server.config import Config import importlib.resources as resources class MockDataStore(DataStore): # noinspection PyUnusedLocal - def __init__(self, config: Config): + def __init__(self, config: Mapping[str, Any]): with resources.open_text('tests', 'mock_collections.json') as text: mock_collections = json.load(text)['_MOCK_COLLECTIONS_LIST'] self._MOCK_COLLECTIONS = {v["id"]: v for v in mock_collections} diff --git a/xcube_geodb_openeo/api/__init__.py b/xcube_geodb_openeo/api/__init__.py new file mode 100644 index 0000000..98cc7a6 --- /dev/null +++ b/xcube_geodb_openeo/api/__init__.py @@ -0,0 +1,22 @@ +# The MIT License (MIT) +# Copyright (c) 2021/2022 by the xcube team and contributors +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +from .routes import api diff --git a/xcube_geodb_openeo/api/api.py b/xcube_geodb_openeo/api/api.py new file mode 100644 index 0000000..ab888c6 --- /dev/null +++ b/xcube_geodb_openeo/api/api.py @@ -0,0 +1,36 @@ +# The MIT License (MIT) +# Copyright (c) 2021/2022 by the xcube team and contributors +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +from xcube.server.api import Api +from xcube.server.context import Context + +from .context import GeoDbContext +from ..server.config import OPENEO_CONFIG_SCHEMA +from ..version import __version__ + + +def create_ctx(root_ctx: Context) -> GeoDbContext: + return GeoDbContext(root_ctx) + + +api = Api('geodb-openeo', version=__version__, + config_schema=OPENEO_CONFIG_SCHEMA, + create_ctx=create_ctx) diff --git a/xcube_geodb_openeo/api/context.py b/xcube_geodb_openeo/api/context.py new file mode 100644 index 0000000..e04cec2 --- /dev/null +++ b/xcube_geodb_openeo/api/context.py @@ -0,0 +1,304 @@ +# The MIT License (MIT) +# Copyright (c) 2021/2022 by the xcube team and contributors +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +import datetime +import importlib +from functools import cached_property +from typing import Any +from typing import Dict +from typing import Mapping +from typing import Optional +from typing import Sequence +from typing import Tuple + +from xcube.server.api import ApiContext +from xcube.server.context import Context +from xcube.server.impl.framework.tornado import TornadoApiRequest + +from ..core.datastore import DataStore +from ..core.vectorcube import VectorCube +from ..core.vectorcube import Feature +from ..defaults import default_config +from ..server.config import STAC_VERSION + +STAC_DEFAULT_COLLECTIONS_LIMIT = 10 +STAC_DEFAULT_ITEMS_LIMIT = 10 +STAC_MAX_ITEMS_LIMIT = 10000 + + +class GeoDbContext(ApiContext): + + @cached_property + def collection_ids(self) -> Sequence[str]: + return tuple(self.data_store.get_collection_keys()) + + @property + def config(self) -> Mapping[str, Any]: + assert self._config is not None + return self._config + + @config.setter + def config(self, config: Mapping[str, Any]): + assert isinstance(config, Mapping) + self._config = dict(config) + + @cached_property + def data_store(self) -> DataStore: + if not self.config: + raise RuntimeError('config not set') + data_store_class = self.config['geodb_openeo']['datastore_class'] + data_store_module = data_store_class[:data_store_class.rindex('.')] + class_name = data_store_class[data_store_class.rindex('.') + 1:] + module = importlib.import_module(data_store_module) + cls = getattr(module, class_name) + return cls(self.config) + + @property + def request(self) -> Mapping[str, Any]: + assert self._request is not None + return self._request + + @config.setter + def request(self, request: TornadoApiRequest): + assert isinstance(request, TornadoApiRequest) + self._request = request + + def __init__(self, root: Context): + super().__init__(root) + self.config = root.config + for key in default_config.keys(): + if key not in self.config: + self.config['geodb_openeo'][key] = default_config[key] + + def update(self, prev_ctx: Optional["Context"]): + pass + + def get_vector_cube(self, collection_id: str, with_items: bool, + bbox: Optional[Tuple[float, float, float, float]], + limit: Optional[int], offset: Optional[int]) \ + -> VectorCube: + return self.data_store.get_vector_cube(collection_id, with_items, + bbox, limit, offset) + + def __init__(self): + self._collections = {} + + @property + def collections(self) -> Dict: + assert self._collections is not None + return self._collections + + @collections.setter + def collections(self, collections: Dict): + assert isinstance(collections, Dict) + self._collections = collections + + def fetch_collections(self, base_url: str, limit: int, + offset: int): + url = f'{base_url}/collections' + links = get_collections_links(limit, offset, url, + len(self.collection_ids)) + collection_list = [] + for collection_id in self.collection_ids[offset:offset + limit]: + vector_cube = self.get_vector_cube(collection_id, with_items=False, + bbox=None, limit=limit, + offset=offset) + collection = _get_vector_cube_collection(base_url, vector_cube) + collection_list.append(collection) + + self.collections = { + 'collections': collection_list, + 'links': links + } + + def get_collection(self, base_url: str, + collection_id: str): + vector_cube = self.get_vector_cube(collection_id, with_items=False, + bbox=None, limit=None, offset=0) + return _get_vector_cube_collection(base_url, vector_cube) + + def get_collection_items(self, base_url: str, + collection_id: str, limit: int, offset: int, + bbox: Optional[Tuple[float, float, float, + float]] = None): + _validate(limit) + vector_cube = self.get_vector_cube(collection_id, with_items=True, + bbox=bbox, limit=limit, + offset=offset) + stac_features = [ + _get_vector_cube_item(base_url, vector_cube, feature) + for feature in vector_cube.get("features", []) + ] + + return { + "type": "FeatureCollection", + "features": stac_features, + "timeStamp": _utc_now(), + "numberMatched": vector_cube['total_feature_count'], + "numberReturned": len(stac_features), + } + + def get_collection_item(self, + collection_id: str, + feature_id: str): + # nah. use different geodb-function, don't get full vector cube + vector_cube = self.get_vector_cube(collection_id, with_items=True, + bbox=None, limit=None, offset=0) + for feature in vector_cube.get("features", []): + if str(feature.get("id")) == feature_id: + return _get_vector_cube_item(vector_cube, feature) + raise ItemNotFoundException( + f'feature {feature_id!r} not found in collection {collection_id!r}' + ) + + + +def get_collections_links(limit: int, offset: int, url: str, + collection_count: int): + links = [] + next_offset = offset + limit + next_link = {'rel': 'next', + 'href': f'{url}?limit={limit}&offset='f'{next_offset}', + 'title': 'next'} + prev_offset = offset - limit + prev_link = {'rel': 'prev', + 'href': f'{url}?limit={limit}&offset='f'{prev_offset}', + 'title': 'prev'} + first_link = {'rel': 'first', + 'href': f'{url}?limit={limit}&offset=0', + 'title': 'first'} + last_offset = collection_count - limit + last_link = {'rel': 'last', + 'href': f'{url}?limit={limit}&offset='f'{last_offset}', + 'title': 'last'} + + if next_offset < collection_count: + links.append(next_link) + if offset > 0: + links.append(prev_link) + links.append(first_link) + if limit + offset < collection_count: + links.append(last_link) + + return links + + +def search(): + # TODO: implement me + return {} + + +def _get_vector_cube_collection(base_url: str, + vector_cube: VectorCube): + vector_cube_id = vector_cube["id"] + metadata = vector_cube.get("metadata", {}) + return { + "stac_version": STAC_VERSION, + "stac_extensions": ["xcube-geodb"], + "id": vector_cube_id, + "title": metadata.get("title", ""), + "description": metadata.get("description", "No description " + "available."), + "license": metadata.get("license", "proprietary"), + "keywords": metadata.get("keywords", []), + "providers": metadata.get("providers", []), + "extent": metadata.get("extent", {}), + "summaries": metadata.get("summaries", {}), + "links": [ + { + "rel": "self", + "href": f"{base_url}/collections/{vector_cube_id}" + }, + { + "rel": "root", + "href": f"{base_url}/collections/" + }, + # { + # "rel": "license", + # "href": ctx.get_url("TODO"), + # "title": "TODO" + # } + ] + } + + +def _get_vector_cube_item(base_url: str, vector_cube: VectorCube, + feature: Feature): + collection_id = vector_cube["id"] + feature_id = feature["id"] + feature_bbox = feature.get("bbox") + feature_geometry = feature.get("geometry") + feature_properties = feature.get("properties", {}) + + return { + "stac_version": STAC_VERSION, + "stac_extensions": ["xcube-geodb"], + "type": "Feature", + "id": feature_id, + "bbox": feature_bbox, + "geometry": feature_geometry, + "properties": feature_properties, + "collection": collection_id, + "links": [ + { + "rel": "self", + "href": f"{base_url}/collections/" + f"{collection_id}/items/{feature_id}" + } + ], + "assets": { + "analytic": { + # TODO + }, + "visual": { + # TODO + }, + "thumbnail": { + # TODO + } + } + } + + +def _utc_now(): + return datetime \ + .datetime \ + .utcnow() \ + .replace(microsecond=0) \ + .isoformat() + 'Z' + + +def _validate(limit: int): + if limit < 1 or limit > STAC_MAX_ITEMS_LIMIT: + raise InvalidParameterException(f'if specified, limit has to be ' + f'between 1 and ' + f'{STAC_MAX_ITEMS_LIMIT}') + + +class CollectionNotFoundException(Exception): + pass + + +class ItemNotFoundException(Exception): + pass + + +class InvalidParameterException(Exception): + pass diff --git a/xcube_geodb_openeo/api/routes.py b/xcube_geodb_openeo/api/routes.py new file mode 100644 index 0000000..abd335d --- /dev/null +++ b/xcube_geodb_openeo/api/routes.py @@ -0,0 +1,174 @@ +# The MIT License (MIT) +# Copyright (c) 2021/2022 by the xcube team and contributors +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +from ..backend import capabilities +from .api import api +from xcube.server.api import ApiHandler +from .context import STAC_DEFAULT_COLLECTIONS_LIMIT + + +def get_limit(request): + limit = int(request.get_query_arg('limit')) if \ + request.get_query_arg('limit') \ + else STAC_DEFAULT_COLLECTIONS_LIMIT + return limit + + +def get_offset(request): + return int(request.get_query_arg('offset')) if \ + request.get_query_arg('offset') \ + else 0 + + +def get_bbox(request): + if request.get_query_arg('bbox'): + bbox = str(request.get_query_arg('bbox')) + return tuple(bbox.split(',')) + else: + return None + + +@api.route('/.well-known/openeo') +class WellKnownHandler(ApiHandler): + """ + Lists all implemented openEO versions supported by the service provider. + This endpoint is the Well-Known URI (see RFC 5785) for openEO. + """ + + @api.operation(operationId='connect', summary='Well-Known URI') + def get(self): + """ + Returns the well-known information. + """ + self.response.finish(capabilities.get_well_known(self.config)) + + +@api.route('/collections') +class CollectionsHandler(ApiHandler): + """ + Lists available collections with at least the required information. + """ + + @api.operation(operationId='getCollections', summary='Gets metadata of ') + def get(self): + """ + Lists the available collections. + + Args: + limit (int): The optional limit parameter limits the number of + items that are presented in the response document. + offset (int): Collections are listed starting at offset. + """ + limit = get_limit(self.request) + offset = get_offset(self.request) + base_url = f'{self.request._request.protocol}://' \ + f'{self.request._request.host}' + self.ctx.request = self.request + if not self.ctx.collections: + self.ctx.fetch_collections(self.ctx, base_url, limit, offset) + self.response.finish(self.ctx.collections) + + +@api.route('/conformance') +class ConformanceHandler(ApiHandler): + """ + Lists all conformance classes specified in OGC standards that the server + conforms to. + """ + + def get(self): + """ + Lists the conformance classes. + """ + self.response.finish(capabilities.get_conformance()) + + +@api.route('/collections/') +class CollectionHandler(ApiHandler): + """ + Lists all information about a specific collection specified by the + identifier collection_id. + """ + + def get(self): + """ + Lists the collection information. + """ + # todo - collection_id is not a query argument, but a path argument. + # Change as soon as Server NG allows + collection_id = self.request.get_query_arg('collection_id') + base_url = f'{self.request._request.protocol}://' \ + f'{self.request._request.host}' + collection = self.ctx.get_collection(self.ctx, base_url, collection_id) + self.response.finish(collection) + + +@api.route('/collections//items') +class CollectionItemsHandler(ApiHandler): + """ + Get features of the feature collection with id collectionId. + """ + + # noinspection PyIncorrectDocstring + def get(self): + """ + Returns the features. + + Args: + limit (int): Optional, limits the number of items presented in + the response document. + offset (int): Optional, collections are listed starting at offset. + bbox (array of numbers): Only features that intersect the bounding + box are selected. Example: bbox=160.6,-55.95,-170,-25.89 + """ + limit = get_limit(self.request) + offset = get_offset(self.request) + bbox = get_bbox(self.request) + + # todo - collection_id is not a query argument, but a path argument. + # Change as soon as Server NG allows + collection_id = self.request.get_query_arg('collection_id') + + base_url = f'{self.request._request.protocol}://' \ + f'{self.request._request.host}' + items = self.ctx.get_collection_items(self.ctx, base_url, collection_id, + limit, offset, bbox) + self.response.finish(items) + + +@api.route('/collections//' + 'items/') +class FeatureHandler(ApiHandler): + """ + Fetch a single feature. + """ + def get(self): + """ + Returns the feature. + """ + + # todo - collection_id is not a query argument, but a path argument. + # Change as soon as Server NG allows + collection_id = self.request.get_query_arg('collection_id') + feature_id = self.request.get_query_arg('feature_id') + + feature = self.ctx.get_collection_item(self.ctx, collection_id, + feature_id) + self.response.finish(feature) diff --git a/xcube_geodb_openeo/backend/capabilities.py b/xcube_geodb_openeo/backend/capabilities.py index 70acfb2..afc2a09 100644 --- a/xcube_geodb_openeo/backend/capabilities.py +++ b/xcube_geodb_openeo/backend/capabilities.py @@ -18,8 +18,10 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. +from typing import Any +from typing import Mapping -from ..server.config import Config +from ..server.config import API_VERSION from ..server.context import RequestContext from ..version import __version__ @@ -29,7 +31,7 @@ ''' -def get_root(config: Config, ctx: RequestContext): +def get_root(config: Mapping[str, Any], ctx: RequestContext): return { 'api_version': config['API_VERSION'], 'backend_version': __version__, @@ -85,12 +87,12 @@ def get_root(config: Config, ctx: RequestContext): } -def get_well_known(config: Config): +def get_well_known(config: Mapping[str, Any]): return { 'versions': [ { - 'url': config['SERVER_URL'], - 'api_version': config['API_VERSION'] + 'url': config['geodb_openeo']['SERVER_URL'], + 'api_version': API_VERSION } ] } diff --git a/xcube_geodb_openeo/backend/catalog.py b/xcube_geodb_openeo/backend/catalog.py index 5354965..3eebc65 100644 --- a/xcube_geodb_openeo/backend/catalog.py +++ b/xcube_geodb_openeo/backend/catalog.py @@ -20,225 +20,15 @@ # DEALINGS IN THE SOFTWARE. -import datetime -from typing import Optional, Tuple, Union +from typing import Dict +from typing import Optional +from typing import Tuple -from ..core.vectorcube import VectorCube, Feature -from ..server.context import RequestContext +from ..api.context import GeoDbContext -STAC_DEFAULT_COLLECTIONS_LIMIT = 10 -STAC_DEFAULT_ITEMS_LIMIT = 10 -STAC_MAX_ITEMS_LIMIT = 10000 -def get_collections(ctx: RequestContext, url: str, limit: int, offset: int): - links = get_collections_links(limit, offset, url, len(ctx.collection_ids)) - collections = { - 'collections': [ - _get_vector_cube_collection( - ctx, _get_vector_cube(ctx, collection_id, with_items=False, - bbox=None, limit=limit, offset=offset), - details=False) - for collection_id in ctx.collection_ids[offset:offset + limit] - ], - 'links': links - } - return collections -def get_collections_links(limit: int, offset: int, url: str, - collection_count: int): - links = [] - next_offset = offset + limit - next_link = {'rel': 'next', - 'href': f'{url}?limit={limit}&offset='f'{next_offset}', - 'title': 'next'} - prev_offset = offset - limit - prev_link = {'rel': 'prev', - 'href': f'{url}?limit={limit}&offset='f'{prev_offset}', - 'title': 'prev'} - first_link = {'rel': 'first', - 'href': f'{url}?limit={limit}&offset=0', - 'title': 'first'} - last_offset = collection_count - limit - last_link = {'rel': 'last', - 'href': f'{url}?limit={limit}&offset='f'{last_offset}', - 'title': 'last'} - - if next_offset < collection_count: - links.append(next_link) - if offset > 0: - links.append(prev_link) - links.append(first_link) - if limit + offset < collection_count: - links.append(last_link) - - return links - - -def get_collection(ctx: RequestContext, - collection_id: str): - vector_cube = _get_vector_cube(ctx, collection_id, with_items=False) - return _get_vector_cube_collection(ctx, vector_cube, details=True) - - -def get_collection_items(ctx: RequestContext, - collection_id: str, - limit: int, - offset: int, - bbox: Optional[Tuple[float, float, float, float]] = - None): - _validate(limit) - vector_cube = _get_vector_cube(ctx, collection_id, with_items=True, - limit=limit, offset=offset, bbox=bbox) - stac_features = [ - _get_vector_cube_item(ctx, - vector_cube, - feature, - details=False) - for feature in vector_cube.get("features", []) - ] - - return { - "type": "FeatureCollection", - "features": stac_features, - "timeStamp": _utc_now(), - "numberMatched": vector_cube['total_feature_count'], - "numberReturned": len(stac_features), - } - - -def get_collection_item(ctx: RequestContext, - collection_id: str, - feature_id: str): - vector_cube = _get_vector_cube(ctx, collection_id, True) - for feature in vector_cube.get("features", []): - if str(feature.get("id")) == feature_id: - return _get_vector_cube_item(ctx, - vector_cube, - feature, - details=True) - raise ItemNotFoundException( - f'feature {feature_id!r} not found in collection {collection_id!r}' - ) - - -def search(ctx: RequestContext): - # TODO: implement me - return {} - - -def _get_vector_cube_collection(ctx: RequestContext, - vector_cube: VectorCube, - details: bool = False): - config = ctx.config - vector_cube_id = vector_cube["id"] - metadata = vector_cube.get("metadata", {}) - return { - "stac_version": config['STAC_VERSION'], - "stac_extensions": ["xcube-geodb"], - "id": vector_cube_id, - "title": metadata.get("title", ""), - "description": metadata.get("description", "No description " - "available."), - "license": metadata.get("license", "proprietary"), - "keywords": metadata.get("keywords", []), - "providers": metadata.get("providers", []), - "extent": metadata.get("extent", {}), - "summaries": metadata.get("summaries", {}), - "links": [ - { - "rel": "self", - "href": ctx.get_url( - f"collections/{vector_cube_id}") - }, - { - "rel": "root", - "href": ctx.get_url("collections") - }, - # { - # "rel": "license", - # "href": ctx.get_url("TODO"), - # "title": "TODO" - # } - ] - } - - -def _get_vector_cube_item(ctx: RequestContext, - vector_cube: VectorCube, - feature: Feature, - details: bool = False): - config = ctx.config - collection_id = vector_cube["id"] - feature_id = feature["id"] - feature_bbox = feature.get("bbox") - feature_geometry = feature.get("geometry") - feature_properties = feature.get("properties", {}) - - return { - "stac_version": config['STAC_VERSION'], - "stac_extensions": ["xcube-geodb"], - "type": "Feature", - "id": feature_id, - "bbox": feature_bbox, - "geometry": feature_geometry, - "properties": feature_properties, - "collection": collection_id, - "links": [ - { - "rel": "self", - 'href': ctx.get_url(f'collections/{collection_id}/' - f'items/{feature_id}') - } - ], - "assets": { - "analytic": { - # TODO - }, - "visual": { - # TODO - }, - "thumbnail": { - # TODO - } - } - } - - -def _utc_now(): - return datetime \ - .datetime \ - .utcnow() \ - .replace(microsecond=0) \ - .isoformat() + 'Z' - - -def _get_vector_cube(ctx, collection_id: str, with_items: bool, - bbox: Union[Tuple[float, float, float, float], None] = - None, - limit: Optional[int] = None, offset: Optional[int] = 0): - if collection_id not in ctx.collection_ids: - raise CollectionNotFoundException( - f'Unknown collection {collection_id!r}' - ) - return ctx.get_vector_cube(collection_id, with_items, bbox, limit, offset) - - -def _validate(limit: int): - if limit < 1 or limit > STAC_MAX_ITEMS_LIMIT: - raise InvalidParameterException(f'if specified, limit has to be ' - f'between 1 and ' - f'{STAC_MAX_ITEMS_LIMIT}') - - -class CollectionNotFoundException(Exception): - pass - - -class ItemNotFoundException(Exception): - pass - - -class InvalidParameterException(Exception): +class Catalog: pass diff --git a/xcube_geodb_openeo/config.yml.example b/xcube_geodb_openeo/config.yml.example index ff30e24..5f03092 100644 --- a/xcube_geodb_openeo/config.yml.example +++ b/xcube_geodb_openeo/config.yml.example @@ -1,8 +1,9 @@ # adapt to your needs and save as config.yml -datastore_class: xcube_geodb_openeo.core.geodb_datastore.GeoDBDataStore +geodb_openeo: + datastore_class: xcube_geodb_openeo.core.geodb_datastore.GeoDBDataStore -postgrest_url: -postgrest_port: -client_id: -client_secret: -auth_domain: \ No newline at end of file + postgrest_url: + postgrest_port: + client_id: + client_secret: + auth_domain: \ No newline at end of file diff --git a/xcube_geodb_openeo/core/datastore.py b/xcube_geodb_openeo/core/datastore.py index cef93e2..15f4ab6 100644 --- a/xcube_geodb_openeo/core/datastore.py +++ b/xcube_geodb_openeo/core/datastore.py @@ -20,21 +20,14 @@ # DEALINGS IN THE SOFTWARE. import abc -from typing import Union, Dict, Tuple, Optional +from typing import Dict, Tuple, Optional -from .vectorcube import VectorCube -from ..defaults import STAC_VERSION - -from geopandas import GeoDataFrame -import shapely.wkt import shapely.geometry +import shapely.wkt +from geopandas import GeoDataFrame - -def get_coords(feature: Dict) -> Dict: - geometry = feature['geometry'] - feature_wkt = shapely.wkt.loads(geometry.wkt) - coords = shapely.geometry.mapping(feature_wkt) - return coords +from .vectorcube import VectorCube +from ..server.config import STAC_VERSION class DataStore(abc.ABC): @@ -50,6 +43,13 @@ def get_vector_cube(self, collection_id: str, with_items: bool, offset: Optional[int] = 0) -> VectorCube: pass + @staticmethod + def _get_coords(feature: Dict) -> Dict: + geometry = feature['geometry'] + feature_wkt = shapely.wkt.loads(geometry.wkt) + coords = shapely.geometry.mapping(feature_wkt) + return coords + @staticmethod def add_items_to_vector_cube( collection: GeoDataFrame, vector_cube: VectorCube): @@ -57,7 +57,7 @@ def add_items_to_vector_cube( for i, row in enumerate(collection.iterrows()): bbox = bounds.iloc[i] feature = row[1] - coords = get_coords(feature) + coords = DataStore._get_coords(feature) properties = {} for k, key in enumerate(feature.keys()): if not key == 'id' and not \ diff --git a/xcube_geodb_openeo/core/geodb_datastore.py b/xcube_geodb_openeo/core/geodb_datastore.py index fcb5499..1861402 100644 --- a/xcube_geodb_openeo/core/geodb_datastore.py +++ b/xcube_geodb_openeo/core/geodb_datastore.py @@ -22,29 +22,31 @@ import json import numpy as np from functools import cached_property -from typing import Tuple, Optional +from typing import Tuple +from typing import Optional +from typing import Mapping +from typing import Any from .datastore import DataStore from xcube_geodb.core.geodb import GeoDBClient from .vectorcube import VectorCube -from ..server.config import Config class GeoDBDataStore(DataStore): - def __init__(self, config: Config): + def __init__(self, config: Mapping[str, Any]): self.config = config @cached_property def geodb(self): assert self.config - server_url = self.config['postgrest_url'] - server_port = self.config['postgrest_port'] - client_id = self.config['client_id'] - client_secret = self.config['client_secret'] - auth_domain = self.config['auth_domain'] + server_url = self.config['geodb_openeo']['postgrest_url'] + server_port = self.config['geodb_openeo']['postgrest_port'] + client_id = self.config['geodb_openeo']['client_id'] + client_secret = self.config['geodb_openeo']['client_secret'] + auth_domain = self.config['geodb_openeo']['auth_domain'] return GeoDBClient( server_url=server_url, diff --git a/xcube_geodb_openeo/defaults.py b/xcube_geodb_openeo/defaults.py index cde4c9a..dd4109b 100644 --- a/xcube_geodb_openeo/defaults.py +++ b/xcube_geodb_openeo/defaults.py @@ -19,9 +19,9 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. -API_VERSION = '1.1.0' -STAC_VERSION = '0.9.0' -SERVER_URL = 'http://www.brockmann-consult.de/xcube-geoDB-openEO' -SERVER_ID = 'xcube-geodb-openeo' -SERVER_TITLE = 'xcube geoDB Server, openEO API' -SERVER_DESCRIPTION = 'Catalog of geoDB collections.' +default_config = { + 'SERVER_URL': 'http://www.brockmann-consult.de/xcube-geoDB-openEO', + 'SERVER_ID': 'xcube-geodb-openeo', + 'SERVER_TITLE': 'xcube geoDB Server, openEO API', + 'SERVER_DESCRIPTION': 'Catalog of geoDB collections.' +} diff --git a/xcube_geodb_openeo/plugin.py b/xcube_geodb_openeo/plugin.py new file mode 100644 index 0000000..1af8d93 --- /dev/null +++ b/xcube_geodb_openeo/plugin.py @@ -0,0 +1,33 @@ +# The MIT License (MIT) +# Copyright (c) 2021/2022 by the xcube team and contributors +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +from xcube.util import extension +from xcube.constants import EXTENSION_POINT_SERVER_APIS + + +def init_plugin(ext_registry: extension.ExtensionRegistry): + ext_registry.add_extension( + loader=extension.import_component( + 'xcube_geodb_openeo.api:api' + ), + point=EXTENSION_POINT_SERVER_APIS, + name='geodb-openeo' + ) diff --git a/xcube_geodb_openeo/server/app/flask.py b/xcube_geodb_openeo/server/app/flask.py index 65012fe..d0e6008 100644 --- a/xcube_geodb_openeo/server/app/flask.py +++ b/xcube_geodb_openeo/server/app/flask.py @@ -26,7 +26,6 @@ import flask from ..api import API_URL_PREFIX -from ..config import Config from ..context import AppContext from ...backend import catalog from ...backend import capabilities @@ -125,7 +124,7 @@ def post_catalog_search(): def serve( - config: Config, + config: None, address: str, port: int, debug: bool = False, diff --git a/xcube_geodb_openeo/server/app/tornado.py b/xcube_geodb_openeo/server/app/tornado.py index 310bcb2..3a7a37a 100644 --- a/xcube_geodb_openeo/server/app/tornado.py +++ b/xcube_geodb_openeo/server/app/tornado.py @@ -29,7 +29,6 @@ import tornado.web from ..api import API_URL_PREFIX -from ..config import Config from ..context import AppContext from ..context import RequestContext from ...backend import capabilities @@ -265,7 +264,7 @@ async def post(self): def serve( - config: Config, + config: None, address: str, port: int, debug: bool = False, diff --git a/xcube_geodb_openeo/server/cli.py b/xcube_geodb_openeo/server/cli.py index bc82aaa..dd5b302 100644 --- a/xcube_geodb_openeo/server/cli.py +++ b/xcube_geodb_openeo/server/cli.py @@ -57,9 +57,8 @@ def main(config_path: Optional[str], A server that represents the openEO backend for the xcube geoDB. """ import importlib - from xcube_geodb_openeo.server.config import load_config - config = load_config(config_path) if config_path else {} + config = {} module = importlib.import_module( f'xcube_geodb_openeo.server.app.{framework}' diff --git a/xcube_geodb_openeo/server/config.py b/xcube_geodb_openeo/server/config.py index ade4a7b..4391cb0 100644 --- a/xcube_geodb_openeo/server/config.py +++ b/xcube_geodb_openeo/server/config.py @@ -19,30 +19,20 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. -from pathlib import Path -from typing import Dict, Any, Union +from xcube.util.jsonschema import JsonObjectSchema +from xcube.util.jsonschema import JsonStringSchema -import yaml +API_VERSION = '1.1.0' +STAC_VERSION = '0.9.0' -from xcube_geodb_openeo.defaults import API_VERSION, STAC_VERSION, SERVER_URL, SERVER_ID, \ - SERVER_TITLE, SERVER_DESCRIPTION - -Config = Dict[str, Any] - - -def load_config(config_path: Union[str, Path]) -> Config: - with open(config_path, 'r') as fp: - config = yaml.safe_load(fp) - if 'API_VERSION' not in config: - config['API_VERSION'] = API_VERSION - if 'STAC_VERSION' not in config: - config['STAC_VERSION'] = STAC_VERSION - if 'SERVER_URL' not in config: - config['SERVER_URL'] = SERVER_URL - if 'SERVER_ID' not in config: - config['SERVER_ID'] = SERVER_ID - if 'SERVER_TITLE' not in config: - config['SERVER_TITLE'] = SERVER_TITLE - if 'SERVER_DESCRIPTION' not in config: - config['SERVER_DESCRIPTION'] = SERVER_DESCRIPTION - return config +OPENEO_CONFIG_SCHEMA = JsonObjectSchema( + properties=dict( + geodb_openeo=JsonObjectSchema(properties=dict( + postgrest_url=JsonStringSchema(), + postgrest_port=JsonStringSchema(), + client_id=JsonStringSchema(), + client_secret=JsonStringSchema(), + auth_domain=JsonStringSchema()) + )), + additional_properties=False +) diff --git a/xcube_geodb_openeo/server/context.py b/xcube_geodb_openeo/server/context.py index a8d6c96..f766cf7 100644 --- a/xcube_geodb_openeo/server/context.py +++ b/xcube_geodb_openeo/server/context.py @@ -24,18 +24,21 @@ import importlib import logging from functools import cached_property -from typing import Sequence, Tuple, Optional +from typing import Any +from typing import Mapping +from typing import Optional +from typing import Sequence +from typing import Tuple from ..core.vectorcube import VectorCube from ..core.datastore import DataStore -from ..server.config import Config class Context(abc.ABC): @property @abc.abstractmethod - def config(self) -> Config: + def config(self) -> Mapping[str, Any]: pass @property @@ -65,12 +68,12 @@ def __init__(self, logger: logging.Logger): self._logger = logger @property - def config(self) -> Config: + def config(self) -> Mapping[str, Any]: assert self._config is not None return self._config @config.setter - def config(self, config: Config): + def config(self, config: Mapping[str, Any]): assert isinstance(config, dict) self._config = dict(config) @@ -115,7 +118,7 @@ def get_url(self, path: str): return f'{self._root_url}/{path}' @property - def config(self) -> Config: + def config(self) -> Mapping[str, Any]: return self._ctx.config @property From d9b2499edf37f2e3e89d60817fbc6efd0390d7fc Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 1 Jun 2022 15:06:51 +0200 Subject: [PATCH 034/163] adapting to xcube Server NG. Intermediate commit, it's all WiP --- tests/{backend => api}/__init__.py | 0 tests/{backend => api}/test_context.py | 1 - tests/server/app/base_test.py | 53 ++-- tests/server/app/test_capabilities.py | 47 ++-- tests/test_config.yml | 9 +- xcube_geodb_openeo/api/context.py | 11 +- xcube_geodb_openeo/api/routes.py | 54 ++-- xcube_geodb_openeo/backend/capabilities.py | 4 +- xcube_geodb_openeo/server/__init__.py | 20 -- xcube_geodb_openeo/server/api.py | 24 -- xcube_geodb_openeo/server/app/__init__.py | 0 xcube_geodb_openeo/server/app/flask.py | 139 ---------- xcube_geodb_openeo/server/app/tornado.py | 279 --------------------- xcube_geodb_openeo/server/cli.py | 76 ------ xcube_geodb_openeo/server/config.py | 1 + xcube_geodb_openeo/server/context.py | 137 ---------- 16 files changed, 75 insertions(+), 780 deletions(-) rename tests/{backend => api}/__init__.py (100%) rename tests/{backend => api}/test_context.py (99%) delete mode 100644 xcube_geodb_openeo/server/__init__.py delete mode 100644 xcube_geodb_openeo/server/api.py delete mode 100644 xcube_geodb_openeo/server/app/__init__.py delete mode 100644 xcube_geodb_openeo/server/app/flask.py delete mode 100644 xcube_geodb_openeo/server/app/tornado.py delete mode 100644 xcube_geodb_openeo/server/cli.py delete mode 100644 xcube_geodb_openeo/server/context.py diff --git a/tests/backend/__init__.py b/tests/api/__init__.py similarity index 100% rename from tests/backend/__init__.py rename to tests/api/__init__.py diff --git a/tests/backend/test_context.py b/tests/api/test_context.py similarity index 99% rename from tests/backend/test_context.py rename to tests/api/test_context.py index 64a8a07..7486cbc 100644 --- a/tests/backend/test_context.py +++ b/tests/api/test_context.py @@ -20,7 +20,6 @@ # DEALINGS IN THE SOFTWARE. import unittest - import xcube_geodb_openeo.api.context as context diff --git a/tests/server/app/base_test.py b/tests/server/app/base_test.py index 069400b..056f66b 100644 --- a/tests/server/app/base_test.py +++ b/tests/server/app/base_test.py @@ -21,9 +21,6 @@ import unittest -import xcube_geodb_openeo.server.app.flask as flask_server -import xcube_geodb_openeo.server.app.tornado as tornado_server - import urllib3 import multiprocessing import pkgutil @@ -34,8 +31,13 @@ import socket from contextlib import closing +import xcube.cli.main as xcube + # taken from https://stackoverflow.com/a/45690594 +from xcube.server.impl.framework.tornado import TornadoFramework + + def find_free_port(): with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as s: s.bind(('localhost', 0)) @@ -44,41 +46,32 @@ def find_free_port(): class BaseTest(unittest.TestCase): - servers = None - flask = None - tornado = None @classmethod def setUpClass(cls) -> None: - wait_for_server_startup = os.environ.get('WAIT_FOR_STARTUP', - '0') == '1' - + cls.port = find_free_port() + from xcube.server.server import Server data = pkgutil.get_data('tests', 'test_config.yml') config = yaml.safe_load(data) - flask_port = find_free_port() - cls.flask = multiprocessing.Process( - target=flask_server.serve, - args=(config, 'localhost', flask_port, False, False) - ) - cls.flask.start() - cls.servers = {'flask': f'http://localhost:{flask_port}'} - if wait_for_server_startup: - time.sleep(10) - - tornado_port = find_free_port() - cls.tornado = multiprocessing.Process( - target=tornado_server.serve, - args=(config, 'localhost', tornado_port, False, False) - ) - cls.tornado.start() - cls.servers['tornado'] = f'http://localhost:{tornado_port}' + config['port'] = cls.port + config['address'] = 'localhost' + server = Server(framework=TornadoFramework(), config=config) + server.start() + import threading + cls.s = threading.Thread(target=server.start) + cls.s.daemon = True + cls.s.start() + # cls.server.start() + + # xcube.main(args=['serve2', '-c', '../test_config.yml']) + + # data = pkgutil.get_data('tests', 'test_config.yml') + # config = yaml.safe_load(data) cls.http = urllib3.PoolManager() + print(cls.port, flush=True) - if wait_for_server_startup: - time.sleep(10) @classmethod def tearDownClass(cls) -> None: - cls.flask.terminate() - cls.tornado.terminate() + cls.s.stop() diff --git a/tests/server/app/test_capabilities.py b/tests/server/app/test_capabilities.py index 923ccec..8b7b89b 100644 --- a/tests/server/app/test_capabilities.py +++ b/tests/server/app/test_capabilities.py @@ -1,4 +1,3 @@ -import xcube_geodb_openeo.server.api as api import json from .base_test import BaseTest @@ -7,31 +6,27 @@ class CapabilitiesTest(BaseTest): def test_root(self): - for server_name in self.servers: - url = self.servers[server_name] - msg = f'in server {server_name} running on {url}' - response = self.http.request('GET', f'{url}' - f'{api.API_URL_PREFIX}/') - self.assertEqual(200, response.status, msg) - self.assertTrue( - 'application/json' in response.headers['content-type'], msg - ) - metainfo = json.loads(response.data) - self.assertEqual('0.1.2', metainfo['api_version'], msg) - self.assertEqual('0.0.1.dev0', metainfo['backend_version'], msg) - self.assertEqual('2.3.4', metainfo['stac_version'], msg) - self.assertEqual('catalog', metainfo['type'], msg) - self.assertEqual('xcube-geodb-openeo', metainfo['id'], msg) - self.assertEqual( - 'xcube geoDB Server, openEO API', metainfo['title'], msg - ) - self.assertEqual( - 'Catalog of geoDB collections.', metainfo['description'], msg) - self.assertEqual( - '/collections', metainfo['endpoints'][0]['path'], msg) - self.assertEqual( - 'GET', metainfo['endpoints'][0]['methods'][0], msg) - self.assertIsNotNone(metainfo['links']) + response = self.http.request('GET', f'http://localhost:{self.port}/') + self.assertEqual(200, response.status) + self.assertTrue( + 'application/json' in response.headers['content-type'] + ) + metainfo = json.loads(response.data) + self.assertEqual('0.1.2', metainfo['api_version']) + self.assertEqual('0.0.1.dev0', metainfo['backend_version']) + self.assertEqual('2.3.4', metainfo['stac_version']) + self.assertEqual('catalog', metainfo['type']) + self.assertEqual('xcube-geodb-openeo', metainfo['id']) + self.assertEqual( + 'xcube geoDB Server, openEO API', metainfo['title'] + ) + self.assertEqual( + 'Catalog of geoDB collections.', metainfo['description']) + self.assertEqual( + '/collections', metainfo['endpoints'][0]['path']) + self.assertEqual( + 'GET', metainfo['endpoints'][0]['methods'][0]) + self.assertIsNotNone(metainfo['links']) def test_well_known_info(self): for server_name in self.servers: diff --git a/tests/test_config.yml b/tests/test_config.yml index b53182d..723d914 100644 --- a/tests/test_config.yml +++ b/tests/test_config.yml @@ -1,7 +1,2 @@ -API_VERSION: 0.1.2 -STAC_VERSION: 2.3.4 -SERVER_URL: http://xcube-geoDB-openEO.de -SERVER_ID: xcube-geodb-openeo -SERVER_TITLE: xcube geoDB Server, openEO API -SERVER_DESCRIPTION: Catalog of geoDB collections. -datastore_class: tests.core.mock_datastore.MockDataStore \ No newline at end of file +geodb_openeo: + datastore_class: tests.core.mock_datastore.MockDataStore \ No newline at end of file diff --git a/xcube_geodb_openeo/api/context.py b/xcube_geodb_openeo/api/context.py index e04cec2..a96a9f1 100644 --- a/xcube_geodb_openeo/api/context.py +++ b/xcube_geodb_openeo/api/context.py @@ -86,6 +86,7 @@ def __init__(self, root: Context): for key in default_config.keys(): if key not in self.config: self.config['geodb_openeo'][key] = default_config[key] + self._collections = {} def update(self, prev_ctx: Optional["Context"]): pass @@ -97,8 +98,6 @@ def get_vector_cube(self, collection_id: str, with_items: bool, return self.data_store.get_vector_cube(collection_id, with_items, bbox, limit, offset) - def __init__(self): - self._collections = {} @property def collections(self) -> Dict: @@ -110,8 +109,7 @@ def collections(self, collections: Dict): assert isinstance(collections, Dict) self._collections = collections - def fetch_collections(self, base_url: str, limit: int, - offset: int): + def fetch_collections(self, base_url: str, limit: int, offset: int): url = f'{base_url}/collections' links = get_collections_links(limit, offset, url, len(self.collection_ids)) @@ -155,7 +153,7 @@ def get_collection_items(self, base_url: str, "numberReturned": len(stac_features), } - def get_collection_item(self, + def get_collection_item(self, base_url: str, collection_id: str, feature_id: str): # nah. use different geodb-function, don't get full vector cube @@ -163,13 +161,12 @@ def get_collection_item(self, bbox=None, limit=None, offset=0) for feature in vector_cube.get("features", []): if str(feature.get("id")) == feature_id: - return _get_vector_cube_item(vector_cube, feature) + return _get_vector_cube_item(base_url, vector_cube, feature) raise ItemNotFoundException( f'feature {feature_id!r} not found in collection {collection_id!r}' ) - def get_collections_links(limit: int, offset: int, url: str, collection_count: int): links = [] diff --git a/xcube_geodb_openeo/api/routes.py b/xcube_geodb_openeo/api/routes.py index abd335d..797a46a 100644 --- a/xcube_geodb_openeo/api/routes.py +++ b/xcube_geodb_openeo/api/routes.py @@ -45,6 +45,13 @@ def get_bbox(request): return None +def get_base_url(request): + # noinspection PyProtectedMember + base_url = f'{request._request.protocol}://' \ + f'{request._request.host}' + return base_url + + @api.route('/.well-known/openeo') class WellKnownHandler(ApiHandler): """ @@ -78,11 +85,10 @@ def get(self): """ limit = get_limit(self.request) offset = get_offset(self.request) - base_url = f'{self.request._request.protocol}://' \ - f'{self.request._request.host}' + base_url = get_base_url(self.request) self.ctx.request = self.request if not self.ctx.collections: - self.ctx.fetch_collections(self.ctx, base_url, limit, offset) + self.ctx.fetch_collections(base_url, limit, offset) self.response.finish(self.ctx.collections) @@ -100,34 +106,30 @@ def get(self): self.response.finish(capabilities.get_conformance()) -@api.route('/collections/') +@api.route('/collections/{collection_id}') class CollectionHandler(ApiHandler): """ Lists all information about a specific collection specified by the identifier collection_id. """ - def get(self): + def get(self, collection_id: str): """ Lists the collection information. """ - # todo - collection_id is not a query argument, but a path argument. - # Change as soon as Server NG allows - collection_id = self.request.get_query_arg('collection_id') - base_url = f'{self.request._request.protocol}://' \ - f'{self.request._request.host}' - collection = self.ctx.get_collection(self.ctx, base_url, collection_id) + base_url = get_base_url(self.request) + collection = self.ctx.get_collection(base_url, collection_id) self.response.finish(collection) -@api.route('/collections//items') +@api.route('/collections/{collection_id}/items') class CollectionItemsHandler(ApiHandler): """ Get features of the feature collection with id collectionId. """ # noinspection PyIncorrectDocstring - def get(self): + def get(self, collection_id: str): """ Returns the features. @@ -141,34 +143,22 @@ def get(self): limit = get_limit(self.request) offset = get_offset(self.request) bbox = get_bbox(self.request) - - # todo - collection_id is not a query argument, but a path argument. - # Change as soon as Server NG allows - collection_id = self.request.get_query_arg('collection_id') - - base_url = f'{self.request._request.protocol}://' \ - f'{self.request._request.host}' - items = self.ctx.get_collection_items(self.ctx, base_url, collection_id, - limit, offset, bbox) + base_url = get_base_url(self.request) + items = self.ctx.get_collection_items(base_url, collection_id, + limit, offset, bbox) self.response.finish(items) -@api.route('/collections//' - 'items/') +@api.route('/collections/{collection_id}/items/{feature_id}') class FeatureHandler(ApiHandler): """ Fetch a single feature. """ - def get(self): + def get(self, collection_id: str, feature_id: str): """ Returns the feature. """ - - # todo - collection_id is not a query argument, but a path argument. - # Change as soon as Server NG allows - collection_id = self.request.get_query_arg('collection_id') - feature_id = self.request.get_query_arg('feature_id') - - feature = self.ctx.get_collection_item(self.ctx, collection_id, + base_url = get_base_url(self.request) + feature = self.ctx.get_collection_item(base_url, collection_id, feature_id) self.response.finish(feature) diff --git a/xcube_geodb_openeo/backend/capabilities.py b/xcube_geodb_openeo/backend/capabilities.py index afc2a09..812c6ae 100644 --- a/xcube_geodb_openeo/backend/capabilities.py +++ b/xcube_geodb_openeo/backend/capabilities.py @@ -22,7 +22,7 @@ from typing import Mapping from ..server.config import API_VERSION -from ..server.context import RequestContext +from ..api.context import GeoDbContext from ..version import __version__ ''' @@ -31,7 +31,7 @@ ''' -def get_root(config: Mapping[str, Any], ctx: RequestContext): +def get_root(config: Mapping[str, Any], ctx: GeoDbContext): return { 'api_version': config['API_VERSION'], 'backend_version': __version__, diff --git a/xcube_geodb_openeo/server/__init__.py b/xcube_geodb_openeo/server/__init__.py deleted file mode 100644 index 2f1eda6..0000000 --- a/xcube_geodb_openeo/server/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# The MIT License (MIT) -# Copyright (c) 2021/2022 by the xcube team and contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. diff --git a/xcube_geodb_openeo/server/api.py b/xcube_geodb_openeo/server/api.py deleted file mode 100644 index c5934b4..0000000 --- a/xcube_geodb_openeo/server/api.py +++ /dev/null @@ -1,24 +0,0 @@ -# The MIT License (MIT) -# Copyright (c) 2021/2022 by the xcube team and contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. - - -API_VERSION = 0 -API_URL_PREFIX = f'/api/v{API_VERSION}' diff --git a/xcube_geodb_openeo/server/app/__init__.py b/xcube_geodb_openeo/server/app/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/xcube_geodb_openeo/server/app/flask.py b/xcube_geodb_openeo/server/app/flask.py deleted file mode 100644 index d0e6008..0000000 --- a/xcube_geodb_openeo/server/app/flask.py +++ /dev/null @@ -1,139 +0,0 @@ -# The MIT License (MIT) -# Copyright (c) 2021/2022 by the xcube team and contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. - - -import logging -import os.path - -import flask - -from ..api import API_URL_PREFIX -from ..context import AppContext -from ...backend import catalog -from ...backend import capabilities -from ...backend.catalog import STAC_DEFAULT_COLLECTIONS_LIMIT -from ...backend.catalog import STAC_DEFAULT_ITEMS_LIMIT - - -app = flask.Flask( - __name__, - instance_path=os.path.join( - os.path.dirname(__file__), '../../..', 'instance' - ) -) - -well_known = flask.Blueprint('well_known', __name__) -api = flask.Blueprint('api', __name__, url_prefix=API_URL_PREFIX) - -ctx = AppContext(app.logger) - - -@well_known.route('/.well-known/openeo') -def get_well_known(): - return capabilities.get_well_known(ctx.config) - - -@api.route('/') -def get_info(): - return capabilities.get_root( - ctx.config, ctx.for_request(f'{flask.request.root_url}' - f'{api.url_prefix}')) - - -@api.route('/conformance') -def get_conformance(): - return capabilities.get_conformance() - - -@api.route('/collections') -def get_catalog_collections(): - limit = int(flask.request.args['limit']) \ - if 'limit' in flask.request.args else STAC_DEFAULT_COLLECTIONS_LIMIT - offset = int(flask.request.args['offset']) \ - if 'offset' in flask.request.args else 0 - request_ctx = ctx.for_request(f'{flask.request.root_url}{api.url_prefix}') - return catalog.get_collections(request_ctx, - request_ctx.get_url('/collections'), - limit, offset) - - -@api.route('/collections/') -def get_catalog_collection(collection_id: str): - return catalog.get_collection(ctx.for_request(f'{flask.request.root_url}' - f'{api.url_prefix}'), - collection_id) - - -@api.route('/collections//items') -def get_catalog_collection_items(collection_id: str): - limit = int(flask.request.args['limit']) \ - if 'limit' in flask.request.args else STAC_DEFAULT_ITEMS_LIMIT - offset = int(flask.request.args['offset']) \ - if 'offset' in flask.request.args else 0 - # sample query parameter: bbox=160.6,-55.95,-170,-25.89 - if 'bbox' in flask.request.args: - query_bbox = str(flask.request.args['bbox']) - bbox = tuple(query_bbox.split(',')) - else: - bbox = None - return catalog.get_collection_items( - ctx.for_request(f'{flask.request.root_url}' - f'{api.url_prefix}'), - collection_id, limit, offset, bbox - ) - - -@api.route('/collections//' - 'items/') -def get_catalog_collection_item(collection_id: str, feature_id: str): - return catalog.get_collection_item(ctx.for_request(flask.request.root_url), - collection_id, - feature_id) - - -@api.route('/catalog/search') -def get_catalog_search(): - return catalog.search( - ctx.for_request(flask.request.root_url) - ) - - -@api.route('/catalog/search', methods=['POST']) -def post_catalog_search(): - return catalog.search( - ctx.for_request(flask.request.root_url) - ) - - -def serve( - config: None, - address: str, - port: int, - debug: bool = False, - verbose: bool = False, -): - ctx.config = config - if verbose or debug: - ctx.logger.setLevel(logging.DEBUG) - - app.register_blueprint(well_known) - app.register_blueprint(api) - app.run(host=address, port=port, debug=debug) diff --git a/xcube_geodb_openeo/server/app/tornado.py b/xcube_geodb_openeo/server/app/tornado.py deleted file mode 100644 index 3a7a37a..0000000 --- a/xcube_geodb_openeo/server/app/tornado.py +++ /dev/null @@ -1,279 +0,0 @@ -# The MIT License (MIT) -# Copyright (c) 2021/2022 by the xcube team and contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. - - -import logging -from typing import Dict, Type, Callable, Optional, Any - -import tornado -import tornado.escape -import tornado.ioloop -import tornado.web - -from ..api import API_URL_PREFIX -from ..context import AppContext -from ..context import RequestContext -from ...backend import capabilities -from ...backend import catalog -from ...backend.catalog import STAC_DEFAULT_ITEMS_LIMIT - -RequestHandlerType = Type[tornado.web.RequestHandler] - - -class App: - """Defines a decorator that makes routing easier.""" - - def __init__(self): - self.handlers = [] - - def route(self, - pattern: str, - kwargs: Optional[Dict[str, Any]] = None, - name: Optional[str] = None, - prefix: str = API_URL_PREFIX) \ - -> Callable[[RequestHandlerType], RequestHandlerType]: - """Allows us to decorate Tornado handlers like Flask does.""" - - def decorator(cls: RequestHandlerType): - prefixed_pattern = prefix + pattern - print(prefixed_pattern) - url_pattern = self.url_pattern(prefixed_pattern) - self.handlers.append( - tornado.web.url(url_pattern, - cls, - kwargs=kwargs, - name=name) - ) - return cls - - return decorator - - @classmethod - def url_pattern(cls, pattern: str): - """Convert a string *pattern* where any occurrences of ``{NAME}`` - are replaced by an equivalent regex expression which will assign - matching character groups to NAME. Characters match until - one of the RFC 2396 reserved characters is found or the end of the - *pattern* is reached. - - RFC 2396 Uniform Resource Identifiers (URI): Generic Syntax lists - the following reserved characters:: - - reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | - "+" | "$" | "," - - :param pattern: URL pattern - :return: equivalent regex pattern - :raise ValueError: if *pattern* is invalid - """ - name_pattern = r'(?P<%s>[^\;\/\?\:\@\&\=\+\$\,]+)' - results = [] - for i, p in enumerate(pattern.split('{')): - closing = p.split('}') - if i == 0: - if len(closing) > 1: - raise ValueError('closing "}" without opening "{"') - results.append(p) - else: - if len(closing) < 2: - raise ValueError('closing "}" missing after opening "{"') - if len(closing) > 2: - raise ValueError('closing "}" without opening "{"') - name = closing[0] - if not name.isidentifier(): - raise ValueError( - 'NAME in "{NAME}" must be a valid identifier,' - ' but got "%s"' % name - ) - results.append(name_pattern % name) - results.append(closing[1]) - return ''.join(results) - - @classmethod - def to_int(cls, name: str, value: str) -> int: - try: - return int(value) - except ValueError: - raise tornado.web.HTTPError(403, f'integer expected for {name!r}') - - -app = App() - - -def _get_request_ctx(handler: tornado.web.RequestHandler) -> RequestContext: - request = handler.request - root_url = request.protocol + "://" + request.host - return ctx.for_request(root_url) - - -# ======================================================== -# Add handlers -# ======================================================== - -# noinspection PyAbstractClass -class BaseHandler(tornado.web.RequestHandler): - - def set_default_headers(self): - """Overridden to naively enable CORS.""" - self.set_header("Access-Control-Allow-Origin", "*") - self.set_header("Access-Control-Allow-Headers", - "x-requested-with") - self.set_header("Access-Control-Allow-Methods", - "POST,PUT,GET,DELETE,OPTIONS") - - # noinspection PyUnusedLocal - def options(self, *args): - """Implemented to always return status 204 (for pre-flight check).""" - self.set_status(204) - self.finish() - - def write_error(self, status_code: int, **kwargs: Any) -> None: - """Overridden to always return a JSON error object.""" - error = dict(status=status_code) - - reason = kwargs.get("reason") - if reason is not None: - error["reason"] = reason - - data = kwargs.get("data") - if data is not None: - error["data"] = data - - exc_info = kwargs.get("exc_info") - if exc_info is not None: - import traceback - traceback.format_exception(*kwargs["exc_info"]) - error["traceback"] = list(traceback.format_exception(*exc_info)) - - self.finish(error) - - -# noinspection PyAbstractClass,PyMethodMayBeStatic -@app.route('/') -class MainHandler(BaseHandler): - async def get(self): - return await self.finish( - capabilities.get_root(ctx.config, _get_request_ctx(self)) - ) - - -# noinspection PyAbstractClass,PyMethodMayBeStatic -@app.route('/.well-known/openeo', prefix='') -class MainHandler(BaseHandler): - async def get(self): - return await self.finish(capabilities.get_well_known(ctx.config)) - - -# noinspection PyAbstractClass,PyMethodMayBeStatic -@app.route('/conformance') -class CatalogConformanceHandler(BaseHandler): - async def get(self): - return await self.finish(capabilities.get_conformance()) - - -# noinspection PyAbstractClass,PyMethodMayBeStatic -@app.route("/collections") -class CatalogCollectionsHandler(BaseHandler): - async def get(self): - from xcube_geodb_openeo.backend import catalog - limit = int(self.get_argument("limit", - str(STAC_DEFAULT_ITEMS_LIMIT), True)) - offset = int(self.get_argument("offset", '0', True)) - url = _get_request_ctx(self).get_url('/collections') - return await self.finish(catalog.get_collections( - _get_request_ctx(self), url, limit, offset - )) - - -# noinspection PyAbstractClass,PyMethodMayBeStatic -@app.route("/collections/{collection_id}") -class CatalogCollectionHandler(BaseHandler): - async def get(self, collection_id: str): - from xcube_geodb_openeo.backend import catalog - return await self.finish(catalog.get_collection( - _get_request_ctx(self), - collection_id - )) - - -# noinspection PyAbstractClass,PyMethodMayBeStatic -@app.route("/collections/{collection_id}/items") -class CatalogCollectionItemsHandler(BaseHandler): - async def get(self, collection_id: str): - limit = int(self.get_argument("limit", - str(STAC_DEFAULT_ITEMS_LIMIT), True)) - offset = int(self.get_argument("offset", '0', True)) - # sample query parameter: bbox=160.6,-55.95,-170,-25.89 - query_bbox = str(self.get_argument('bbox', '', True)) - if query_bbox: - bbox = tuple(query_bbox.split(',')) - else: - bbox = None - return await self.finish(catalog.get_collection_items( - _get_request_ctx(self), - collection_id, limit, offset, bbox - )) - - -# noinspection PyAbstractClass,PyMethodMayBeStatic -@app.route("/collections/{collection_id}/items/{feature_id}") -class CatalogCollectionItemHandler(BaseHandler): - async def get(self, collection_id: str, feature_id: str): - return await self.finish(catalog.get_collection_item( - _get_request_ctx(self), collection_id, feature_id - )) - - -# noinspection PyAbstractClass,PyMethodMayBeStatic -@app.route("/catalog/search") -class CatalogSearchHandler(BaseHandler): - - async def get(self): - return await self.finish(catalog.search( - _get_request_ctx(self) - )) - - async def post(self): - return await self.finish(catalog.search( - _get_request_ctx(self) - )) - - -ctx = AppContext(logging.getLogger('tornado')) - -MultiResDatasets = Dict[str, - 'xcube_tileserver.core.mrdataset.MultiResDataset'] - - -def serve( - config: None, - address: str, - port: int, - debug: bool = False, - verbose: bool = False, -): - ctx.config = config - if verbose or debug: - ctx.logger.setLevel(logging.DEBUG) - - application = tornado.web.Application(app.handlers, debug=debug) - application.listen(address=address, port=port) - tornado.ioloop.IOLoop.current().start() diff --git a/xcube_geodb_openeo/server/cli.py b/xcube_geodb_openeo/server/cli.py deleted file mode 100644 index dd5b302..0000000 --- a/xcube_geodb_openeo/server/cli.py +++ /dev/null @@ -1,76 +0,0 @@ -# The MIT License (MIT) -# Copyright (c) 2021/2022 by the xcube team and contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. -from typing import Optional - -import click - -WEB_FRAMEWORK_TORNADO = 'tornado' -WEB_FRAMEWORK_FLASK = 'flask' -WEB_FRAMEWORKS = [WEB_FRAMEWORK_FLASK, WEB_FRAMEWORK_TORNADO] - -DEFAULT_CONFIG_PATH = 'xcube_geodb_openeo/config.yml' -DEFAULT_WEB_FRAMEWORK = WEB_FRAMEWORK_FLASK -DEFAULT_ADDRESS = '0.0.0.0' -DEFAULT_PORT = 5000 - - -@click.command() -@click.option('--config', '-c', 'config_path', default=DEFAULT_CONFIG_PATH, - help='Path to configuration YAML file.') -@click.option('--address', '-a', default=DEFAULT_ADDRESS, - help='Server address.') -@click.option('--port', '-p', default=DEFAULT_PORT, - help='Server port number.') -@click.option('--framework', '-f', - help='Web framework to be used.', - default=DEFAULT_WEB_FRAMEWORK, - type=click.Choice(WEB_FRAMEWORKS)) -@click.option('--debug', '-d', is_flag=True, - help='Turn debug mode on.') -@click.option('--verbose', '-v', is_flag=True, - help='Turn verbose mode on.') -def main(config_path: Optional[str], - address: str = DEFAULT_ADDRESS, - port: int = DEFAULT_PORT, - framework: str = DEFAULT_WEB_FRAMEWORK, - debug: bool = False, - verbose: bool = False): - """ - A server that represents the openEO backend for the xcube geoDB. - """ - import importlib - - config = {} - - module = importlib.import_module( - f'xcube_geodb_openeo.server.app.{framework}' - ) - - # noinspection PyUnresolvedReferences - module.serve(config=config, - address=address, - port=port, - debug=debug, - verbose=verbose) - - -if __name__ == '__main__': - main() diff --git a/xcube_geodb_openeo/server/config.py b/xcube_geodb_openeo/server/config.py index 4391cb0..40d2123 100644 --- a/xcube_geodb_openeo/server/config.py +++ b/xcube_geodb_openeo/server/config.py @@ -23,6 +23,7 @@ from xcube.util.jsonschema import JsonStringSchema API_VERSION = '1.1.0' +API_URL_PREFIX = f'/api/v{API_VERSION}' STAC_VERSION = '0.9.0' OPENEO_CONFIG_SCHEMA = JsonObjectSchema( diff --git a/xcube_geodb_openeo/server/context.py b/xcube_geodb_openeo/server/context.py deleted file mode 100644 index f766cf7..0000000 --- a/xcube_geodb_openeo/server/context.py +++ /dev/null @@ -1,137 +0,0 @@ -# The MIT License (MIT) -# Copyright (c) 2021/2022 by the xcube team and contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. - - -import abc -import importlib -import logging -from functools import cached_property -from typing import Any -from typing import Mapping -from typing import Optional -from typing import Sequence -from typing import Tuple - -from ..core.vectorcube import VectorCube -from ..core.datastore import DataStore - - -class Context(abc.ABC): - - @property - @abc.abstractmethod - def config(self) -> Mapping[str, Any]: - pass - - @property - @abc.abstractmethod - def collection_ids(self) -> Sequence[str]: - pass - - @abc.abstractmethod - def get_vector_cube(self, collection_id: str, with_items: bool, - bbox: Tuple[float, float, float, float], - limit: Optional[int], offset: Optional[int]) \ - -> VectorCube: - pass - - @property - @abc.abstractmethod - def logger(self) -> logging.Logger: - pass - - def for_request(self, root_url: str) -> 'RequestContext': - return RequestContext(self, root_url) - - -class AppContext(Context): - def __init__(self, logger: logging.Logger): - self._config = None - self._logger = logger - - @property - def config(self) -> Mapping[str, Any]: - assert self._config is not None - return self._config - - @config.setter - def config(self, config: Mapping[str, Any]): - assert isinstance(config, dict) - self._config = dict(config) - - @cached_property - def data_store(self) -> DataStore: - if not self.config: - raise RuntimeError('config not set') - data_store_class = self.config['datastore_class'] - data_store_module = data_store_class[:data_store_class.rindex('.')] - class_name = data_store_class[data_store_class.rindex('.') + 1:] - module = importlib.import_module(data_store_module) - cls = getattr(module, class_name) - return cls(self.config) - - @property - def collection_ids(self) -> Sequence[str]: - return tuple(self.data_store.get_collection_keys()) - - def get_vector_cube(self, collection_id: str, with_items: bool, - bbox: Tuple[float, float, float, float], - limit: Optional[int], offset: Optional[int]) \ - -> VectorCube: - return self.data_store.get_vector_cube(collection_id, with_items, - bbox, limit, offset) - - @property - def logger(self) -> logging.Logger: - return self._logger - - -class RequestContext(Context): - - def __init__(self, ctx: Context, root_url: str): - self._ctx = ctx - self._root_url = root_url - - @property - def root_url(self) -> str: - return self._root_url - - def get_url(self, path: str): - return f'{self._root_url}/{path}' - - @property - def config(self) -> Mapping[str, Any]: - return self._ctx.config - - @property - def collection_ids(self) -> Sequence[str]: - return self._ctx.collection_ids - - def get_vector_cube(self, collection_id: str, with_items: bool, - bbox: Tuple[float, float, float, float], - limit: Optional[int], offset: Optional[int]) \ - -> VectorCube: - return self._ctx.get_vector_cube(collection_id, with_items, bbox, - limit, offset) - - @property - def logger(self) -> logging.Logger: - return self._ctx.logger From 9f832acd91736e71ce05a2f9e827aeb4111ce9ae Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 2 Jun 2022 16:59:53 +0200 Subject: [PATCH 035/163] finished adaptation to xcube Server NG --- tests/server/app/base_test.py | 49 +++---- tests/server/app/test_capabilities.py | 42 +++--- tests/server/app/test_data_discovery.py | 162 +++++++++------------ tests/server/app/test_tornado.py | 79 ---------- xcube_geodb_openeo/api/api.py | 2 +- xcube_geodb_openeo/api/context.py | 9 +- xcube_geodb_openeo/api/routes.py | 22 ++- xcube_geodb_openeo/backend/capabilities.py | 26 ++-- 8 files changed, 140 insertions(+), 251 deletions(-) delete mode 100644 tests/server/app/test_tornado.py diff --git a/tests/server/app/base_test.py b/tests/server/app/base_test.py index 056f66b..0330d96 100644 --- a/tests/server/app/base_test.py +++ b/tests/server/app/base_test.py @@ -19,25 +19,26 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. +import asyncio +import pkgutil import unittest - import urllib3 -import multiprocessing -import pkgutil +import socket +import threading import yaml -import time -import os -import socket from contextlib import closing -import xcube.cli.main as xcube - +from xcube.server.server import Server +from xcube.constants import EXTENSION_POINT_SERVER_APIS +from xcube.util import extension +from xcube.util.extension import ExtensionRegistry -# taken from https://stackoverflow.com/a/45690594 +from tornado.platform.asyncio import AnyThreadEventLoopPolicy from xcube.server.impl.framework.tornado import TornadoFramework +# taken from https://stackoverflow.com/a/45690594 def find_free_port(): with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as s: s.bind(('localhost', 0)) @@ -46,32 +47,24 @@ def find_free_port(): class BaseTest(unittest.TestCase): + port = None @classmethod def setUpClass(cls) -> None: cls.port = find_free_port() - from xcube.server.server import Server data = pkgutil.get_data('tests', 'test_config.yml') config = yaml.safe_load(data) config['port'] = cls.port config['address'] = 'localhost' - server = Server(framework=TornadoFramework(), config=config) - server.start() - import threading - cls.s = threading.Thread(target=server.start) - cls.s.daemon = True - cls.s.start() - # cls.server.start() - - # xcube.main(args=['serve2', '-c', '../test_config.yml']) - - # data = pkgutil.get_data('tests', 'test_config.yml') - # config = yaml.safe_load(data) + asyncio.set_event_loop_policy(AnyThreadEventLoopPolicy()) + er = ExtensionRegistry() + er.add_extension(loader=extension.import_component( + 'xcube_geodb_openeo.api:api' + ), point=EXTENSION_POINT_SERVER_APIS, name='geodb-openeo') + server = Server(framework=TornadoFramework(), config=config, + extension_registry=er) + tornado = threading.Thread(target=server.start) + tornado.daemon = True + tornado.start() cls.http = urllib3.PoolManager() - print(cls.port, flush=True) - - - @classmethod - def tearDownClass(cls) -> None: - cls.s.stop() diff --git a/tests/server/app/test_capabilities.py b/tests/server/app/test_capabilities.py index 8b7b89b..eac9f19 100644 --- a/tests/server/app/test_capabilities.py +++ b/tests/server/app/test_capabilities.py @@ -12,9 +12,9 @@ def test_root(self): 'application/json' in response.headers['content-type'] ) metainfo = json.loads(response.data) - self.assertEqual('0.1.2', metainfo['api_version']) + self.assertEqual('1.1.0', metainfo['api_version']) self.assertEqual('0.0.1.dev0', metainfo['backend_version']) - self.assertEqual('2.3.4', metainfo['stac_version']) + self.assertEqual('0.9.0', metainfo['stac_version']) self.assertEqual('catalog', metainfo['type']) self.assertEqual('xcube-geodb-openeo', metainfo['id']) self.assertEqual( @@ -29,28 +29,20 @@ def test_root(self): self.assertIsNotNone(metainfo['links']) def test_well_known_info(self): - for server_name in self.servers: - url = self.servers[server_name] - msg = f'in server {server_name} running on {url}' - response = self.http.request( - 'GET', f'{url}/.well-known/openeo' - ) - self.assertEqual(200, response.status, msg) - well_known_data = json.loads(response.data) - self.assertEqual('http://xcube-geoDB-openEO.de', - well_known_data['versions'][0]['url'], msg) - self.assertEqual('0.1.2', - well_known_data['versions'][0]['api_version'], - msg) + response = self.http.request( + 'GET', f'http://localhost:{self.port}/.well-known/openeo' + ) + self.assertEqual(200, response.status) + well_known_data = json.loads(response.data) + self.assertEqual('http://www.brockmann-consult.de/xcube-geoDB-openEO', + well_known_data['versions'][0]['url']) + self.assertEqual('1.1.0', + well_known_data['versions'][0]['api_version']) def test_conformance(self): - for server_name in self.servers: - url = self.servers[server_name] - msg = f'in server {server_name} running on {url}' - - response = self.http.request( - 'GET', f'{url}{api.API_URL_PREFIX}/conformance' - ) - self.assertEqual(200, response.status, msg) - conformance_data = json.loads(response.data) - self.assertIsNotNone(conformance_data['conformsTo'], msg) + response = self.http.request( + 'GET', f'http://localhost:{self.port}/conformance' + ) + self.assertEqual(200, response.status) + conformance_data = json.loads(response.data) + self.assertIsNotNone(conformance_data['conformsTo']) diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index fe23c80..1563740 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -1,130 +1,102 @@ -import xcube_geodb_openeo.server.api as api import json from .base_test import BaseTest class DataDiscoveryTest(BaseTest): - flask = None - tornado = None def test_collections(self): - for server_name in self.servers: - base_url = self.servers[server_name] - url = f'{base_url}{api.API_URL_PREFIX}/collections' - msg = f'in server {server_name} running on {url}' - response = self.http.request('GET', url) - self.assertEqual(200, response.status, msg) - collections_data = json.loads(response.data) - self.assertIsNotNone(collections_data['collections'], msg) - self.assertIsNotNone(collections_data['links'], msg) + url = f'http://localhost:{self.port}/collections' + response = self.http.request('GET', url) + self.assertEqual(200, response.status) + collections_data = json.loads(response.data) + self.assertIsNotNone(collections_data['collections']) + self.assertIsNotNone(collections_data['links']) def test_collection(self): - for server_name in self.servers: - base_url = self.servers[server_name] - url = f'{base_url}{api.API_URL_PREFIX}/collections/collection_1' - msg = f'in server {server_name} running on {url}' - response = self.http.request('GET', url) - self.assertEqual(200, response.status, msg) - collection_data = json.loads(response.data) - self.assertIsNotNone(collection_data, msg) + url = f'http://localhost:{self.port}/collections/collection_1' + response = self.http.request('GET', url) + self.assertEqual(200, response.status) + collection_data = json.loads(response.data) + self.assertIsNotNone(collection_data) def test_get_items(self): - for server_name in self.servers: - base_url = self.servers[server_name] - url = f'{base_url}' \ - f'{api.API_URL_PREFIX}/collections/collection_1/items' - msg = f'in server {server_name} running on {url}' - response = self.http.request('GET', url) - self.assertEqual(200, response.status, msg) - items_data = json.loads(response.data) - self.assertIsNotNone(items_data, msg) - self.assertEqual('FeatureCollection', items_data['type'], msg) - self.assertIsNotNone(items_data['features'], msg) - self.assertEqual(2, len(items_data['features']), msg) + url = f'http://localhost:{self.port}/collections/collection_1/items' + response = self.http.request('GET', url) + self.assertEqual(200, response.status) + items_data = json.loads(response.data) + self.assertIsNotNone(items_data) + self.assertEqual('FeatureCollection', items_data['type']) + self.assertIsNotNone(items_data['features']) + self.assertEqual(2, len(items_data['features'])) - self._assert_hamburg(items_data['features'][0], msg) - self._assert_paderborn(items_data['features'][1], msg) + self._assert_hamburg(items_data['features'][0]) + self._assert_paderborn(items_data['features'][1]) def test_get_item(self): - for server_name in self.servers: - base_url = self.servers[server_name] - url = f'{base_url}' \ - f'{api.API_URL_PREFIX}/collections/collection_1/items/1' - msg = f'in server {server_name} running on {url}' - response = self.http.request('GET', url) - self.assertEqual(200, response.status, msg) - item_data = json.loads(response.data) - self._assert_paderborn(item_data, msg) + url = f'http://localhost:{self.port}/collections/collection_1/items/1' + response = self.http.request('GET', url) + self.assertEqual(200, response.status) + item_data = json.loads(response.data) + self._assert_paderborn(item_data) def test_get_items_filtered(self): - for server_name in self.servers: - base_url = self.servers[server_name] - url = f'{base_url}' \ - f'{api.API_URL_PREFIX}/collections/collection_1/items' \ - f'?limit=1&offset=1' - msg = f'in server {server_name} running on {url}' - response = self.http.request('GET', url) - self.assertEqual(200, response.status, msg) - items_data = json.loads(response.data) - self.assertIsNotNone(items_data, msg) - self.assertEqual('FeatureCollection', items_data['type'], msg) - self.assertIsNotNone(items_data['features'], msg) - self.assertEqual(1, len(items_data['features']), msg) - self._assert_paderborn(items_data['features'][0], msg) + url = f'http://localhost:{self.port}/collections/collection_1/items' \ + f'?limit=1&offset=1' + response = self.http.request('GET', url) + self.assertEqual(200, response.status) + items_data = json.loads(response.data) + self.assertIsNotNone(items_data) + self.assertEqual('FeatureCollection', items_data['type']) + self.assertIsNotNone(items_data['features']) + self.assertEqual(1, len(items_data['features'])) + self._assert_paderborn(items_data['features'][0]) def test_get_items_invalid_filter(self): - for server_name in self.servers: - base_url = self.servers[server_name] - for invalid_limit in [-1, 0, 10001]: - url = f'{base_url}' \ - f'{api.API_URL_PREFIX}/collections/collection_1/items' \ - f'?limit={invalid_limit}' - msg = f'in server {server_name} running on {url}' - response = self.http.request('GET', url) - self.assertEqual(500, response.status, msg) - - def test_get_items_by_bbox(self): - for server_name in self.servers: - base_url = self.servers[server_name] - bbox_param = '?bbox=9.01,50.01,10.01,51.01' - url = f'{base_url}' \ - f'{api.API_URL_PREFIX}/collections/collection_1/items' \ - f'{bbox_param}' - msg = f'in server {server_name} running on {url}' + for invalid_limit in [-1, 0, 10001]: + url = f'http://localhost:{self.port}/' \ + f'collections/collection_1/items' \ + f'?limit={invalid_limit}' response = self.http.request('GET', url) - self.assertEqual(200, response.status, msg) - items_data = json.loads(response.data) - self.assertEqual('FeatureCollection', items_data['type'], msg) - self.assertIsNotNone(items_data['features'], msg) - self.assertEqual(1, len(items_data['features']), msg) + self.assertEqual(500, response.status) + def test_get_items_by_bbox(self): + bbox_param = '?bbox=9.01,50.01,10.01,51.01' + url = f'http://localhost:{self.port}' \ + f'/collections/collection_1/items' \ + f'{bbox_param}' + response = self.http.request('GET', url) + self.assertEqual(200, response.status) + items_data = json.loads(response.data) + self.assertEqual('FeatureCollection', items_data['type']) + self.assertIsNotNone(items_data['features']) + self.assertEqual(1, len(items_data['features'])) - def _assert_paderborn(self, item_data, msg): - self.assertIsNotNone(item_data, msg) - self.assertEqual('2.3.4', item_data['stac_version']) + def _assert_paderborn(self, item_data): + self.assertIsNotNone(item_data) + self.assertEqual('0.9.0', item_data['stac_version']) self.assertEqual(['xcube-geodb'], item_data['stac_extensions']) self.assertEqual('Feature', item_data['type']) - self.assertEqual('1', item_data['id'], msg) + self.assertEqual('1', item_data['id']) self.assertEqual(['8.7000', '51.3000', '8.8000', '51.8000'], - item_data['bbox'], msg) + item_data['bbox']) self.assertEqual({'type': 'Polygon', 'coordinates': [[[8.7, 51.3], [8.7, 51.8], [8.8, 51.8], [8.8, 51.3], [8.7, 51.3] ]]}, - item_data['geometry'], msg) + item_data['geometry']) self.assertEqual({'name': 'paderborn', 'population': 150000}, - item_data['properties'], msg) + item_data['properties']) - def _assert_hamburg(self, item_data, msg): - self.assertEqual('2.3.4', item_data['stac_version'], msg) - self.assertEqual(['xcube-geodb'], item_data['stac_extensions'], msg) - self.assertEqual('Feature', item_data['type'], msg) - self.assertEqual('0', item_data['id'], msg) + def _assert_hamburg(self, item_data): + self.assertEqual('0.9.0', item_data['stac_version']) + self.assertEqual(['xcube-geodb'], item_data['stac_extensions']) + self.assertEqual('Feature', item_data['type']) + self.assertEqual('0', item_data['id']) self.assertEqual(['9.0000', '52.0000', '11.0000', '54.0000'], - item_data['bbox'], msg) + item_data['bbox']) self.assertEqual({'type': 'Polygon', 'coordinates': [[[9, 52], [9, 54], [11, 54], @@ -133,6 +105,6 @@ def _assert_hamburg(self, item_data, msg): [9.8, 53.4], [9.2, 52.1], [9, 52]]]}, - item_data['geometry'], msg) + item_data['geometry']) self.assertEqual({'name': 'hamburg', 'population': 1700000}, - item_data['properties'], msg) \ No newline at end of file + item_data['properties']) diff --git a/tests/server/app/test_tornado.py b/tests/server/app/test_tornado.py deleted file mode 100644 index 3437def..0000000 --- a/tests/server/app/test_tornado.py +++ /dev/null @@ -1,79 +0,0 @@ -import re -import unittest - -from xcube_geodb_openeo.server.app.tornado import App - - -class UrlPatternTest(unittest.TestCase): - def test_url_pattern_works(self): - re_pattern = App.url_pattern('/open/{id1}ws/{id2}wf') - matcher = re.fullmatch(re_pattern, '/open/34ws/a66wf') - self.assertIsNotNone(matcher) - self.assertEqual(matcher.groupdict(), {'id1': '34', 'id2': 'a66'}) - - re_pattern = App.url_pattern('/open/ws{id1}/wf{id2}') - matcher = re.fullmatch(re_pattern, '/open/ws34/wfa66') - self.assertIsNotNone(matcher) - self.assertEqual(matcher.groupdict(), {'id1': '34', 'id2': 'a66'}) - - re_pattern = App.url_pattern( - '/datasets/{ds_id}/data.zarr/(?P.*)' - ) - - matcher = re.fullmatch(re_pattern, - '/datasets/S2PLUS_2017/data.zarr/') - self.assertIsNotNone(matcher) - self.assertEqual(matcher.groupdict(), - {'ds_id': 'S2PLUS_2017', 'path': ''}) - - matcher = re.fullmatch(re_pattern, - '/datasets/S2PLUS_2017/' - 'data.zarr/conc_chl/.zattrs') - self.assertIsNotNone(matcher) - self.assertEqual(matcher.groupdict(), - {'ds_id': 'S2PLUS_2017', 'path': 'conc_chl/.zattrs'}) - - x = 'C%3A%5CUsers%5CNorman%5C' \ - 'IdeaProjects%5Cccitools%5Cect-core%5Ctest%5Cui%5CTEST_WS_3' - re_pattern = App.url_pattern('/ws/{base_dir}/res/{res_name}/add') - matcher = re.fullmatch(re_pattern, '/ws/%s/res/SST/add' % x) - self.assertIsNotNone(matcher) - self.assertEqual(matcher.groupdict(), - {'base_dir': x, 'res_name': 'SST'}) - - def test_url_pattern_ok(self): - self.assertEqual('/version', - App.url_pattern('/version')) - self.assertEqual(r'(?P[^\;\/\?\:\@\&\=\+\$\,]+)/get', - App.url_pattern('{num}/get')) - self.assertEqual(r'/open/(?P[^\;\/\?\:\@\&\=\+\$\,]+)', - App.url_pattern('/open/{ws_name}')) - self.assertEqual( - r'/open/ws(?P[^\;\/\?\:\@\&\=\+\$\,]+)/' - r'wf(?P[^\;\/\?\:\@\&\=\+\$\,]+)', - App.url_pattern('/open/ws{id1}/wf{id2}')) - self.assertEqual( - r'/datasets/(?P[^\;\/\?\:\@\&\=\+\$\,]+)/data.zip/(.*)', - App.url_pattern('/datasets/{ds_id}/data.zip/(.*)')) - - def test_url_pattern_fail(self): - with self.assertRaises(ValueError) as cm: - App.url_pattern('/open/{ws/name}') - self.assertEqual('NAME in "{NAME}" must be a valid identifier,' - ' but got "ws/name"', - str(cm.exception)) - - with self.assertRaises(ValueError) as cm: - App.url_pattern('/info/{id') - self.assertEqual('closing "}" missing after opening "{"', - str(cm.exception)) - - with self.assertRaises(ValueError) as cm: - App.url_pattern('/info/id}') - self.assertEqual('closing "}" without opening "{"', - str(cm.exception)) - - with self.assertRaises(ValueError) as cm: - App.url_pattern('/info/{id}/{x}}') - self.assertEqual('closing "}" without opening "{"', - str(cm.exception)) diff --git a/xcube_geodb_openeo/api/api.py b/xcube_geodb_openeo/api/api.py index ab888c6..8854dca 100644 --- a/xcube_geodb_openeo/api/api.py +++ b/xcube_geodb_openeo/api/api.py @@ -20,7 +20,7 @@ # DEALINGS IN THE SOFTWARE. from xcube.server.api import Api -from xcube.server.context import Context +from xcube.server.api import Context from .context import GeoDbContext from ..server.config import OPENEO_CONFIG_SCHEMA diff --git a/xcube_geodb_openeo/api/context.py b/xcube_geodb_openeo/api/context.py index a96a9f1..31b4516 100644 --- a/xcube_geodb_openeo/api/context.py +++ b/xcube_geodb_openeo/api/context.py @@ -29,8 +29,7 @@ from typing import Tuple from xcube.server.api import ApiContext -from xcube.server.context import Context -from xcube.server.impl.framework.tornado import TornadoApiRequest +from xcube.server.api import Context from ..core.datastore import DataStore from ..core.vectorcube import VectorCube @@ -75,13 +74,9 @@ def request(self) -> Mapping[str, Any]: assert self._request is not None return self._request - @config.setter - def request(self, request: TornadoApiRequest): - assert isinstance(request, TornadoApiRequest) - self._request = request - def __init__(self, root: Context): super().__init__(root) + self._request = None self.config = root.config for key in default_config.keys(): if key not in self.config: diff --git a/xcube_geodb_openeo/api/routes.py b/xcube_geodb_openeo/api/routes.py index 797a46a..d722e26 100644 --- a/xcube_geodb_openeo/api/routes.py +++ b/xcube_geodb_openeo/api/routes.py @@ -52,6 +52,22 @@ def get_base_url(request): return base_url +@api.route('/') +class RootHandler(ApiHandler): + """ + Lists general information about the back-end, including which version and + endpoints of the openEO API are supported. May also include billing + information. + """ + + def get(self): + """ + Information about the API version and supported endpoints / features. + """ + base_url = get_base_url(self.request) + self.response.finish(capabilities.get_root(self.ctx.config, base_url)) + + @api.route('/.well-known/openeo') class WellKnownHandler(ApiHandler): """ @@ -64,7 +80,7 @@ def get(self): """ Returns the well-known information. """ - self.response.finish(capabilities.get_well_known(self.config)) + self.response.finish(capabilities.get_well_known(self.ctx.config)) @api.route('/collections') @@ -73,7 +89,8 @@ class CollectionsHandler(ApiHandler): Lists available collections with at least the required information. """ - @api.operation(operationId='getCollections', summary='Gets metadata of ') + @api.operation(operationId='getCollections', + summary='Gets metadata of all available collections') def get(self): """ Lists the available collections. @@ -86,7 +103,6 @@ def get(self): limit = get_limit(self.request) offset = get_offset(self.request) base_url = get_base_url(self.request) - self.ctx.request = self.request if not self.ctx.collections: self.ctx.fetch_collections(base_url, limit, offset) self.response.finish(self.ctx.collections) diff --git a/xcube_geodb_openeo/backend/capabilities.py b/xcube_geodb_openeo/backend/capabilities.py index 812c6ae..df5e0f8 100644 --- a/xcube_geodb_openeo/backend/capabilities.py +++ b/xcube_geodb_openeo/backend/capabilities.py @@ -22,7 +22,7 @@ from typing import Mapping from ..server.config import API_VERSION -from ..api.context import GeoDbContext +from ..server.config import STAC_VERSION from ..version import __version__ ''' @@ -31,15 +31,15 @@ ''' -def get_root(config: Mapping[str, Any], ctx: GeoDbContext): +def get_root(config: Mapping[str, Any], base_url: str): return { - 'api_version': config['API_VERSION'], + 'api_version': API_VERSION, 'backend_version': __version__, - 'stac_version': config['STAC_VERSION'], + 'stac_version': STAC_VERSION, 'type': 'catalog', - "id": config['SERVER_ID'], - "title": config['SERVER_TITLE'], - "description": config['SERVER_DESCRIPTION'], + "id": config['geodb_openeo']['SERVER_ID'], + "title": config['geodb_openeo']['SERVER_TITLE'], + "description": config['geodb_openeo']['SERVER_DESCRIPTION'], 'endpoints': [ {'path': '/collections', 'methods': ['GET']}, # TODO - only list endpoints, which are implemented and are @@ -48,38 +48,38 @@ def get_root(config: Mapping[str, Any], ctx: GeoDbContext): "links": [ # todo - links are incorrect { "rel": "self", - "href": ctx.get_url('/'), + "href": f"{base_url}/", "type": "application/json", "title": "this document" }, { "rel": "service-desc", - "href": ctx.get_url('/api'), + "href": f"{base_url}/api", "type": "application/vnd.oai.openapi+json;version=3.0", "title": "the API definition" }, { "rel": "service-doc", - "href": ctx.get_url('/api.html'), + "href": f"{base_url}/api.html", "type": "text/html", "title": "the API documentation" }, { "rel": "conformance", - "href": ctx.get_url('/conformance'), + "href": f"{base_url}/conformance", "type": "application/json", "title": "OGC API conformance classes" " implemented by this server" }, { "rel": "data", - "href": ctx.get_url('/collections'), + "href": f"{base_url}/collections", "type": "application/json", "title": "Information about the feature collections" }, { "rel": "search", - "href": ctx.get_url('/search'), + "href": f"{base_url}/search", "type": "application/json", "title": "Search across feature collections" } From 8456035a1d0350d156eb236bd90d8f4bc5f6dcb8 Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 16 Jun 2022 10:12:20 +0200 Subject: [PATCH 036/163] started to implement processing --- tests/server/app/test_processing.py | 100 +++++++++++++ xcube_geodb_openeo/api/routes.py | 14 ++ xcube_geodb_openeo/backend/processes.py | 189 ++++++++++++++++++++++++ 3 files changed, 303 insertions(+) create mode 100644 tests/server/app/test_processing.py create mode 100644 xcube_geodb_openeo/backend/processes.py diff --git a/tests/server/app/test_processing.py b/tests/server/app/test_processing.py new file mode 100644 index 0000000..aafba8a --- /dev/null +++ b/tests/server/app/test_processing.py @@ -0,0 +1,100 @@ +# The MIT License (MIT) +# Copyright (c) 2021/2022 by the xcube team and contributors +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +import json + +from .base_test import BaseTest + + +class ProcessingTest(BaseTest): + + def test_get_predefined_processes(self): + response = self.http.request('GET', f'http://localhost:{self.port}/processes') + self.assertEqual(200, response.status) + self.assertTrue( + 'application/json' in response.headers['content-type'] + ) + processes_resp = json.loads(response.data) + self.assertTrue('processes' in processes_resp) + self.assertTrue('links' in processes_resp) + + processes = processes_resp['processes'] + self.assertTrue(len(processes) > 0) + load_collection = None + for p in processes: + self.assertTrue('id' in p) + self.assertTrue('description' in p) + self.assertTrue('parameters' in p) + self.assertTrue('returns' in p) + + if p['id'] == 'load_collection': + load_collection = p + + self.assertIsNotNone(load_collection) + self.assertEqual(1, len(load_collection['categories'])) + self.assertTrue('import', load_collection['categories'][0]) + + self.assertTrue('Load a collection.', load_collection['summary']) + + self.assertTrue('Loads a collection from the current back-end ' + 'by its id and returns it as a vector cube.' + 'The data that is added to the data cube can be' + ' restricted with the parameters' + '"spatial_extent" and "properties".' + , load_collection['description']) + + self.assertEqual(list, type(load_collection['parameters'])) + + collection_param = None + database_param = None + spatial_extent_param = None + self.assertEqual(3, len(load_collection['parameters'])) + for p in load_collection['parameters']: + self.assertEqual(dict, type(p)) + self.assertTrue('name' in p) + self.assertTrue('description' in p) + self.assertTrue('schema' in p) + if p['name'] == 'id': + collection_param = p + if p['name'] == 'database': + database_param = p + if p['name'] == 'spatial_extent': + spatial_extent_param = p + + self.assertIsNotNone(collection_param) + self.assertIsNotNone(database_param) + self.assertIsNotNone(spatial_extent_param) + + self.assertEqual('string', collection_param['schema']['type']) + self.assertEqual(dict, type(collection_param['schema'])) + + self.assertEqual(dict, type(database_param['schema'])) + self.assertEqual('string', database_param['schema']['type']) + self.assertEqual(True, database_param['optional']) + + self.assertEqual(list, type(spatial_extent_param['schema'])) + + self.assertIsNotNone(load_collection['returns']) + self.assertEqual(dict, type(load_collection['returns'])) + self.assertTrue('schema' in load_collection['returns']) + return_schema = load_collection['returns']['schema'] + self.assertEqual(dict, type(return_schema)) + self.assertEqual('object', return_schema['type']) + self.assertEqual('vector-cube', return_schema['subtype']) diff --git a/xcube_geodb_openeo/api/routes.py b/xcube_geodb_openeo/api/routes.py index d722e26..9239663 100644 --- a/xcube_geodb_openeo/api/routes.py +++ b/xcube_geodb_openeo/api/routes.py @@ -19,6 +19,7 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. from ..backend import capabilities +from ..backend import processes from .api import api from xcube.server.api import ApiHandler from .context import STAC_DEFAULT_COLLECTIONS_LIMIT @@ -82,6 +83,19 @@ def get(self): """ self.response.finish(capabilities.get_well_known(self.ctx.config)) +@api.route('/processes') +class ProcessesHandler(ApiHandler): + """ + Lists all predefined processes and returns detailed process descriptions, + including parameters and return values. + """ + + @api.operation(operationId='processes', summary='Listing of processes') + def get(self): + """ + Returns the processes information. + """ + self.response.finish(processes.get_processors()) @api.route('/collections') class CollectionsHandler(ApiHandler): diff --git a/xcube_geodb_openeo/backend/processes.py b/xcube_geodb_openeo/backend/processes.py new file mode 100644 index 0000000..2a9d566 --- /dev/null +++ b/xcube_geodb_openeo/backend/processes.py @@ -0,0 +1,189 @@ +# The MIT License (MIT) +# Copyright (c) 2021/2022 by the xcube team and contributors +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +def get_processors(): + return { + 'processes': [ + { + 'id': 'load_collection', + 'summary': 'Load a collection.', + 'categories': ['import'], + 'description': 'Loads a collection from the current back-end ' + 'by its id and returns it as a vector cube.' + 'The data that is added to the data cube can be' + ' restricted with the parameters' + '"spatial_extent" and "properties".', + 'parameters': [ + { + 'name': 'id', + 'description': 'The collection\'s name', + 'schema': { + 'type': 'string' + } + }, + { + 'name': 'database', + 'description': 'The database of the collection', + 'schema': { + 'type': 'string' + }, + 'optional': True + }, + { + "name": "spatial_extent", + "description": + "Limits the data to load from the collection to" + " the specified bounding box or polygons.\n\nThe " + "process puts a pixel into the data cube if the " + "point at the pixel center intersects with the " + "bounding box or any of the polygons (as defined " + "in the Simple Features standard by the OGC).\n\n" + "The GeoJSON can be one of the following feature " + "types:\n\n* A `Polygon` or `MultiPolygon` " + "geometry,\n* a `Feature` with a `Polygon` or " + "`MultiPolygon` geometry,\n* a " + "`FeatureCollection` containing at least one " + "`Feature` with `Polygon` or `MultiPolygon` " + "geometries, or\n* a `GeometryCollection` " + "containing `Polygon` or `MultiPolygon` " + "geometries. To maximize interoperability, " + "`GeometryCollection` should be avoided in favour " + "of one of the alternatives above.\n\nSet this " + "parameter to `null` to set no limit for the " + "spatial extent. Be careful with this when " + "loading large datasets! It is recommended to use " + "this parameter instead of using " + "``filter_bbox()`` or ``filter_spatial()`` " + "directly after loading unbounded data.", + "schema": [ + { + "title": "Bounding Box", + "type": "object", + "subtype": "bounding-box", + "required": [ + "west", + "south", + "east", + "north" + ], + "properties": { + "west": { + "description": + "West (lower left corner, " + "coordinate axis 1).", + "type": "number" + }, + "south": { + "description": + "South (lower left corner, " + "coordinate axis 2).", + "type": "number" + }, + "east": { + "description": + "East (upper right corner, " + "coordinate axis 1).", + "type": "number" + }, + "north": { + "description": + "North (upper right corner, " + "coordinate axis 2).", + "type": "number" + }, + "base": { + "description": + "Base (optional, lower left " + "corner, coordinate axis 3).", + "type": [ + "number", + "null" + ], + "default": "null" + }, + "height": { + "description": "Height (optional, upper right corner, coordinate axis 3).", + "type": [ + "number", + "null" + ], + "default": "null" + }, + "crs": { + "description": "Coordinate reference system of the extent, specified as as [EPSG code](http://www.epsg-registry.org/), [WKT2 (ISO 19162) string](http://docs.opengeospatial.org/is/18-010r7/18-010r7.html) or [PROJ definition (deprecated)](https://proj.org/usage/quickstart.html). Defaults to `4326` (EPSG code 4326) unless the client explicitly requests a different coordinate reference system.", + "anyOf": [ + { + "title": "EPSG Code", + "type": "integer", + "subtype": "epsg-code", + "minimum": 1000, + "examples": [ + 3857 + ] + }, + { + "title": "WKT2", + "type": "string", + "subtype": "wkt2-definition" + }, + { + "title": "PROJ definition", + "type": "string", + "subtype": "proj-definition", + "deprecated": True + } + ], + "default": 4326 + } + } + }, + { + "title": "GeoJSON", + "description": + "Limits the data cube to the bounding box " + "of the given geometry. All pixels inside " + "the bounding box that do not intersect " + "with any of the polygons will be set to " + "no data (`null`).", + "type": "object", + "subtype": "geojson" + }, + { + "title": "No filter", + "description": + "Don't filter spatially. All data is " + "included in the data cube.", + "type": "null" + } + ] + } + ], + 'returns': { + 'description': 'A vector cube for further processing.', + 'schema': { + "type": "object", + "subtype": "vector-cube" + } + } + } + ], + 'links': [] + } From c192135ff677048e138d782cc782d888c8a33856 Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 16 Jun 2022 16:17:58 +0200 Subject: [PATCH 037/163] adapting to new test module in Server NG --- .github/workflows/workflow.yaml | 6 +++ environment.yml | 1 + tests/server/app/base_test.py | 70 ------------------------- tests/server/app/test_capabilities.py | 18 ++++++- tests/server/app/test_data_discovery.py | 18 ++++++- tests/server/app/test_processing.py | 18 ++++++- 6 files changed, 55 insertions(+), 76 deletions(-) delete mode 100644 tests/server/app/base_test.py diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 8174263..85b41c2 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -24,6 +24,12 @@ jobs: - run: | echo "SKIP_UNITTESTS: ${{ env.SKIP_UNITTESTS }}" - uses: actions/checkout@v2 +# - name: Checkout xcube-geodb repo +# uses: actions/checkout@v3 +# with: +# repository: dcs4cop/xcube +# path: xcube +# ref: forman-676-server_redesign - uses: conda-incubator/setup-miniconda@v2 if: ${{ env.SKIP_UNITTESTS == '0' }} with: diff --git a/environment.yml b/environment.yml index 013abb6..29fb09d 100644 --- a/environment.yml +++ b/environment.yml @@ -8,6 +8,7 @@ dependencies: # Required - click >=8.0 - deprecated >=1.2 + - geopandas - pyjwt >=1.7 - pyproj >=3.0,<3.3 # tests fail with 3.3.0, missing database on Windows - pyyaml >=5.4 diff --git a/tests/server/app/base_test.py b/tests/server/app/base_test.py deleted file mode 100644 index 0330d96..0000000 --- a/tests/server/app/base_test.py +++ /dev/null @@ -1,70 +0,0 @@ -# The MIT License (MIT) -# Copyright (c) 2021/2022 by the xcube team and contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. - -import asyncio -import pkgutil -import unittest -import urllib3 -import socket -import threading -import yaml - -from contextlib import closing - -from xcube.server.server import Server -from xcube.constants import EXTENSION_POINT_SERVER_APIS -from xcube.util import extension -from xcube.util.extension import ExtensionRegistry - -from tornado.platform.asyncio import AnyThreadEventLoopPolicy -from xcube.server.impl.framework.tornado import TornadoFramework - - -# taken from https://stackoverflow.com/a/45690594 -def find_free_port(): - with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as s: - s.bind(('localhost', 0)) - s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - return s.getsockname()[1] - - -class BaseTest(unittest.TestCase): - port = None - - @classmethod - def setUpClass(cls) -> None: - cls.port = find_free_port() - data = pkgutil.get_data('tests', 'test_config.yml') - config = yaml.safe_load(data) - config['port'] = cls.port - config['address'] = 'localhost' - asyncio.set_event_loop_policy(AnyThreadEventLoopPolicy()) - er = ExtensionRegistry() - er.add_extension(loader=extension.import_component( - 'xcube_geodb_openeo.api:api' - ), point=EXTENSION_POINT_SERVER_APIS, name='geodb-openeo') - server = Server(framework=TornadoFramework(), config=config, - extension_registry=er) - tornado = threading.Thread(target=server.start) - tornado.daemon = True - tornado.start() - - cls.http = urllib3.PoolManager() diff --git a/tests/server/app/test_capabilities.py b/tests/server/app/test_capabilities.py index eac9f19..41d3dec 100644 --- a/tests/server/app/test_capabilities.py +++ b/tests/server/app/test_capabilities.py @@ -1,9 +1,23 @@ import json +import pkgutil +from typing import Dict -from .base_test import BaseTest +import yaml +from xcube.server.testing import ServerTest +from xcube.util import extension +from xcube.constants import EXTENSION_POINT_SERVER_APIS +from xcube.util.extension import ExtensionRegistry -class CapabilitiesTest(BaseTest): +class CapabilitiesTest(ServerTest): + + def add_extension(self, er: ExtensionRegistry) -> None: + er.add_extension(loader=extension.import_component('xcube_geodb_openeo.api:api'), + point=EXTENSION_POINT_SERVER_APIS, name='geodb-openeo') + + def add_config(self, config: Dict): + data = pkgutil.get_data('tests', 'test_config.yml') + config.update(yaml.safe_load(data)) def test_root(self): response = self.http.request('GET', f'http://localhost:{self.port}/') diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index 1563740..72ff184 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -1,9 +1,23 @@ import json +import pkgutil +from typing import Dict -from .base_test import BaseTest +import yaml +from xcube.constants import EXTENSION_POINT_SERVER_APIS +from xcube.server.testing import ServerTest +from xcube.util import extension +from xcube.util.extension import ExtensionRegistry -class DataDiscoveryTest(BaseTest): +class DataDiscoveryTest(ServerTest): + + def add_extension(self, er: ExtensionRegistry) -> None: + er.add_extension(loader=extension.import_component('xcube_geodb_openeo.api:api'), + point=EXTENSION_POINT_SERVER_APIS, name='geodb-openeo') + + def add_config(self, config: Dict): + data = pkgutil.get_data('tests', 'test_config.yml') + config.update(yaml.safe_load(data)) def test_collections(self): url = f'http://localhost:{self.port}/collections' diff --git a/tests/server/app/test_processing.py b/tests/server/app/test_processing.py index aafba8a..4b449ef 100644 --- a/tests/server/app/test_processing.py +++ b/tests/server/app/test_processing.py @@ -19,11 +19,25 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. import json +import pkgutil +from typing import Dict -from .base_test import BaseTest +import yaml +from xcube.constants import EXTENSION_POINT_SERVER_APIS +from xcube.server.testing import ServerTest +from xcube.util import extension +from xcube.util.extension import ExtensionRegistry -class ProcessingTest(BaseTest): +class ProcessingTest(ServerTest): + + def add_extension(self, er: ExtensionRegistry) -> None: + er.add_extension(loader=extension.import_component('xcube_geodb_openeo.api:api'), + point=EXTENSION_POINT_SERVER_APIS, name='geodb-openeo') + + def add_config(self, config: Dict): + data = pkgutil.get_data('tests', 'test_config.yml') + config.update(yaml.safe_load(data)) def test_get_predefined_processes(self): response = self.http.request('GET', f'http://localhost:{self.port}/processes') From efca64c65eb44195c8e12e48316e1394625394c6 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 17 Jun 2022 01:53:41 +0200 Subject: [PATCH 038/163] moving towards processing --- tests/server/app/test_processing.py | 28 ++++++++++++ xcube_geodb_openeo/api/routes.py | 47 ++++++++++++++++++- xcube_geodb_openeo/backend/processes.py | 60 ++++++++++++++++++++++--- 3 files changed, 127 insertions(+), 8 deletions(-) diff --git a/tests/server/app/test_processing.py b/tests/server/app/test_processing.py index 4b449ef..605882e 100644 --- a/tests/server/app/test_processing.py +++ b/tests/server/app/test_processing.py @@ -24,10 +24,13 @@ import yaml from xcube.constants import EXTENSION_POINT_SERVER_APIS +from xcube.server.api import ApiError from xcube.server.testing import ServerTest from xcube.util import extension from xcube.util.extension import ExtensionRegistry +from xcube_geodb_openeo.backend import processes + class ProcessingTest(ServerTest): @@ -112,3 +115,28 @@ def test_get_predefined_processes(self): self.assertEqual(dict, type(return_schema)) self.assertEqual('object', return_schema['type']) self.assertEqual('vector-cube', return_schema['subtype']) + + def test_get_file_formats(self): + response = self.http.request('GET', f'http://localhost:{self.port}/file_formats') + self.assertEqual(200, response.status) + self.assertTrue( + 'application/json' in response.headers['content-type'] + ) + formats = json.loads(response.data) + self.assertTrue('input' in formats) + self.assertTrue('output' in formats) + + def test_result(self): + body = json.dumps({'process': {'id': 'load_collection', 'parameters': []}}) + response = self.http.request('POST', f'http://localhost:{self.port}/result', body=body, headers={'content-type': 'application/json'}) + self.assertEqual(200, response.status) + + def test_result_no_query_param(self): + response = self.http.request('POST', f'http://localhost:{self.port}/result') + self.assertEqual(400, response.status) + message = json.loads(response.data) + self.assertTrue('Request body must contain key \'process\'.' in message['error']['message']) + + def test_invalid_process_id(self): + with self.assertRaises(ValueError): + processes.get_processes_registry().get_process('miau!') diff --git a/xcube_geodb_openeo/api/routes.py b/xcube_geodb_openeo/api/routes.py index 9239663..ac0c083 100644 --- a/xcube_geodb_openeo/api/routes.py +++ b/xcube_geodb_openeo/api/routes.py @@ -18,10 +18,13 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. +import json + from ..backend import capabilities from ..backend import processes from .api import api from xcube.server.api import ApiHandler +from xcube.server.api import ApiError from .context import STAC_DEFAULT_COLLECTIONS_LIMIT @@ -83,6 +86,7 @@ def get(self): """ self.response.finish(capabilities.get_well_known(self.ctx.config)) + @api.route('/processes') class ProcessesHandler(ApiHandler): """ @@ -95,7 +99,48 @@ def get(self): """ Returns the processes information. """ - self.response.finish(processes.get_processors()) + registry = processes.get_processes_registry() + self.response.finish({ + 'processes': registry.get_processes(), + 'links': registry.get_links()} + ) + + +@api.route('/file_formats') +class FormatsHandler(ApiHandler): + """ + Lists supported input and output file formats. Input file formats specify which file a back-end can read from. + Output file formats specify which file a back-end can write to. + """ + + @api.operation(operationId='file_formats', summary='Listing of supported file formats') + def get(self): + """ + Returns the supported file formats. + """ + self.response.finish(processes.get_processes_registry().get_file_formats()) + + +@api.route('/result') +class ResultHandler(ApiHandler): + """ + Executes a user-defined process directly (synchronously) and the result will be downloaded. + """ + + @api.operation(operationId='result', summary='Execute process synchronously.') + def post(self): + """ + Processes requested processing task and returns result. + """ + if not self.request.body: + raise(ApiError(400, 'Request body must contain key \'process\'.')) + + processing_request = json.loads(self.request.body)['process'] + process_id = processing_request['id'] + process_parameters = processing_request['parameters'] + process = processes.get_processes_registry().get_process(process_id) + self.response.finish('process') + @api.route('/collections') class CollectionsHandler(ApiHandler): diff --git a/xcube_geodb_openeo/backend/processes.py b/xcube_geodb_openeo/backend/processes.py index 2a9d566..b48a361 100644 --- a/xcube_geodb_openeo/backend/processes.py +++ b/xcube_geodb_openeo/backend/processes.py @@ -18,10 +18,40 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. +from typing import Dict, List -def get_processors(): - return { - 'processes': [ + +class ProcessesRegistry: + + def __init__(self): + self.processes = [] + self.links = [] + self._add_default_processes() + self._add_default_links() + + def add_process(self, process: Dict) -> None: + self.processes.append(process) + + def add_link(self, link: Dict) -> None: + self.links.append(link) + + def get_processes(self) -> List: + return self.processes.copy() + + def get_links(self) -> List: + return self.links.copy() + + def get_file_formats(self) -> Dict: + return {'input': {}, 'output': {}} + + def get_process(self, process_id): + for process in self.processes: + if process['id'] == process_id: + return process + raise ValueError(f'Unknown process_id: {process_id}') + + def _add_default_processes(self): + self.add_process( { 'id': 'load_collection', 'summary': 'Load a collection.', @@ -128,7 +158,14 @@ def get_processors(): "default": "null" }, "crs": { - "description": "Coordinate reference system of the extent, specified as as [EPSG code](http://www.epsg-registry.org/), [WKT2 (ISO 19162) string](http://docs.opengeospatial.org/is/18-010r7/18-010r7.html) or [PROJ definition (deprecated)](https://proj.org/usage/quickstart.html). Defaults to `4326` (EPSG code 4326) unless the client explicitly requests a different coordinate reference system.", + "description": "Coordinate reference system of the extent, specified as as " + "[EPSG code](http://www.epsg-registry.org/), [WKT2 (ISO 19162) " + "string]" + "(http://docs.opengeospatial.org/is/18-010r7/18-010r7.html) or" + " [PROJ definition (deprecated)]" + "(https://proj.org/usage/quickstart.html). Defaults to `4326`" + " (EPSG code 4326) unless the client explicitly requests a" + " different coordinate reference system.", "anyOf": [ { "title": "EPSG Code", @@ -184,6 +221,15 @@ def get_processors(): } } } - ], - 'links': [] - } + ) + + def _add_default_links(self): + self.add_link({}) + + +_PROCESSES_REGISTRY_SINGLETON = ProcessesRegistry() + + +def get_processes_registry() -> ProcessesRegistry: + """Return the processes registry singleton.""" + return _PROCESSES_REGISTRY_SINGLETON From a8f30ee43897d083f70def389b19dc48696d6445 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 17 Jun 2022 12:22:51 +0200 Subject: [PATCH 039/163] code style --- tests/server/app/test_processing.py | 32 +++++++++++++++++++---------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/tests/server/app/test_processing.py b/tests/server/app/test_processing.py index 605882e..5178ddb 100644 --- a/tests/server/app/test_processing.py +++ b/tests/server/app/test_processing.py @@ -24,7 +24,6 @@ import yaml from xcube.constants import EXTENSION_POINT_SERVER_APIS -from xcube.server.api import ApiError from xcube.server.testing import ServerTest from xcube.util import extension from xcube.util.extension import ExtensionRegistry @@ -35,15 +34,18 @@ class ProcessingTest(ServerTest): def add_extension(self, er: ExtensionRegistry) -> None: - er.add_extension(loader=extension.import_component('xcube_geodb_openeo.api:api'), - point=EXTENSION_POINT_SERVER_APIS, name='geodb-openeo') + er.add_extension( + loader=extension.import_component('xcube_geodb_openeo.api:api'), + point=EXTENSION_POINT_SERVER_APIS, name='geodb-openeo' + ) def add_config(self, config: Dict): data = pkgutil.get_data('tests', 'test_config.yml') config.update(yaml.safe_load(data)) def test_get_predefined_processes(self): - response = self.http.request('GET', f'http://localhost:{self.port}/processes') + response = self.http.request('GET', + f'http://localhost:{self.port}/processes') self.assertEqual(200, response.status) self.assertTrue( 'application/json' in response.headers['content-type'] @@ -52,10 +54,10 @@ def test_get_predefined_processes(self): self.assertTrue('processes' in processes_resp) self.assertTrue('links' in processes_resp) - processes = processes_resp['processes'] - self.assertTrue(len(processes) > 0) + processes_md = processes_resp['processes'] + self.assertTrue(len(processes_md) > 0) load_collection = None - for p in processes: + for p in processes_md: self.assertTrue('id' in p) self.assertTrue('description' in p) self.assertTrue('parameters' in p) @@ -117,7 +119,8 @@ def test_get_predefined_processes(self): self.assertEqual('vector-cube', return_schema['subtype']) def test_get_file_formats(self): - response = self.http.request('GET', f'http://localhost:{self.port}/file_formats') + response = self.http.request('GET', f'http://localhost:{self.port}' + f'/file_formats') self.assertEqual(200, response.status) self.assertTrue( 'application/json' in response.headers['content-type'] @@ -128,14 +131,21 @@ def test_get_file_formats(self): def test_result(self): body = json.dumps({'process': {'id': 'load_collection', 'parameters': []}}) - response = self.http.request('POST', f'http://localhost:{self.port}/result', body=body, headers={'content-type': 'application/json'}) + response = self.http.request('POST', + f'http://localhost:{self.port}/result', + body=body, + headers={ + 'content-type': 'application/json' + }) self.assertEqual(200, response.status) def test_result_no_query_param(self): - response = self.http.request('POST', f'http://localhost:{self.port}/result') + response = self.http.request('POST', + f'http://localhost:{self.port}/result') self.assertEqual(400, response.status) message = json.loads(response.data) - self.assertTrue('Request body must contain key \'process\'.' in message['error']['message']) + self.assertTrue('Request body must contain key \'process\'.' in + message['error']['message']) def test_invalid_process_id(self): with self.assertRaises(ValueError): From 72b6a4d0b11473bcabc2ea0ee23d41ceefb6620f Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 17 Jun 2022 14:01:08 +0200 Subject: [PATCH 040/163] taking care that parameters are complete --- tests/server/app/test_processing.py | 13 ++++++++++--- xcube_geodb_openeo/api/routes.py | 12 ++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/tests/server/app/test_processing.py b/tests/server/app/test_processing.py index 5178ddb..6768a2c 100644 --- a/tests/server/app/test_processing.py +++ b/tests/server/app/test_processing.py @@ -129,15 +129,22 @@ def test_get_file_formats(self): self.assertTrue('input' in formats) self.assertTrue('output' in formats) - def test_result(self): - body = json.dumps({'process': {'id': 'load_collection', 'parameters': []}}) + def test_result_missing_parameters(self): + body = json.dumps({'process': { + 'id': 'load_collection', + 'parameters': [] + }}) response = self.http.request('POST', f'http://localhost:{self.port}/result', body=body, headers={ 'content-type': 'application/json' }) - self.assertEqual(200, response.status) + self.assertEqual(400, response.status) + message = json.loads(response.data) + self.assertTrue('Request body must contain parameter \'id\'.' in + message['error']['message']) + def test_result_no_query_param(self): response = self.http.request('POST', diff --git a/xcube_geodb_openeo/api/routes.py b/xcube_geodb_openeo/api/routes.py index ac0c083..2756066 100644 --- a/xcube_geodb_openeo/api/routes.py +++ b/xcube_geodb_openeo/api/routes.py @@ -139,8 +139,20 @@ def post(self): process_id = processing_request['id'] process_parameters = processing_request['parameters'] process = processes.get_processes_registry().get_process(process_id) + + expected_parameters = process['parameters'] + self.ensure_parameters(expected_parameters, process_parameters) + self.response.finish('process') + def ensure_parameters(self, expected_parameters, process_parameters): + for ep in expected_parameters: + is_optional_param = 'optional' in ep and ep['optional'] + if not is_optional_param: + if ep['name'] not in process_parameters: + raise (ApiError(400, f'Request body must contain parameter' + f' \'{ep["name"]}\'.')) + @api.route('/collections') class CollectionsHandler(ApiHandler): From 000380717a4a1c28f405a34848f83d6e0d773943 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 20 Jun 2022 00:48:14 +0200 Subject: [PATCH 041/163] moving towards processing abstraction --- tests/server/app/test_capabilities.py | 3 + tests/server/app/test_processing.py | 24 +- xcube_geodb_openeo/api/routes.py | 14 +- xcube_geodb_openeo/backend/catalog.py | 34 --- xcube_geodb_openeo/backend/processes.py | 276 ++++++------------ xcube_geodb_openeo/backend/res/__init__.py | 0 .../backend/res/load_collection.json | 122 ++++++++ xcube_geodb_openeo/core/vectorcube.py | 3 +- 8 files changed, 251 insertions(+), 225 deletions(-) delete mode 100644 xcube_geodb_openeo/backend/catalog.py create mode 100644 xcube_geodb_openeo/backend/res/__init__.py create mode 100644 xcube_geodb_openeo/backend/res/load_collection.json diff --git a/tests/server/app/test_capabilities.py b/tests/server/app/test_capabilities.py index 41d3dec..c22d37c 100644 --- a/tests/server/app/test_capabilities.py +++ b/tests/server/app/test_capabilities.py @@ -60,3 +60,6 @@ def test_conformance(self): self.assertEqual(200, response.status) conformance_data = json.loads(response.data) self.assertIsNotNone(conformance_data['conformsTo']) + + def test_bluh(self): + print(__file__) diff --git a/tests/server/app/test_processing.py b/tests/server/app/test_processing.py index 6768a2c..0576adf 100644 --- a/tests/server/app/test_processing.py +++ b/tests/server/app/test_processing.py @@ -29,6 +29,7 @@ from xcube.util.extension import ExtensionRegistry from xcube_geodb_openeo.backend import processes +from xcube_geodb_openeo.core.vectorcube import VectorCube class ProcessingTest(ServerTest): @@ -118,6 +119,7 @@ def test_get_predefined_processes(self): self.assertEqual('object', return_schema['type']) self.assertEqual('vector-cube', return_schema['subtype']) + def test_get_file_formats(self): response = self.http.request('GET', f'http://localhost:{self.port}' f'/file_formats') @@ -129,10 +131,29 @@ def test_get_file_formats(self): self.assertTrue('input' in formats) self.assertTrue('output' in formats) + def test_result(self): + body = json.dumps({'process': { + 'id': 'load_collection', + 'parameters': { + 'id': 'collection_1', + 'spatial_extent': None + } + }}) + response = self.http.request('POST', + f'http://localhost:{self.port}/result', + body=body, + headers={ + 'content-type': 'application/json' + }) + + self.assertEqual(200, response.status) + result = json.loads(response.data) + self.assertEqual(dict, type(result)) + def test_result_missing_parameters(self): body = json.dumps({'process': { 'id': 'load_collection', - 'parameters': [] + 'parameters': {} }}) response = self.http.request('POST', f'http://localhost:{self.port}/result', @@ -145,7 +166,6 @@ def test_result_missing_parameters(self): self.assertTrue('Request body must contain parameter \'id\'.' in message['error']['message']) - def test_result_no_query_param(self): response = self.http.request('POST', f'http://localhost:{self.port}/result') diff --git a/xcube_geodb_openeo/api/routes.py b/xcube_geodb_openeo/api/routes.py index 2756066..6e4947a 100644 --- a/xcube_geodb_openeo/api/routes.py +++ b/xcube_geodb_openeo/api/routes.py @@ -26,6 +26,7 @@ from xcube.server.api import ApiHandler from xcube.server.api import ApiError from .context import STAC_DEFAULT_COLLECTIONS_LIMIT +from ..core.vectorcube import VectorCube def get_limit(request): @@ -99,9 +100,9 @@ def get(self): """ Returns the processes information. """ - registry = processes.get_processes_registry() + registry = processes.get_processes_registry(self.ctx) self.response.finish({ - 'processes': registry.get_processes(), + 'processes': [p.metadata for p in registry.processes], 'links': registry.get_links()} ) @@ -138,12 +139,15 @@ def post(self): processing_request = json.loads(self.request.body)['process'] process_id = processing_request['id'] process_parameters = processing_request['parameters'] - process = processes.get_processes_registry().get_process(process_id) + registry = processes.get_processes_registry(self.ctx) + process = registry.get_process(process_id) - expected_parameters = process['parameters'] + expected_parameters = process.metadata['parameters'] self.ensure_parameters(expected_parameters, process_parameters) + process.parameters = process_parameters - self.response.finish('process') + result = processes.submit_process_sync(process, self.ctx) + self.response.finish(result) def ensure_parameters(self, expected_parameters, process_parameters): for ep in expected_parameters: diff --git a/xcube_geodb_openeo/backend/catalog.py b/xcube_geodb_openeo/backend/catalog.py deleted file mode 100644 index 3eebc65..0000000 --- a/xcube_geodb_openeo/backend/catalog.py +++ /dev/null @@ -1,34 +0,0 @@ -# The MIT License (MIT) -# Copyright (c) 2021/2022 by the xcube team and contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. - - -from typing import Dict -from typing import Optional -from typing import Tuple - -from ..api.context import GeoDbContext - - - - - -class Catalog: - pass diff --git a/xcube_geodb_openeo/backend/processes.py b/xcube_geodb_openeo/backend/processes.py index b48a361..6033bf0 100644 --- a/xcube_geodb_openeo/backend/processes.py +++ b/xcube_geodb_openeo/backend/processes.py @@ -18,218 +18,128 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. +import importlib +import importlib.resources as resources +import json +from abc import abstractmethod from typing import Dict, List +from geopandas import GeoDataFrame +from xcube.server.api import ServerContextT -class ProcessesRegistry: +from xcube_geodb_openeo.core.vectorcube import VectorCube + + +class Process: + """ + This class represents a process. It contains the metadata, and the method + "Execute". + Instances can be passed as parameter to Processing. + """ + + def __init__(self, metadata: Dict): + if not metadata: + raise ValueError('Empty processor metadata provided.') + self._metadata = metadata + self._parameters = {} + + @property + def metadata(self) -> Dict: + return self._metadata + + @property + def parameters(self) -> Dict: + return self._parameters + + @parameters.setter + def parameters(self, p: dict) -> None: + self._parameters = p + + @abstractmethod + def execute(self, parameters: dict, ctx: ServerContextT) -> GeoDataFrame: + pass + + +def read_default_processes() -> List[Process]: + processes_specs = [j for j in resources.contents(f'{__package__}.res') + if j.lower().endswith('json')] + processes = [] + for spec in processes_specs: + with resources.open_binary(f'{__package__}.res', spec) as f: + metadata = json.loads(f.read()) + module = importlib.import_module(metadata['module']) + class_name = metadata['class_name'] + cls = getattr(module, class_name) + processes.append(cls(metadata)) + + return processes + + +class ProcessRegistry: + + @property + def processes(self) -> List[Process]: + return self._processes def __init__(self): - self.processes = [] + self._processes = [] self.links = [] self._add_default_processes() self._add_default_links() - def add_process(self, process: Dict) -> None: + def add_process(self, process: Process) -> None: self.processes.append(process) def add_link(self, link: Dict) -> None: self.links.append(link) - def get_processes(self) -> List: - return self.processes.copy() - def get_links(self) -> List: return self.links.copy() def get_file_formats(self) -> Dict: return {'input': {}, 'output': {}} - def get_process(self, process_id): + def get_process(self, process_id: str) -> Process: for process in self.processes: - if process['id'] == process_id: + if process.metadata['id'] == process_id: return process raise ValueError(f'Unknown process_id: {process_id}') def _add_default_processes(self): - self.add_process( - { - 'id': 'load_collection', - 'summary': 'Load a collection.', - 'categories': ['import'], - 'description': 'Loads a collection from the current back-end ' - 'by its id and returns it as a vector cube.' - 'The data that is added to the data cube can be' - ' restricted with the parameters' - '"spatial_extent" and "properties".', - 'parameters': [ - { - 'name': 'id', - 'description': 'The collection\'s name', - 'schema': { - 'type': 'string' - } - }, - { - 'name': 'database', - 'description': 'The database of the collection', - 'schema': { - 'type': 'string' - }, - 'optional': True - }, - { - "name": "spatial_extent", - "description": - "Limits the data to load from the collection to" - " the specified bounding box or polygons.\n\nThe " - "process puts a pixel into the data cube if the " - "point at the pixel center intersects with the " - "bounding box or any of the polygons (as defined " - "in the Simple Features standard by the OGC).\n\n" - "The GeoJSON can be one of the following feature " - "types:\n\n* A `Polygon` or `MultiPolygon` " - "geometry,\n* a `Feature` with a `Polygon` or " - "`MultiPolygon` geometry,\n* a " - "`FeatureCollection` containing at least one " - "`Feature` with `Polygon` or `MultiPolygon` " - "geometries, or\n* a `GeometryCollection` " - "containing `Polygon` or `MultiPolygon` " - "geometries. To maximize interoperability, " - "`GeometryCollection` should be avoided in favour " - "of one of the alternatives above.\n\nSet this " - "parameter to `null` to set no limit for the " - "spatial extent. Be careful with this when " - "loading large datasets! It is recommended to use " - "this parameter instead of using " - "``filter_bbox()`` or ``filter_spatial()`` " - "directly after loading unbounded data.", - "schema": [ - { - "title": "Bounding Box", - "type": "object", - "subtype": "bounding-box", - "required": [ - "west", - "south", - "east", - "north" - ], - "properties": { - "west": { - "description": - "West (lower left corner, " - "coordinate axis 1).", - "type": "number" - }, - "south": { - "description": - "South (lower left corner, " - "coordinate axis 2).", - "type": "number" - }, - "east": { - "description": - "East (upper right corner, " - "coordinate axis 1).", - "type": "number" - }, - "north": { - "description": - "North (upper right corner, " - "coordinate axis 2).", - "type": "number" - }, - "base": { - "description": - "Base (optional, lower left " - "corner, coordinate axis 3).", - "type": [ - "number", - "null" - ], - "default": "null" - }, - "height": { - "description": "Height (optional, upper right corner, coordinate axis 3).", - "type": [ - "number", - "null" - ], - "default": "null" - }, - "crs": { - "description": "Coordinate reference system of the extent, specified as as " - "[EPSG code](http://www.epsg-registry.org/), [WKT2 (ISO 19162) " - "string]" - "(http://docs.opengeospatial.org/is/18-010r7/18-010r7.html) or" - " [PROJ definition (deprecated)]" - "(https://proj.org/usage/quickstart.html). Defaults to `4326`" - " (EPSG code 4326) unless the client explicitly requests a" - " different coordinate reference system.", - "anyOf": [ - { - "title": "EPSG Code", - "type": "integer", - "subtype": "epsg-code", - "minimum": 1000, - "examples": [ - 3857 - ] - }, - { - "title": "WKT2", - "type": "string", - "subtype": "wkt2-definition" - }, - { - "title": "PROJ definition", - "type": "string", - "subtype": "proj-definition", - "deprecated": True - } - ], - "default": 4326 - } - } - }, - { - "title": "GeoJSON", - "description": - "Limits the data cube to the bounding box " - "of the given geometry. All pixels inside " - "the bounding box that do not intersect " - "with any of the polygons will be set to " - "no data (`null`).", - "type": "object", - "subtype": "geojson" - }, - { - "title": "No filter", - "description": - "Don't filter spatially. All data is " - "included in the data cube.", - "type": "null" - } - ] - } - ], - 'returns': { - 'description': 'A vector cube for further processing.', - 'schema': { - "type": "object", - "subtype": "vector-cube" - } - } - } - ) + for dp in read_default_processes(): + self.add_process(dp) def _add_default_links(self): self.add_link({}) -_PROCESSES_REGISTRY_SINGLETON = ProcessesRegistry() +_PROCESS_REGISTRY_SINGLETON = None + + +def get_processes_registry(ctx: ServerContextT) -> ProcessRegistry: + """Return the process registry singleton.""" + global _PROCESS_REGISTRY_SINGLETON + if not _PROCESS_REGISTRY_SINGLETON: + _PROCESS_REGISTRY_SINGLETON = ProcessRegistry() + return _PROCESS_REGISTRY_SINGLETON + + +def submit_process_sync(p: Process, ctx: ServerContextT) -> GeoDataFrame: + """ + Submits a process synchronously, and returns the result. + :param p: The process to execute. + :param ctx: The Server context. + :return: processing result as geopandas object + """ + parameters = p.parameters + print(parameters) + parameters['with_items'] = True + # parameter_translator (introduce interface, we need to translate params from query params to backend params) + return p.execute(parameters, ctx) + +class LoadCollection(Process): -def get_processes_registry() -> ProcessesRegistry: - """Return the processes registry singleton.""" - return _PROCESSES_REGISTRY_SINGLETON + def execute(self, parameters: dict, ctx: ServerContextT) -> GeoDataFrame: + result = VectorCube() + return result diff --git a/xcube_geodb_openeo/backend/res/__init__.py b/xcube_geodb_openeo/backend/res/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/xcube_geodb_openeo/backend/res/load_collection.json b/xcube_geodb_openeo/backend/res/load_collection.json new file mode 100644 index 0000000..52b88a3 --- /dev/null +++ b/xcube_geodb_openeo/backend/res/load_collection.json @@ -0,0 +1,122 @@ +{ + "id": "load_collection", + "summary": "Load a collection", + "categories": [ + "import" + ], + "description": "Loads a collection from the current back-end by its id and returns it as a vector cube. The data that is added to the data cube can be restricted with the parameters \"spatial_extent\" and \"properties\".", + "parameters": [ + { + "name": "id", + "description": "The collection's name", + "schema": { + "type": "string" + } + }, + { + "name": "database", + "description": "The database of the collection", + "schema": { + "type": "string" + }, + "optional": true + }, + { + "name": "spatial_extent", + "description": "Limits the data to load from the collection to the specified bounding box or polygons.\n\nThe process puts a pixel into the data cube if the point at the pixel center intersects with the bounding box or any of the polygons (as defined in the Simple Features standard by the OGC).\n\n The GeoJSON can be one of the following feature types:\n\n* A `Polygon` or `MultiPolygon` geometry,\n* a `Feature` with a `Polygon` or `MultiPolygon` geometry,\n* a `FeatureCollection` containing at least one `Feature` with `Polygon` or `MultiPolygon` geometries, or\n* a `GeometryCollection` containing `Polygon` or `MultiPolygon` geometries. To maximize interoperability, `GeometryCollection` should be avoided in favour of one of the alternatives above.\n\nSet this parameter to `null` to set no limit for the spatial extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using ``filter_bbox()`` or ``filter_spatial()`` directly after loading unbounded data.", + "schema": [ + { + "title": "Bounding Box", + "type": "object", + "subtype": "bounding-box", + "required": [ + "west", + "south", + "east", + "north" + ], + "properties": { + "west": { + "description": "West (lower left corner, coordinate axis 1).", + "type": "number" + }, + "south": { + "description": "South (lower left corner, coordinate axis 2).", + "type": "number" + }, + "east": { + "description": "East (upper right corner, coordinate axis 1).", + "type": "number" + }, + "north": { + "description": "North (upper right corner, coordinate axis 2).", + "type": "number" + }, + "base": { + "description": "Base (optional, lower left corner, coordinate axis 3).", + "type": [ + "number", + "null" + ], + "default": "null" + }, + "height": { + "description": "Height (optional, upper right corner, coordinate axis 3).", + "type": [ + "number", + "null" + ], + "default": "null" + }, + "crs": { + "description": "Coordinate reference system of the extent, specified as as [EPSG code](http://www.epsg-registry.org/), [WKT2 (ISO 19162) string] (http://docs.opengeospatial.org/is/18-010r7/18-010r7.html) or [PROJ definition (deprecated)](https://proj.org/usage/quickstart.html). Defaults to `4326` (EPSG code 4326) unless the client explicitly requests a different coordinate reference system.", + "anyOf": [ + { + "title": "EPSG Code", + "type": "integer", + "subtype": "epsg-code", + "minimum": 1000, + "examples": [ + 3857 + ] + }, + { + "title": "WKT2", + "type": "string", + "subtype": "wkt2-definition" + }, + { + "title": "PROJ definition", + "type": "string", + "subtype": "proj-definition", + "deprecated": true + } + ], + "default": 4326 + } + } + }, + { + "title": "GeoJSON", + "description": "Limits the data cube to the bounding box of the given geometry. All pixels inside the bounding box that do not intersect with any of the polygons will be set to no data (`null`).", + "type": "object", + "subtype": "geojson" + }, + { + "title": "No filter", + "description": "Don't filter spatially. All data is included in the data cube.", + "type": "null" + } + ] + } + ], + "returns": { + "description": "A vector cube for further processing.", + "schema": { + "type": "object", + "subtype": "vector-cube" + } + }, + "module": "xcube_geodb_openeo.backend.processes", + "class_name": "LoadCollection" +} \ No newline at end of file diff --git a/xcube_geodb_openeo/core/vectorcube.py b/xcube_geodb_openeo/core/vectorcube.py index ae72dfa..73d362d 100644 --- a/xcube_geodb_openeo/core/vectorcube.py +++ b/xcube_geodb_openeo/core/vectorcube.py @@ -19,7 +19,8 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. -from typing import Any, Dict +from typing import Any +from typing import Dict VectorCube = Dict[str, Any] From e05874b3178a74a86799f4b301ef3179647a0b6d Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 22 Jun 2022 03:16:32 +0200 Subject: [PATCH 042/163] implemented load_collection process; yet to test thoroughly --- tests/server/app/test_capabilities.py | 3 - tests/server/app/test_data_discovery.py | 46 ++---------- tests/server/app/test_processing.py | 83 +++++++++++++++++++--- tests/server/app/test_utils.py | 37 ++++++++++ xcube_geodb_openeo/api/context.py | 5 ++ xcube_geodb_openeo/api/routes.py | 11 +-- xcube_geodb_openeo/backend/processes.py | 55 +++++++++++--- xcube_geodb_openeo/core/geodb_datastore.py | 15 ++-- 8 files changed, 181 insertions(+), 74 deletions(-) create mode 100644 tests/server/app/test_utils.py diff --git a/tests/server/app/test_capabilities.py b/tests/server/app/test_capabilities.py index c22d37c..41d3dec 100644 --- a/tests/server/app/test_capabilities.py +++ b/tests/server/app/test_capabilities.py @@ -60,6 +60,3 @@ def test_conformance(self): self.assertEqual(200, response.status) conformance_data = json.loads(response.data) self.assertIsNotNone(conformance_data['conformsTo']) - - def test_bluh(self): - print(__file__) diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index 72ff184..0e0b720 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -7,6 +7,7 @@ from xcube.server.testing import ServerTest from xcube.util import extension from xcube.util.extension import ExtensionRegistry +from . import test_utils class DataDiscoveryTest(ServerTest): @@ -44,15 +45,15 @@ def test_get_items(self): self.assertIsNotNone(items_data['features']) self.assertEqual(2, len(items_data['features'])) - self._assert_hamburg(items_data['features'][0]) - self._assert_paderborn(items_data['features'][1]) + test_utils.assert_hamburg(self, items_data['features'][0]) + test_utils.assert_paderborn(self, items_data['features'][1]) def test_get_item(self): url = f'http://localhost:{self.port}/collections/collection_1/items/1' response = self.http.request('GET', url) self.assertEqual(200, response.status) item_data = json.loads(response.data) - self._assert_paderborn(item_data) + test_utils.assert_paderborn(self, item_data) def test_get_items_filtered(self): url = f'http://localhost:{self.port}/collections/collection_1/items' \ @@ -64,7 +65,7 @@ def test_get_items_filtered(self): self.assertEqual('FeatureCollection', items_data['type']) self.assertIsNotNone(items_data['features']) self.assertEqual(1, len(items_data['features'])) - self._assert_paderborn(items_data['features'][0]) + test_utils.assert_paderborn(self, items_data['features'][0]) def test_get_items_invalid_filter(self): for invalid_limit in [-1, 0, 10001]: @@ -85,40 +86,3 @@ def test_get_items_by_bbox(self): self.assertEqual('FeatureCollection', items_data['type']) self.assertIsNotNone(items_data['features']) self.assertEqual(1, len(items_data['features'])) - - def _assert_paderborn(self, item_data): - self.assertIsNotNone(item_data) - self.assertEqual('0.9.0', item_data['stac_version']) - self.assertEqual(['xcube-geodb'], item_data['stac_extensions']) - self.assertEqual('Feature', item_data['type']) - self.assertEqual('1', item_data['id']) - self.assertEqual(['8.7000', '51.3000', '8.8000', '51.8000'], - item_data['bbox']) - self.assertEqual({'type': 'Polygon', 'coordinates': [[[8.7, 51.3], - [8.7, 51.8], - [8.8, 51.8], - [8.8, 51.3], - [8.7, 51.3] - ]]}, - item_data['geometry']) - self.assertEqual({'name': 'paderborn', 'population': 150000}, - item_data['properties']) - - def _assert_hamburg(self, item_data): - self.assertEqual('0.9.0', item_data['stac_version']) - self.assertEqual(['xcube-geodb'], item_data['stac_extensions']) - self.assertEqual('Feature', item_data['type']) - self.assertEqual('0', item_data['id']) - self.assertEqual(['9.0000', '52.0000', '11.0000', '54.0000'], - item_data['bbox']) - self.assertEqual({'type': 'Polygon', 'coordinates': [[[9, 52], - [9, 54], - [11, 54], - [11, 52], - [10, 53], - [9.8, 53.4], - [9.2, 52.1], - [9, 52]]]}, - item_data['geometry']) - self.assertEqual({'name': 'hamburg', 'population': 1700000}, - item_data['properties']) diff --git a/tests/server/app/test_processing.py b/tests/server/app/test_processing.py index 0576adf..e64af80 100644 --- a/tests/server/app/test_processing.py +++ b/tests/server/app/test_processing.py @@ -28,8 +28,9 @@ from xcube.util import extension from xcube.util.extension import ExtensionRegistry +from . import test_utils from xcube_geodb_openeo.backend import processes -from xcube_geodb_openeo.core.vectorcube import VectorCube +from xcube_geodb_openeo.backend.processes import LoadCollection class ProcessingTest(ServerTest): @@ -119,7 +120,6 @@ def test_get_predefined_processes(self): self.assertEqual('object', return_schema['type']) self.assertEqual('vector-cube', return_schema['subtype']) - def test_get_file_formats(self): response = self.http.request('GET', f'http://localhost:{self.port}' f'/file_formats') @@ -132,11 +132,39 @@ def test_get_file_formats(self): self.assertTrue('output' in formats) def test_result(self): - body = json.dumps({'process': { - 'id': 'load_collection', - 'parameters': { - 'id': 'collection_1', - 'spatial_extent': None + body = json.dumps({"process": { + "id": "load_collection", + "parameters": { + "id": "collection_1", + "spatial_extent": None + } + }}) + response = self.http.request('POST', + f'http://localhost:{self.port}/result', + body=body, + headers={ + 'content-type': 'application/json' + }) + + self.assertEqual(200, response.status) + items_data = json.loads(response.data) + self.assertEqual(dict, type(items_data)) + self.assertIsNotNone(items_data) + self.assertIsNotNone(items_data['features']) + self.assertEqual(2, len(items_data['features'])) + + test_utils.assert_hamburg(self, items_data['features'][0]) + test_utils.assert_paderborn(self, items_data['features'][1]) + + def test_result_bbox(self): + body = json.dumps({"process": { + "id": "load_collection", + "parameters": { + "id": "collection_1", + "spatial_extent": { + "bbox": (33, -10, 71, 43), + "crs": 4326 + } } }}) response = self.http.request('POST', @@ -147,8 +175,14 @@ def test_result(self): }) self.assertEqual(200, response.status) - result = json.loads(response.data) - self.assertEqual(dict, type(result)) + items_data = json.loads(response.data) + self.assertEqual(dict, type(items_data)) + self.assertIsNotNone(items_data) + self.assertIsNotNone(items_data['features']) + self.assertEqual(1, len(items_data['features'])) + + test_utils.assert_hamburg(self, items_data['features'][0]) + # test_utils.assert_paderborn(self, items_data['features'][0]) def test_result_missing_parameters(self): body = json.dumps({'process': { @@ -177,3 +211,34 @@ def test_result_no_query_param(self): def test_invalid_process_id(self): with self.assertRaises(ValueError): processes.get_processes_registry().get_process('miau!') + + def test_translate_parameters(self): + lc = LoadCollection({ + "id": "load_collection", + "summary": "Load a collection" + }) + query_params = { + 'id': 'collection_1', + 'spatial_extent': None + } + backend_params = lc.translate_parameters(query_params) + self.assertEqual(backend_params['collection_id'], 'collection_1') + self.assertIsNone(backend_params['bbox']) + self.assertIsNone(backend_params['crs']) + + def test_translate_parameters_with_bbox(self): + lc = LoadCollection({ + "id": "load_collection", + "summary": "Load a collection" + }) + query_params = { + 'id': 'collection_1', + 'spatial_extent': { + 'bbox': (33, -10, 71, 43), + 'crs': 4326 + } + } + backend_params = lc.translate_parameters(query_params) + self.assertEqual(backend_params['collection_id'], 'collection_1') + self.assertEqual((33, -10, 71, 43), backend_params['bbox']) + self.assertEqual(4326, backend_params['crs']) diff --git a/tests/server/app/test_utils.py b/tests/server/app/test_utils.py new file mode 100644 index 0000000..1cd3ac6 --- /dev/null +++ b/tests/server/app/test_utils.py @@ -0,0 +1,37 @@ +def assert_paderborn(cls, item_data): + cls.assertIsNotNone(item_data) + cls.assertEqual('0.9.0', item_data['stac_version']) + cls.assertEqual(['xcube-geodb'], item_data['stac_extensions']) + cls.assertEqual('Feature', item_data['type']) + cls.assertEqual('1', item_data['id']) + cls.assertEqual(['8.7000', '51.3000', '8.8000', '51.8000'], + item_data['bbox']) + cls.assertEqual({'type': 'Polygon', 'coordinates': [[[8.7, 51.3], + [8.7, 51.8], + [8.8, 51.8], + [8.8, 51.3], + [8.7, 51.3] + ]]}, + item_data['geometry']) + cls.assertEqual({'name': 'paderborn', 'population': 150000}, + item_data['properties']) + + +def assert_hamburg(cls, item_data): + cls.assertEqual('0.9.0', item_data['stac_version']) + cls.assertEqual(['xcube-geodb'], item_data['stac_extensions']) + cls.assertEqual('Feature', item_data['type']) + cls.assertEqual('0', item_data['id']) + cls.assertEqual(['9.0000', '52.0000', '11.0000', '54.0000'], + item_data['bbox']) + cls.assertEqual({'type': 'Polygon', 'coordinates': [[[9, 52], + [9, 54], + [11, 54], + [11, 52], + [10, 53], + [9.8, 53.4], + [9.2, 52.1], + [9, 52]]]}, + item_data['geometry']) + cls.assertEqual({'name': 'hamburg', 'population': 1700000}, + item_data['properties']) \ No newline at end of file diff --git a/xcube_geodb_openeo/api/context.py b/xcube_geodb_openeo/api/context.py index 31b4516..6aafb0f 100644 --- a/xcube_geodb_openeo/api/context.py +++ b/xcube_geodb_openeo/api/context.py @@ -161,6 +161,11 @@ def get_collection_item(self, base_url: str, f'feature {feature_id!r} not found in collection {collection_id!r}' ) + def transform_bbox(self, collection_id: str, + bbox: Tuple[float, float, float, float], + crs: int) -> Tuple[float, float, float, float]: + return self.data_store.transform_bbox(collection_id, bbox, crs) + def get_collections_links(limit: int, offset: int, url: str, collection_count: int): diff --git a/xcube_geodb_openeo/api/routes.py b/xcube_geodb_openeo/api/routes.py index 6e4947a..46e3db3 100644 --- a/xcube_geodb_openeo/api/routes.py +++ b/xcube_geodb_openeo/api/routes.py @@ -26,7 +26,6 @@ from xcube.server.api import ApiHandler from xcube.server.api import ApiError from .context import STAC_DEFAULT_COLLECTIONS_LIMIT -from ..core.vectorcube import VectorCube def get_limit(request): @@ -100,7 +99,7 @@ def get(self): """ Returns the processes information. """ - registry = processes.get_processes_registry(self.ctx) + registry = processes.get_processes_registry() self.response.finish({ 'processes': [p.metadata for p in registry.processes], 'links': registry.get_links()} @@ -128,18 +127,19 @@ class ResultHandler(ApiHandler): Executes a user-defined process directly (synchronously) and the result will be downloaded. """ - @api.operation(operationId='result', summary='Execute process synchronously.') + @api.operation(operationId='result', summary='Execute process' + 'synchronously.') def post(self): """ Processes requested processing task and returns result. """ if not self.request.body: - raise(ApiError(400, 'Request body must contain key \'process\'.')) + raise (ApiError(400, 'Request body must contain key \'process\'.')) processing_request = json.loads(self.request.body)['process'] process_id = processing_request['id'] process_parameters = processing_request['parameters'] - registry = processes.get_processes_registry(self.ctx) + registry = processes.get_processes_registry() process = registry.get_process(process_id) expected_parameters = process.metadata['parameters'] @@ -245,6 +245,7 @@ class FeatureHandler(ApiHandler): """ Fetch a single feature. """ + def get(self, collection_id: str, feature_id: str): """ Returns the feature. diff --git a/xcube_geodb_openeo/backend/processes.py b/xcube_geodb_openeo/backend/processes.py index 6033bf0..fe11843 100644 --- a/xcube_geodb_openeo/backend/processes.py +++ b/xcube_geodb_openeo/backend/processes.py @@ -41,6 +41,9 @@ def __init__(self, metadata: Dict): if not metadata: raise ValueError('Empty processor metadata provided.') self._metadata = metadata + if 'module' in self._metadata: + del self.metadata['module'] + del self.metadata['class_name'] self._parameters = {} @property @@ -56,7 +59,16 @@ def parameters(self, p: dict) -> None: self._parameters = p @abstractmethod - def execute(self, parameters: dict, ctx: ServerContextT) -> GeoDataFrame: + def execute(self, parameters: dict, ctx: ServerContextT) -> str: + pass + + @abstractmethod + def translate_parameters(self, parameters: dict) -> dict: + """ + Translate params from query params to backend params + :param parameters: query params + :return: backend params + """ pass @@ -116,7 +128,7 @@ def _add_default_links(self): _PROCESS_REGISTRY_SINGLETON = None -def get_processes_registry(ctx: ServerContextT) -> ProcessRegistry: +def get_processes_registry() -> ProcessRegistry: """Return the process registry singleton.""" global _PROCESS_REGISTRY_SINGLETON if not _PROCESS_REGISTRY_SINGLETON: @@ -124,22 +136,43 @@ def get_processes_registry(ctx: ServerContextT) -> ProcessRegistry: return _PROCESS_REGISTRY_SINGLETON -def submit_process_sync(p: Process, ctx: ServerContextT) -> GeoDataFrame: +def submit_process_sync(p: Process, ctx: ServerContextT) -> str: """ Submits a process synchronously, and returns the result. :param p: The process to execute. :param ctx: The Server context. :return: processing result as geopandas object """ - parameters = p.parameters - print(parameters) - parameters['with_items'] = True - # parameter_translator (introduce interface, we need to translate params from query params to backend params) - return p.execute(parameters, ctx) + return p.execute(p.parameters, ctx) class LoadCollection(Process): - def execute(self, parameters: dict, ctx: ServerContextT) -> GeoDataFrame: - result = VectorCube() - return result + def execute(self, query_params: dict, ctx: ServerContextT) -> str: + backend_params = self.translate_parameters(query_params) + collection_id = backend_params['collection_id'] + bbox_transformed = None + if backend_params['bbox']: + bbox = tuple(backend_params['bbox'].replace('(', '') + .replace(')', '').replace(' ', '').split(',')) + crs = backend_params['crs'] if backend_params['crs'] else None + bbox_transformed = ctx.transform_bbox(collection_id, bbox, crs) + + vector_cube = ctx.data_store.get_vector_cube( + collection_id=collection_id, + with_items=True, + bbox=bbox_transformed + ) + return json.dumps(vector_cube) + + def translate_parameters(self, query_params: dict) -> dict: + bbox_qp = query_params['spatial_extent']['bbox']\ + if query_params['spatial_extent'] else None + crs_qp = query_params['spatial_extent']['crs']\ + if query_params['spatial_extent'] else None + backend_params = { + 'collection_id': query_params['id'], + 'bbox': bbox_qp, + 'crs': crs_qp + } + return backend_params diff --git a/xcube_geodb_openeo/core/geodb_datastore.py b/xcube_geodb_openeo/core/geodb_datastore.py index 1861402..5779d7f 100644 --- a/xcube_geodb_openeo/core/geodb_datastore.py +++ b/xcube_geodb_openeo/core/geodb_datastore.py @@ -93,16 +93,13 @@ def get_vector_cube(self, collection_id: str, with_items: bool, offset=offset) self.add_items_to_vector_cube(items, vector_cube) - res = self.geodb.get_collection_bbox(collection_id) + collection_bbox = self.geodb.get_collection_bbox(collection_id) srid = self.geodb.get_collection_srid(collection_id) - collection_bbox = list(json.loads(res)[0].values())[0][4:-1] - collection_bbox = np.fromstring(collection_bbox.replace(',', ' '), - dtype=float, sep=' ') if srid is not None and srid != '4326': collection_bbox = self.geodb.transform_bbox_crs( collection_bbox, srid, '4326', - wsg84_order='lon_lat') + ) properties = self.geodb.get_properties(collection_id) summaries = { @@ -124,3 +121,11 @@ def get_vector_cube(self, collection_id: str, with_items: bool, 'summaries': summaries } return vector_cube + + def transform_bbox(self, collection_id: str, + bbox: Tuple[float, float, float, float], + crs: int) -> Tuple[float, float, float, float]: + srid = self.geodb.get_collection_srid(collection_id) + if srid == crs: + return bbox + return self.geodb.transform_bbox_crs(bbox, crs, srid) From d40b9e119f3c65a31c28106f5d7fd97f07c734ba Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 22 Jun 2022 03:23:34 +0200 Subject: [PATCH 043/163] fix test --- tests/core/mock_datastore.py | 5 +++++ tests/server/app/test_processing.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/core/mock_datastore.py b/tests/core/mock_datastore.py index e358000..d63c327 100644 --- a/tests/core/mock_datastore.py +++ b/tests/core/mock_datastore.py @@ -74,3 +74,8 @@ def get_vector_cube(self, collection_id: str, with_items: bool, if with_items: self.add_items_to_vector_cube(collection, vector_cube) return vector_cube + + def transform_bbox(self, collection_id: str, + bbox: Tuple[float, float, float, float], + crs: int) -> Tuple[float, float, float, float]: + return bbox \ No newline at end of file diff --git a/tests/server/app/test_processing.py b/tests/server/app/test_processing.py index e64af80..0872309 100644 --- a/tests/server/app/test_processing.py +++ b/tests/server/app/test_processing.py @@ -162,7 +162,7 @@ def test_result_bbox(self): "parameters": { "id": "collection_1", "spatial_extent": { - "bbox": (33, -10, 71, 43), + "bbox": "(33, -10, 71, 43)", "crs": 4326 } } From b3b90115b30d6b5be4b22756a2ba63698f466d06 Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 23 Jun 2022 23:43:32 +0200 Subject: [PATCH 044/163] support empty collections --- xcube_geodb_openeo/core/geodb_datastore.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/xcube_geodb_openeo/core/geodb_datastore.py b/xcube_geodb_openeo/core/geodb_datastore.py index 5779d7f..78b1ccb 100644 --- a/xcube_geodb_openeo/core/geodb_datastore.py +++ b/xcube_geodb_openeo/core/geodb_datastore.py @@ -94,12 +94,13 @@ def get_vector_cube(self, collection_id: str, with_items: bool, self.add_items_to_vector_cube(items, vector_cube) collection_bbox = self.geodb.get_collection_bbox(collection_id) - srid = self.geodb.get_collection_srid(collection_id) - if srid is not None and srid != '4326': - collection_bbox = self.geodb.transform_bbox_crs( - collection_bbox, - srid, '4326', - ) + if collection_bbox: + srid = self.geodb.get_collection_srid(collection_id) + if srid is not None and srid != '4326': + collection_bbox = self.geodb.transform_bbox_crs( + collection_bbox, + srid, '4326', + ) properties = self.geodb.get_properties(collection_id) summaries = { From 1ba924aeef7f4aee4e2ebbedbaef3df116204eb1 Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 23 Jun 2022 23:44:36 +0200 Subject: [PATCH 045/163] added test case --- tests/core/mock_datastore.py | 5 +++-- tests/mock_collections.json | 7 +++++++ tests/server/app/test_data_discovery.py | 10 ++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/tests/core/mock_datastore.py b/tests/core/mock_datastore.py index d63c327..c8c2996 100644 --- a/tests/core/mock_datastore.py +++ b/tests/core/mock_datastore.py @@ -71,11 +71,12 @@ def get_vector_cube(self, collection_id: str, with_items: bool, vector_cube['id'] = collection_id vector_cube['features'] = [] vector_cube['total_feature_count'] = len(collection) - if with_items: + if with_items and collection_id != 'empty_collection': self.add_items_to_vector_cube(collection, vector_cube) return vector_cube + # noinspection PyUnusedLocal def transform_bbox(self, collection_id: str, bbox: Tuple[float, float, float, float], crs: int) -> Tuple[float, float, float, float]: - return bbox \ No newline at end of file + return bbox diff --git a/tests/mock_collections.json b/tests/mock_collections.json index c451ad3..6d3f8d0 100644 --- a/tests/mock_collections.json +++ b/tests/mock_collections.json @@ -36,6 +36,13 @@ "title": "I am collection #3" }, "features": [] + }, + { + "id": "empty_collection", + "metadata": { + "title": "I don't have any features" + }, + "features": [] } ] } \ No newline at end of file diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index 0e0b720..80c1640 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -48,6 +48,16 @@ def test_get_items(self): test_utils.assert_hamburg(self, items_data['features'][0]) test_utils.assert_paderborn(self, items_data['features'][1]) + def test_get_items_no_results(self): + url = f'http://localhost:{self.port}/collections/empty_collection/items' + response = self.http.request('GET', url) + self.assertEqual(200, response.status) + items_data = json.loads(response.data) + self.assertIsNotNone(items_data) + self.assertEqual('FeatureCollection', items_data['type']) + self.assertIsNotNone(items_data['features']) + self.assertEqual(0, len(items_data['features'])) + def test_get_item(self): url = f'http://localhost:{self.port}/collections/collection_1/items/1' response = self.http.request('GET', url) From c1edc59fcc324b83133229d06df337cbc67e9895 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 24 Jun 2022 00:02:54 +0200 Subject: [PATCH 046/163] reduced possibilities to set spatial_extent --- tests/server/app/test_processing.py | 27 +++++++++- xcube_geodb_openeo/backend/processes.py | 12 ++--- .../backend/res/load_collection.json | 51 +++---------------- 3 files changed, 39 insertions(+), 51 deletions(-) diff --git a/tests/server/app/test_processing.py b/tests/server/app/test_processing.py index 0872309..86db5e4 100644 --- a/tests/server/app/test_processing.py +++ b/tests/server/app/test_processing.py @@ -182,7 +182,32 @@ def test_result_bbox(self): self.assertEqual(1, len(items_data['features'])) test_utils.assert_hamburg(self, items_data['features'][0]) - # test_utils.assert_paderborn(self, items_data['features'][0]) + + def test_result_bbox_default_crs(self): + body = json.dumps({"process": { + "id": "load_collection", + "parameters": { + "id": "collection_1", + "spatial_extent": { + "bbox": "(33, -10, 71, 43)" + } + } + }}) + response = self.http.request('POST', + f'http://localhost:{self.port}/result', + body=body, + headers={ + 'content-type': 'application/json' + }) + + self.assertEqual(200, response.status) + items_data = json.loads(response.data) + self.assertEqual(dict, type(items_data)) + self.assertIsNotNone(items_data) + self.assertIsNotNone(items_data['features']) + self.assertEqual(1, len(items_data['features'])) + + test_utils.assert_hamburg(self, items_data['features'][0]) def test_result_missing_parameters(self): body = json.dumps({'process': { diff --git a/xcube_geodb_openeo/backend/processes.py b/xcube_geodb_openeo/backend/processes.py index fe11843..9c860b9 100644 --- a/xcube_geodb_openeo/backend/processes.py +++ b/xcube_geodb_openeo/backend/processes.py @@ -24,11 +24,8 @@ from abc import abstractmethod from typing import Dict, List -from geopandas import GeoDataFrame from xcube.server.api import ServerContextT -from xcube_geodb_openeo.core.vectorcube import VectorCube - class Process: """ @@ -148,6 +145,8 @@ def submit_process_sync(p: Process, ctx: ServerContextT) -> str: class LoadCollection(Process): + DEFAULT_CRS = 4326 + def execute(self, query_params: dict, ctx: ServerContextT) -> str: backend_params = self.translate_parameters(query_params) collection_id = backend_params['collection_id'] @@ -166,10 +165,11 @@ def execute(self, query_params: dict, ctx: ServerContextT) -> str: return json.dumps(vector_cube) def translate_parameters(self, query_params: dict) -> dict: - bbox_qp = query_params['spatial_extent']['bbox']\ - if query_params['spatial_extent'] else None - crs_qp = query_params['spatial_extent']['crs']\ + bbox_qp = query_params['spatial_extent']['bbox'] \ if query_params['spatial_extent'] else None + crs_qp = query_params['spatial_extent']['crs'] \ + if query_params['spatial_extent'] and \ + 'crs' in query_params['spatial_extent'] else self.DEFAULT_CRS backend_params = { 'collection_id': query_params['id'], 'bbox': bbox_qp, diff --git a/xcube_geodb_openeo/backend/res/load_collection.json b/xcube_geodb_openeo/backend/res/load_collection.json index 52b88a3..1cac9ca 100644 --- a/xcube_geodb_openeo/backend/res/load_collection.json +++ b/xcube_geodb_openeo/backend/res/load_collection.json @@ -23,7 +23,7 @@ }, { "name": "spatial_extent", - "description": "Limits the data to load from the collection to the specified bounding box or polygons.\n\nThe process puts a pixel into the data cube if the point at the pixel center intersects with the bounding box or any of the polygons (as defined in the Simple Features standard by the OGC).\n\n The GeoJSON can be one of the following feature types:\n\n* A `Polygon` or `MultiPolygon` geometry,\n* a `Feature` with a `Polygon` or `MultiPolygon` geometry,\n* a `FeatureCollection` containing at least one `Feature` with `Polygon` or `MultiPolygon` geometries, or\n* a `GeometryCollection` containing `Polygon` or `MultiPolygon` geometries. To maximize interoperability, `GeometryCollection` should be avoided in favour of one of the alternatives above.\n\nSet this parameter to `null` to set no limit for the spatial extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using ``filter_bbox()`` or ``filter_spatial()`` directly after loading unbounded data.", + "description": "Limits the data to load from the collection to the specified bounding box or polygons.\n\nThe process puts a pixel into the data cube if the point at the pixel center intersects with the bounding box.\n\nSet this parameter to `null` to set no limit for the spatial extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using ``filter_bbox()`` or ``filter_spatial()`` directly after loading unbounded data.", "schema": [ { "title": "Bounding Box", @@ -52,56 +52,19 @@ "description": "North (upper right corner, coordinate axis 2).", "type": "number" }, - "base": { - "description": "Base (optional, lower left corner, coordinate axis 3).", - "type": [ - "number", - "null" - ], - "default": "null" - }, - "height": { - "description": "Height (optional, upper right corner, coordinate axis 3).", - "type": [ - "number", - "null" - ], - "default": "null" - }, "crs": { "description": "Coordinate reference system of the extent, specified as as [EPSG code](http://www.epsg-registry.org/), [WKT2 (ISO 19162) string] (http://docs.opengeospatial.org/is/18-010r7/18-010r7.html) or [PROJ definition (deprecated)](https://proj.org/usage/quickstart.html). Defaults to `4326` (EPSG code 4326) unless the client explicitly requests a different coordinate reference system.", - "anyOf": [ - { - "title": "EPSG Code", - "type": "integer", - "subtype": "epsg-code", - "minimum": 1000, - "examples": [ - 3857 - ] - }, - { - "title": "WKT2", - "type": "string", - "subtype": "wkt2-definition" - }, - { - "title": "PROJ definition", - "type": "string", - "subtype": "proj-definition", - "deprecated": true - } + "title": "EPSG Code", + "type": "integer", + "subtype": "epsg-code", + "minimum": 1000, + "examples": [ + 3857 ], "default": 4326 } } }, - { - "title": "GeoJSON", - "description": "Limits the data cube to the bounding box of the given geometry. All pixels inside the bounding box that do not intersect with any of the polygons will be set to no data (`null`).", - "type": "object", - "subtype": "geojson" - }, { "title": "No filter", "description": "Don't filter spatially. All data is included in the data cube.", From b46ee3bae46f743bcee6f14f6092dbbaeb2da230 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 24 Jun 2022 12:20:30 +0200 Subject: [PATCH 047/163] fixed workflow --- .github/workflows/workflow.yaml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 85b41c2..5fd0d4d 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -23,13 +23,14 @@ jobs: steps: - run: | echo "SKIP_UNITTESTS: ${{ env.SKIP_UNITTESTS }}" - - uses: actions/checkout@v2 -# - name: Checkout xcube-geodb repo -# uses: actions/checkout@v3 -# with: -# repository: dcs4cop/xcube -# path: xcube -# ref: forman-676-server_redesign + - uses: actions/checkout@v3 + name: Checkout xcube-geodb-openeo repo + - name: Checkout xcube repo + uses: actions/checkout@v3 + with: + repository: dcs4cop/xcube + path: "xcube" + ref: forman-676-server_redesign - uses: conda-incubator/setup-miniconda@v2 if: ${{ env.SKIP_UNITTESTS == '0' }} with: @@ -45,13 +46,17 @@ jobs: conda config --show printenv | sort - name: setup-xcube-geodb-openeo - if: ${{ env.SKIP_UNITTESTS == '0' }} run: | - python setup.py develop + pip install -e . + - name: setup-xcube + run: | + cd xcube + pip install -e . + cd .. - name: unittest-xcube-geodb-openeo if: ${{ env.SKIP_UNITTESTS == '0' }} run: | - pytest --cov=./ --cov-report=xml --tb=native + pytest --cov=./ --cov-report=xml --tb=native tests - uses: codecov/codecov-action@v2 if: ${{ env.SKIP_UNITTESTS == '0' }} with: From 6eecce6b52530937e9cd743b95cfb4985257ac8a Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 24 Jun 2022 12:24:48 +0200 Subject: [PATCH 048/163] fixed workflow --- .github/workflows/workflow.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 5fd0d4d..5e19203 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -45,14 +45,14 @@ jobs: conda config --show-sources conda config --show printenv | sort - - name: setup-xcube-geodb-openeo - run: | - pip install -e . - name: setup-xcube run: | cd xcube pip install -e . cd .. + - name: setup-xcube-geodb-openeo + run: | + pip install -e . - name: unittest-xcube-geodb-openeo if: ${{ env.SKIP_UNITTESTS == '0' }} run: | From bf7a2cd1f37697f3ea582da820d8db4afad4e6c3 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 24 Jun 2022 12:31:22 +0200 Subject: [PATCH 049/163] fixed workflow --- .github/workflows/workflow.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 5e19203..0a74f2b 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -48,6 +48,7 @@ jobs: - name: setup-xcube run: | cd xcube + conda env update -n xcube-geodb-openeo -f environment.yml pip install -e . cd .. - name: setup-xcube-geodb-openeo From d0efbc171bab9f5b99e242304fb9f6e270c3399d Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 24 Jun 2022 12:45:41 +0200 Subject: [PATCH 050/163] fixed tests --- xcube_geodb_openeo/backend/processes.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/xcube_geodb_openeo/backend/processes.py b/xcube_geodb_openeo/backend/processes.py index 9c860b9..ca0c229 100644 --- a/xcube_geodb_openeo/backend/processes.py +++ b/xcube_geodb_openeo/backend/processes.py @@ -144,7 +144,6 @@ def submit_process_sync(p: Process, ctx: ServerContextT) -> str: class LoadCollection(Process): - DEFAULT_CRS = 4326 def execute(self, query_params: dict, ctx: ServerContextT) -> str: @@ -167,9 +166,13 @@ def execute(self, query_params: dict, ctx: ServerContextT) -> str: def translate_parameters(self, query_params: dict) -> dict: bbox_qp = query_params['spatial_extent']['bbox'] \ if query_params['spatial_extent'] else None - crs_qp = query_params['spatial_extent']['crs'] \ - if query_params['spatial_extent'] and \ - 'crs' in query_params['spatial_extent'] else self.DEFAULT_CRS + if not bbox_qp: + crs_qp = None + else: + crs_qp = query_params['spatial_extent']['crs'] \ + if query_params['spatial_extent'] and \ + 'crs' in query_params['spatial_extent'] \ + else self.DEFAULT_CRS backend_params = { 'collection_id': query_params['id'], 'bbox': bbox_qp, From ca3eb2f1ca712d56871f53247a63c653415da072 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 24 Jun 2022 19:32:38 +0200 Subject: [PATCH 051/163] started creating a sample JNB for use case 1: load_collection --- .gitignore | 3 +- notebooks/credentials-example.py | 23 + notebooks/geoDB-openEO_use_case_1.ipynb | 997 ++++++++++++++++++++++++ xcube_geodb_openeo/backend/processes.py | 2 +- 4 files changed, 1023 insertions(+), 2 deletions(-) create mode 100644 notebooks/credentials-example.py create mode 100644 notebooks/geoDB-openEO_use_case_1.ipynb diff --git a/.gitignore b/.gitignore index ae2034f..877f666 100644 --- a/.gitignore +++ b/.gitignore @@ -134,4 +134,5 @@ dmypy.json # Pyre type checker .pyre/ -xcube_geodb_openeo.iml \ No newline at end of file +xcube_geodb_openeo.iml +/notebooks/credentials.py diff --git a/notebooks/credentials-example.py b/notebooks/credentials-example.py new file mode 100644 index 0000000..47c903d --- /dev/null +++ b/notebooks/credentials-example.py @@ -0,0 +1,23 @@ +# The MIT License (MIT) +# Copyright (c) 2021/2022 by the xcube team and contributors +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +client_id = '' +client_secret = '' diff --git a/notebooks/geoDB-openEO_use_case_1.ipynb b/notebooks/geoDB-openEO_use_case_1.ipynb new file mode 100644 index 0000000..e2dd7f4 --- /dev/null +++ b/notebooks/geoDB-openEO_use_case_1.ipynb @@ -0,0 +1,997 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 14, + "outputs": [], + "source": [ + "import urllib3\n", + "import json\n", + "\n", + "http = urllib3.PoolManager()\n", + "base_url = 'http://localhost:8080'" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": 2, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Status: 200\n", + "Result: {\n", + " \"collections\": [\n", + " {\n", + " \"description\": \"No description available.\",\n", + " \"extent\": {\n", + " \"spatial\": {\n", + " \"bbox\": [\n", + " 53.54041278,\n", + " 9.886165746,\n", + " 53.54041278,\n", + " 9.886165746\n", + " ],\n", + " \"crs\": \"http://www.opengis.net/def/crs/OGC/1.3/CRS84\"\n", + " },\n", + " \"temporal\": {\n", + " \"interval\": [\n", + " [\n", + " \"null\"\n", + " ]\n", + " ]\n", + " }\n", + " },\n", + " \"id\": \"alster_debug\",\n", + " \"keywords\": [],\n", + " \"license\": \"proprietary\",\n", + " \"links\": [\n", + " {\n", + " \"href\": \"http://localhost:8080/collections/alster_debug\",\n", + " \"rel\": \"self\"\n", + " },\n", + " {\n", + " \"href\": \"http://localhost:8080/collections/\",\n", + " \"rel\": \"root\"\n", + " }\n", + " ],\n", + " \"providers\": [],\n", + " \"stac_extensions\": [\n", + " \"xcube-geodb\"\n", + " ],\n", + " \"stac_version\": \"0.9.0\",\n", + " \"summaries\": {\n", + " \"properties\": [\n", + " {\n", + " \"name\": \"id\"\n", + " },\n", + " {\n", + " \"name\": \"created_at\"\n", + " },\n", + " {\n", + " \"name\": \"modified_at\"\n", + " },\n", + " {\n", + " \"name\": \"date\"\n", + " },\n", + " {\n", + " \"name\": \"chl\"\n", + " },\n", + " {\n", + " \"name\": \"chl_min\"\n", + " },\n", + " {\n", + " \"name\": \"chl_max\"\n", + " },\n", + " {\n", + " \"name\": \"status\"\n", + " },\n", + " {\n", + " \"name\": \"geometry\"\n", + " }\n", + " ]\n", + " },\n", + " \"title\": \"alster_debug\"\n", + " },\n", + " {\n", + " \"description\": \"No description available.\",\n", + " \"extent\": {\n", + " \"spatial\": {\n", + " \"bbox\": [\n", + " 9.596750015799916,\n", + " 46.34587798618984,\n", + " 17.232237875796603,\n", + " 48.96562893083748\n", + " ],\n", + " \"crs\": \"http://www.opengis.net/def/crs/OGC/1.3/CRS84\"\n", + " },\n", + " \"temporal\": {\n", + " \"interval\": [\n", + " [\n", + " \"null\"\n", + " ]\n", + " ]\n", + " }\n", + " },\n", + " \"id\": \"AT_2021_EC21\",\n", + " \"keywords\": [],\n", + " \"license\": \"proprietary\",\n", + " \"links\": [\n", + " {\n", + " \"href\": \"http://localhost:8080/collections/AT_2021_EC21\",\n", + " \"rel\": \"self\"\n", + " },\n", + " {\n", + " \"href\": \"http://localhost:8080/collections/\",\n", + " \"rel\": \"root\"\n", + " }\n", + " ],\n", + " \"providers\": [],\n", + " \"stac_extensions\": [\n", + " \"xcube-geodb\"\n", + " ],\n", + " \"stac_version\": \"0.9.0\",\n", + " \"summaries\": {\n", + " \"properties\": [\n", + " {\n", + " \"name\": \"id\"\n", + " },\n", + " {\n", + " \"name\": \"created_at\"\n", + " },\n", + " {\n", + " \"name\": \"modified_at\"\n", + " },\n", + " {\n", + " \"name\": \"fid\"\n", + " },\n", + " {\n", + " \"name\": \"fs_kennung\"\n", + " },\n", + " {\n", + " \"name\": \"snar_bezei\"\n", + " },\n", + " {\n", + " \"name\": \"sl_flaeche\"\n", + " },\n", + " {\n", + " \"name\": \"geo_id\"\n", + " },\n", + " {\n", + " \"name\": \"inspire_id\"\n", + " },\n", + " {\n", + " \"name\": \"gml_id\"\n", + " },\n", + " {\n", + " \"name\": \"gml_identi\"\n", + " },\n", + " {\n", + " \"name\": \"snar_code\"\n", + " },\n", + " {\n", + " \"name\": \"geo_part_k\"\n", + " },\n", + " {\n", + " \"name\": \"log_pkey\"\n", + " },\n", + " {\n", + " \"name\": \"geom_date_\"\n", + " },\n", + " {\n", + " \"name\": \"fart_id\"\n", + " },\n", + " {\n", + " \"name\": \"geo_type\"\n", + " },\n", + " {\n", + " \"name\": \"gml_length\"\n", + " },\n", + " {\n", + " \"name\": \"ec_trans_n\"\n", + " },\n", + " {\n", + " \"name\": \"ec_hcat_n\"\n", + " },\n", + " {\n", + " \"name\": \"ec_hcat_c\"\n", + " },\n", + " {\n", + " \"name\": \"geometry\"\n", + " }\n", + " ]\n", + " },\n", + " \"title\": \"AT_2021_EC21\"\n", + " },\n", + " {\n", + " \"description\": \"No description available.\",\n", + " \"extent\": {\n", + " \"spatial\": {\n", + " \"bbox\": [\n", + " 4.4110298963594845,\n", + " 49.513108154698884,\n", + " 5.726474442684629,\n", + " 51.62918026270598\n", + " ],\n", + " \"crs\": \"http://www.opengis.net/def/crs/OGC/1.3/CRS84\"\n", + " },\n", + " \"temporal\": {\n", + " \"interval\": [\n", + " [\n", + " \"null\"\n", + " ]\n", + " ]\n", + " }\n", + " },\n", + " \"id\": \"BE_VLG_2021_EC21\",\n", + " \"keywords\": [],\n", + " \"license\": \"proprietary\",\n", + " \"links\": [\n", + " {\n", + " \"href\": \"http://localhost:8080/collections/BE_VLG_2021_EC21\",\n", + " \"rel\": \"self\"\n", + " },\n", + " {\n", + " \"href\": \"http://localhost:8080/collections/\",\n", + " \"rel\": \"root\"\n", + " }\n", + " ],\n", + " \"providers\": [],\n", + " \"stac_extensions\": [\n", + " \"xcube-geodb\"\n", + " ],\n", + " \"stac_version\": \"0.9.0\",\n", + " \"summaries\": {\n", + " \"properties\": [\n", + " {\n", + " \"name\": \"id\"\n", + " },\n", + " {\n", + " \"name\": \"created_at\"\n", + " },\n", + " {\n", + " \"name\": \"modified_at\"\n", + " },\n", + " {\n", + " \"name\": \"fid\"\n", + " },\n", + " {\n", + " \"name\": \"graf_opp\"\n", + " },\n", + " {\n", + " \"name\": \"ref_id\"\n", + " },\n", + " {\n", + " \"name\": \"gwscod_v\"\n", + " },\n", + " {\n", + " \"name\": \"gwsnam_v\"\n", + " },\n", + " {\n", + " \"name\": \"gwscod_h\"\n", + " },\n", + " {\n", + " \"name\": \"gwsnam_h\"\n", + " },\n", + " {\n", + " \"name\": \"gwsgrp_h\"\n", + " },\n", + " {\n", + " \"name\": \"gwsgrph_lb\"\n", + " },\n", + " {\n", + " \"name\": \"gwscod_n\"\n", + " },\n", + " {\n", + " \"name\": \"gwsnam_n\"\n", + " },\n", + " {\n", + " \"name\": \"gwscod_n2\"\n", + " },\n", + " {\n", + " \"name\": \"gwsnam_n2\"\n", + " },\n", + " {\n", + " \"name\": \"gesp_pm\"\n", + " },\n", + " {\n", + " \"name\": \"gesp_pm_lb\"\n", + " },\n", + " {\n", + " \"name\": \"ero_nam\"\n", + " },\n", + " {\n", + " \"name\": \"stat_bgv\"\n", + " },\n", + " {\n", + " \"name\": \"landbstr\"\n", + " },\n", + " {\n", + " \"name\": \"stat_aar\"\n", + " },\n", + " {\n", + " \"name\": \"pct_ekbg\"\n", + " },\n", + " {\n", + " \"name\": \"prc_gem\"\n", + " },\n", + " {\n", + " \"name\": \"prc_nis\"\n", + " },\n", + " {\n", + " \"name\": \"x_ref\"\n", + " },\n", + " {\n", + " \"name\": \"y_ref\"\n", + " },\n", + " {\n", + " \"name\": \"wgs84_lg\"\n", + " },\n", + " {\n", + " \"name\": \"wgs84_bg\"\n", + " },\n", + " {\n", + " \"name\": \"ec_nuts3\"\n", + " },\n", + " {\n", + " \"name\": \"ec_trans_n\"\n", + " },\n", + " {\n", + " \"name\": \"ec_hcat_n\"\n", + " },\n", + " {\n", + " \"name\": \"ec_hcat_c\"\n", + " },\n", + " {\n", + " \"name\": \"geometry\"\n", + " }\n", + " ]\n", + " },\n", + " \"title\": \"BE_VLG_2021_EC21\"\n", + " },\n", + " {\n", + " \"description\": \"No description available.\",\n", + " \"extent\": {\n", + " \"spatial\": {\n", + " \"bbox\": [\n", + " 51.470403111669235,\n", + " 3.506642990695565,\n", + " 51.6481401036661,\n", + " 3.5322344100893526\n", + " ],\n", + " \"crs\": \"http://www.opengis.net/def/crs/OGC/1.3/CRS84\"\n", + " },\n", + " \"temporal\": {\n", + " \"interval\": [\n", + " [\n", + " \"null\"\n", + " ]\n", + " ]\n", + " }\n", + " },\n", + " \"id\": \"eurocrops-test-1\",\n", + " \"keywords\": [],\n", + " \"license\": \"proprietary\",\n", + " \"links\": [\n", + " {\n", + " \"href\": \"http://localhost:8080/collections/eurocrops-test-1\",\n", + " \"rel\": \"self\"\n", + " },\n", + " {\n", + " \"href\": \"http://localhost:8080/collections/\",\n", + " \"rel\": \"root\"\n", + " }\n", + " ],\n", + " \"providers\": [],\n", + " \"stac_extensions\": [\n", + " \"xcube-geodb\"\n", + " ],\n", + " \"stac_version\": \"0.9.0\",\n", + " \"summaries\": {\n", + " \"properties\": [\n", + " {\n", + " \"name\": \"id\"\n", + " },\n", + " {\n", + " \"name\": \"created_at\"\n", + " },\n", + " {\n", + " \"name\": \"modified_at\"\n", + " },\n", + " {\n", + " \"name\": \"inspire_id\"\n", + " },\n", + " {\n", + " \"name\": \"flik\"\n", + " },\n", + " {\n", + " \"name\": \"area_ha\"\n", + " },\n", + " {\n", + " \"name\": \"code\"\n", + " },\n", + " {\n", + " \"name\": \"code_txt\"\n", + " },\n", + " {\n", + " \"name\": \"use_code\"\n", + " },\n", + " {\n", + " \"name\": \"use_txt\"\n", + " },\n", + " {\n", + " \"name\": \"d_pg\"\n", + " },\n", + " {\n", + " \"name\": \"cropdiv\"\n", + " },\n", + " {\n", + " \"name\": \"efa\"\n", + " },\n", + " {\n", + " \"name\": \"eler\"\n", + " },\n", + " {\n", + " \"name\": \"wj\"\n", + " },\n", + " {\n", + " \"name\": \"dat_bearb\"\n", + " },\n", + " {\n", + " \"name\": \"ec_trans_n\"\n", + " },\n", + " {\n", + " \"name\": \"ec_hcat_n\"\n", + " },\n", + " {\n", + " \"name\": \"ec_hcat_c\"\n", + " },\n", + " {\n", + " \"name\": \"geometry\"\n", + " }\n", + " ]\n", + " },\n", + " \"title\": \"eurocrops-test-1\"\n", + " },\n", + " {\n", + " \"description\": \"No description available.\",\n", + " \"extent\": {\n", + " \"spatial\": {\n", + " \"bbox\": [\n", + " 50.455334356316605,\n", + " 1.8967512362310952,\n", + " 52.13675045936469,\n", + " 3.5040816893950466\n", + " ],\n", + " \"crs\": \"http://www.opengis.net/def/crs/OGC/1.3/CRS84\"\n", + " },\n", + " \"temporal\": {\n", + " \"interval\": [\n", + " [\n", + " \"null\"\n", + " ]\n", + " ]\n", + " }\n", + " },\n", + " \"id\": \"eurocrops-test-nrw\",\n", + " \"keywords\": [],\n", + " \"license\": \"proprietary\",\n", + " \"links\": [\n", + " {\n", + " \"href\": \"http://localhost:8080/collections/eurocrops-test-nrw\",\n", + " \"rel\": \"self\"\n", + " },\n", + " {\n", + " \"href\": \"http://localhost:8080/collections/\",\n", + " \"rel\": \"root\"\n", + " }\n", + " ],\n", + " \"providers\": [],\n", + " \"stac_extensions\": [\n", + " \"xcube-geodb\"\n", + " ],\n", + " \"stac_version\": \"0.9.0\",\n", + " \"summaries\": {\n", + " \"properties\": [\n", + " {\n", + " \"name\": \"id\"\n", + " },\n", + " {\n", + " \"name\": \"created_at\"\n", + " },\n", + " {\n", + " \"name\": \"modified_at\"\n", + " },\n", + " {\n", + " \"name\": \"inspire_id\"\n", + " },\n", + " {\n", + " \"name\": \"flik\"\n", + " },\n", + " {\n", + " \"name\": \"area_ha\"\n", + " },\n", + " {\n", + " \"name\": \"code\"\n", + " },\n", + " {\n", + " \"name\": \"code_txt\"\n", + " },\n", + " {\n", + " \"name\": \"use_code\"\n", + " },\n", + " {\n", + " \"name\": \"use_txt\"\n", + " },\n", + " {\n", + " \"name\": \"d_pg\"\n", + " },\n", + " {\n", + " \"name\": \"cropdiv\"\n", + " },\n", + " {\n", + " \"name\": \"efa\"\n", + " },\n", + " {\n", + " \"name\": \"eler\"\n", + " },\n", + " {\n", + " \"name\": \"wj\"\n", + " },\n", + " {\n", + " \"name\": \"dat_bearb\"\n", + " },\n", + " {\n", + " \"name\": \"ec_trans_n\"\n", + " },\n", + " {\n", + " \"name\": \"ec_hcat_n\"\n", + " },\n", + " {\n", + " \"name\": \"ec_hcat_c\"\n", + " },\n", + " {\n", + " \"name\": \"geometry\"\n", + " }\n", + " ]\n", + " },\n", + " \"title\": \"eurocrops-test-nrw\"\n", + " },\n", + " {\n", + " \"description\": \"No description available.\",\n", + " \"extent\": {\n", + " \"spatial\": {\n", + " \"bbox\": [\n", + " -41.2999879,\n", + " -175.2205645,\n", + " 64.1500236,\n", + " 179.2166471\n", + " ],\n", + " \"crs\": \"http://www.opengis.net/def/crs/OGC/1.3/CRS84\"\n", + " },\n", + " \"temporal\": {\n", + " \"interval\": [\n", + " [\n", + " \"null\"\n", + " ]\n", + " ]\n", + " }\n", + " },\n", + " \"id\": \"populated_places_sub\",\n", + " \"keywords\": [],\n", + " \"license\": \"proprietary\",\n", + " \"links\": [\n", + " {\n", + " \"href\": \"http://localhost:8080/collections/populated_places_sub\",\n", + " \"rel\": \"self\"\n", + " },\n", + " {\n", + " \"href\": \"http://localhost:8080/collections/\",\n", + " \"rel\": \"root\"\n", + " }\n", + " ],\n", + " \"providers\": [],\n", + " \"stac_extensions\": [\n", + " \"xcube-geodb\"\n", + " ],\n", + " \"stac_version\": \"0.9.0\",\n", + " \"summaries\": {\n", + " \"properties\": [\n", + " {\n", + " \"name\": \"id\"\n", + " },\n", + " {\n", + " \"name\": \"created_at\"\n", + " },\n", + " {\n", + " \"name\": \"modified_at\"\n", + " },\n", + " {\n", + " \"name\": \"name\"\n", + " },\n", + " {\n", + " \"name\": \"sov0name\"\n", + " },\n", + " {\n", + " \"name\": \"latitude\"\n", + " },\n", + " {\n", + " \"name\": \"longitude\"\n", + " },\n", + " {\n", + " \"name\": \"pop_max\"\n", + " },\n", + " {\n", + " \"name\": \"pop_min\"\n", + " },\n", + " {\n", + " \"name\": \"meganame\"\n", + " },\n", + " {\n", + " \"name\": \"min_areakm\"\n", + " },\n", + " {\n", + " \"name\": \"max_areakm\"\n", + " },\n", + " {\n", + " \"name\": \"pop1950\"\n", + " },\n", + " {\n", + " \"name\": \"pop1960\"\n", + " },\n", + " {\n", + " \"name\": \"pop1970\"\n", + " },\n", + " {\n", + " \"name\": \"pop1980\"\n", + " },\n", + " {\n", + " \"name\": \"pop1990\"\n", + " },\n", + " {\n", + " \"name\": \"pop2000\"\n", + " },\n", + " {\n", + " \"name\": \"pop2010\"\n", + " },\n", + " {\n", + " \"name\": \"pop2020\"\n", + " },\n", + " {\n", + " \"name\": \"pop2050\"\n", + " },\n", + " {\n", + " \"name\": \"geometry\"\n", + " }\n", + " ]\n", + " },\n", + " \"title\": \"populated_places_sub\"\n", + " },\n", + " {\n", + " \"description\": \"No description available.\",\n", + " \"extent\": {\n", + " \"spatial\": {\n", + " \"bbox\": null,\n", + " \"crs\": \"http://www.opengis.net/def/crs/OGC/1.3/CRS84\"\n", + " },\n", + " \"temporal\": {\n", + " \"interval\": [\n", + " [\n", + " \"null\"\n", + " ]\n", + " ]\n", + " }\n", + " },\n", + " \"id\": \"SI_2021_EC21\",\n", + " \"keywords\": [],\n", + " \"license\": \"proprietary\",\n", + " \"links\": [\n", + " {\n", + " \"href\": \"http://localhost:8080/collections/SI_2021_EC21\",\n", + " \"rel\": \"self\"\n", + " },\n", + " {\n", + " \"href\": \"http://localhost:8080/collections/\",\n", + " \"rel\": \"root\"\n", + " }\n", + " ],\n", + " \"providers\": [],\n", + " \"stac_extensions\": [\n", + " \"xcube-geodb\"\n", + " ],\n", + " \"stac_version\": \"0.9.0\",\n", + " \"summaries\": {\n", + " \"properties\": [\n", + " {\n", + " \"name\": \"id\"\n", + " },\n", + " {\n", + " \"name\": \"created_at\"\n", + " },\n", + " {\n", + " \"name\": \"modified_at\"\n", + " },\n", + " {\n", + " \"name\": \"gerk_pid\"\n", + " },\n", + " {\n", + " \"name\": \"sifra_kmrs\"\n", + " },\n", + " {\n", + " \"name\": \"area\"\n", + " },\n", + " {\n", + " \"name\": \"rastlina\"\n", + " },\n", + " {\n", + " \"name\": \"crop_lat_e\"\n", + " },\n", + " {\n", + " \"name\": \"color\"\n", + " },\n", + " {\n", + " \"name\": \"ec_nuts3\"\n", + " },\n", + " {\n", + " \"name\": \"ec_trans_n\"\n", + " },\n", + " {\n", + " \"name\": \"ec_hcat_n\"\n", + " },\n", + " {\n", + " \"name\": \"ec_hcat_c\"\n", + " },\n", + " {\n", + " \"name\": \"geometry\"\n", + " }\n", + " ]\n", + " },\n", + " \"title\": \"SI_2021_EC21\"\n", + " }\n", + " ],\n", + " \"links\": []\n", + "}\n" + ] + } + ], + "source": [ + "r = http.request('GET', f'{base_url}/collections')\n", + "collections = json.loads(r.data)\n", + "print(f\"Status: {r.status}\")\n", + "print(f\"Result: {json.dumps(collections, indent=2, sort_keys=True)}\")" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": 3, + "outputs": [ + { + "data": { + "text/plain": "['alster_debug',\n 'AT_2021_EC21',\n 'BE_VLG_2021_EC21',\n 'eurocrops-test-1',\n 'eurocrops-test-nrw',\n 'populated_places_sub',\n 'SI_2021_EC21']" + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "collection_ids = [a['id'] for a in collections['collections']]\n", + "collection_ids" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": 15, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{\n", + " \"links\": [\n", + " {}\n", + " ],\n", + " \"processes\": [\n", + " {\n", + " \"categories\": [\n", + " \"import\"\n", + " ],\n", + " \"description\": \"Loads a collection from the current back-end by its id and returns it as a vector cube. The data that is added to the data cube can be restricted with the parameters \\\"spatial_extent\\\" and \\\"properties\\\".\",\n", + " \"id\": \"load_collection\",\n", + " \"parameters\": [\n", + " {\n", + " \"description\": \"The collection's name\",\n", + " \"name\": \"id\",\n", + " \"schema\": {\n", + " \"type\": \"string\"\n", + " }\n", + " },\n", + " {\n", + " \"description\": \"The database of the collection\",\n", + " \"name\": \"database\",\n", + " \"optional\": true,\n", + " \"schema\": {\n", + " \"type\": \"string\"\n", + " }\n", + " },\n", + " {\n", + " \"description\": \"Limits the data to load from the collection to the specified bounding box or polygons.\\n\\nThe process puts a pixel into the data cube if the point at the pixel center intersects with the bounding box.\\n\\nSet this parameter to `null` to set no limit for the spatial extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using ``filter_bbox()`` or ``filter_spatial()`` directly after loading unbounded data.\",\n", + " \"name\": \"spatial_extent\",\n", + " \"schema\": [\n", + " {\n", + " \"properties\": {\n", + " \"crs\": {\n", + " \"default\": 4326,\n", + " \"description\": \"Coordinate reference system of the extent, specified as as [EPSG code](http://www.epsg-registry.org/), [WKT2 (ISO 19162) string] (http://docs.opengeospatial.org/is/18-010r7/18-010r7.html) or [PROJ definition (deprecated)](https://proj.org/usage/quickstart.html). Defaults to `4326` (EPSG code 4326) unless the client explicitly requests a different coordinate reference system.\",\n", + " \"examples\": [\n", + " 3857\n", + " ],\n", + " \"minimum\": 1000,\n", + " \"subtype\": \"epsg-code\",\n", + " \"title\": \"EPSG Code\",\n", + " \"type\": \"integer\"\n", + " },\n", + " \"east\": {\n", + " \"description\": \"East (upper right corner, coordinate axis 1).\",\n", + " \"type\": \"number\"\n", + " },\n", + " \"north\": {\n", + " \"description\": \"North (upper right corner, coordinate axis 2).\",\n", + " \"type\": \"number\"\n", + " },\n", + " \"south\": {\n", + " \"description\": \"South (lower left corner, coordinate axis 2).\",\n", + " \"type\": \"number\"\n", + " },\n", + " \"west\": {\n", + " \"description\": \"West (lower left corner, coordinate axis 1).\",\n", + " \"type\": \"number\"\n", + " }\n", + " },\n", + " \"required\": [\n", + " \"west\",\n", + " \"south\",\n", + " \"east\",\n", + " \"north\"\n", + " ],\n", + " \"subtype\": \"bounding-box\",\n", + " \"title\": \"Bounding Box\",\n", + " \"type\": \"object\"\n", + " },\n", + " {\n", + " \"description\": \"Don't filter spatially. All data is included in the data cube.\",\n", + " \"title\": \"No filter\",\n", + " \"type\": \"null\"\n", + " }\n", + " ]\n", + " }\n", + " ],\n", + " \"returns\": {\n", + " \"description\": \"A vector cube for further processing.\",\n", + " \"schema\": {\n", + " \"subtype\": \"vector-cube\",\n", + " \"type\": \"object\"\n", + " }\n", + " },\n", + " \"summary\": \"Load a collection\"\n", + " }\n", + " ]\n", + "}\n" + ] + } + ], + "source": [ + "r = http.request('GET', f'{base_url}/processes')\n", + "processes = json.loads(r.data)\n", + "print(json.dumps(processes, indent=2, sort_keys=True))" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": 21, + "outputs": [], + "source": [ + "body = json.dumps({\"process\": {\n", + " \"id\": \"load_collection\",\n", + " \"parameters\": {\n", + " \"id\": \"populated_places_sub\",\n", + " \"spatial_extent\": {\n", + " \"bbox\": \"(33, -10, 71, 43)\"\n", + " }\n", + " }\n", + "}})\n", + "r = http.request('POST', f'{base_url}/result',\n", + " headers={'Content-Type': 'application/json'},\n", + " body=body)\n", + "features = json.loads(r.data)" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": 22, + "outputs": [ + { + "data": { + "text/plain": "{'type': 'object',\n 'id': 'populated_places_sub',\n 'features': [{'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 22,\n 'bbox': ['51.5330', '25.2866', '51.5330', '25.2866'],\n 'geometry': {'type': 'Point', 'coordinates': [51.5329679, 25.286556]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Doha',\n 'sov0name': 'Qatar',\n 'latitude': 25.286556,\n 'longitude': 51.532968,\n 'pop_max': 1450000,\n 'pop_min': 731310,\n 'meganame': None,\n 'min_areakm': 270,\n 'max_areakm': 270,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 26,\n 'bbox': ['35.7500', '-6.1833', '35.7500', '-6.1833'],\n 'geometry': {'type': 'Point', 'coordinates': [35.7500036, -6.1833061]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dodoma',\n 'sov0name': 'United Republic of Tanzania',\n 'latitude': -6.183306,\n 'longitude': 35.750004,\n 'pop_max': 218269,\n 'pop_min': 180541,\n 'meganame': None,\n 'min_areakm': 55,\n 'max_areakm': 55,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 31,\n 'bbox': ['43.1480', '11.5950', '43.1480', '11.5950'],\n 'geometry': {'type': 'Point', 'coordinates': [43.1480017, 11.5950145]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Djibouti',\n 'sov0name': 'Djibouti',\n 'latitude': 11.595015,\n 'longitude': 43.148002,\n 'pop_max': 923000,\n 'pop_min': 604013,\n 'meganame': None,\n 'min_areakm': 42,\n 'max_areakm': 42,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 44,\n 'bbox': ['50.5831', '26.2361', '50.5831', '26.2361'],\n 'geometry': {'type': 'Point', 'coordinates': [50.5830517, 26.2361363]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Manama',\n 'sov0name': 'Bahrain',\n 'latitude': 26.236136,\n 'longitude': 50.583052,\n 'pop_max': 563920,\n 'pop_min': 157474,\n 'meganame': None,\n 'min_areakm': 178,\n 'max_areakm': 178,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 49,\n 'bbox': ['54.3666', '24.4667', '54.3666', '24.4667'],\n 'geometry': {'type': 'Point', 'coordinates': [54.3665934, 24.4666836]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Abu Dhabi',\n 'sov0name': 'United Arab Emirates',\n 'latitude': 24.466684,\n 'longitude': 54.366593,\n 'pop_max': 603492,\n 'pop_min': 560230,\n 'meganame': None,\n 'min_areakm': 96,\n 'max_areakm': 96,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 50,\n 'bbox': ['58.3833', '37.9500', '58.3833', '37.9500'],\n 'geometry': {'type': 'Point', 'coordinates': [58.3832991, 37.9499949]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Ashgabat',\n 'sov0name': 'Turkmenistan',\n 'latitude': 37.949995,\n 'longitude': 58.383299,\n 'pop_max': 727700,\n 'pop_min': 577982,\n 'meganame': None,\n 'min_areakm': 108,\n 'max_areakm': 128,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 62,\n 'bbox': ['68.7739', '38.5600', '68.7739', '38.5600'],\n 'geometry': {'type': 'Point', 'coordinates': [68.7738794, 38.5600352]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dushanbe',\n 'sov0name': 'Tajikistan',\n 'latitude': 38.560035,\n 'longitude': 68.773879,\n 'pop_max': 1086244,\n 'pop_min': 679400,\n 'meganame': None,\n 'min_areakm': 415,\n 'max_areakm': 415,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 76,\n 'bbox': ['45.3647', '2.0686', '45.3647', '2.0686'],\n 'geometry': {'type': 'Point', 'coordinates': [45.3647318, 2.0686272]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Mogadishu',\n 'sov0name': 'Somalia',\n 'latitude': 2.068627,\n 'longitude': 45.364732,\n 'pop_max': 1100000,\n 'pop_min': 875388,\n 'meganame': 'Muqdisho',\n 'min_areakm': 99,\n 'max_areakm': 99,\n 'pop1950': 69,\n 'pop1960': 94,\n 'pop1970': 272,\n 'pop1980': 551,\n 'pop1990': 1035,\n 'pop2000': 1201,\n 'pop2010': 1100,\n 'pop2020': 1794,\n 'pop2050': 2529}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 77,\n 'bbox': ['58.5933', '23.6133', '58.5933', '23.6133'],\n 'geometry': {'type': 'Point', 'coordinates': [58.5933121, 23.6133248]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Muscat',\n 'sov0name': 'Oman',\n 'latitude': 23.613325,\n 'longitude': 58.593312,\n 'pop_max': 734697,\n 'pop_min': 586861,\n 'meganame': None,\n 'min_areakm': 104,\n 'max_areakm': 104,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 83,\n 'bbox': ['35.9314', '31.9520', '35.9314', '31.9520'],\n 'geometry': {'type': 'Point', 'coordinates': [35.9313541, 31.9519711]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Amman',\n 'sov0name': 'Jordan',\n 'latitude': 31.951971,\n 'longitude': 35.931354,\n 'pop_max': 1060000,\n 'pop_min': 1060000,\n 'meganame': 'Amman',\n 'min_areakm': 403,\n 'max_areakm': 545,\n 'pop1950': 90,\n 'pop1960': 218,\n 'pop1970': 388,\n 'pop1980': 636,\n 'pop1990': 851,\n 'pop2000': 1007,\n 'pop2010': 1060,\n 'pop2020': 1185,\n 'pop2050': 1359}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 95,\n 'bbox': ['38.9333', '15.3333', '38.9333', '15.3333'],\n 'geometry': {'type': 'Point', 'coordinates': [38.9333235, 15.3333393]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Asmara',\n 'sov0name': 'Eritrea',\n 'latitude': 15.333339,\n 'longitude': 38.933324,\n 'pop_max': 620802,\n 'pop_min': 563930,\n 'meganame': None,\n 'min_areakm': 90,\n 'max_areakm': 90,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 105,\n 'bbox': ['35.5078', '33.8739', '35.5078', '33.8739'],\n 'geometry': {'type': 'Point', 'coordinates': [35.5077624, 33.873921]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Beirut',\n 'sov0name': 'Lebanon',\n 'latitude': 33.873921,\n 'longitude': 35.507762,\n 'pop_max': 1846000,\n 'pop_min': 1712125,\n 'meganame': 'Bayrut',\n 'min_areakm': 429,\n 'max_areakm': 471,\n 'pop1950': 322,\n 'pop1960': 561,\n 'pop1970': 923,\n 'pop1980': 1623,\n 'pop1990': 1293,\n 'pop2000': 1487,\n 'pop2010': 1846,\n 'pop2020': 2051,\n 'pop2050': 2173}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 106,\n 'bbox': ['44.7888', '41.7270', '44.7888', '41.7270'],\n 'geometry': {'type': 'Point', 'coordinates': [44.7888496, 41.7269558]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tbilisi',\n 'sov0name': 'Georgia',\n 'latitude': 41.726956,\n 'longitude': 44.78885,\n 'pop_max': 1100000,\n 'pop_min': 1005257,\n 'meganame': 'Tbilisi',\n 'min_areakm': 131,\n 'max_areakm': 135,\n 'pop1950': 612,\n 'pop1960': 718,\n 'pop1970': 897,\n 'pop1980': 1090,\n 'pop1990': 1224,\n 'pop2000': 1100,\n 'pop2010': 1100,\n 'pop2020': 1113,\n 'pop2050': 1114}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 120,\n 'bbox': ['44.5116', '40.1831', '44.5116', '40.1831'],\n 'geometry': {'type': 'Point', 'coordinates': [44.5116055, 40.1830966]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Yerevan',\n 'sov0name': 'Armenia',\n 'latitude': 40.183097,\n 'longitude': 44.511606,\n 'pop_max': 1102000,\n 'pop_min': 1093485,\n 'meganame': 'Yerevan',\n 'min_areakm': 191,\n 'max_areakm': 191,\n 'pop1950': 341,\n 'pop1960': 538,\n 'pop1970': 778,\n 'pop1980': 1042,\n 'pop1990': 1175,\n 'pop2000': 1111,\n 'pop2010': 1102,\n 'pop2020': 1102,\n 'pop2050': 1102}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 121,\n 'bbox': ['49.8603', '40.3972', '49.8603', '40.3972'],\n 'geometry': {'type': 'Point', 'coordinates': [49.8602713, 40.3972179]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Baku',\n 'sov0name': 'Azerbaijan',\n 'latitude': 40.397218,\n 'longitude': 49.860271,\n 'pop_max': 2122300,\n 'pop_min': 1892000,\n 'meganame': 'Baku',\n 'min_areakm': 246,\n 'max_areakm': 249,\n 'pop1950': 897,\n 'pop1960': 1005,\n 'pop1970': 1274,\n 'pop1980': 1574,\n 'pop1990': 1733,\n 'pop2000': 1806,\n 'pop2010': 1892,\n 'pop2020': 2006,\n 'pop2050': 2187}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 134,\n 'bbox': ['44.0653', '9.5600', '44.0653', '9.5600'],\n 'geometry': {'type': 'Point', 'coordinates': [44.06531, 9.5600224]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Hargeysa',\n 'sov0name': 'Somaliland',\n 'latitude': 9.560022,\n 'longitude': 44.06531,\n 'pop_max': 477876,\n 'pop_min': 247018,\n 'meganame': None,\n 'min_areakm': 40,\n 'max_areakm': 40,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 135,\n 'bbox': ['55.4500', '-4.6166', '55.4500', '-4.6166'],\n 'geometry': {'type': 'Point', 'coordinates': [55.4499898, -4.6166317]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Victoria',\n 'sov0name': 'Seychelles',\n 'latitude': -4.616632,\n 'longitude': 55.44999,\n 'pop_max': 33576,\n 'pop_min': 22881,\n 'meganame': None,\n 'min_areakm': 15,\n 'max_areakm': 15,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 140,\n 'bbox': ['35.2066', '31.7784', '35.2066', '31.7784'],\n 'geometry': {'type': 'Point', 'coordinates': [35.2066259, 31.7784078]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Jerusalem',\n 'sov0name': 'Israel',\n 'latitude': 31.778408,\n 'longitude': 35.206626,\n 'pop_max': 1029300,\n 'pop_min': 801000,\n 'meganame': None,\n 'min_areakm': 246,\n 'max_areakm': 246,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 143,\n 'bbox': ['33.3666', '35.1667', '33.3666', '35.1667'],\n 'geometry': {'type': 'Point', 'coordinates': [33.3666349, 35.1666765]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Nicosia',\n 'sov0name': 'Cyprus',\n 'latitude': 35.166677,\n 'longitude': 33.366635,\n 'pop_max': 224300,\n 'pop_min': 200452,\n 'meganame': None,\n 'min_areakm': 128,\n 'max_areakm': 128,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 148,\n 'bbox': ['44.2046', '15.3567', '44.2046', '15.3567'],\n 'geometry': {'type': 'Point', 'coordinates': [44.2046475, 15.3566792]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Sanaa',\n 'sov0name': 'Yemen',\n 'latitude': 15.356679,\n 'longitude': 44.204648,\n 'pop_max': 2008000,\n 'pop_min': 1835853,\n 'meganame': \"Sana'a'\",\n 'min_areakm': 160,\n 'max_areakm': 160,\n 'pop1950': 46,\n 'pop1960': 72,\n 'pop1970': 111,\n 'pop1980': 238,\n 'pop1990': 653,\n 'pop2000': 1365,\n 'pop2010': 2008,\n 'pop2020': 2955,\n 'pop2050': 4382}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 150,\n 'bbox': ['36.2981', '33.5020', '36.2981', '33.5020'],\n 'geometry': {'type': 'Point', 'coordinates': [36.29805, 33.5019799]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Damascus',\n 'sov0name': 'Syria',\n 'latitude': 33.50198,\n 'longitude': 36.29805,\n 'pop_max': 2466000,\n 'pop_min': 2466000,\n 'meganame': 'Dimashq',\n 'min_areakm': 532,\n 'max_areakm': 705,\n 'pop1950': 367,\n 'pop1960': 579,\n 'pop1970': 914,\n 'pop1980': 1376,\n 'pop1990': 1691,\n 'pop2000': 2044,\n 'pop2010': 2466,\n 'pop2020': 2981,\n 'pop2050': 3605}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 156,\n 'bbox': ['39.2664', '-6.7981', '39.2664', '-6.7981'],\n 'geometry': {'type': 'Point', 'coordinates': [39.266396, -6.7980667]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dar es Salaam',\n 'sov0name': 'United Republic of Tanzania',\n 'latitude': -6.798067,\n 'longitude': 39.266396,\n 'pop_max': 2930000,\n 'pop_min': 2698652,\n 'meganame': 'Dar es Salaam',\n 'min_areakm': 211,\n 'max_areakm': 211,\n 'pop1950': 67,\n 'pop1960': 162,\n 'pop1970': 357,\n 'pop1980': 836,\n 'pop1990': 1316,\n 'pop2000': 2116,\n 'pop2010': 2930,\n 'pop2020': 4020,\n 'pop2050': 5688}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 162,\n 'bbox': ['47.9764', '29.3717', '47.9764', '29.3717'],\n 'geometry': {'type': 'Point', 'coordinates': [47.9763553, 29.3716635]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Kuwait City',\n 'sov0name': 'Kuwait',\n 'latitude': 29.371664,\n 'longitude': 47.976355,\n 'pop_max': 2063000,\n 'pop_min': 60064,\n 'meganame': 'Al Kuwayt (Kuwait City)',\n 'min_areakm': 264,\n 'max_areakm': 366,\n 'pop1950': 63,\n 'pop1960': 179,\n 'pop1970': 553,\n 'pop1980': 891,\n 'pop1990': 1392,\n 'pop2000': 1499,\n 'pop2010': 2063,\n 'pop2020': 2592,\n 'pop2050': 2956}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 166,\n 'bbox': ['34.7681', '32.0819', '34.7681', '32.0819'],\n 'geometry': {'type': 'Point', 'coordinates': [34.7680659, 32.0819373]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tel Aviv-Yafo',\n 'sov0name': 'Israel',\n 'latitude': 32.081937,\n 'longitude': 34.768066,\n 'pop_max': 3112000,\n 'pop_min': 378358,\n 'meganame': 'Tel Aviv-Yafo',\n 'min_areakm': 436,\n 'max_areakm': 436,\n 'pop1950': 418,\n 'pop1960': 738,\n 'pop1970': 1029,\n 'pop1980': 1416,\n 'pop1990': 2026,\n 'pop2000': 2752,\n 'pop2010': 3112,\n 'pop2020': 3453,\n 'pop2050': 3726}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 184,\n 'bbox': ['55.2780', '25.2319', '55.2780', '25.2319'],\n 'geometry': {'type': 'Point', 'coordinates': [55.2780285, 25.231942]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dubai',\n 'sov0name': 'United Arab Emirates',\n 'latitude': 25.231942,\n 'longitude': 55.278029,\n 'pop_max': 1379000,\n 'pop_min': 1137347,\n 'meganame': 'Dubayy',\n 'min_areakm': 187,\n 'max_areakm': 407,\n 'pop1950': 20,\n 'pop1960': 40,\n 'pop1970': 80,\n 'pop1980': 254,\n 'pop1990': 473,\n 'pop2000': 938,\n 'pop2010': 1379,\n 'pop2020': 1709,\n 'pop2050': 2077}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 185,\n 'bbox': ['69.2930', '41.3136', '69.2930', '41.3136'],\n 'geometry': {'type': 'Point', 'coordinates': [69.292987, 41.3136477]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tashkent',\n 'sov0name': 'Uzbekistan',\n 'latitude': 41.313648,\n 'longitude': 69.292987,\n 'pop_max': 2184000,\n 'pop_min': 1978028,\n 'meganame': 'Tashkent',\n 'min_areakm': 639,\n 'max_areakm': 643,\n 'pop1950': 755,\n 'pop1960': 964,\n 'pop1970': 1403,\n 'pop1980': 1818,\n 'pop1990': 2100,\n 'pop2000': 2135,\n 'pop2010': 2184,\n 'pop2020': 2416,\n 'pop2050': 2892}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 206,\n 'bbox': ['44.3919', '33.3406', '44.3919', '33.3406'],\n 'geometry': {'type': 'Point', 'coordinates': [44.3919229, 33.3405944]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Baghdad',\n 'sov0name': 'Iraq',\n 'latitude': 33.340594,\n 'longitude': 44.391923,\n 'pop_max': 5054000,\n 'pop_min': 5054000,\n 'meganame': 'Baghdad',\n 'min_areakm': 587,\n 'max_areakm': 587,\n 'pop1950': 579,\n 'pop1960': 1019,\n 'pop1970': 2070,\n 'pop1980': 3145,\n 'pop1990': 4092,\n 'pop2000': 5200,\n 'pop2010': 5054,\n 'pop2020': 6618,\n 'pop2050': 8060}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 207,\n 'bbox': ['38.6981', '9.0353', '38.6981', '9.0353'],\n 'geometry': {'type': 'Point', 'coordinates': [38.6980586, 9.0352562]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Addis Ababa',\n 'sov0name': 'Ethiopia',\n 'latitude': 9.035256,\n 'longitude': 38.698059,\n 'pop_max': 3100000,\n 'pop_min': 2757729,\n 'meganame': 'Addis Ababa',\n 'min_areakm': 462,\n 'max_areakm': 1182,\n 'pop1950': 392,\n 'pop1960': 519,\n 'pop1970': 729,\n 'pop1980': 1175,\n 'pop1990': 1791,\n 'pop2000': 2493,\n 'pop2010': 3100,\n 'pop2020': 4184,\n 'pop2050': 6156}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 208,\n 'bbox': ['51.4224', '35.6739', '51.4224', '35.6739'],\n 'geometry': {'type': 'Point', 'coordinates': [51.4223982, 35.6738886]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tehran',\n 'sov0name': 'Iran',\n 'latitude': 35.673889,\n 'longitude': 51.422398,\n 'pop_max': 7873000,\n 'pop_min': 7153309,\n 'meganame': 'Tehran',\n 'min_areakm': 496,\n 'max_areakm': 496,\n 'pop1950': 1041,\n 'pop1960': 1873,\n 'pop1970': 3290,\n 'pop1980': 5079,\n 'pop1990': 6365,\n 'pop2000': 7128,\n 'pop2010': 7873,\n 'pop2020': 8832,\n 'pop2050': 9814}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 212,\n 'bbox': ['69.1813', '34.5186', '69.1813', '34.5186'],\n 'geometry': {'type': 'Point', 'coordinates': [69.1813142, 34.5186361]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Kabul',\n 'sov0name': 'Afghanistan',\n 'latitude': 34.518636,\n 'longitude': 69.181314,\n 'pop_max': 3277000,\n 'pop_min': 3043532,\n 'meganame': 'Kabul',\n 'min_areakm': 594,\n 'max_areakm': 1471,\n 'pop1950': 129,\n 'pop1960': 263,\n 'pop1970': 472,\n 'pop1980': 978,\n 'pop1990': 1306,\n 'pop2000': 1963,\n 'pop2010': 3277,\n 'pop2020': 4730,\n 'pop2050': 7175}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 222,\n 'bbox': ['46.7708', '24.6428', '46.7708', '24.6428'],\n 'geometry': {'type': 'Point', 'coordinates': [46.7707958, 24.642779]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Riyadh',\n 'sov0name': 'Saudi Arabia',\n 'latitude': 24.642779,\n 'longitude': 46.770796,\n 'pop_max': 4465000,\n 'pop_min': 4205961,\n 'meganame': 'Ar-Riyadh',\n 'min_areakm': 854,\n 'max_areakm': 854,\n 'pop1950': 111,\n 'pop1960': 156,\n 'pop1970': 408,\n 'pop1980': 1055,\n 'pop1990': 2325,\n 'pop2000': 3567,\n 'pop2010': 4465,\n 'pop2020': 5405,\n 'pop2050': 6275}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 229,\n 'bbox': ['36.8147', '-1.2814', '36.8147', '-1.2814'],\n 'geometry': {'type': 'Point', 'coordinates': [36.814711, -1.2814009]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Nairobi',\n 'sov0name': 'Kenya',\n 'latitude': -1.281401,\n 'longitude': 36.814711,\n 'pop_max': 3010000,\n 'pop_min': 2750547,\n 'meganame': 'Nairobi',\n 'min_areakm': 698,\n 'max_areakm': 719,\n 'pop1950': 137,\n 'pop1960': 293,\n 'pop1970': 531,\n 'pop1980': 862,\n 'pop1990': 1380,\n 'pop2000': 2233,\n 'pop2010': 3010,\n 'pop2020': 4052,\n 'pop2050': 5871}}],\n 'total_feature_count': 32,\n 'metadata': {'title': 'populated_places_sub',\n 'extent': {'spatial': {'bbox': [-41.2999879,\n -175.2205645,\n 64.1500236,\n 179.2166471],\n 'crs': 'http://www.opengis.net/def/crs/OGC/1.3/CRS84'},\n 'temporal': {'interval': [['null']]}},\n 'summaries': {'properties': [{'name': 'id'},\n {'name': 'created_at'},\n {'name': 'modified_at'},\n {'name': 'name'},\n {'name': 'sov0name'},\n {'name': 'latitude'},\n {'name': 'longitude'},\n {'name': 'pop_max'},\n {'name': 'pop_min'},\n {'name': 'meganame'},\n {'name': 'min_areakm'},\n {'name': 'max_areakm'},\n {'name': 'pop1950'},\n {'name': 'pop1960'},\n {'name': 'pop1970'},\n {'name': 'pop1980'},\n {'name': 'pop1990'},\n {'name': 'pop2000'},\n {'name': 'pop2010'},\n {'name': 'pop2020'},\n {'name': 'pop2050'},\n {'name': 'geometry'}]}}}" + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "features" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": null, + "outputs": [], + "source": [], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/xcube_geodb_openeo/backend/processes.py b/xcube_geodb_openeo/backend/processes.py index ca0c229..f3ef8ee 100644 --- a/xcube_geodb_openeo/backend/processes.py +++ b/xcube_geodb_openeo/backend/processes.py @@ -153,7 +153,7 @@ def execute(self, query_params: dict, ctx: ServerContextT) -> str: if backend_params['bbox']: bbox = tuple(backend_params['bbox'].replace('(', '') .replace(')', '').replace(' ', '').split(',')) - crs = backend_params['crs'] if backend_params['crs'] else None + crs = backend_params['crs'] bbox_transformed = ctx.transform_bbox(collection_id, bbox, crs) vector_cube = ctx.data_store.get_vector_cube( From fccccee7e9eddb55e0fbd70ea887cd9301f4edd4 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 27 Jun 2022 23:24:12 +0200 Subject: [PATCH 052/163] - finished to create a sample JNB for use case 1: load_collection - simplified result of load_collection --- notebooks/geoDB-openEO_use_case_1.ipynb | 412 +++++++++++++++--------- tests/server/app/test_processing.py | 36 +-- tests/server/app/test_utils.py | 42 ++- xcube_geodb_openeo/backend/processes.py | 12 +- 4 files changed, 314 insertions(+), 188 deletions(-) diff --git a/notebooks/geoDB-openEO_use_case_1.ipynb b/notebooks/geoDB-openEO_use_case_1.ipynb index e2dd7f4..03d58c1 100644 --- a/notebooks/geoDB-openEO_use_case_1.ipynb +++ b/notebooks/geoDB-openEO_use_case_1.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 14, + "execution_count": 40, "outputs": [], "source": [ "import urllib3\n", @@ -20,7 +20,257 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, + "outputs": [], + "source": [ + "def print_endpoint(url):\n", + " r = http.request('GET', url)\n", + " data = json.loads(r.data)\n", + " print(f\"Status: {r.status}\")\n", + " print(f\"Result: {json.dumps(data, indent=2, sort_keys=True)}\")" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": null, + "outputs": [], + "source": [ + "print_endpoint(f'{base_url}/')" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": 47, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Status: 200\n", + "Result: {\n", + " \"versions\": [\n", + " {\n", + " \"api_version\": \"1.1.0\",\n", + " \"url\": \"http://www.brockmann-consult.de/xcube-geoDB-openEO\"\n", + " }\n", + " ]\n", + "}\n" + ] + } + ], + "source": [ + "print_endpoint(f'{base_url}/.well-known/openeo')" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": 48, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Status: 200\n", + "Result: {\n", + " \"input\": {},\n", + " \"output\": {}\n", + "}\n" + ] + } + ], + "source": [ + "print_endpoint(f'{base_url}/file_formats')" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": 49, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Status: 200\n", + "Result: {\n", + " \"conformsTo\": [\n", + " \"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core\",\n", + " \"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30\",\n", + " \"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/html\",\n", + " \"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson\"\n", + " ]\n", + "}\n" + ] + } + ], + "source": [ + "print_endpoint(f'{base_url}/conformance')" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": 51, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Status: 200\n", + "Result: {\n", + " \"description\": \"No description available.\",\n", + " \"extent\": {\n", + " \"spatial\": {\n", + " \"bbox\": [\n", + " 9.596750015799916,\n", + " 46.34587798618984,\n", + " 17.232237875796603,\n", + " 48.96562893083748\n", + " ],\n", + " \"crs\": \"http://www.opengis.net/def/crs/OGC/1.3/CRS84\"\n", + " },\n", + " \"temporal\": {\n", + " \"interval\": [\n", + " [\n", + " \"null\"\n", + " ]\n", + " ]\n", + " }\n", + " },\n", + " \"id\": \"AT_2021_EC21\",\n", + " \"keywords\": [],\n", + " \"license\": \"proprietary\",\n", + " \"links\": [\n", + " {\n", + " \"href\": \"http://localhost:8080/collections/AT_2021_EC21\",\n", + " \"rel\": \"self\"\n", + " },\n", + " {\n", + " \"href\": \"http://localhost:8080/collections/\",\n", + " \"rel\": \"root\"\n", + " }\n", + " ],\n", + " \"providers\": [],\n", + " \"stac_extensions\": [\n", + " \"xcube-geodb\"\n", + " ],\n", + " \"stac_version\": \"0.9.0\",\n", + " \"summaries\": {\n", + " \"properties\": [\n", + " {\n", + " \"name\": \"id\"\n", + " },\n", + " {\n", + " \"name\": \"created_at\"\n", + " },\n", + " {\n", + " \"name\": \"modified_at\"\n", + " },\n", + " {\n", + " \"name\": \"fid\"\n", + " },\n", + " {\n", + " \"name\": \"fs_kennung\"\n", + " },\n", + " {\n", + " \"name\": \"snar_bezei\"\n", + " },\n", + " {\n", + " \"name\": \"sl_flaeche\"\n", + " },\n", + " {\n", + " \"name\": \"geo_id\"\n", + " },\n", + " {\n", + " \"name\": \"inspire_id\"\n", + " },\n", + " {\n", + " \"name\": \"gml_id\"\n", + " },\n", + " {\n", + " \"name\": \"gml_identi\"\n", + " },\n", + " {\n", + " \"name\": \"snar_code\"\n", + " },\n", + " {\n", + " \"name\": \"geo_part_k\"\n", + " },\n", + " {\n", + " \"name\": \"log_pkey\"\n", + " },\n", + " {\n", + " \"name\": \"geom_date_\"\n", + " },\n", + " {\n", + " \"name\": \"fart_id\"\n", + " },\n", + " {\n", + " \"name\": \"geo_type\"\n", + " },\n", + " {\n", + " \"name\": \"gml_length\"\n", + " },\n", + " {\n", + " \"name\": \"ec_trans_n\"\n", + " },\n", + " {\n", + " \"name\": \"ec_hcat_n\"\n", + " },\n", + " {\n", + " \"name\": \"ec_hcat_c\"\n", + " },\n", + " {\n", + " \"name\": \"geometry\"\n", + " }\n", + " ]\n", + " },\n", + " \"title\": \"AT_2021_EC21\"\n", + "}\n" + ] + } + ], + "source": [ + "print_endpoint(f'{base_url}/collections/AT_2021_EC21')" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": 42, "outputs": [ { "name": "stdout", @@ -762,34 +1012,7 @@ } ], "source": [ - "r = http.request('GET', f'{base_url}/collections')\n", - "collections = json.loads(r.data)\n", - "print(f\"Status: {r.status}\")\n", - "print(f\"Result: {json.dumps(collections, indent=2, sort_keys=True)}\")" - ], - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - } - }, - { - "cell_type": "code", - "execution_count": 3, - "outputs": [ - { - "data": { - "text/plain": "['alster_debug',\n 'AT_2021_EC21',\n 'BE_VLG_2021_EC21',\n 'eurocrops-test-1',\n 'eurocrops-test-nrw',\n 'populated_places_sub',\n 'SI_2021_EC21']" - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "collection_ids = [a['id'] for a in collections['collections']]\n", - "collection_ids" + "print_endpoint(f'{base_url}/collections')" ], "metadata": { "collapsed": false, @@ -800,109 +1023,10 @@ }, { "cell_type": "code", - "execution_count": 15, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{\n", - " \"links\": [\n", - " {}\n", - " ],\n", - " \"processes\": [\n", - " {\n", - " \"categories\": [\n", - " \"import\"\n", - " ],\n", - " \"description\": \"Loads a collection from the current back-end by its id and returns it as a vector cube. The data that is added to the data cube can be restricted with the parameters \\\"spatial_extent\\\" and \\\"properties\\\".\",\n", - " \"id\": \"load_collection\",\n", - " \"parameters\": [\n", - " {\n", - " \"description\": \"The collection's name\",\n", - " \"name\": \"id\",\n", - " \"schema\": {\n", - " \"type\": \"string\"\n", - " }\n", - " },\n", - " {\n", - " \"description\": \"The database of the collection\",\n", - " \"name\": \"database\",\n", - " \"optional\": true,\n", - " \"schema\": {\n", - " \"type\": \"string\"\n", - " }\n", - " },\n", - " {\n", - " \"description\": \"Limits the data to load from the collection to the specified bounding box or polygons.\\n\\nThe process puts a pixel into the data cube if the point at the pixel center intersects with the bounding box.\\n\\nSet this parameter to `null` to set no limit for the spatial extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using ``filter_bbox()`` or ``filter_spatial()`` directly after loading unbounded data.\",\n", - " \"name\": \"spatial_extent\",\n", - " \"schema\": [\n", - " {\n", - " \"properties\": {\n", - " \"crs\": {\n", - " \"default\": 4326,\n", - " \"description\": \"Coordinate reference system of the extent, specified as as [EPSG code](http://www.epsg-registry.org/), [WKT2 (ISO 19162) string] (http://docs.opengeospatial.org/is/18-010r7/18-010r7.html) or [PROJ definition (deprecated)](https://proj.org/usage/quickstart.html). Defaults to `4326` (EPSG code 4326) unless the client explicitly requests a different coordinate reference system.\",\n", - " \"examples\": [\n", - " 3857\n", - " ],\n", - " \"minimum\": 1000,\n", - " \"subtype\": \"epsg-code\",\n", - " \"title\": \"EPSG Code\",\n", - " \"type\": \"integer\"\n", - " },\n", - " \"east\": {\n", - " \"description\": \"East (upper right corner, coordinate axis 1).\",\n", - " \"type\": \"number\"\n", - " },\n", - " \"north\": {\n", - " \"description\": \"North (upper right corner, coordinate axis 2).\",\n", - " \"type\": \"number\"\n", - " },\n", - " \"south\": {\n", - " \"description\": \"South (lower left corner, coordinate axis 2).\",\n", - " \"type\": \"number\"\n", - " },\n", - " \"west\": {\n", - " \"description\": \"West (lower left corner, coordinate axis 1).\",\n", - " \"type\": \"number\"\n", - " }\n", - " },\n", - " \"required\": [\n", - " \"west\",\n", - " \"south\",\n", - " \"east\",\n", - " \"north\"\n", - " ],\n", - " \"subtype\": \"bounding-box\",\n", - " \"title\": \"Bounding Box\",\n", - " \"type\": \"object\"\n", - " },\n", - " {\n", - " \"description\": \"Don't filter spatially. All data is included in the data cube.\",\n", - " \"title\": \"No filter\",\n", - " \"type\": \"null\"\n", - " }\n", - " ]\n", - " }\n", - " ],\n", - " \"returns\": {\n", - " \"description\": \"A vector cube for further processing.\",\n", - " \"schema\": {\n", - " \"subtype\": \"vector-cube\",\n", - " \"type\": \"object\"\n", - " }\n", - " },\n", - " \"summary\": \"Load a collection\"\n", - " }\n", - " ]\n", - "}\n" - ] - } - ], + "execution_count": null, + "outputs": [], "source": [ - "r = http.request('GET', f'{base_url}/processes')\n", - "processes = json.loads(r.data)\n", - "print(json.dumps(processes, indent=2, sort_keys=True))" + "print_endpoint(f'{base_url}/processes')" ], "metadata": { "collapsed": false, @@ -913,7 +1037,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 38, "outputs": [], "source": [ "body = json.dumps({\"process\": {\n", @@ -928,7 +1052,7 @@ "r = http.request('POST', f'{base_url}/result',\n", " headers={'Content-Type': 'application/json'},\n", " body=body)\n", - "features = json.loads(r.data)" + "vector_cube = json.loads(r.data)" ], "metadata": { "collapsed": false, @@ -939,19 +1063,19 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 39, "outputs": [ { "data": { - "text/plain": "{'type': 'object',\n 'id': 'populated_places_sub',\n 'features': [{'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 22,\n 'bbox': ['51.5330', '25.2866', '51.5330', '25.2866'],\n 'geometry': {'type': 'Point', 'coordinates': [51.5329679, 25.286556]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Doha',\n 'sov0name': 'Qatar',\n 'latitude': 25.286556,\n 'longitude': 51.532968,\n 'pop_max': 1450000,\n 'pop_min': 731310,\n 'meganame': None,\n 'min_areakm': 270,\n 'max_areakm': 270,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 26,\n 'bbox': ['35.7500', '-6.1833', '35.7500', '-6.1833'],\n 'geometry': {'type': 'Point', 'coordinates': [35.7500036, -6.1833061]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dodoma',\n 'sov0name': 'United Republic of Tanzania',\n 'latitude': -6.183306,\n 'longitude': 35.750004,\n 'pop_max': 218269,\n 'pop_min': 180541,\n 'meganame': None,\n 'min_areakm': 55,\n 'max_areakm': 55,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 31,\n 'bbox': ['43.1480', '11.5950', '43.1480', '11.5950'],\n 'geometry': {'type': 'Point', 'coordinates': [43.1480017, 11.5950145]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Djibouti',\n 'sov0name': 'Djibouti',\n 'latitude': 11.595015,\n 'longitude': 43.148002,\n 'pop_max': 923000,\n 'pop_min': 604013,\n 'meganame': None,\n 'min_areakm': 42,\n 'max_areakm': 42,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 44,\n 'bbox': ['50.5831', '26.2361', '50.5831', '26.2361'],\n 'geometry': {'type': 'Point', 'coordinates': [50.5830517, 26.2361363]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Manama',\n 'sov0name': 'Bahrain',\n 'latitude': 26.236136,\n 'longitude': 50.583052,\n 'pop_max': 563920,\n 'pop_min': 157474,\n 'meganame': None,\n 'min_areakm': 178,\n 'max_areakm': 178,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 49,\n 'bbox': ['54.3666', '24.4667', '54.3666', '24.4667'],\n 'geometry': {'type': 'Point', 'coordinates': [54.3665934, 24.4666836]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Abu Dhabi',\n 'sov0name': 'United Arab Emirates',\n 'latitude': 24.466684,\n 'longitude': 54.366593,\n 'pop_max': 603492,\n 'pop_min': 560230,\n 'meganame': None,\n 'min_areakm': 96,\n 'max_areakm': 96,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 50,\n 'bbox': ['58.3833', '37.9500', '58.3833', '37.9500'],\n 'geometry': {'type': 'Point', 'coordinates': [58.3832991, 37.9499949]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Ashgabat',\n 'sov0name': 'Turkmenistan',\n 'latitude': 37.949995,\n 'longitude': 58.383299,\n 'pop_max': 727700,\n 'pop_min': 577982,\n 'meganame': None,\n 'min_areakm': 108,\n 'max_areakm': 128,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 62,\n 'bbox': ['68.7739', '38.5600', '68.7739', '38.5600'],\n 'geometry': {'type': 'Point', 'coordinates': [68.7738794, 38.5600352]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dushanbe',\n 'sov0name': 'Tajikistan',\n 'latitude': 38.560035,\n 'longitude': 68.773879,\n 'pop_max': 1086244,\n 'pop_min': 679400,\n 'meganame': None,\n 'min_areakm': 415,\n 'max_areakm': 415,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 76,\n 'bbox': ['45.3647', '2.0686', '45.3647', '2.0686'],\n 'geometry': {'type': 'Point', 'coordinates': [45.3647318, 2.0686272]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Mogadishu',\n 'sov0name': 'Somalia',\n 'latitude': 2.068627,\n 'longitude': 45.364732,\n 'pop_max': 1100000,\n 'pop_min': 875388,\n 'meganame': 'Muqdisho',\n 'min_areakm': 99,\n 'max_areakm': 99,\n 'pop1950': 69,\n 'pop1960': 94,\n 'pop1970': 272,\n 'pop1980': 551,\n 'pop1990': 1035,\n 'pop2000': 1201,\n 'pop2010': 1100,\n 'pop2020': 1794,\n 'pop2050': 2529}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 77,\n 'bbox': ['58.5933', '23.6133', '58.5933', '23.6133'],\n 'geometry': {'type': 'Point', 'coordinates': [58.5933121, 23.6133248]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Muscat',\n 'sov0name': 'Oman',\n 'latitude': 23.613325,\n 'longitude': 58.593312,\n 'pop_max': 734697,\n 'pop_min': 586861,\n 'meganame': None,\n 'min_areakm': 104,\n 'max_areakm': 104,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 83,\n 'bbox': ['35.9314', '31.9520', '35.9314', '31.9520'],\n 'geometry': {'type': 'Point', 'coordinates': [35.9313541, 31.9519711]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Amman',\n 'sov0name': 'Jordan',\n 'latitude': 31.951971,\n 'longitude': 35.931354,\n 'pop_max': 1060000,\n 'pop_min': 1060000,\n 'meganame': 'Amman',\n 'min_areakm': 403,\n 'max_areakm': 545,\n 'pop1950': 90,\n 'pop1960': 218,\n 'pop1970': 388,\n 'pop1980': 636,\n 'pop1990': 851,\n 'pop2000': 1007,\n 'pop2010': 1060,\n 'pop2020': 1185,\n 'pop2050': 1359}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 95,\n 'bbox': ['38.9333', '15.3333', '38.9333', '15.3333'],\n 'geometry': {'type': 'Point', 'coordinates': [38.9333235, 15.3333393]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Asmara',\n 'sov0name': 'Eritrea',\n 'latitude': 15.333339,\n 'longitude': 38.933324,\n 'pop_max': 620802,\n 'pop_min': 563930,\n 'meganame': None,\n 'min_areakm': 90,\n 'max_areakm': 90,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 105,\n 'bbox': ['35.5078', '33.8739', '35.5078', '33.8739'],\n 'geometry': {'type': 'Point', 'coordinates': [35.5077624, 33.873921]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Beirut',\n 'sov0name': 'Lebanon',\n 'latitude': 33.873921,\n 'longitude': 35.507762,\n 'pop_max': 1846000,\n 'pop_min': 1712125,\n 'meganame': 'Bayrut',\n 'min_areakm': 429,\n 'max_areakm': 471,\n 'pop1950': 322,\n 'pop1960': 561,\n 'pop1970': 923,\n 'pop1980': 1623,\n 'pop1990': 1293,\n 'pop2000': 1487,\n 'pop2010': 1846,\n 'pop2020': 2051,\n 'pop2050': 2173}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 106,\n 'bbox': ['44.7888', '41.7270', '44.7888', '41.7270'],\n 'geometry': {'type': 'Point', 'coordinates': [44.7888496, 41.7269558]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tbilisi',\n 'sov0name': 'Georgia',\n 'latitude': 41.726956,\n 'longitude': 44.78885,\n 'pop_max': 1100000,\n 'pop_min': 1005257,\n 'meganame': 'Tbilisi',\n 'min_areakm': 131,\n 'max_areakm': 135,\n 'pop1950': 612,\n 'pop1960': 718,\n 'pop1970': 897,\n 'pop1980': 1090,\n 'pop1990': 1224,\n 'pop2000': 1100,\n 'pop2010': 1100,\n 'pop2020': 1113,\n 'pop2050': 1114}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 120,\n 'bbox': ['44.5116', '40.1831', '44.5116', '40.1831'],\n 'geometry': {'type': 'Point', 'coordinates': [44.5116055, 40.1830966]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Yerevan',\n 'sov0name': 'Armenia',\n 'latitude': 40.183097,\n 'longitude': 44.511606,\n 'pop_max': 1102000,\n 'pop_min': 1093485,\n 'meganame': 'Yerevan',\n 'min_areakm': 191,\n 'max_areakm': 191,\n 'pop1950': 341,\n 'pop1960': 538,\n 'pop1970': 778,\n 'pop1980': 1042,\n 'pop1990': 1175,\n 'pop2000': 1111,\n 'pop2010': 1102,\n 'pop2020': 1102,\n 'pop2050': 1102}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 121,\n 'bbox': ['49.8603', '40.3972', '49.8603', '40.3972'],\n 'geometry': {'type': 'Point', 'coordinates': [49.8602713, 40.3972179]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Baku',\n 'sov0name': 'Azerbaijan',\n 'latitude': 40.397218,\n 'longitude': 49.860271,\n 'pop_max': 2122300,\n 'pop_min': 1892000,\n 'meganame': 'Baku',\n 'min_areakm': 246,\n 'max_areakm': 249,\n 'pop1950': 897,\n 'pop1960': 1005,\n 'pop1970': 1274,\n 'pop1980': 1574,\n 'pop1990': 1733,\n 'pop2000': 1806,\n 'pop2010': 1892,\n 'pop2020': 2006,\n 'pop2050': 2187}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 134,\n 'bbox': ['44.0653', '9.5600', '44.0653', '9.5600'],\n 'geometry': {'type': 'Point', 'coordinates': [44.06531, 9.5600224]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Hargeysa',\n 'sov0name': 'Somaliland',\n 'latitude': 9.560022,\n 'longitude': 44.06531,\n 'pop_max': 477876,\n 'pop_min': 247018,\n 'meganame': None,\n 'min_areakm': 40,\n 'max_areakm': 40,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 135,\n 'bbox': ['55.4500', '-4.6166', '55.4500', '-4.6166'],\n 'geometry': {'type': 'Point', 'coordinates': [55.4499898, -4.6166317]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Victoria',\n 'sov0name': 'Seychelles',\n 'latitude': -4.616632,\n 'longitude': 55.44999,\n 'pop_max': 33576,\n 'pop_min': 22881,\n 'meganame': None,\n 'min_areakm': 15,\n 'max_areakm': 15,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 140,\n 'bbox': ['35.2066', '31.7784', '35.2066', '31.7784'],\n 'geometry': {'type': 'Point', 'coordinates': [35.2066259, 31.7784078]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Jerusalem',\n 'sov0name': 'Israel',\n 'latitude': 31.778408,\n 'longitude': 35.206626,\n 'pop_max': 1029300,\n 'pop_min': 801000,\n 'meganame': None,\n 'min_areakm': 246,\n 'max_areakm': 246,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 143,\n 'bbox': ['33.3666', '35.1667', '33.3666', '35.1667'],\n 'geometry': {'type': 'Point', 'coordinates': [33.3666349, 35.1666765]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Nicosia',\n 'sov0name': 'Cyprus',\n 'latitude': 35.166677,\n 'longitude': 33.366635,\n 'pop_max': 224300,\n 'pop_min': 200452,\n 'meganame': None,\n 'min_areakm': 128,\n 'max_areakm': 128,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 148,\n 'bbox': ['44.2046', '15.3567', '44.2046', '15.3567'],\n 'geometry': {'type': 'Point', 'coordinates': [44.2046475, 15.3566792]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Sanaa',\n 'sov0name': 'Yemen',\n 'latitude': 15.356679,\n 'longitude': 44.204648,\n 'pop_max': 2008000,\n 'pop_min': 1835853,\n 'meganame': \"Sana'a'\",\n 'min_areakm': 160,\n 'max_areakm': 160,\n 'pop1950': 46,\n 'pop1960': 72,\n 'pop1970': 111,\n 'pop1980': 238,\n 'pop1990': 653,\n 'pop2000': 1365,\n 'pop2010': 2008,\n 'pop2020': 2955,\n 'pop2050': 4382}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 150,\n 'bbox': ['36.2981', '33.5020', '36.2981', '33.5020'],\n 'geometry': {'type': 'Point', 'coordinates': [36.29805, 33.5019799]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Damascus',\n 'sov0name': 'Syria',\n 'latitude': 33.50198,\n 'longitude': 36.29805,\n 'pop_max': 2466000,\n 'pop_min': 2466000,\n 'meganame': 'Dimashq',\n 'min_areakm': 532,\n 'max_areakm': 705,\n 'pop1950': 367,\n 'pop1960': 579,\n 'pop1970': 914,\n 'pop1980': 1376,\n 'pop1990': 1691,\n 'pop2000': 2044,\n 'pop2010': 2466,\n 'pop2020': 2981,\n 'pop2050': 3605}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 156,\n 'bbox': ['39.2664', '-6.7981', '39.2664', '-6.7981'],\n 'geometry': {'type': 'Point', 'coordinates': [39.266396, -6.7980667]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dar es Salaam',\n 'sov0name': 'United Republic of Tanzania',\n 'latitude': -6.798067,\n 'longitude': 39.266396,\n 'pop_max': 2930000,\n 'pop_min': 2698652,\n 'meganame': 'Dar es Salaam',\n 'min_areakm': 211,\n 'max_areakm': 211,\n 'pop1950': 67,\n 'pop1960': 162,\n 'pop1970': 357,\n 'pop1980': 836,\n 'pop1990': 1316,\n 'pop2000': 2116,\n 'pop2010': 2930,\n 'pop2020': 4020,\n 'pop2050': 5688}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 162,\n 'bbox': ['47.9764', '29.3717', '47.9764', '29.3717'],\n 'geometry': {'type': 'Point', 'coordinates': [47.9763553, 29.3716635]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Kuwait City',\n 'sov0name': 'Kuwait',\n 'latitude': 29.371664,\n 'longitude': 47.976355,\n 'pop_max': 2063000,\n 'pop_min': 60064,\n 'meganame': 'Al Kuwayt (Kuwait City)',\n 'min_areakm': 264,\n 'max_areakm': 366,\n 'pop1950': 63,\n 'pop1960': 179,\n 'pop1970': 553,\n 'pop1980': 891,\n 'pop1990': 1392,\n 'pop2000': 1499,\n 'pop2010': 2063,\n 'pop2020': 2592,\n 'pop2050': 2956}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 166,\n 'bbox': ['34.7681', '32.0819', '34.7681', '32.0819'],\n 'geometry': {'type': 'Point', 'coordinates': [34.7680659, 32.0819373]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tel Aviv-Yafo',\n 'sov0name': 'Israel',\n 'latitude': 32.081937,\n 'longitude': 34.768066,\n 'pop_max': 3112000,\n 'pop_min': 378358,\n 'meganame': 'Tel Aviv-Yafo',\n 'min_areakm': 436,\n 'max_areakm': 436,\n 'pop1950': 418,\n 'pop1960': 738,\n 'pop1970': 1029,\n 'pop1980': 1416,\n 'pop1990': 2026,\n 'pop2000': 2752,\n 'pop2010': 3112,\n 'pop2020': 3453,\n 'pop2050': 3726}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 184,\n 'bbox': ['55.2780', '25.2319', '55.2780', '25.2319'],\n 'geometry': {'type': 'Point', 'coordinates': [55.2780285, 25.231942]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dubai',\n 'sov0name': 'United Arab Emirates',\n 'latitude': 25.231942,\n 'longitude': 55.278029,\n 'pop_max': 1379000,\n 'pop_min': 1137347,\n 'meganame': 'Dubayy',\n 'min_areakm': 187,\n 'max_areakm': 407,\n 'pop1950': 20,\n 'pop1960': 40,\n 'pop1970': 80,\n 'pop1980': 254,\n 'pop1990': 473,\n 'pop2000': 938,\n 'pop2010': 1379,\n 'pop2020': 1709,\n 'pop2050': 2077}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 185,\n 'bbox': ['69.2930', '41.3136', '69.2930', '41.3136'],\n 'geometry': {'type': 'Point', 'coordinates': [69.292987, 41.3136477]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tashkent',\n 'sov0name': 'Uzbekistan',\n 'latitude': 41.313648,\n 'longitude': 69.292987,\n 'pop_max': 2184000,\n 'pop_min': 1978028,\n 'meganame': 'Tashkent',\n 'min_areakm': 639,\n 'max_areakm': 643,\n 'pop1950': 755,\n 'pop1960': 964,\n 'pop1970': 1403,\n 'pop1980': 1818,\n 'pop1990': 2100,\n 'pop2000': 2135,\n 'pop2010': 2184,\n 'pop2020': 2416,\n 'pop2050': 2892}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 206,\n 'bbox': ['44.3919', '33.3406', '44.3919', '33.3406'],\n 'geometry': {'type': 'Point', 'coordinates': [44.3919229, 33.3405944]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Baghdad',\n 'sov0name': 'Iraq',\n 'latitude': 33.340594,\n 'longitude': 44.391923,\n 'pop_max': 5054000,\n 'pop_min': 5054000,\n 'meganame': 'Baghdad',\n 'min_areakm': 587,\n 'max_areakm': 587,\n 'pop1950': 579,\n 'pop1960': 1019,\n 'pop1970': 2070,\n 'pop1980': 3145,\n 'pop1990': 4092,\n 'pop2000': 5200,\n 'pop2010': 5054,\n 'pop2020': 6618,\n 'pop2050': 8060}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 207,\n 'bbox': ['38.6981', '9.0353', '38.6981', '9.0353'],\n 'geometry': {'type': 'Point', 'coordinates': [38.6980586, 9.0352562]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Addis Ababa',\n 'sov0name': 'Ethiopia',\n 'latitude': 9.035256,\n 'longitude': 38.698059,\n 'pop_max': 3100000,\n 'pop_min': 2757729,\n 'meganame': 'Addis Ababa',\n 'min_areakm': 462,\n 'max_areakm': 1182,\n 'pop1950': 392,\n 'pop1960': 519,\n 'pop1970': 729,\n 'pop1980': 1175,\n 'pop1990': 1791,\n 'pop2000': 2493,\n 'pop2010': 3100,\n 'pop2020': 4184,\n 'pop2050': 6156}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 208,\n 'bbox': ['51.4224', '35.6739', '51.4224', '35.6739'],\n 'geometry': {'type': 'Point', 'coordinates': [51.4223982, 35.6738886]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tehran',\n 'sov0name': 'Iran',\n 'latitude': 35.673889,\n 'longitude': 51.422398,\n 'pop_max': 7873000,\n 'pop_min': 7153309,\n 'meganame': 'Tehran',\n 'min_areakm': 496,\n 'max_areakm': 496,\n 'pop1950': 1041,\n 'pop1960': 1873,\n 'pop1970': 3290,\n 'pop1980': 5079,\n 'pop1990': 6365,\n 'pop2000': 7128,\n 'pop2010': 7873,\n 'pop2020': 8832,\n 'pop2050': 9814}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 212,\n 'bbox': ['69.1813', '34.5186', '69.1813', '34.5186'],\n 'geometry': {'type': 'Point', 'coordinates': [69.1813142, 34.5186361]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Kabul',\n 'sov0name': 'Afghanistan',\n 'latitude': 34.518636,\n 'longitude': 69.181314,\n 'pop_max': 3277000,\n 'pop_min': 3043532,\n 'meganame': 'Kabul',\n 'min_areakm': 594,\n 'max_areakm': 1471,\n 'pop1950': 129,\n 'pop1960': 263,\n 'pop1970': 472,\n 'pop1980': 978,\n 'pop1990': 1306,\n 'pop2000': 1963,\n 'pop2010': 3277,\n 'pop2020': 4730,\n 'pop2050': 7175}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 222,\n 'bbox': ['46.7708', '24.6428', '46.7708', '24.6428'],\n 'geometry': {'type': 'Point', 'coordinates': [46.7707958, 24.642779]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Riyadh',\n 'sov0name': 'Saudi Arabia',\n 'latitude': 24.642779,\n 'longitude': 46.770796,\n 'pop_max': 4465000,\n 'pop_min': 4205961,\n 'meganame': 'Ar-Riyadh',\n 'min_areakm': 854,\n 'max_areakm': 854,\n 'pop1950': 111,\n 'pop1960': 156,\n 'pop1970': 408,\n 'pop1980': 1055,\n 'pop1990': 2325,\n 'pop2000': 3567,\n 'pop2010': 4465,\n 'pop2020': 5405,\n 'pop2050': 6275}},\n {'stac_version': '0.9.0',\n 'stac_extensions': ['xcube-geodb'],\n 'type': 'Feature',\n 'id': 229,\n 'bbox': ['36.8147', '-1.2814', '36.8147', '-1.2814'],\n 'geometry': {'type': 'Point', 'coordinates': [36.814711, -1.2814009]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Nairobi',\n 'sov0name': 'Kenya',\n 'latitude': -1.281401,\n 'longitude': 36.814711,\n 'pop_max': 3010000,\n 'pop_min': 2750547,\n 'meganame': 'Nairobi',\n 'min_areakm': 698,\n 'max_areakm': 719,\n 'pop1950': 137,\n 'pop1960': 293,\n 'pop1970': 531,\n 'pop1980': 862,\n 'pop1990': 1380,\n 'pop2000': 2233,\n 'pop2010': 3010,\n 'pop2020': 4052,\n 'pop2050': 5871}}],\n 'total_feature_count': 32,\n 'metadata': {'title': 'populated_places_sub',\n 'extent': {'spatial': {'bbox': [-41.2999879,\n -175.2205645,\n 64.1500236,\n 179.2166471],\n 'crs': 'http://www.opengis.net/def/crs/OGC/1.3/CRS84'},\n 'temporal': {'interval': [['null']]}},\n 'summaries': {'properties': [{'name': 'id'},\n {'name': 'created_at'},\n {'name': 'modified_at'},\n {'name': 'name'},\n {'name': 'sov0name'},\n {'name': 'latitude'},\n {'name': 'longitude'},\n {'name': 'pop_max'},\n {'name': 'pop_min'},\n {'name': 'meganame'},\n {'name': 'min_areakm'},\n {'name': 'max_areakm'},\n {'name': 'pop1950'},\n {'name': 'pop1960'},\n {'name': 'pop1970'},\n {'name': 'pop1980'},\n {'name': 'pop1990'},\n {'name': 'pop2000'},\n {'name': 'pop2010'},\n {'name': 'pop2020'},\n {'name': 'pop2050'},\n {'name': 'geometry'}]}}}" + "text/plain": "[{'id': 22,\n 'bbox': ['51.5330', '25.2866', '51.5330', '25.2866'],\n 'geometry': {'type': 'Point', 'coordinates': [51.5329679, 25.286556]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Doha',\n 'sov0name': 'Qatar',\n 'latitude': 25.286556,\n 'longitude': 51.532968,\n 'pop_max': 1450000,\n 'pop_min': 731310,\n 'meganame': None,\n 'min_areakm': 270,\n 'max_areakm': 270,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 26,\n 'bbox': ['35.7500', '-6.1833', '35.7500', '-6.1833'],\n 'geometry': {'type': 'Point', 'coordinates': [35.7500036, -6.1833061]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dodoma',\n 'sov0name': 'United Republic of Tanzania',\n 'latitude': -6.183306,\n 'longitude': 35.750004,\n 'pop_max': 218269,\n 'pop_min': 180541,\n 'meganame': None,\n 'min_areakm': 55,\n 'max_areakm': 55,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 31,\n 'bbox': ['43.1480', '11.5950', '43.1480', '11.5950'],\n 'geometry': {'type': 'Point', 'coordinates': [43.1480017, 11.5950145]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Djibouti',\n 'sov0name': 'Djibouti',\n 'latitude': 11.595015,\n 'longitude': 43.148002,\n 'pop_max': 923000,\n 'pop_min': 604013,\n 'meganame': None,\n 'min_areakm': 42,\n 'max_areakm': 42,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 44,\n 'bbox': ['50.5831', '26.2361', '50.5831', '26.2361'],\n 'geometry': {'type': 'Point', 'coordinates': [50.5830517, 26.2361363]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Manama',\n 'sov0name': 'Bahrain',\n 'latitude': 26.236136,\n 'longitude': 50.583052,\n 'pop_max': 563920,\n 'pop_min': 157474,\n 'meganame': None,\n 'min_areakm': 178,\n 'max_areakm': 178,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 49,\n 'bbox': ['54.3666', '24.4667', '54.3666', '24.4667'],\n 'geometry': {'type': 'Point', 'coordinates': [54.3665934, 24.4666836]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Abu Dhabi',\n 'sov0name': 'United Arab Emirates',\n 'latitude': 24.466684,\n 'longitude': 54.366593,\n 'pop_max': 603492,\n 'pop_min': 560230,\n 'meganame': None,\n 'min_areakm': 96,\n 'max_areakm': 96,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 50,\n 'bbox': ['58.3833', '37.9500', '58.3833', '37.9500'],\n 'geometry': {'type': 'Point', 'coordinates': [58.3832991, 37.9499949]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Ashgabat',\n 'sov0name': 'Turkmenistan',\n 'latitude': 37.949995,\n 'longitude': 58.383299,\n 'pop_max': 727700,\n 'pop_min': 577982,\n 'meganame': None,\n 'min_areakm': 108,\n 'max_areakm': 128,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 62,\n 'bbox': ['68.7739', '38.5600', '68.7739', '38.5600'],\n 'geometry': {'type': 'Point', 'coordinates': [68.7738794, 38.5600352]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dushanbe',\n 'sov0name': 'Tajikistan',\n 'latitude': 38.560035,\n 'longitude': 68.773879,\n 'pop_max': 1086244,\n 'pop_min': 679400,\n 'meganame': None,\n 'min_areakm': 415,\n 'max_areakm': 415,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 76,\n 'bbox': ['45.3647', '2.0686', '45.3647', '2.0686'],\n 'geometry': {'type': 'Point', 'coordinates': [45.3647318, 2.0686272]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Mogadishu',\n 'sov0name': 'Somalia',\n 'latitude': 2.068627,\n 'longitude': 45.364732,\n 'pop_max': 1100000,\n 'pop_min': 875388,\n 'meganame': 'Muqdisho',\n 'min_areakm': 99,\n 'max_areakm': 99,\n 'pop1950': 69,\n 'pop1960': 94,\n 'pop1970': 272,\n 'pop1980': 551,\n 'pop1990': 1035,\n 'pop2000': 1201,\n 'pop2010': 1100,\n 'pop2020': 1794,\n 'pop2050': 2529}},\n {'id': 77,\n 'bbox': ['58.5933', '23.6133', '58.5933', '23.6133'],\n 'geometry': {'type': 'Point', 'coordinates': [58.5933121, 23.6133248]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Muscat',\n 'sov0name': 'Oman',\n 'latitude': 23.613325,\n 'longitude': 58.593312,\n 'pop_max': 734697,\n 'pop_min': 586861,\n 'meganame': None,\n 'min_areakm': 104,\n 'max_areakm': 104,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 83,\n 'bbox': ['35.9314', '31.9520', '35.9314', '31.9520'],\n 'geometry': {'type': 'Point', 'coordinates': [35.9313541, 31.9519711]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Amman',\n 'sov0name': 'Jordan',\n 'latitude': 31.951971,\n 'longitude': 35.931354,\n 'pop_max': 1060000,\n 'pop_min': 1060000,\n 'meganame': 'Amman',\n 'min_areakm': 403,\n 'max_areakm': 545,\n 'pop1950': 90,\n 'pop1960': 218,\n 'pop1970': 388,\n 'pop1980': 636,\n 'pop1990': 851,\n 'pop2000': 1007,\n 'pop2010': 1060,\n 'pop2020': 1185,\n 'pop2050': 1359}},\n {'id': 95,\n 'bbox': ['38.9333', '15.3333', '38.9333', '15.3333'],\n 'geometry': {'type': 'Point', 'coordinates': [38.9333235, 15.3333393]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Asmara',\n 'sov0name': 'Eritrea',\n 'latitude': 15.333339,\n 'longitude': 38.933324,\n 'pop_max': 620802,\n 'pop_min': 563930,\n 'meganame': None,\n 'min_areakm': 90,\n 'max_areakm': 90,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 105,\n 'bbox': ['35.5078', '33.8739', '35.5078', '33.8739'],\n 'geometry': {'type': 'Point', 'coordinates': [35.5077624, 33.873921]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Beirut',\n 'sov0name': 'Lebanon',\n 'latitude': 33.873921,\n 'longitude': 35.507762,\n 'pop_max': 1846000,\n 'pop_min': 1712125,\n 'meganame': 'Bayrut',\n 'min_areakm': 429,\n 'max_areakm': 471,\n 'pop1950': 322,\n 'pop1960': 561,\n 'pop1970': 923,\n 'pop1980': 1623,\n 'pop1990': 1293,\n 'pop2000': 1487,\n 'pop2010': 1846,\n 'pop2020': 2051,\n 'pop2050': 2173}},\n {'id': 106,\n 'bbox': ['44.7888', '41.7270', '44.7888', '41.7270'],\n 'geometry': {'type': 'Point', 'coordinates': [44.7888496, 41.7269558]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tbilisi',\n 'sov0name': 'Georgia',\n 'latitude': 41.726956,\n 'longitude': 44.78885,\n 'pop_max': 1100000,\n 'pop_min': 1005257,\n 'meganame': 'Tbilisi',\n 'min_areakm': 131,\n 'max_areakm': 135,\n 'pop1950': 612,\n 'pop1960': 718,\n 'pop1970': 897,\n 'pop1980': 1090,\n 'pop1990': 1224,\n 'pop2000': 1100,\n 'pop2010': 1100,\n 'pop2020': 1113,\n 'pop2050': 1114}},\n {'id': 120,\n 'bbox': ['44.5116', '40.1831', '44.5116', '40.1831'],\n 'geometry': {'type': 'Point', 'coordinates': [44.5116055, 40.1830966]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Yerevan',\n 'sov0name': 'Armenia',\n 'latitude': 40.183097,\n 'longitude': 44.511606,\n 'pop_max': 1102000,\n 'pop_min': 1093485,\n 'meganame': 'Yerevan',\n 'min_areakm': 191,\n 'max_areakm': 191,\n 'pop1950': 341,\n 'pop1960': 538,\n 'pop1970': 778,\n 'pop1980': 1042,\n 'pop1990': 1175,\n 'pop2000': 1111,\n 'pop2010': 1102,\n 'pop2020': 1102,\n 'pop2050': 1102}},\n {'id': 121,\n 'bbox': ['49.8603', '40.3972', '49.8603', '40.3972'],\n 'geometry': {'type': 'Point', 'coordinates': [49.8602713, 40.3972179]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Baku',\n 'sov0name': 'Azerbaijan',\n 'latitude': 40.397218,\n 'longitude': 49.860271,\n 'pop_max': 2122300,\n 'pop_min': 1892000,\n 'meganame': 'Baku',\n 'min_areakm': 246,\n 'max_areakm': 249,\n 'pop1950': 897,\n 'pop1960': 1005,\n 'pop1970': 1274,\n 'pop1980': 1574,\n 'pop1990': 1733,\n 'pop2000': 1806,\n 'pop2010': 1892,\n 'pop2020': 2006,\n 'pop2050': 2187}},\n {'id': 134,\n 'bbox': ['44.0653', '9.5600', '44.0653', '9.5600'],\n 'geometry': {'type': 'Point', 'coordinates': [44.06531, 9.5600224]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Hargeysa',\n 'sov0name': 'Somaliland',\n 'latitude': 9.560022,\n 'longitude': 44.06531,\n 'pop_max': 477876,\n 'pop_min': 247018,\n 'meganame': None,\n 'min_areakm': 40,\n 'max_areakm': 40,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 135,\n 'bbox': ['55.4500', '-4.6166', '55.4500', '-4.6166'],\n 'geometry': {'type': 'Point', 'coordinates': [55.4499898, -4.6166317]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Victoria',\n 'sov0name': 'Seychelles',\n 'latitude': -4.616632,\n 'longitude': 55.44999,\n 'pop_max': 33576,\n 'pop_min': 22881,\n 'meganame': None,\n 'min_areakm': 15,\n 'max_areakm': 15,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 140,\n 'bbox': ['35.2066', '31.7784', '35.2066', '31.7784'],\n 'geometry': {'type': 'Point', 'coordinates': [35.2066259, 31.7784078]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Jerusalem',\n 'sov0name': 'Israel',\n 'latitude': 31.778408,\n 'longitude': 35.206626,\n 'pop_max': 1029300,\n 'pop_min': 801000,\n 'meganame': None,\n 'min_areakm': 246,\n 'max_areakm': 246,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 143,\n 'bbox': ['33.3666', '35.1667', '33.3666', '35.1667'],\n 'geometry': {'type': 'Point', 'coordinates': [33.3666349, 35.1666765]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Nicosia',\n 'sov0name': 'Cyprus',\n 'latitude': 35.166677,\n 'longitude': 33.366635,\n 'pop_max': 224300,\n 'pop_min': 200452,\n 'meganame': None,\n 'min_areakm': 128,\n 'max_areakm': 128,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 148,\n 'bbox': ['44.2046', '15.3567', '44.2046', '15.3567'],\n 'geometry': {'type': 'Point', 'coordinates': [44.2046475, 15.3566792]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Sanaa',\n 'sov0name': 'Yemen',\n 'latitude': 15.356679,\n 'longitude': 44.204648,\n 'pop_max': 2008000,\n 'pop_min': 1835853,\n 'meganame': \"Sana'a'\",\n 'min_areakm': 160,\n 'max_areakm': 160,\n 'pop1950': 46,\n 'pop1960': 72,\n 'pop1970': 111,\n 'pop1980': 238,\n 'pop1990': 653,\n 'pop2000': 1365,\n 'pop2010': 2008,\n 'pop2020': 2955,\n 'pop2050': 4382}},\n {'id': 150,\n 'bbox': ['36.2981', '33.5020', '36.2981', '33.5020'],\n 'geometry': {'type': 'Point', 'coordinates': [36.29805, 33.5019799]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Damascus',\n 'sov0name': 'Syria',\n 'latitude': 33.50198,\n 'longitude': 36.29805,\n 'pop_max': 2466000,\n 'pop_min': 2466000,\n 'meganame': 'Dimashq',\n 'min_areakm': 532,\n 'max_areakm': 705,\n 'pop1950': 367,\n 'pop1960': 579,\n 'pop1970': 914,\n 'pop1980': 1376,\n 'pop1990': 1691,\n 'pop2000': 2044,\n 'pop2010': 2466,\n 'pop2020': 2981,\n 'pop2050': 3605}},\n {'id': 156,\n 'bbox': ['39.2664', '-6.7981', '39.2664', '-6.7981'],\n 'geometry': {'type': 'Point', 'coordinates': [39.266396, -6.7980667]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dar es Salaam',\n 'sov0name': 'United Republic of Tanzania',\n 'latitude': -6.798067,\n 'longitude': 39.266396,\n 'pop_max': 2930000,\n 'pop_min': 2698652,\n 'meganame': 'Dar es Salaam',\n 'min_areakm': 211,\n 'max_areakm': 211,\n 'pop1950': 67,\n 'pop1960': 162,\n 'pop1970': 357,\n 'pop1980': 836,\n 'pop1990': 1316,\n 'pop2000': 2116,\n 'pop2010': 2930,\n 'pop2020': 4020,\n 'pop2050': 5688}},\n {'id': 162,\n 'bbox': ['47.9764', '29.3717', '47.9764', '29.3717'],\n 'geometry': {'type': 'Point', 'coordinates': [47.9763553, 29.3716635]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Kuwait City',\n 'sov0name': 'Kuwait',\n 'latitude': 29.371664,\n 'longitude': 47.976355,\n 'pop_max': 2063000,\n 'pop_min': 60064,\n 'meganame': 'Al Kuwayt (Kuwait City)',\n 'min_areakm': 264,\n 'max_areakm': 366,\n 'pop1950': 63,\n 'pop1960': 179,\n 'pop1970': 553,\n 'pop1980': 891,\n 'pop1990': 1392,\n 'pop2000': 1499,\n 'pop2010': 2063,\n 'pop2020': 2592,\n 'pop2050': 2956}},\n {'id': 166,\n 'bbox': ['34.7681', '32.0819', '34.7681', '32.0819'],\n 'geometry': {'type': 'Point', 'coordinates': [34.7680659, 32.0819373]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tel Aviv-Yafo',\n 'sov0name': 'Israel',\n 'latitude': 32.081937,\n 'longitude': 34.768066,\n 'pop_max': 3112000,\n 'pop_min': 378358,\n 'meganame': 'Tel Aviv-Yafo',\n 'min_areakm': 436,\n 'max_areakm': 436,\n 'pop1950': 418,\n 'pop1960': 738,\n 'pop1970': 1029,\n 'pop1980': 1416,\n 'pop1990': 2026,\n 'pop2000': 2752,\n 'pop2010': 3112,\n 'pop2020': 3453,\n 'pop2050': 3726}},\n {'id': 184,\n 'bbox': ['55.2780', '25.2319', '55.2780', '25.2319'],\n 'geometry': {'type': 'Point', 'coordinates': [55.2780285, 25.231942]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dubai',\n 'sov0name': 'United Arab Emirates',\n 'latitude': 25.231942,\n 'longitude': 55.278029,\n 'pop_max': 1379000,\n 'pop_min': 1137347,\n 'meganame': 'Dubayy',\n 'min_areakm': 187,\n 'max_areakm': 407,\n 'pop1950': 20,\n 'pop1960': 40,\n 'pop1970': 80,\n 'pop1980': 254,\n 'pop1990': 473,\n 'pop2000': 938,\n 'pop2010': 1379,\n 'pop2020': 1709,\n 'pop2050': 2077}},\n {'id': 185,\n 'bbox': ['69.2930', '41.3136', '69.2930', '41.3136'],\n 'geometry': {'type': 'Point', 'coordinates': [69.292987, 41.3136477]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tashkent',\n 'sov0name': 'Uzbekistan',\n 'latitude': 41.313648,\n 'longitude': 69.292987,\n 'pop_max': 2184000,\n 'pop_min': 1978028,\n 'meganame': 'Tashkent',\n 'min_areakm': 639,\n 'max_areakm': 643,\n 'pop1950': 755,\n 'pop1960': 964,\n 'pop1970': 1403,\n 'pop1980': 1818,\n 'pop1990': 2100,\n 'pop2000': 2135,\n 'pop2010': 2184,\n 'pop2020': 2416,\n 'pop2050': 2892}},\n {'id': 206,\n 'bbox': ['44.3919', '33.3406', '44.3919', '33.3406'],\n 'geometry': {'type': 'Point', 'coordinates': [44.3919229, 33.3405944]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Baghdad',\n 'sov0name': 'Iraq',\n 'latitude': 33.340594,\n 'longitude': 44.391923,\n 'pop_max': 5054000,\n 'pop_min': 5054000,\n 'meganame': 'Baghdad',\n 'min_areakm': 587,\n 'max_areakm': 587,\n 'pop1950': 579,\n 'pop1960': 1019,\n 'pop1970': 2070,\n 'pop1980': 3145,\n 'pop1990': 4092,\n 'pop2000': 5200,\n 'pop2010': 5054,\n 'pop2020': 6618,\n 'pop2050': 8060}},\n {'id': 207,\n 'bbox': ['38.6981', '9.0353', '38.6981', '9.0353'],\n 'geometry': {'type': 'Point', 'coordinates': [38.6980586, 9.0352562]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Addis Ababa',\n 'sov0name': 'Ethiopia',\n 'latitude': 9.035256,\n 'longitude': 38.698059,\n 'pop_max': 3100000,\n 'pop_min': 2757729,\n 'meganame': 'Addis Ababa',\n 'min_areakm': 462,\n 'max_areakm': 1182,\n 'pop1950': 392,\n 'pop1960': 519,\n 'pop1970': 729,\n 'pop1980': 1175,\n 'pop1990': 1791,\n 'pop2000': 2493,\n 'pop2010': 3100,\n 'pop2020': 4184,\n 'pop2050': 6156}},\n {'id': 208,\n 'bbox': ['51.4224', '35.6739', '51.4224', '35.6739'],\n 'geometry': {'type': 'Point', 'coordinates': [51.4223982, 35.6738886]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tehran',\n 'sov0name': 'Iran',\n 'latitude': 35.673889,\n 'longitude': 51.422398,\n 'pop_max': 7873000,\n 'pop_min': 7153309,\n 'meganame': 'Tehran',\n 'min_areakm': 496,\n 'max_areakm': 496,\n 'pop1950': 1041,\n 'pop1960': 1873,\n 'pop1970': 3290,\n 'pop1980': 5079,\n 'pop1990': 6365,\n 'pop2000': 7128,\n 'pop2010': 7873,\n 'pop2020': 8832,\n 'pop2050': 9814}},\n {'id': 212,\n 'bbox': ['69.1813', '34.5186', '69.1813', '34.5186'],\n 'geometry': {'type': 'Point', 'coordinates': [69.1813142, 34.5186361]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Kabul',\n 'sov0name': 'Afghanistan',\n 'latitude': 34.518636,\n 'longitude': 69.181314,\n 'pop_max': 3277000,\n 'pop_min': 3043532,\n 'meganame': 'Kabul',\n 'min_areakm': 594,\n 'max_areakm': 1471,\n 'pop1950': 129,\n 'pop1960': 263,\n 'pop1970': 472,\n 'pop1980': 978,\n 'pop1990': 1306,\n 'pop2000': 1963,\n 'pop2010': 3277,\n 'pop2020': 4730,\n 'pop2050': 7175}},\n {'id': 222,\n 'bbox': ['46.7708', '24.6428', '46.7708', '24.6428'],\n 'geometry': {'type': 'Point', 'coordinates': [46.7707958, 24.642779]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Riyadh',\n 'sov0name': 'Saudi Arabia',\n 'latitude': 24.642779,\n 'longitude': 46.770796,\n 'pop_max': 4465000,\n 'pop_min': 4205961,\n 'meganame': 'Ar-Riyadh',\n 'min_areakm': 854,\n 'max_areakm': 854,\n 'pop1950': 111,\n 'pop1960': 156,\n 'pop1970': 408,\n 'pop1980': 1055,\n 'pop1990': 2325,\n 'pop2000': 3567,\n 'pop2010': 4465,\n 'pop2020': 5405,\n 'pop2050': 6275}},\n {'id': 229,\n 'bbox': ['36.8147', '-1.2814', '36.8147', '-1.2814'],\n 'geometry': {'type': 'Point', 'coordinates': [36.814711, -1.2814009]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Nairobi',\n 'sov0name': 'Kenya',\n 'latitude': -1.281401,\n 'longitude': 36.814711,\n 'pop_max': 3010000,\n 'pop_min': 2750547,\n 'meganame': 'Nairobi',\n 'min_areakm': 698,\n 'max_areakm': 719,\n 'pop1950': 137,\n 'pop1960': 293,\n 'pop1970': 531,\n 'pop1980': 862,\n 'pop1990': 1380,\n 'pop2000': 2233,\n 'pop2010': 3010,\n 'pop2020': 4052,\n 'pop2050': 5871}}]" }, - "execution_count": 22, + "execution_count": 39, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "features" + "vector_cube" ], "metadata": { "collapsed": false, @@ -959,18 +1083,6 @@ "name": "#%%\n" } } - }, - { - "cell_type": "code", - "execution_count": null, - "outputs": [], - "source": [], - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - } } ], "metadata": { diff --git a/tests/server/app/test_processing.py b/tests/server/app/test_processing.py index 86db5e4..4965f52 100644 --- a/tests/server/app/test_processing.py +++ b/tests/server/app/test_processing.py @@ -147,14 +147,13 @@ def test_result(self): }) self.assertEqual(200, response.status) - items_data = json.loads(response.data) - self.assertEqual(dict, type(items_data)) - self.assertIsNotNone(items_data) - self.assertIsNotNone(items_data['features']) - self.assertEqual(2, len(items_data['features'])) + vector_cube = json.loads(response.data) + self.assertEqual(list, type(vector_cube)) + self.assertIsNotNone(vector_cube) + self.assertEqual(2, len(vector_cube)) - test_utils.assert_hamburg(self, items_data['features'][0]) - test_utils.assert_paderborn(self, items_data['features'][1]) + test_utils.assert_hamburg_data(self, vector_cube[0]) + test_utils.assert_paderborn_data(self, vector_cube[1]) def test_result_bbox(self): body = json.dumps({"process": { @@ -175,13 +174,12 @@ def test_result_bbox(self): }) self.assertEqual(200, response.status) - items_data = json.loads(response.data) - self.assertEqual(dict, type(items_data)) - self.assertIsNotNone(items_data) - self.assertIsNotNone(items_data['features']) - self.assertEqual(1, len(items_data['features'])) + vector_cube = json.loads(response.data) + self.assertEqual(list, type(vector_cube)) + self.assertIsNotNone(vector_cube) + self.assertEqual(1, len(vector_cube)) - test_utils.assert_hamburg(self, items_data['features'][0]) + test_utils.assert_hamburg(self, vector_cube[0]) def test_result_bbox_default_crs(self): body = json.dumps({"process": { @@ -201,13 +199,11 @@ def test_result_bbox_default_crs(self): }) self.assertEqual(200, response.status) - items_data = json.loads(response.data) - self.assertEqual(dict, type(items_data)) - self.assertIsNotNone(items_data) - self.assertIsNotNone(items_data['features']) - self.assertEqual(1, len(items_data['features'])) - - test_utils.assert_hamburg(self, items_data['features'][0]) + vector_cube = json.loads(response.data) + self.assertEqual(list, type(vector_cube)) + self.assertIsNotNone(vector_cube) + self.assertEqual(1, len(vector_cube)) + test_utils.assert_hamburg(self, vector_cube[0]) def test_result_missing_parameters(self): body = json.dumps({'process': { diff --git a/tests/server/app/test_utils.py b/tests/server/app/test_utils.py index 1cd3ac6..fa7fc7b 100644 --- a/tests/server/app/test_utils.py +++ b/tests/server/app/test_utils.py @@ -1,29 +1,37 @@ -def assert_paderborn(cls, item_data): - cls.assertIsNotNone(item_data) - cls.assertEqual('0.9.0', item_data['stac_version']) - cls.assertEqual(['xcube-geodb'], item_data['stac_extensions']) - cls.assertEqual('Feature', item_data['type']) - cls.assertEqual('1', item_data['id']) +def assert_paderborn(cls, vector_cube): + cls.assertIsNotNone(vector_cube) + cls.assertEqual('0.9.0', vector_cube['stac_version']) + cls.assertEqual(['xcube-geodb'], vector_cube['stac_extensions']) + cls.assertEqual('Feature', vector_cube['type']) + cls.assertEqual('1', vector_cube['id']) + assert_paderborn_data(cls, vector_cube) + + +def assert_paderborn_data(cls, vector_cube): cls.assertEqual(['8.7000', '51.3000', '8.8000', '51.8000'], - item_data['bbox']) + vector_cube['bbox']) cls.assertEqual({'type': 'Polygon', 'coordinates': [[[8.7, 51.3], [8.7, 51.8], [8.8, 51.8], [8.8, 51.3], [8.7, 51.3] ]]}, - item_data['geometry']) + vector_cube['geometry']) cls.assertEqual({'name': 'paderborn', 'population': 150000}, - item_data['properties']) + vector_cube['properties']) + + +def assert_hamburg(cls, vector_cube): + cls.assertEqual('0.9.0', vector_cube['stac_version']) + cls.assertEqual(['xcube-geodb'], vector_cube['stac_extensions']) + cls.assertEqual('Feature', vector_cube['type']) + cls.assertEqual('0', vector_cube['id']) + assert_hamburg_data(cls, vector_cube) -def assert_hamburg(cls, item_data): - cls.assertEqual('0.9.0', item_data['stac_version']) - cls.assertEqual(['xcube-geodb'], item_data['stac_extensions']) - cls.assertEqual('Feature', item_data['type']) - cls.assertEqual('0', item_data['id']) +def assert_hamburg_data(cls, vector_cube): cls.assertEqual(['9.0000', '52.0000', '11.0000', '54.0000'], - item_data['bbox']) + vector_cube['bbox']) cls.assertEqual({'type': 'Polygon', 'coordinates': [[[9, 52], [9, 54], [11, 54], @@ -32,6 +40,6 @@ def assert_hamburg(cls, item_data): [9.8, 53.4], [9.2, 52.1], [9, 52]]]}, - item_data['geometry']) + vector_cube['geometry']) cls.assertEqual({'name': 'hamburg', 'population': 1700000}, - item_data['properties']) \ No newline at end of file + vector_cube['properties']) diff --git a/xcube_geodb_openeo/backend/processes.py b/xcube_geodb_openeo/backend/processes.py index f3ef8ee..e016d02 100644 --- a/xcube_geodb_openeo/backend/processes.py +++ b/xcube_geodb_openeo/backend/processes.py @@ -161,7 +161,17 @@ def execute(self, query_params: dict, ctx: ServerContextT) -> str: with_items=True, bbox=bbox_transformed ) - return json.dumps(vector_cube) + result = [] + features = vector_cube['features'] + for feature in features: + result.append({ + 'id': feature['id'], + 'bbox': feature['bbox'], + 'geometry': feature['geometry'], + 'properties': feature['properties'] + }) + + return json.dumps(result) def translate_parameters(self, query_params: dict) -> dict: bbox_qp = query_params['spatial_extent']['bbox'] \ From 614d85ff82c5fe02ae85cf991098564384609e71 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 27 Jun 2022 23:35:33 +0200 Subject: [PATCH 053/163] fixed tests --- tests/server/app/test_processing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/server/app/test_processing.py b/tests/server/app/test_processing.py index 4965f52..776e0a6 100644 --- a/tests/server/app/test_processing.py +++ b/tests/server/app/test_processing.py @@ -179,7 +179,7 @@ def test_result_bbox(self): self.assertIsNotNone(vector_cube) self.assertEqual(1, len(vector_cube)) - test_utils.assert_hamburg(self, vector_cube[0]) + test_utils.assert_hamburg_data(self, vector_cube[0]) def test_result_bbox_default_crs(self): body = json.dumps({"process": { @@ -203,7 +203,7 @@ def test_result_bbox_default_crs(self): self.assertEqual(list, type(vector_cube)) self.assertIsNotNone(vector_cube) self.assertEqual(1, len(vector_cube)) - test_utils.assert_hamburg(self, vector_cube[0]) + test_utils.assert_hamburg_data(self, vector_cube[0]) def test_result_missing_parameters(self): body = json.dumps({'process': { From e1b68b84dd2a7a0d7c9d97625d22c19e42fdfbb4 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 1 Jul 2022 12:46:50 +0200 Subject: [PATCH 054/163] starting to develop Dockerfile --- docker/Dockerfile | 22 ++++++++++++++++++++++ docker/README.md | 23 +++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 docker/Dockerfile create mode 100644 docker/README.md diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..9ab47d0 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,22 @@ +FROM continuumio/miniconda3:4.12.0 + +LABEL maintainer="xcube-team@brockmann-consult.de" +LABEL name=xcube_geodb_openeo + +ARG GEODB_OPENEO_VERSION=0.0.1.dev0 + +RUN conda install -n base -c conda-forge mamba pip + +WORKDIR /tmp +ADD environment.yml /tmp/environment.yml +RUN mamba env update -n base +RUN mamba install -n base -y -c conda-forge +RUN source activate base + +RUN echo "postgrest_url=${postgrest_url}" >> config.yml +RUN echo "postgrest_port=${postgrest_port}" >> config.yml +RUN echo "client_id=${client_id}" >> config.yml +RUN echo "client_secret=${client_secret}" >> config.yml +RUN echo "auth_domain=${auth_domain}" >> config.yml + +RUN xcube.cli.main --loglevel=DETAIL --traceback serve2 -vvv -c config.yml \ No newline at end of file diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 0000000..efac494 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,23 @@ +# Docker builds for the xcube-geoDB-openEO Backend + +The backend image is automatically built on push to master, and on release. +The image is built and uploaded to _quay.io_ during the default GitHub workflow +in the step `build-docker-image`. + +It can be run locally using docker like so: + +```bash +docker run -p 8080:8080 -env-file env.list quay.io/bcdev/xcube-geoserv +``` + +where `env.list` contains the following values: +``` +postgrest_url: +postgrest_port: +client_id: +client_secret: +auth_domain: +``` + +This starts the geoDB-openEO server instance accessible through port 8080, e.g. +at `localhost:8080/processes` \ No newline at end of file From c19e3d9b96209ccd4a0d9799e524be6a14892aed Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 1 Jul 2022 15:49:22 +0200 Subject: [PATCH 055/163] finished Dockerfile for geoDB-openEO --- docker/Dockerfile | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 9ab47d0..19f3ed6 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -9,14 +9,17 @@ RUN conda install -n base -c conda-forge mamba pip WORKDIR /tmp ADD environment.yml /tmp/environment.yml +ADD . /tmp/ RUN mamba env update -n base -RUN mamba install -n base -y -c conda-forge -RUN source activate base +RUN . activate base -RUN echo "postgrest_url=${postgrest_url}" >> config.yml -RUN echo "postgrest_port=${postgrest_port}" >> config.yml -RUN echo "client_id=${client_id}" >> config.yml -RUN echo "client_secret=${client_secret}" >> config.yml -RUN echo "auth_domain=${auth_domain}" >> config.yml +RUN git clone https://github.com/dcs4cop/xcube.git +WORKDIR /tmp/xcube +RUN git checkout forman-676-server_redesign +RUN mamba env update -n base +RUN pip install -e . + +WORKDIR /tmp +RUN pip install -e . -RUN xcube.cli.main --loglevel=DETAIL --traceback serve2 -vvv -c config.yml \ No newline at end of file +CMD ["python", "-m", "xcube.cli.main", "--loglevel=DETAIL", "--traceback", "serve2", "-vvv", "-c", "config/config.yml"] \ No newline at end of file From fb71f47bea031723ac377d2bff55d26e64077c13 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 1 Jul 2022 21:51:33 +0200 Subject: [PATCH 056/163] developing GH actions --- .github/workflows/workflow.yaml | 119 ++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 0a74f2b..d96eaf2 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -63,3 +63,122 @@ jobs: with: fail_ci_if_error: true verbose: false + + build-docker-image: + runs-on: ubuntu-latest + needs: [unittest] + name: build-docker-image + steps: + # Checkout xcube-geodb-openeo (this project) + - name: git-checkout + uses: actions/checkout@v2 + # Get the base release tag used in docker images + - name: get-release-tag + id: release + run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} + # The docker image always needs the version as in version.py + - name: get-xcube-geodb-openeo-version + id: real-version + run: | + VERSION=$(echo "`cat xcube_geodb_openeo/version.py | grep version | cut -d "'" -f2`") + echo ::set-output name=version::${VERSION} + # Determine the deployment phase (dev/stage/prod) will be 'ignore' if a dev branch is processed + - name: deployment-phase + id: deployment-phase + uses: bc-org/gha-determine-phase@v0.1 + with: + event_name: ${{ github.event_name }} + tag: ${{ steps.release.outputs.tag }} + - name: info + id: info + run: | + echo "TAG: ${{ steps.release.outputs.tag }}" + echo "DEPLOYMENT_PHASE: ${{ steps.deployment-phase.outputs.phase }}" + echo "REAL_VERSION: ${{ steps.real-version.outputs.version }}" + echo "EVENT: ${{ github.event_name }}" + # Build docker image + - uses: mr-smithers-excellent/docker-build-push@v5.5 + name: build-and-push-docker-image + if: ${{ steps.deployment-phase.outputs.phase != 'ignore' }} + with: + image: ${{ env.ORG_NAME }}/${{ env.APP_NAME }}-server + directory: xcube_geodb_openeo + dockerfile: docker/Dockerfile + addLatest: true + registry: quay.io + buildArgs: GEODB_OPENEO_VERSION=${{ steps.real-version.outputs.tag }} + username: ${{ secrets.QUAY_REG_USERNAME }} + password: ${{ secrets.QUAY_REG_PASSWORD }} + #update-version-deployment: + # env: + # PUSH: 1 + # runs-on: ubuntu-latest + # needs: build-docker-image + # name: update-tag + # steps: + # - name: git-checkout + # uses: actions/checkout@v2 + # # Clone k8s-config into path 'k8s' + # - uses: actions/checkout@v2 + # with: + # repository: bc-org/k8s-configs + # token: ${{ secrets.API_TOKEN_GITHUB }} + # path: k8s + # # Get the release tag (or main on push) + # - name: get-release-tag + # id: release + # run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} + # # Determine the deployment phase + # - name: deployment-phase + # id: deployment-phase + # uses: bc-org/gha-determine-phase@v0.1 + # with: + # event_name: ${{ github.event_name }} + # tag: ${{ steps.release.outputs.tag }} + # - name: get-hash + # id: get-hash + # run: | + # HASH=$(skopeo inspect docker://quay.io/bcdev/${{ env.APP_NAME }}-lab:${{ steps.release.outputs.tag }} | jq '.Digest') + # if [[ "$HASH" == *"sha256"* ]]; then + # echo ::set-output name=hash::$HASH + # else + # echo "No has present. Using none as hash. This will use the version tag instead for deployment." + # echo ::set-output name=hash::none + # fi + # - name: info + # run: | + # echo "Event: ${{ github.event_name }}" + # echo "Deployment Stage: ${{ steps.deployment-phase.outputs.phase }}" +# + # echo "Release Tag: ${{ steps.release.outputs.tag }}" + # echo "Deployment Release Tag: ${{ steps.deployment-phase.outputs.tag }}" + # echo "Deployment Digest: ${{ steps.get-hash.outputs.hash }}" + # - name: set-version-tag + # uses: bc-org/update-application-version-tags@main + # with: + # app: ${{ env.APP_NAME }} + # phase: ${{ steps.deployment-phase.outputs.phase }} + # delimiter: ' ' + # tag: ${{ steps.deployment-phase.outputs.tag }} + # hash: ${{ steps.get-hash.outputs.hash }} + # working-directory: "./k8s/${{ env.APP_NAME }}-jh/helm" + # - name: cat-result + # working-directory: "./k8s/${{ env.APP_NAME }}-jh/helm" + # run: | + # head values-dev.yaml + # head values-stage.yaml + # # No production deployment at the moment + # # head values-prod.yaml + # - name: Pushes to another repository + # # Don't run if run locally and should be ignored + # if: ${{ steps.deployment-phase.outputs.phase != 'ignore' && !env.ACT }} + # uses: cpina/github-action-push-to-another-repository@main + # env: + # API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} + # with: + # source-directory: 'k8s' + # destination-github-username: 'bc-org' + # destination-repository-name: 'k8s-configs' + # user-email: bcdev@brockmann-consult.de + # target-branch: main + # commit-message: ${{ github.event.release }}. Set version to ${{ steps.release.outputs.tag }} From b0bb4ea9d0aa9ad4e7684881c4bbcea1a6db84de Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 1 Jul 2022 22:18:59 +0200 Subject: [PATCH 057/163] developing GH actions --- .github/workflows/workflow.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index d96eaf2..a25c5fd 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -13,6 +13,9 @@ env: SKIP_UNITTESTS: "0" WAIT_FOR_STARTUP: "1" + # If set to 1, docker build is performed + FORCE_DOCKER_BUILD: "1" + jobs: unittest: @@ -99,7 +102,7 @@ jobs: # Build docker image - uses: mr-smithers-excellent/docker-build-push@v5.5 name: build-and-push-docker-image - if: ${{ steps.deployment-phase.outputs.phase != 'ignore' }} + if: ${{ steps.deployment-phase.outputs.phase != 'ignore' || env.FORCE_DOCKER_BUILD == '1'}} with: image: ${{ env.ORG_NAME }}/${{ env.APP_NAME }}-server directory: xcube_geodb_openeo From 7349c1119e50610545190f0e4e0e92198acbc098 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 1 Jul 2022 22:29:54 +0200 Subject: [PATCH 058/163] debugging GH actions --- .github/workflows/workflow.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index a25c5fd..4f9c448 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -10,7 +10,7 @@ env: APP_NAME: xcube-geodb-openeo ORG_NAME: bcdev - SKIP_UNITTESTS: "0" + SKIP_UNITTESTS: "1" WAIT_FOR_STARTUP: "1" # If set to 1, docker build is performed @@ -69,7 +69,7 @@ jobs: build-docker-image: runs-on: ubuntu-latest - needs: [unittest] +# needs: [unittest] name: build-docker-image steps: # Checkout xcube-geodb-openeo (this project) @@ -99,6 +99,8 @@ jobs: echo "DEPLOYMENT_PHASE: ${{ steps.deployment-phase.outputs.phase }}" echo "REAL_VERSION: ${{ steps.real-version.outputs.version }}" echo "EVENT: ${{ github.event_name }}" + pwd + ls # Build docker image - uses: mr-smithers-excellent/docker-build-push@v5.5 name: build-and-push-docker-image From 8fd201196a92555f4f681e872570fd94b6f26dbc Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 1 Jul 2022 22:31:37 +0200 Subject: [PATCH 059/163] gh actions --- .github/workflows/workflow.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 4f9c448..ce197dc 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -49,12 +49,14 @@ jobs: conda config --show printenv | sort - name: setup-xcube + if: ${{ env.SKIP_UNITTESTS == '0' }} run: | cd xcube conda env update -n xcube-geodb-openeo -f environment.yml pip install -e . cd .. - name: setup-xcube-geodb-openeo + if: ${{ env.SKIP_UNITTESTS == '0' }} run: | pip install -e . - name: unittest-xcube-geodb-openeo From 5d768144ff3701bc8cd3bf2138952bd8684d7728 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 1 Jul 2022 22:36:39 +0200 Subject: [PATCH 060/163] gh actions --- .github/workflows/workflow.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index ce197dc..8bd95fc 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -101,8 +101,6 @@ jobs: echo "DEPLOYMENT_PHASE: ${{ steps.deployment-phase.outputs.phase }}" echo "REAL_VERSION: ${{ steps.real-version.outputs.version }}" echo "EVENT: ${{ github.event_name }}" - pwd - ls # Build docker image - uses: mr-smithers-excellent/docker-build-push@v5.5 name: build-and-push-docker-image @@ -113,7 +111,7 @@ jobs: dockerfile: docker/Dockerfile addLatest: true registry: quay.io - buildArgs: GEODB_OPENEO_VERSION=${{ steps.real-version.outputs.tag }} + buildArgs: GEODB_OPENEO_VERSION=${{ steps.real-version.outputs.version }} username: ${{ secrets.QUAY_REG_USERNAME }} password: ${{ secrets.QUAY_REG_PASSWORD }} #update-version-deployment: From a8a4989f42567b27f1aa1661c49ec0d6351954b7 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 1 Jul 2022 22:43:00 +0200 Subject: [PATCH 061/163] gh actions --- .github/workflows/workflow.yaml | 2 +- docker/Dockerfile | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 8bd95fc..d9e1c2a 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -107,7 +107,7 @@ jobs: if: ${{ steps.deployment-phase.outputs.phase != 'ignore' || env.FORCE_DOCKER_BUILD == '1'}} with: image: ${{ env.ORG_NAME }}/${{ env.APP_NAME }}-server - directory: xcube_geodb_openeo + directory: . dockerfile: docker/Dockerfile addLatest: true registry: quay.io diff --git a/docker/Dockerfile b/docker/Dockerfile index 19f3ed6..0ba6d5f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -7,9 +7,9 @@ ARG GEODB_OPENEO_VERSION=0.0.1.dev0 RUN conda install -n base -c conda-forge mamba pip -WORKDIR /tmp -ADD environment.yml /tmp/environment.yml +#ADD environment.yml /tmp/environment.yml ADD . /tmp/ +WORKDIR /tmp RUN mamba env update -n base RUN . activate base @@ -19,7 +19,7 @@ RUN git checkout forman-676-server_redesign RUN mamba env update -n base RUN pip install -e . -WORKDIR /tmp +WORKDIR /tmp/xcube_geodb_openeo RUN pip install -e . CMD ["python", "-m", "xcube.cli.main", "--loglevel=DETAIL", "--traceback", "serve2", "-vvv", "-c", "config/config.yml"] \ No newline at end of file From 5b82172616a640b560e30e080bae84b19c0b646c Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 1 Jul 2022 22:52:15 +0200 Subject: [PATCH 062/163] gh actions --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 0ba6d5f..31189fe 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -19,7 +19,7 @@ RUN git checkout forman-676-server_redesign RUN mamba env update -n base RUN pip install -e . -WORKDIR /tmp/xcube_geodb_openeo +WORKDIR /tmp/ RUN pip install -e . CMD ["python", "-m", "xcube.cli.main", "--loglevel=DETAIL", "--traceback", "serve2", "-vvv", "-c", "config/config.yml"] \ No newline at end of file From f25dce97f17640d00cce81f9bc7a3b46afe4e984 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 12 Jul 2022 23:36:53 +0200 Subject: [PATCH 063/163] allowing to set creds by environment --- .github/workflows/workflow.yaml | 2 +- xcube_geodb_openeo/core/geodb_datastore.py | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index d9e1c2a..d3c3ff5 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -10,7 +10,7 @@ env: APP_NAME: xcube-geodb-openeo ORG_NAME: bcdev - SKIP_UNITTESTS: "1" + SKIP_UNITTESTS: "0" WAIT_FOR_STARTUP: "1" # If set to 1, docker build is performed diff --git a/xcube_geodb_openeo/core/geodb_datastore.py b/xcube_geodb_openeo/core/geodb_datastore.py index 78b1ccb..7742889 100644 --- a/xcube_geodb_openeo/core/geodb_datastore.py +++ b/xcube_geodb_openeo/core/geodb_datastore.py @@ -19,8 +19,8 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. -import json -import numpy as np +import os + from functools import cached_property from typing import Tuple from typing import Optional @@ -44,8 +44,12 @@ def geodb(self): server_url = self.config['geodb_openeo']['postgrest_url'] server_port = self.config['geodb_openeo']['postgrest_port'] - client_id = self.config['geodb_openeo']['client_id'] - client_secret = self.config['geodb_openeo']['client_secret'] + client_id = self.config['geodb_openeo']['client_id'] \ + if 'client_id' in self.config['geodb_openeo'] \ + else os.getenv('XC_GEODB_OPENEO_CLIENT_ID') + client_secret = self.config['geodb_openeo']['client_secret'] \ + if 'client_secret' in self.config['geodb_openeo'] \ + else os.getenv('XC_GEODB_OPENEO_CLIENT_SECRET') auth_domain = self.config['geodb_openeo']['auth_domain'] return GeoDBClient( From 10d650603840237ff1ff70cff35e60268daa6c67 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 13 Jul 2022 00:23:27 +0200 Subject: [PATCH 064/163] moving 'if' a level up --- .github/workflows/workflow.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index d3c3ff5..cf46fbc 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -73,6 +73,7 @@ jobs: runs-on: ubuntu-latest # needs: [unittest] name: build-docker-image + if: ${{ steps.deployment-phase.outputs.phase != 'ignore' || env.FORCE_DOCKER_BUILD == '1'}} steps: # Checkout xcube-geodb-openeo (this project) - name: git-checkout @@ -104,7 +105,6 @@ jobs: # Build docker image - uses: mr-smithers-excellent/docker-build-push@v5.5 name: build-and-push-docker-image - if: ${{ steps.deployment-phase.outputs.phase != 'ignore' || env.FORCE_DOCKER_BUILD == '1'}} with: image: ${{ env.ORG_NAME }}/${{ env.APP_NAME }}-server directory: . From 9e8000bc510161a577ea95259fc1e2ae398d9474 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 13 Jul 2022 00:25:17 +0200 Subject: [PATCH 065/163] moving 'if' a level down --- .github/workflows/workflow.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index cf46fbc..f9424c8 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -73,18 +73,20 @@ jobs: runs-on: ubuntu-latest # needs: [unittest] name: build-docker-image - if: ${{ steps.deployment-phase.outputs.phase != 'ignore' || env.FORCE_DOCKER_BUILD == '1'}} steps: # Checkout xcube-geodb-openeo (this project) - name: git-checkout uses: actions/checkout@v2 + if: ${{ steps.deployment-phase.outputs.phase != 'ignore' || env.FORCE_DOCKER_BUILD == '1'}} # Get the base release tag used in docker images - name: get-release-tag id: release run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} + if: ${{ steps.deployment-phase.outputs.phase != 'ignore' || env.FORCE_DOCKER_BUILD == '1'}} # The docker image always needs the version as in version.py - name: get-xcube-geodb-openeo-version id: real-version + if: ${{ steps.deployment-phase.outputs.phase != 'ignore' || env.FORCE_DOCKER_BUILD == '1'}} run: | VERSION=$(echo "`cat xcube_geodb_openeo/version.py | grep version | cut -d "'" -f2`") echo ::set-output name=version::${VERSION} @@ -92,6 +94,7 @@ jobs: - name: deployment-phase id: deployment-phase uses: bc-org/gha-determine-phase@v0.1 + if: ${{ steps.deployment-phase.outputs.phase != 'ignore' || env.FORCE_DOCKER_BUILD == '1'}} with: event_name: ${{ github.event_name }} tag: ${{ steps.release.outputs.tag }} @@ -104,6 +107,7 @@ jobs: echo "EVENT: ${{ github.event_name }}" # Build docker image - uses: mr-smithers-excellent/docker-build-push@v5.5 + if: ${{ steps.deployment-phase.outputs.phase != 'ignore' || env.FORCE_DOCKER_BUILD == '1'}} name: build-and-push-docker-image with: image: ${{ env.ORG_NAME }}/${{ env.APP_NAME }}-server From 7422bbf8f9a36496e39503bb97953c7f8646f298 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 13 Jul 2022 00:38:13 +0200 Subject: [PATCH 066/163] adapted Dockerfile to config map --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 31189fe..3fbbc45 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -22,4 +22,4 @@ RUN pip install -e . WORKDIR /tmp/ RUN pip install -e . -CMD ["python", "-m", "xcube.cli.main", "--loglevel=DETAIL", "--traceback", "serve2", "-vvv", "-c", "config/config.yml"] \ No newline at end of file +CMD ["python", "-m", "xcube.cli.main", "--loglevel=DETAIL", "--traceback", "serve2", "-vvv", "-c", "/etc/config/config.yml"] \ No newline at end of file From 36940531de9b83a1c015211ea55d0809385f0393 Mon Sep 17 00:00:00 2001 From: thomas Date: Thu, 14 Jul 2022 12:17:15 +0200 Subject: [PATCH 067/163] made JN run with public base url --- notebooks/geoDB-openEO_use_case_1.ipynb | 395 +++++++++++++++++------- 1 file changed, 283 insertions(+), 112 deletions(-) diff --git a/notebooks/geoDB-openEO_use_case_1.ipynb b/notebooks/geoDB-openEO_use_case_1.ipynb index 03d58c1..0e483b8 100644 --- a/notebooks/geoDB-openEO_use_case_1.ipynb +++ b/notebooks/geoDB-openEO_use_case_1.ipynb @@ -2,14 +2,14 @@ "cells": [ { "cell_type": "code", - "execution_count": 40, + "execution_count": 11, "outputs": [], "source": [ "import urllib3\n", "import json\n", "\n", - "http = urllib3.PoolManager()\n", - "base_url = 'http://localhost:8080'" + "http = urllib3.PoolManager(cert_reqs='CERT_NONE')\n", + "base_url = 'https://geodb.openeo.dev.brockmann-consult.de'" ], "metadata": { "collapsed": false, @@ -20,10 +20,11 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 12, "outputs": [], "source": [ "def print_endpoint(url):\n", + " print(url)\n", " r = http.request('GET', url)\n", " data = json.loads(r.data)\n", " print(f\"Status: {r.status}\")\n", @@ -38,8 +39,80 @@ }, { "cell_type": "code", - "execution_count": null, - "outputs": [], + "execution_count": 13, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "https://geodb.openeo.dev.brockmann-consult.de/\n", + "Status: 200\n", + "Result: {\n", + " \"api_version\": \"1.1.0\",\n", + " \"backend_version\": \"0.0.1.dev0\",\n", + " \"description\": \"Catalog of geoDB collections.\",\n", + " \"endpoints\": [\n", + " {\n", + " \"methods\": [\n", + " \"GET\"\n", + " ],\n", + " \"path\": \"/collections\"\n", + " }\n", + " ],\n", + " \"id\": \"xcube-geodb-openeo\",\n", + " \"links\": [\n", + " {\n", + " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/\",\n", + " \"rel\": \"self\",\n", + " \"title\": \"this document\",\n", + " \"type\": \"application/json\"\n", + " },\n", + " {\n", + " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/api\",\n", + " \"rel\": \"service-desc\",\n", + " \"title\": \"the API definition\",\n", + " \"type\": \"application/vnd.oai.openapi+json;version=3.0\"\n", + " },\n", + " {\n", + " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/api.html\",\n", + " \"rel\": \"service-doc\",\n", + " \"title\": \"the API documentation\",\n", + " \"type\": \"text/html\"\n", + " },\n", + " {\n", + " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/conformance\",\n", + " \"rel\": \"conformance\",\n", + " \"title\": \"OGC API conformance classes implemented by this server\",\n", + " \"type\": \"application/json\"\n", + " },\n", + " {\n", + " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections\",\n", + " \"rel\": \"data\",\n", + " \"title\": \"Information about the feature collections\",\n", + " \"type\": \"application/json\"\n", + " },\n", + " {\n", + " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/search\",\n", + " \"rel\": \"search\",\n", + " \"title\": \"Search across feature collections\",\n", + " \"type\": \"application/json\"\n", + " }\n", + " ],\n", + " \"stac_version\": \"0.9.0\",\n", + " \"title\": \"xcube geoDB Server, openEO API\",\n", + " \"type\": \"catalog\"\n", + "}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "d:\\Miniconda3\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'geodb.openeo.dev.brockmann-consult.de'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n", + " warnings.warn(\n" + ] + } + ], "source": [ "print_endpoint(f'{base_url}/')" ], @@ -52,12 +125,13 @@ }, { "cell_type": "code", - "execution_count": 47, + "execution_count": 14, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ + "https://geodb.openeo.dev.brockmann-consult.de/.well-known/openeo\n", "Status: 200\n", "Result: {\n", " \"versions\": [\n", @@ -68,6 +142,14 @@ " ]\n", "}\n" ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "d:\\Miniconda3\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'geodb.openeo.dev.brockmann-consult.de'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n", + " warnings.warn(\n" + ] } ], "source": [ @@ -82,18 +164,27 @@ }, { "cell_type": "code", - "execution_count": 48, + "execution_count": 15, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ + "https://geodb.openeo.dev.brockmann-consult.de/file_formats\n", "Status: 200\n", "Result: {\n", " \"input\": {},\n", " \"output\": {}\n", "}\n" ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "d:\\Miniconda3\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'geodb.openeo.dev.brockmann-consult.de'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n", + " warnings.warn(\n" + ] } ], "source": [ @@ -108,12 +199,13 @@ }, { "cell_type": "code", - "execution_count": 49, + "execution_count": 16, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ + "https://geodb.openeo.dev.brockmann-consult.de/conformance\n", "Status: 200\n", "Result: {\n", " \"conformsTo\": [\n", @@ -124,6 +216,14 @@ " ]\n", "}\n" ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "d:\\Miniconda3\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'geodb.openeo.dev.brockmann-consult.de'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n", + " warnings.warn(\n" + ] } ], "source": [ @@ -138,8 +238,23 @@ }, { "cell_type": "code", - "execution_count": 51, + "execution_count": 17, "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "https://geodb.openeo.dev.brockmann-consult.de/collections/AT_2021_EC21\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "d:\\Miniconda3\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'geodb.openeo.dev.brockmann-consult.de'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n", + " warnings.warn(\n" + ] + }, { "name": "stdout", "output_type": "stream", @@ -170,11 +285,11 @@ " \"license\": \"proprietary\",\n", " \"links\": [\n", " {\n", - " \"href\": \"http://localhost:8080/collections/AT_2021_EC21\",\n", + " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/AT_2021_EC21\",\n", " \"rel\": \"self\"\n", " },\n", " {\n", - " \"href\": \"http://localhost:8080/collections/\",\n", + " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/\",\n", " \"rel\": \"root\"\n", " }\n", " ],\n", @@ -270,12 +385,13 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 19, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ + "https://geodb.openeo.dev.brockmann-consult.de/collections\n", "Status: 200\n", "Result: {\n", " \"collections\": [\n", @@ -304,11 +420,11 @@ " \"license\": \"proprietary\",\n", " \"links\": [\n", " {\n", - " \"href\": \"http://localhost:8080/collections/alster_debug\",\n", + " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/alster_debug\",\n", " \"rel\": \"self\"\n", " },\n", " {\n", - " \"href\": \"http://localhost:8080/collections/\",\n", + " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/\",\n", " \"rel\": \"root\"\n", " }\n", " ],\n", @@ -375,11 +491,11 @@ " \"license\": \"proprietary\",\n", " \"links\": [\n", " {\n", - " \"href\": \"http://localhost:8080/collections/AT_2021_EC21\",\n", + " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/AT_2021_EC21\",\n", " \"rel\": \"self\"\n", " },\n", " {\n", - " \"href\": \"http://localhost:8080/collections/\",\n", + " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/\",\n", " \"rel\": \"root\"\n", " }\n", " ],\n", @@ -485,11 +601,11 @@ " \"license\": \"proprietary\",\n", " \"links\": [\n", " {\n", - " \"href\": \"http://localhost:8080/collections/BE_VLG_2021_EC21\",\n", + " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/BE_VLG_2021_EC21\",\n", " \"rel\": \"self\"\n", " },\n", " {\n", - " \"href\": \"http://localhost:8080/collections/\",\n", + " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/\",\n", " \"rel\": \"root\"\n", " }\n", " ],\n", @@ -631,11 +747,11 @@ " \"license\": \"proprietary\",\n", " \"links\": [\n", " {\n", - " \"href\": \"http://localhost:8080/collections/eurocrops-test-1\",\n", + " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/eurocrops-test-1\",\n", " \"rel\": \"self\"\n", " },\n", " {\n", - " \"href\": \"http://localhost:8080/collections/\",\n", + " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/\",\n", " \"rel\": \"root\"\n", " }\n", " ],\n", @@ -735,11 +851,11 @@ " \"license\": \"proprietary\",\n", " \"links\": [\n", " {\n", - " \"href\": \"http://localhost:8080/collections/eurocrops-test-nrw\",\n", + " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/eurocrops-test-nrw\",\n", " \"rel\": \"self\"\n", " },\n", " {\n", - " \"href\": \"http://localhost:8080/collections/\",\n", + " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/\",\n", " \"rel\": \"root\"\n", " }\n", " ],\n", @@ -839,11 +955,11 @@ " \"license\": \"proprietary\",\n", " \"links\": [\n", " {\n", - " \"href\": \"http://localhost:8080/collections/populated_places_sub\",\n", + " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/populated_places_sub\",\n", " \"rel\": \"self\"\n", " },\n", " {\n", - " \"href\": \"http://localhost:8080/collections/\",\n", + " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/\",\n", " \"rel\": \"root\"\n", " }\n", " ],\n", @@ -923,92 +1039,19 @@ " ]\n", " },\n", " \"title\": \"populated_places_sub\"\n", - " },\n", - " {\n", - " \"description\": \"No description available.\",\n", - " \"extent\": {\n", - " \"spatial\": {\n", - " \"bbox\": null,\n", - " \"crs\": \"http://www.opengis.net/def/crs/OGC/1.3/CRS84\"\n", - " },\n", - " \"temporal\": {\n", - " \"interval\": [\n", - " [\n", - " \"null\"\n", - " ]\n", - " ]\n", - " }\n", - " },\n", - " \"id\": \"SI_2021_EC21\",\n", - " \"keywords\": [],\n", - " \"license\": \"proprietary\",\n", - " \"links\": [\n", - " {\n", - " \"href\": \"http://localhost:8080/collections/SI_2021_EC21\",\n", - " \"rel\": \"self\"\n", - " },\n", - " {\n", - " \"href\": \"http://localhost:8080/collections/\",\n", - " \"rel\": \"root\"\n", - " }\n", - " ],\n", - " \"providers\": [],\n", - " \"stac_extensions\": [\n", - " \"xcube-geodb\"\n", - " ],\n", - " \"stac_version\": \"0.9.0\",\n", - " \"summaries\": {\n", - " \"properties\": [\n", - " {\n", - " \"name\": \"id\"\n", - " },\n", - " {\n", - " \"name\": \"created_at\"\n", - " },\n", - " {\n", - " \"name\": \"modified_at\"\n", - " },\n", - " {\n", - " \"name\": \"gerk_pid\"\n", - " },\n", - " {\n", - " \"name\": \"sifra_kmrs\"\n", - " },\n", - " {\n", - " \"name\": \"area\"\n", - " },\n", - " {\n", - " \"name\": \"rastlina\"\n", - " },\n", - " {\n", - " \"name\": \"crop_lat_e\"\n", - " },\n", - " {\n", - " \"name\": \"color\"\n", - " },\n", - " {\n", - " \"name\": \"ec_nuts3\"\n", - " },\n", - " {\n", - " \"name\": \"ec_trans_n\"\n", - " },\n", - " {\n", - " \"name\": \"ec_hcat_n\"\n", - " },\n", - " {\n", - " \"name\": \"ec_hcat_c\"\n", - " },\n", - " {\n", - " \"name\": \"geometry\"\n", - " }\n", - " ]\n", - " },\n", - " \"title\": \"SI_2021_EC21\"\n", " }\n", " ],\n", " \"links\": []\n", "}\n" ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "d:\\Miniconda3\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'geodb.openeo.dev.brockmann-consult.de'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n", + " warnings.warn(\n" + ] } ], "source": [ @@ -1023,8 +1066,115 @@ }, { "cell_type": "code", - "execution_count": null, - "outputs": [], + "execution_count": 18, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "https://geodb.openeo.dev.brockmann-consult.de/processes\n", + "Status: 200\n", + "Result: {\n", + " \"links\": [\n", + " {}\n", + " ],\n", + " \"processes\": [\n", + " {\n", + " \"categories\": [\n", + " \"import\"\n", + " ],\n", + " \"description\": \"Loads a collection from the current back-end by its id and returns it as a vector cube. The data that is added to the data cube can be restricted with the parameters \\\"spatial_extent\\\" and \\\"properties\\\".\",\n", + " \"id\": \"load_collection\",\n", + " \"parameters\": [\n", + " {\n", + " \"description\": \"The collection's name\",\n", + " \"name\": \"id\",\n", + " \"schema\": {\n", + " \"type\": \"string\"\n", + " }\n", + " },\n", + " {\n", + " \"description\": \"The database of the collection\",\n", + " \"name\": \"database\",\n", + " \"optional\": true,\n", + " \"schema\": {\n", + " \"type\": \"string\"\n", + " }\n", + " },\n", + " {\n", + " \"description\": \"Limits the data to load from the collection to the specified bounding box or polygons.\\n\\nThe process puts a pixel into the data cube if the point at the pixel center intersects with the bounding box.\\n\\nSet this parameter to `null` to set no limit for the spatial extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using ``filter_bbox()`` or ``filter_spatial()`` directly after loading unbounded data.\",\n", + " \"name\": \"spatial_extent\",\n", + " \"schema\": [\n", + " {\n", + " \"properties\": {\n", + " \"crs\": {\n", + " \"default\": 4326,\n", + " \"description\": \"Coordinate reference system of the extent, specified as as [EPSG code](http://www.epsg-registry.org/), [WKT2 (ISO 19162) string] (http://docs.opengeospatial.org/is/18-010r7/18-010r7.html) or [PROJ definition (deprecated)](https://proj.org/usage/quickstart.html). Defaults to `4326` (EPSG code 4326) unless the client explicitly requests a different coordinate reference system.\",\n", + " \"examples\": [\n", + " 3857\n", + " ],\n", + " \"minimum\": 1000,\n", + " \"subtype\": \"epsg-code\",\n", + " \"title\": \"EPSG Code\",\n", + " \"type\": \"integer\"\n", + " },\n", + " \"east\": {\n", + " \"description\": \"East (upper right corner, coordinate axis 1).\",\n", + " \"type\": \"number\"\n", + " },\n", + " \"north\": {\n", + " \"description\": \"North (upper right corner, coordinate axis 2).\",\n", + " \"type\": \"number\"\n", + " },\n", + " \"south\": {\n", + " \"description\": \"South (lower left corner, coordinate axis 2).\",\n", + " \"type\": \"number\"\n", + " },\n", + " \"west\": {\n", + " \"description\": \"West (lower left corner, coordinate axis 1).\",\n", + " \"type\": \"number\"\n", + " }\n", + " },\n", + " \"required\": [\n", + " \"west\",\n", + " \"south\",\n", + " \"east\",\n", + " \"north\"\n", + " ],\n", + " \"subtype\": \"bounding-box\",\n", + " \"title\": \"Bounding Box\",\n", + " \"type\": \"object\"\n", + " },\n", + " {\n", + " \"description\": \"Don't filter spatially. All data is included in the data cube.\",\n", + " \"title\": \"No filter\",\n", + " \"type\": \"null\"\n", + " }\n", + " ]\n", + " }\n", + " ],\n", + " \"returns\": {\n", + " \"description\": \"A vector cube for further processing.\",\n", + " \"schema\": {\n", + " \"subtype\": \"vector-cube\",\n", + " \"type\": \"object\"\n", + " }\n", + " },\n", + " \"summary\": \"Load a collection\"\n", + " }\n", + " ]\n", + "}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "d:\\Miniconda3\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'geodb.openeo.dev.brockmann-consult.de'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n", + " warnings.warn(\n" + ] + } + ], "source": [ "print_endpoint(f'{base_url}/processes')" ], @@ -1037,8 +1187,17 @@ }, { "cell_type": "code", - "execution_count": 38, - "outputs": [], + "execution_count": 20, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "d:\\Miniconda3\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'geodb.openeo.dev.brockmann-consult.de'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n", + " warnings.warn(\n" + ] + } + ], "source": [ "body = json.dumps({\"process\": {\n", " \"id\": \"load_collection\",\n", @@ -1063,13 +1222,13 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 21, "outputs": [ { "data": { "text/plain": "[{'id': 22,\n 'bbox': ['51.5330', '25.2866', '51.5330', '25.2866'],\n 'geometry': {'type': 'Point', 'coordinates': [51.5329679, 25.286556]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Doha',\n 'sov0name': 'Qatar',\n 'latitude': 25.286556,\n 'longitude': 51.532968,\n 'pop_max': 1450000,\n 'pop_min': 731310,\n 'meganame': None,\n 'min_areakm': 270,\n 'max_areakm': 270,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 26,\n 'bbox': ['35.7500', '-6.1833', '35.7500', '-6.1833'],\n 'geometry': {'type': 'Point', 'coordinates': [35.7500036, -6.1833061]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dodoma',\n 'sov0name': 'United Republic of Tanzania',\n 'latitude': -6.183306,\n 'longitude': 35.750004,\n 'pop_max': 218269,\n 'pop_min': 180541,\n 'meganame': None,\n 'min_areakm': 55,\n 'max_areakm': 55,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 31,\n 'bbox': ['43.1480', '11.5950', '43.1480', '11.5950'],\n 'geometry': {'type': 'Point', 'coordinates': [43.1480017, 11.5950145]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Djibouti',\n 'sov0name': 'Djibouti',\n 'latitude': 11.595015,\n 'longitude': 43.148002,\n 'pop_max': 923000,\n 'pop_min': 604013,\n 'meganame': None,\n 'min_areakm': 42,\n 'max_areakm': 42,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 44,\n 'bbox': ['50.5831', '26.2361', '50.5831', '26.2361'],\n 'geometry': {'type': 'Point', 'coordinates': [50.5830517, 26.2361363]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Manama',\n 'sov0name': 'Bahrain',\n 'latitude': 26.236136,\n 'longitude': 50.583052,\n 'pop_max': 563920,\n 'pop_min': 157474,\n 'meganame': None,\n 'min_areakm': 178,\n 'max_areakm': 178,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 49,\n 'bbox': ['54.3666', '24.4667', '54.3666', '24.4667'],\n 'geometry': {'type': 'Point', 'coordinates': [54.3665934, 24.4666836]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Abu Dhabi',\n 'sov0name': 'United Arab Emirates',\n 'latitude': 24.466684,\n 'longitude': 54.366593,\n 'pop_max': 603492,\n 'pop_min': 560230,\n 'meganame': None,\n 'min_areakm': 96,\n 'max_areakm': 96,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 50,\n 'bbox': ['58.3833', '37.9500', '58.3833', '37.9500'],\n 'geometry': {'type': 'Point', 'coordinates': [58.3832991, 37.9499949]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Ashgabat',\n 'sov0name': 'Turkmenistan',\n 'latitude': 37.949995,\n 'longitude': 58.383299,\n 'pop_max': 727700,\n 'pop_min': 577982,\n 'meganame': None,\n 'min_areakm': 108,\n 'max_areakm': 128,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 62,\n 'bbox': ['68.7739', '38.5600', '68.7739', '38.5600'],\n 'geometry': {'type': 'Point', 'coordinates': [68.7738794, 38.5600352]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dushanbe',\n 'sov0name': 'Tajikistan',\n 'latitude': 38.560035,\n 'longitude': 68.773879,\n 'pop_max': 1086244,\n 'pop_min': 679400,\n 'meganame': None,\n 'min_areakm': 415,\n 'max_areakm': 415,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 76,\n 'bbox': ['45.3647', '2.0686', '45.3647', '2.0686'],\n 'geometry': {'type': 'Point', 'coordinates': [45.3647318, 2.0686272]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Mogadishu',\n 'sov0name': 'Somalia',\n 'latitude': 2.068627,\n 'longitude': 45.364732,\n 'pop_max': 1100000,\n 'pop_min': 875388,\n 'meganame': 'Muqdisho',\n 'min_areakm': 99,\n 'max_areakm': 99,\n 'pop1950': 69,\n 'pop1960': 94,\n 'pop1970': 272,\n 'pop1980': 551,\n 'pop1990': 1035,\n 'pop2000': 1201,\n 'pop2010': 1100,\n 'pop2020': 1794,\n 'pop2050': 2529}},\n {'id': 77,\n 'bbox': ['58.5933', '23.6133', '58.5933', '23.6133'],\n 'geometry': {'type': 'Point', 'coordinates': [58.5933121, 23.6133248]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Muscat',\n 'sov0name': 'Oman',\n 'latitude': 23.613325,\n 'longitude': 58.593312,\n 'pop_max': 734697,\n 'pop_min': 586861,\n 'meganame': None,\n 'min_areakm': 104,\n 'max_areakm': 104,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 83,\n 'bbox': ['35.9314', '31.9520', '35.9314', '31.9520'],\n 'geometry': {'type': 'Point', 'coordinates': [35.9313541, 31.9519711]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Amman',\n 'sov0name': 'Jordan',\n 'latitude': 31.951971,\n 'longitude': 35.931354,\n 'pop_max': 1060000,\n 'pop_min': 1060000,\n 'meganame': 'Amman',\n 'min_areakm': 403,\n 'max_areakm': 545,\n 'pop1950': 90,\n 'pop1960': 218,\n 'pop1970': 388,\n 'pop1980': 636,\n 'pop1990': 851,\n 'pop2000': 1007,\n 'pop2010': 1060,\n 'pop2020': 1185,\n 'pop2050': 1359}},\n {'id': 95,\n 'bbox': ['38.9333', '15.3333', '38.9333', '15.3333'],\n 'geometry': {'type': 'Point', 'coordinates': [38.9333235, 15.3333393]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Asmara',\n 'sov0name': 'Eritrea',\n 'latitude': 15.333339,\n 'longitude': 38.933324,\n 'pop_max': 620802,\n 'pop_min': 563930,\n 'meganame': None,\n 'min_areakm': 90,\n 'max_areakm': 90,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 105,\n 'bbox': ['35.5078', '33.8739', '35.5078', '33.8739'],\n 'geometry': {'type': 'Point', 'coordinates': [35.5077624, 33.873921]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Beirut',\n 'sov0name': 'Lebanon',\n 'latitude': 33.873921,\n 'longitude': 35.507762,\n 'pop_max': 1846000,\n 'pop_min': 1712125,\n 'meganame': 'Bayrut',\n 'min_areakm': 429,\n 'max_areakm': 471,\n 'pop1950': 322,\n 'pop1960': 561,\n 'pop1970': 923,\n 'pop1980': 1623,\n 'pop1990': 1293,\n 'pop2000': 1487,\n 'pop2010': 1846,\n 'pop2020': 2051,\n 'pop2050': 2173}},\n {'id': 106,\n 'bbox': ['44.7888', '41.7270', '44.7888', '41.7270'],\n 'geometry': {'type': 'Point', 'coordinates': [44.7888496, 41.7269558]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tbilisi',\n 'sov0name': 'Georgia',\n 'latitude': 41.726956,\n 'longitude': 44.78885,\n 'pop_max': 1100000,\n 'pop_min': 1005257,\n 'meganame': 'Tbilisi',\n 'min_areakm': 131,\n 'max_areakm': 135,\n 'pop1950': 612,\n 'pop1960': 718,\n 'pop1970': 897,\n 'pop1980': 1090,\n 'pop1990': 1224,\n 'pop2000': 1100,\n 'pop2010': 1100,\n 'pop2020': 1113,\n 'pop2050': 1114}},\n {'id': 120,\n 'bbox': ['44.5116', '40.1831', '44.5116', '40.1831'],\n 'geometry': {'type': 'Point', 'coordinates': [44.5116055, 40.1830966]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Yerevan',\n 'sov0name': 'Armenia',\n 'latitude': 40.183097,\n 'longitude': 44.511606,\n 'pop_max': 1102000,\n 'pop_min': 1093485,\n 'meganame': 'Yerevan',\n 'min_areakm': 191,\n 'max_areakm': 191,\n 'pop1950': 341,\n 'pop1960': 538,\n 'pop1970': 778,\n 'pop1980': 1042,\n 'pop1990': 1175,\n 'pop2000': 1111,\n 'pop2010': 1102,\n 'pop2020': 1102,\n 'pop2050': 1102}},\n {'id': 121,\n 'bbox': ['49.8603', '40.3972', '49.8603', '40.3972'],\n 'geometry': {'type': 'Point', 'coordinates': [49.8602713, 40.3972179]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Baku',\n 'sov0name': 'Azerbaijan',\n 'latitude': 40.397218,\n 'longitude': 49.860271,\n 'pop_max': 2122300,\n 'pop_min': 1892000,\n 'meganame': 'Baku',\n 'min_areakm': 246,\n 'max_areakm': 249,\n 'pop1950': 897,\n 'pop1960': 1005,\n 'pop1970': 1274,\n 'pop1980': 1574,\n 'pop1990': 1733,\n 'pop2000': 1806,\n 'pop2010': 1892,\n 'pop2020': 2006,\n 'pop2050': 2187}},\n {'id': 134,\n 'bbox': ['44.0653', '9.5600', '44.0653', '9.5600'],\n 'geometry': {'type': 'Point', 'coordinates': [44.06531, 9.5600224]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Hargeysa',\n 'sov0name': 'Somaliland',\n 'latitude': 9.560022,\n 'longitude': 44.06531,\n 'pop_max': 477876,\n 'pop_min': 247018,\n 'meganame': None,\n 'min_areakm': 40,\n 'max_areakm': 40,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 135,\n 'bbox': ['55.4500', '-4.6166', '55.4500', '-4.6166'],\n 'geometry': {'type': 'Point', 'coordinates': [55.4499898, -4.6166317]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Victoria',\n 'sov0name': 'Seychelles',\n 'latitude': -4.616632,\n 'longitude': 55.44999,\n 'pop_max': 33576,\n 'pop_min': 22881,\n 'meganame': None,\n 'min_areakm': 15,\n 'max_areakm': 15,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 140,\n 'bbox': ['35.2066', '31.7784', '35.2066', '31.7784'],\n 'geometry': {'type': 'Point', 'coordinates': [35.2066259, 31.7784078]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Jerusalem',\n 'sov0name': 'Israel',\n 'latitude': 31.778408,\n 'longitude': 35.206626,\n 'pop_max': 1029300,\n 'pop_min': 801000,\n 'meganame': None,\n 'min_areakm': 246,\n 'max_areakm': 246,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 143,\n 'bbox': ['33.3666', '35.1667', '33.3666', '35.1667'],\n 'geometry': {'type': 'Point', 'coordinates': [33.3666349, 35.1666765]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Nicosia',\n 'sov0name': 'Cyprus',\n 'latitude': 35.166677,\n 'longitude': 33.366635,\n 'pop_max': 224300,\n 'pop_min': 200452,\n 'meganame': None,\n 'min_areakm': 128,\n 'max_areakm': 128,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 148,\n 'bbox': ['44.2046', '15.3567', '44.2046', '15.3567'],\n 'geometry': {'type': 'Point', 'coordinates': [44.2046475, 15.3566792]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Sanaa',\n 'sov0name': 'Yemen',\n 'latitude': 15.356679,\n 'longitude': 44.204648,\n 'pop_max': 2008000,\n 'pop_min': 1835853,\n 'meganame': \"Sana'a'\",\n 'min_areakm': 160,\n 'max_areakm': 160,\n 'pop1950': 46,\n 'pop1960': 72,\n 'pop1970': 111,\n 'pop1980': 238,\n 'pop1990': 653,\n 'pop2000': 1365,\n 'pop2010': 2008,\n 'pop2020': 2955,\n 'pop2050': 4382}},\n {'id': 150,\n 'bbox': ['36.2981', '33.5020', '36.2981', '33.5020'],\n 'geometry': {'type': 'Point', 'coordinates': [36.29805, 33.5019799]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Damascus',\n 'sov0name': 'Syria',\n 'latitude': 33.50198,\n 'longitude': 36.29805,\n 'pop_max': 2466000,\n 'pop_min': 2466000,\n 'meganame': 'Dimashq',\n 'min_areakm': 532,\n 'max_areakm': 705,\n 'pop1950': 367,\n 'pop1960': 579,\n 'pop1970': 914,\n 'pop1980': 1376,\n 'pop1990': 1691,\n 'pop2000': 2044,\n 'pop2010': 2466,\n 'pop2020': 2981,\n 'pop2050': 3605}},\n {'id': 156,\n 'bbox': ['39.2664', '-6.7981', '39.2664', '-6.7981'],\n 'geometry': {'type': 'Point', 'coordinates': [39.266396, -6.7980667]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dar es Salaam',\n 'sov0name': 'United Republic of Tanzania',\n 'latitude': -6.798067,\n 'longitude': 39.266396,\n 'pop_max': 2930000,\n 'pop_min': 2698652,\n 'meganame': 'Dar es Salaam',\n 'min_areakm': 211,\n 'max_areakm': 211,\n 'pop1950': 67,\n 'pop1960': 162,\n 'pop1970': 357,\n 'pop1980': 836,\n 'pop1990': 1316,\n 'pop2000': 2116,\n 'pop2010': 2930,\n 'pop2020': 4020,\n 'pop2050': 5688}},\n {'id': 162,\n 'bbox': ['47.9764', '29.3717', '47.9764', '29.3717'],\n 'geometry': {'type': 'Point', 'coordinates': [47.9763553, 29.3716635]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Kuwait City',\n 'sov0name': 'Kuwait',\n 'latitude': 29.371664,\n 'longitude': 47.976355,\n 'pop_max': 2063000,\n 'pop_min': 60064,\n 'meganame': 'Al Kuwayt (Kuwait City)',\n 'min_areakm': 264,\n 'max_areakm': 366,\n 'pop1950': 63,\n 'pop1960': 179,\n 'pop1970': 553,\n 'pop1980': 891,\n 'pop1990': 1392,\n 'pop2000': 1499,\n 'pop2010': 2063,\n 'pop2020': 2592,\n 'pop2050': 2956}},\n {'id': 166,\n 'bbox': ['34.7681', '32.0819', '34.7681', '32.0819'],\n 'geometry': {'type': 'Point', 'coordinates': [34.7680659, 32.0819373]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tel Aviv-Yafo',\n 'sov0name': 'Israel',\n 'latitude': 32.081937,\n 'longitude': 34.768066,\n 'pop_max': 3112000,\n 'pop_min': 378358,\n 'meganame': 'Tel Aviv-Yafo',\n 'min_areakm': 436,\n 'max_areakm': 436,\n 'pop1950': 418,\n 'pop1960': 738,\n 'pop1970': 1029,\n 'pop1980': 1416,\n 'pop1990': 2026,\n 'pop2000': 2752,\n 'pop2010': 3112,\n 'pop2020': 3453,\n 'pop2050': 3726}},\n {'id': 184,\n 'bbox': ['55.2780', '25.2319', '55.2780', '25.2319'],\n 'geometry': {'type': 'Point', 'coordinates': [55.2780285, 25.231942]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dubai',\n 'sov0name': 'United Arab Emirates',\n 'latitude': 25.231942,\n 'longitude': 55.278029,\n 'pop_max': 1379000,\n 'pop_min': 1137347,\n 'meganame': 'Dubayy',\n 'min_areakm': 187,\n 'max_areakm': 407,\n 'pop1950': 20,\n 'pop1960': 40,\n 'pop1970': 80,\n 'pop1980': 254,\n 'pop1990': 473,\n 'pop2000': 938,\n 'pop2010': 1379,\n 'pop2020': 1709,\n 'pop2050': 2077}},\n {'id': 185,\n 'bbox': ['69.2930', '41.3136', '69.2930', '41.3136'],\n 'geometry': {'type': 'Point', 'coordinates': [69.292987, 41.3136477]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tashkent',\n 'sov0name': 'Uzbekistan',\n 'latitude': 41.313648,\n 'longitude': 69.292987,\n 'pop_max': 2184000,\n 'pop_min': 1978028,\n 'meganame': 'Tashkent',\n 'min_areakm': 639,\n 'max_areakm': 643,\n 'pop1950': 755,\n 'pop1960': 964,\n 'pop1970': 1403,\n 'pop1980': 1818,\n 'pop1990': 2100,\n 'pop2000': 2135,\n 'pop2010': 2184,\n 'pop2020': 2416,\n 'pop2050': 2892}},\n {'id': 206,\n 'bbox': ['44.3919', '33.3406', '44.3919', '33.3406'],\n 'geometry': {'type': 'Point', 'coordinates': [44.3919229, 33.3405944]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Baghdad',\n 'sov0name': 'Iraq',\n 'latitude': 33.340594,\n 'longitude': 44.391923,\n 'pop_max': 5054000,\n 'pop_min': 5054000,\n 'meganame': 'Baghdad',\n 'min_areakm': 587,\n 'max_areakm': 587,\n 'pop1950': 579,\n 'pop1960': 1019,\n 'pop1970': 2070,\n 'pop1980': 3145,\n 'pop1990': 4092,\n 'pop2000': 5200,\n 'pop2010': 5054,\n 'pop2020': 6618,\n 'pop2050': 8060}},\n {'id': 207,\n 'bbox': ['38.6981', '9.0353', '38.6981', '9.0353'],\n 'geometry': {'type': 'Point', 'coordinates': [38.6980586, 9.0352562]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Addis Ababa',\n 'sov0name': 'Ethiopia',\n 'latitude': 9.035256,\n 'longitude': 38.698059,\n 'pop_max': 3100000,\n 'pop_min': 2757729,\n 'meganame': 'Addis Ababa',\n 'min_areakm': 462,\n 'max_areakm': 1182,\n 'pop1950': 392,\n 'pop1960': 519,\n 'pop1970': 729,\n 'pop1980': 1175,\n 'pop1990': 1791,\n 'pop2000': 2493,\n 'pop2010': 3100,\n 'pop2020': 4184,\n 'pop2050': 6156}},\n {'id': 208,\n 'bbox': ['51.4224', '35.6739', '51.4224', '35.6739'],\n 'geometry': {'type': 'Point', 'coordinates': [51.4223982, 35.6738886]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tehran',\n 'sov0name': 'Iran',\n 'latitude': 35.673889,\n 'longitude': 51.422398,\n 'pop_max': 7873000,\n 'pop_min': 7153309,\n 'meganame': 'Tehran',\n 'min_areakm': 496,\n 'max_areakm': 496,\n 'pop1950': 1041,\n 'pop1960': 1873,\n 'pop1970': 3290,\n 'pop1980': 5079,\n 'pop1990': 6365,\n 'pop2000': 7128,\n 'pop2010': 7873,\n 'pop2020': 8832,\n 'pop2050': 9814}},\n {'id': 212,\n 'bbox': ['69.1813', '34.5186', '69.1813', '34.5186'],\n 'geometry': {'type': 'Point', 'coordinates': [69.1813142, 34.5186361]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Kabul',\n 'sov0name': 'Afghanistan',\n 'latitude': 34.518636,\n 'longitude': 69.181314,\n 'pop_max': 3277000,\n 'pop_min': 3043532,\n 'meganame': 'Kabul',\n 'min_areakm': 594,\n 'max_areakm': 1471,\n 'pop1950': 129,\n 'pop1960': 263,\n 'pop1970': 472,\n 'pop1980': 978,\n 'pop1990': 1306,\n 'pop2000': 1963,\n 'pop2010': 3277,\n 'pop2020': 4730,\n 'pop2050': 7175}},\n {'id': 222,\n 'bbox': ['46.7708', '24.6428', '46.7708', '24.6428'],\n 'geometry': {'type': 'Point', 'coordinates': [46.7707958, 24.642779]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Riyadh',\n 'sov0name': 'Saudi Arabia',\n 'latitude': 24.642779,\n 'longitude': 46.770796,\n 'pop_max': 4465000,\n 'pop_min': 4205961,\n 'meganame': 'Ar-Riyadh',\n 'min_areakm': 854,\n 'max_areakm': 854,\n 'pop1950': 111,\n 'pop1960': 156,\n 'pop1970': 408,\n 'pop1980': 1055,\n 'pop1990': 2325,\n 'pop2000': 3567,\n 'pop2010': 4465,\n 'pop2020': 5405,\n 'pop2050': 6275}},\n {'id': 229,\n 'bbox': ['36.8147', '-1.2814', '36.8147', '-1.2814'],\n 'geometry': {'type': 'Point', 'coordinates': [36.814711, -1.2814009]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Nairobi',\n 'sov0name': 'Kenya',\n 'latitude': -1.281401,\n 'longitude': 36.814711,\n 'pop_max': 3010000,\n 'pop_min': 2750547,\n 'meganame': 'Nairobi',\n 'min_areakm': 698,\n 'max_areakm': 719,\n 'pop1950': 137,\n 'pop1960': 293,\n 'pop1970': 531,\n 'pop1980': 862,\n 'pop1990': 1380,\n 'pop2000': 2233,\n 'pop2010': 3010,\n 'pop2020': 4052,\n 'pop2050': 5871}}]" }, - "execution_count": 39, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -1083,6 +1242,18 @@ "name": "#%%\n" } } + }, + { + "cell_type": "code", + "execution_count": null, + "outputs": [], + "source": [], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } } ], "metadata": { From b14bf81982c71301e3a51fc5ec2f16483d48c500 Mon Sep 17 00:00:00 2001 From: thomas Date: Thu, 14 Jul 2022 17:10:45 +0200 Subject: [PATCH 068/163] minor stuff --- .github/workflows/workflow.yaml | 4 +- notebooks/geoDB-openEO_use_case_1.ipynb | 870 ++++++++++++++++++++++-- 2 files changed, 807 insertions(+), 67 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index f9424c8..19ed645 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -14,7 +14,7 @@ env: WAIT_FOR_STARTUP: "1" # If set to 1, docker build is performed - FORCE_DOCKER_BUILD: "1" + FORCE_DOCKER_BUILD: "0" jobs: @@ -71,7 +71,7 @@ jobs: build-docker-image: runs-on: ubuntu-latest -# needs: [unittest] + needs: [unittest] name: build-docker-image steps: # Checkout xcube-geodb-openeo (this project) diff --git a/notebooks/geoDB-openEO_use_case_1.ipynb b/notebooks/geoDB-openEO_use_case_1.ipynb index 0e483b8..fdd7723 100644 --- a/notebooks/geoDB-openEO_use_case_1.ipynb +++ b/notebooks/geoDB-openEO_use_case_1.ipynb @@ -2,7 +2,12 @@ "cells": [ { "cell_type": "code", - "execution_count": 11, + "execution_count": 1, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [], "source": [ "import urllib3\n", @@ -10,7 +15,11 @@ "\n", "http = urllib3.PoolManager(cert_reqs='CERT_NONE')\n", "base_url = 'https://geodb.openeo.dev.brockmann-consult.de'" - ], + ] + }, + { + "cell_type": "code", + "execution_count": 2, "metadata": { "collapsed": false, "pycharm": { @@ -29,17 +38,17 @@ " data = json.loads(r.data)\n", " print(f\"Status: {r.status}\")\n", " print(f\"Result: {json.dumps(data, indent=2, sort_keys=True)}\")" - ], + ] + }, + { + "cell_type": "code", + "execution_count": 3, "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } - } - }, - { - "cell_type": "code", - "execution_count": 13, + }, "outputs": [ { "name": "stdout", @@ -115,17 +124,17 @@ ], "source": [ "print_endpoint(f'{base_url}/')" - ], + ] + }, + { + "cell_type": "code", + "execution_count": 4, "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } - } - }, - { - "cell_type": "code", - "execution_count": 14, + }, "outputs": [ { "name": "stdout", @@ -154,17 +163,17 @@ ], "source": [ "print_endpoint(f'{base_url}/.well-known/openeo')" - ], + ] + }, + { + "cell_type": "code", + "execution_count": 5, "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } - } - }, - { - "cell_type": "code", - "execution_count": 15, + }, "outputs": [ { "name": "stdout", @@ -189,17 +198,17 @@ ], "source": [ "print_endpoint(f'{base_url}/file_formats')" - ], + ] + }, + { + "cell_type": "code", + "execution_count": 6, "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } - } - }, - { - "cell_type": "code", - "execution_count": 16, + }, "outputs": [ { "name": "stdout", @@ -228,25 +237,18 @@ ], "source": [ "print_endpoint(f'{base_url}/conformance')" - ], + ] + }, + { + "cell_type": "code", + "execution_count": 7, "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } - } - }, - { - "cell_type": "code", - "execution_count": 17, + }, "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "https://geodb.openeo.dev.brockmann-consult.de/collections/AT_2021_EC21\n" - ] - }, { "name": "stderr", "output_type": "stream", @@ -259,6 +261,7 @@ "name": "stdout", "output_type": "stream", "text": [ + "https://geodb.openeo.dev.brockmann-consult.de/collections/AT_2021_EC21\n", "Status: 200\n", "Result: {\n", " \"description\": \"No description available.\",\n", @@ -375,17 +378,17 @@ ], "source": [ "print_endpoint(f'{base_url}/collections/AT_2021_EC21')" - ], + ] + }, + { + "cell_type": "code", + "execution_count": 8, "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } - } - }, - { - "cell_type": "code", - "execution_count": 19, + }, "outputs": [ { "name": "stdout", @@ -1056,17 +1059,17 @@ ], "source": [ "print_endpoint(f'{base_url}/collections')" - ], + ] + }, + { + "cell_type": "code", + "execution_count": 9, "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } - } - }, - { - "cell_type": "code", - "execution_count": 18, + }, "outputs": [ { "name": "stdout", @@ -1177,17 +1180,17 @@ ], "source": [ "print_endpoint(f'{base_url}/processes')" - ], + ] + }, + { + "cell_type": "code", + "execution_count": 10, "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } - } - }, - { - "cell_type": "code", - "execution_count": 20, + }, "outputs": [ { "name": "stderr", @@ -1212,23 +1215,760 @@ " headers={'Content-Type': 'application/json'},\n", " body=body)\n", "vector_cube = json.loads(r.data)" - ], + ] + }, + { + "cell_type": "code", + "execution_count": 11, "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } - } - }, - { - "cell_type": "code", - "execution_count": 21, + }, "outputs": [ { "data": { - "text/plain": "[{'id': 22,\n 'bbox': ['51.5330', '25.2866', '51.5330', '25.2866'],\n 'geometry': {'type': 'Point', 'coordinates': [51.5329679, 25.286556]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Doha',\n 'sov0name': 'Qatar',\n 'latitude': 25.286556,\n 'longitude': 51.532968,\n 'pop_max': 1450000,\n 'pop_min': 731310,\n 'meganame': None,\n 'min_areakm': 270,\n 'max_areakm': 270,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 26,\n 'bbox': ['35.7500', '-6.1833', '35.7500', '-6.1833'],\n 'geometry': {'type': 'Point', 'coordinates': [35.7500036, -6.1833061]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dodoma',\n 'sov0name': 'United Republic of Tanzania',\n 'latitude': -6.183306,\n 'longitude': 35.750004,\n 'pop_max': 218269,\n 'pop_min': 180541,\n 'meganame': None,\n 'min_areakm': 55,\n 'max_areakm': 55,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 31,\n 'bbox': ['43.1480', '11.5950', '43.1480', '11.5950'],\n 'geometry': {'type': 'Point', 'coordinates': [43.1480017, 11.5950145]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Djibouti',\n 'sov0name': 'Djibouti',\n 'latitude': 11.595015,\n 'longitude': 43.148002,\n 'pop_max': 923000,\n 'pop_min': 604013,\n 'meganame': None,\n 'min_areakm': 42,\n 'max_areakm': 42,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 44,\n 'bbox': ['50.5831', '26.2361', '50.5831', '26.2361'],\n 'geometry': {'type': 'Point', 'coordinates': [50.5830517, 26.2361363]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Manama',\n 'sov0name': 'Bahrain',\n 'latitude': 26.236136,\n 'longitude': 50.583052,\n 'pop_max': 563920,\n 'pop_min': 157474,\n 'meganame': None,\n 'min_areakm': 178,\n 'max_areakm': 178,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 49,\n 'bbox': ['54.3666', '24.4667', '54.3666', '24.4667'],\n 'geometry': {'type': 'Point', 'coordinates': [54.3665934, 24.4666836]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Abu Dhabi',\n 'sov0name': 'United Arab Emirates',\n 'latitude': 24.466684,\n 'longitude': 54.366593,\n 'pop_max': 603492,\n 'pop_min': 560230,\n 'meganame': None,\n 'min_areakm': 96,\n 'max_areakm': 96,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 50,\n 'bbox': ['58.3833', '37.9500', '58.3833', '37.9500'],\n 'geometry': {'type': 'Point', 'coordinates': [58.3832991, 37.9499949]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Ashgabat',\n 'sov0name': 'Turkmenistan',\n 'latitude': 37.949995,\n 'longitude': 58.383299,\n 'pop_max': 727700,\n 'pop_min': 577982,\n 'meganame': None,\n 'min_areakm': 108,\n 'max_areakm': 128,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 62,\n 'bbox': ['68.7739', '38.5600', '68.7739', '38.5600'],\n 'geometry': {'type': 'Point', 'coordinates': [68.7738794, 38.5600352]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dushanbe',\n 'sov0name': 'Tajikistan',\n 'latitude': 38.560035,\n 'longitude': 68.773879,\n 'pop_max': 1086244,\n 'pop_min': 679400,\n 'meganame': None,\n 'min_areakm': 415,\n 'max_areakm': 415,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 76,\n 'bbox': ['45.3647', '2.0686', '45.3647', '2.0686'],\n 'geometry': {'type': 'Point', 'coordinates': [45.3647318, 2.0686272]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Mogadishu',\n 'sov0name': 'Somalia',\n 'latitude': 2.068627,\n 'longitude': 45.364732,\n 'pop_max': 1100000,\n 'pop_min': 875388,\n 'meganame': 'Muqdisho',\n 'min_areakm': 99,\n 'max_areakm': 99,\n 'pop1950': 69,\n 'pop1960': 94,\n 'pop1970': 272,\n 'pop1980': 551,\n 'pop1990': 1035,\n 'pop2000': 1201,\n 'pop2010': 1100,\n 'pop2020': 1794,\n 'pop2050': 2529}},\n {'id': 77,\n 'bbox': ['58.5933', '23.6133', '58.5933', '23.6133'],\n 'geometry': {'type': 'Point', 'coordinates': [58.5933121, 23.6133248]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Muscat',\n 'sov0name': 'Oman',\n 'latitude': 23.613325,\n 'longitude': 58.593312,\n 'pop_max': 734697,\n 'pop_min': 586861,\n 'meganame': None,\n 'min_areakm': 104,\n 'max_areakm': 104,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 83,\n 'bbox': ['35.9314', '31.9520', '35.9314', '31.9520'],\n 'geometry': {'type': 'Point', 'coordinates': [35.9313541, 31.9519711]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Amman',\n 'sov0name': 'Jordan',\n 'latitude': 31.951971,\n 'longitude': 35.931354,\n 'pop_max': 1060000,\n 'pop_min': 1060000,\n 'meganame': 'Amman',\n 'min_areakm': 403,\n 'max_areakm': 545,\n 'pop1950': 90,\n 'pop1960': 218,\n 'pop1970': 388,\n 'pop1980': 636,\n 'pop1990': 851,\n 'pop2000': 1007,\n 'pop2010': 1060,\n 'pop2020': 1185,\n 'pop2050': 1359}},\n {'id': 95,\n 'bbox': ['38.9333', '15.3333', '38.9333', '15.3333'],\n 'geometry': {'type': 'Point', 'coordinates': [38.9333235, 15.3333393]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Asmara',\n 'sov0name': 'Eritrea',\n 'latitude': 15.333339,\n 'longitude': 38.933324,\n 'pop_max': 620802,\n 'pop_min': 563930,\n 'meganame': None,\n 'min_areakm': 90,\n 'max_areakm': 90,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 105,\n 'bbox': ['35.5078', '33.8739', '35.5078', '33.8739'],\n 'geometry': {'type': 'Point', 'coordinates': [35.5077624, 33.873921]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Beirut',\n 'sov0name': 'Lebanon',\n 'latitude': 33.873921,\n 'longitude': 35.507762,\n 'pop_max': 1846000,\n 'pop_min': 1712125,\n 'meganame': 'Bayrut',\n 'min_areakm': 429,\n 'max_areakm': 471,\n 'pop1950': 322,\n 'pop1960': 561,\n 'pop1970': 923,\n 'pop1980': 1623,\n 'pop1990': 1293,\n 'pop2000': 1487,\n 'pop2010': 1846,\n 'pop2020': 2051,\n 'pop2050': 2173}},\n {'id': 106,\n 'bbox': ['44.7888', '41.7270', '44.7888', '41.7270'],\n 'geometry': {'type': 'Point', 'coordinates': [44.7888496, 41.7269558]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tbilisi',\n 'sov0name': 'Georgia',\n 'latitude': 41.726956,\n 'longitude': 44.78885,\n 'pop_max': 1100000,\n 'pop_min': 1005257,\n 'meganame': 'Tbilisi',\n 'min_areakm': 131,\n 'max_areakm': 135,\n 'pop1950': 612,\n 'pop1960': 718,\n 'pop1970': 897,\n 'pop1980': 1090,\n 'pop1990': 1224,\n 'pop2000': 1100,\n 'pop2010': 1100,\n 'pop2020': 1113,\n 'pop2050': 1114}},\n {'id': 120,\n 'bbox': ['44.5116', '40.1831', '44.5116', '40.1831'],\n 'geometry': {'type': 'Point', 'coordinates': [44.5116055, 40.1830966]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Yerevan',\n 'sov0name': 'Armenia',\n 'latitude': 40.183097,\n 'longitude': 44.511606,\n 'pop_max': 1102000,\n 'pop_min': 1093485,\n 'meganame': 'Yerevan',\n 'min_areakm': 191,\n 'max_areakm': 191,\n 'pop1950': 341,\n 'pop1960': 538,\n 'pop1970': 778,\n 'pop1980': 1042,\n 'pop1990': 1175,\n 'pop2000': 1111,\n 'pop2010': 1102,\n 'pop2020': 1102,\n 'pop2050': 1102}},\n {'id': 121,\n 'bbox': ['49.8603', '40.3972', '49.8603', '40.3972'],\n 'geometry': {'type': 'Point', 'coordinates': [49.8602713, 40.3972179]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Baku',\n 'sov0name': 'Azerbaijan',\n 'latitude': 40.397218,\n 'longitude': 49.860271,\n 'pop_max': 2122300,\n 'pop_min': 1892000,\n 'meganame': 'Baku',\n 'min_areakm': 246,\n 'max_areakm': 249,\n 'pop1950': 897,\n 'pop1960': 1005,\n 'pop1970': 1274,\n 'pop1980': 1574,\n 'pop1990': 1733,\n 'pop2000': 1806,\n 'pop2010': 1892,\n 'pop2020': 2006,\n 'pop2050': 2187}},\n {'id': 134,\n 'bbox': ['44.0653', '9.5600', '44.0653', '9.5600'],\n 'geometry': {'type': 'Point', 'coordinates': [44.06531, 9.5600224]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Hargeysa',\n 'sov0name': 'Somaliland',\n 'latitude': 9.560022,\n 'longitude': 44.06531,\n 'pop_max': 477876,\n 'pop_min': 247018,\n 'meganame': None,\n 'min_areakm': 40,\n 'max_areakm': 40,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 135,\n 'bbox': ['55.4500', '-4.6166', '55.4500', '-4.6166'],\n 'geometry': {'type': 'Point', 'coordinates': [55.4499898, -4.6166317]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Victoria',\n 'sov0name': 'Seychelles',\n 'latitude': -4.616632,\n 'longitude': 55.44999,\n 'pop_max': 33576,\n 'pop_min': 22881,\n 'meganame': None,\n 'min_areakm': 15,\n 'max_areakm': 15,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 140,\n 'bbox': ['35.2066', '31.7784', '35.2066', '31.7784'],\n 'geometry': {'type': 'Point', 'coordinates': [35.2066259, 31.7784078]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Jerusalem',\n 'sov0name': 'Israel',\n 'latitude': 31.778408,\n 'longitude': 35.206626,\n 'pop_max': 1029300,\n 'pop_min': 801000,\n 'meganame': None,\n 'min_areakm': 246,\n 'max_areakm': 246,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 143,\n 'bbox': ['33.3666', '35.1667', '33.3666', '35.1667'],\n 'geometry': {'type': 'Point', 'coordinates': [33.3666349, 35.1666765]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Nicosia',\n 'sov0name': 'Cyprus',\n 'latitude': 35.166677,\n 'longitude': 33.366635,\n 'pop_max': 224300,\n 'pop_min': 200452,\n 'meganame': None,\n 'min_areakm': 128,\n 'max_areakm': 128,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 148,\n 'bbox': ['44.2046', '15.3567', '44.2046', '15.3567'],\n 'geometry': {'type': 'Point', 'coordinates': [44.2046475, 15.3566792]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Sanaa',\n 'sov0name': 'Yemen',\n 'latitude': 15.356679,\n 'longitude': 44.204648,\n 'pop_max': 2008000,\n 'pop_min': 1835853,\n 'meganame': \"Sana'a'\",\n 'min_areakm': 160,\n 'max_areakm': 160,\n 'pop1950': 46,\n 'pop1960': 72,\n 'pop1970': 111,\n 'pop1980': 238,\n 'pop1990': 653,\n 'pop2000': 1365,\n 'pop2010': 2008,\n 'pop2020': 2955,\n 'pop2050': 4382}},\n {'id': 150,\n 'bbox': ['36.2981', '33.5020', '36.2981', '33.5020'],\n 'geometry': {'type': 'Point', 'coordinates': [36.29805, 33.5019799]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Damascus',\n 'sov0name': 'Syria',\n 'latitude': 33.50198,\n 'longitude': 36.29805,\n 'pop_max': 2466000,\n 'pop_min': 2466000,\n 'meganame': 'Dimashq',\n 'min_areakm': 532,\n 'max_areakm': 705,\n 'pop1950': 367,\n 'pop1960': 579,\n 'pop1970': 914,\n 'pop1980': 1376,\n 'pop1990': 1691,\n 'pop2000': 2044,\n 'pop2010': 2466,\n 'pop2020': 2981,\n 'pop2050': 3605}},\n {'id': 156,\n 'bbox': ['39.2664', '-6.7981', '39.2664', '-6.7981'],\n 'geometry': {'type': 'Point', 'coordinates': [39.266396, -6.7980667]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dar es Salaam',\n 'sov0name': 'United Republic of Tanzania',\n 'latitude': -6.798067,\n 'longitude': 39.266396,\n 'pop_max': 2930000,\n 'pop_min': 2698652,\n 'meganame': 'Dar es Salaam',\n 'min_areakm': 211,\n 'max_areakm': 211,\n 'pop1950': 67,\n 'pop1960': 162,\n 'pop1970': 357,\n 'pop1980': 836,\n 'pop1990': 1316,\n 'pop2000': 2116,\n 'pop2010': 2930,\n 'pop2020': 4020,\n 'pop2050': 5688}},\n {'id': 162,\n 'bbox': ['47.9764', '29.3717', '47.9764', '29.3717'],\n 'geometry': {'type': 'Point', 'coordinates': [47.9763553, 29.3716635]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Kuwait City',\n 'sov0name': 'Kuwait',\n 'latitude': 29.371664,\n 'longitude': 47.976355,\n 'pop_max': 2063000,\n 'pop_min': 60064,\n 'meganame': 'Al Kuwayt (Kuwait City)',\n 'min_areakm': 264,\n 'max_areakm': 366,\n 'pop1950': 63,\n 'pop1960': 179,\n 'pop1970': 553,\n 'pop1980': 891,\n 'pop1990': 1392,\n 'pop2000': 1499,\n 'pop2010': 2063,\n 'pop2020': 2592,\n 'pop2050': 2956}},\n {'id': 166,\n 'bbox': ['34.7681', '32.0819', '34.7681', '32.0819'],\n 'geometry': {'type': 'Point', 'coordinates': [34.7680659, 32.0819373]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tel Aviv-Yafo',\n 'sov0name': 'Israel',\n 'latitude': 32.081937,\n 'longitude': 34.768066,\n 'pop_max': 3112000,\n 'pop_min': 378358,\n 'meganame': 'Tel Aviv-Yafo',\n 'min_areakm': 436,\n 'max_areakm': 436,\n 'pop1950': 418,\n 'pop1960': 738,\n 'pop1970': 1029,\n 'pop1980': 1416,\n 'pop1990': 2026,\n 'pop2000': 2752,\n 'pop2010': 3112,\n 'pop2020': 3453,\n 'pop2050': 3726}},\n {'id': 184,\n 'bbox': ['55.2780', '25.2319', '55.2780', '25.2319'],\n 'geometry': {'type': 'Point', 'coordinates': [55.2780285, 25.231942]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dubai',\n 'sov0name': 'United Arab Emirates',\n 'latitude': 25.231942,\n 'longitude': 55.278029,\n 'pop_max': 1379000,\n 'pop_min': 1137347,\n 'meganame': 'Dubayy',\n 'min_areakm': 187,\n 'max_areakm': 407,\n 'pop1950': 20,\n 'pop1960': 40,\n 'pop1970': 80,\n 'pop1980': 254,\n 'pop1990': 473,\n 'pop2000': 938,\n 'pop2010': 1379,\n 'pop2020': 1709,\n 'pop2050': 2077}},\n {'id': 185,\n 'bbox': ['69.2930', '41.3136', '69.2930', '41.3136'],\n 'geometry': {'type': 'Point', 'coordinates': [69.292987, 41.3136477]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tashkent',\n 'sov0name': 'Uzbekistan',\n 'latitude': 41.313648,\n 'longitude': 69.292987,\n 'pop_max': 2184000,\n 'pop_min': 1978028,\n 'meganame': 'Tashkent',\n 'min_areakm': 639,\n 'max_areakm': 643,\n 'pop1950': 755,\n 'pop1960': 964,\n 'pop1970': 1403,\n 'pop1980': 1818,\n 'pop1990': 2100,\n 'pop2000': 2135,\n 'pop2010': 2184,\n 'pop2020': 2416,\n 'pop2050': 2892}},\n {'id': 206,\n 'bbox': ['44.3919', '33.3406', '44.3919', '33.3406'],\n 'geometry': {'type': 'Point', 'coordinates': [44.3919229, 33.3405944]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Baghdad',\n 'sov0name': 'Iraq',\n 'latitude': 33.340594,\n 'longitude': 44.391923,\n 'pop_max': 5054000,\n 'pop_min': 5054000,\n 'meganame': 'Baghdad',\n 'min_areakm': 587,\n 'max_areakm': 587,\n 'pop1950': 579,\n 'pop1960': 1019,\n 'pop1970': 2070,\n 'pop1980': 3145,\n 'pop1990': 4092,\n 'pop2000': 5200,\n 'pop2010': 5054,\n 'pop2020': 6618,\n 'pop2050': 8060}},\n {'id': 207,\n 'bbox': ['38.6981', '9.0353', '38.6981', '9.0353'],\n 'geometry': {'type': 'Point', 'coordinates': [38.6980586, 9.0352562]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Addis Ababa',\n 'sov0name': 'Ethiopia',\n 'latitude': 9.035256,\n 'longitude': 38.698059,\n 'pop_max': 3100000,\n 'pop_min': 2757729,\n 'meganame': 'Addis Ababa',\n 'min_areakm': 462,\n 'max_areakm': 1182,\n 'pop1950': 392,\n 'pop1960': 519,\n 'pop1970': 729,\n 'pop1980': 1175,\n 'pop1990': 1791,\n 'pop2000': 2493,\n 'pop2010': 3100,\n 'pop2020': 4184,\n 'pop2050': 6156}},\n {'id': 208,\n 'bbox': ['51.4224', '35.6739', '51.4224', '35.6739'],\n 'geometry': {'type': 'Point', 'coordinates': [51.4223982, 35.6738886]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tehran',\n 'sov0name': 'Iran',\n 'latitude': 35.673889,\n 'longitude': 51.422398,\n 'pop_max': 7873000,\n 'pop_min': 7153309,\n 'meganame': 'Tehran',\n 'min_areakm': 496,\n 'max_areakm': 496,\n 'pop1950': 1041,\n 'pop1960': 1873,\n 'pop1970': 3290,\n 'pop1980': 5079,\n 'pop1990': 6365,\n 'pop2000': 7128,\n 'pop2010': 7873,\n 'pop2020': 8832,\n 'pop2050': 9814}},\n {'id': 212,\n 'bbox': ['69.1813', '34.5186', '69.1813', '34.5186'],\n 'geometry': {'type': 'Point', 'coordinates': [69.1813142, 34.5186361]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Kabul',\n 'sov0name': 'Afghanistan',\n 'latitude': 34.518636,\n 'longitude': 69.181314,\n 'pop_max': 3277000,\n 'pop_min': 3043532,\n 'meganame': 'Kabul',\n 'min_areakm': 594,\n 'max_areakm': 1471,\n 'pop1950': 129,\n 'pop1960': 263,\n 'pop1970': 472,\n 'pop1980': 978,\n 'pop1990': 1306,\n 'pop2000': 1963,\n 'pop2010': 3277,\n 'pop2020': 4730,\n 'pop2050': 7175}},\n {'id': 222,\n 'bbox': ['46.7708', '24.6428', '46.7708', '24.6428'],\n 'geometry': {'type': 'Point', 'coordinates': [46.7707958, 24.642779]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Riyadh',\n 'sov0name': 'Saudi Arabia',\n 'latitude': 24.642779,\n 'longitude': 46.770796,\n 'pop_max': 4465000,\n 'pop_min': 4205961,\n 'meganame': 'Ar-Riyadh',\n 'min_areakm': 854,\n 'max_areakm': 854,\n 'pop1950': 111,\n 'pop1960': 156,\n 'pop1970': 408,\n 'pop1980': 1055,\n 'pop1990': 2325,\n 'pop2000': 3567,\n 'pop2010': 4465,\n 'pop2020': 5405,\n 'pop2050': 6275}},\n {'id': 229,\n 'bbox': ['36.8147', '-1.2814', '36.8147', '-1.2814'],\n 'geometry': {'type': 'Point', 'coordinates': [36.814711, -1.2814009]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Nairobi',\n 'sov0name': 'Kenya',\n 'latitude': -1.281401,\n 'longitude': 36.814711,\n 'pop_max': 3010000,\n 'pop_min': 2750547,\n 'meganame': 'Nairobi',\n 'min_areakm': 698,\n 'max_areakm': 719,\n 'pop1950': 137,\n 'pop1960': 293,\n 'pop1970': 531,\n 'pop1980': 862,\n 'pop1990': 1380,\n 'pop2000': 2233,\n 'pop2010': 3010,\n 'pop2020': 4052,\n 'pop2050': 5871}}]" + "text/plain": [ + "[{'id': 22,\n", + " 'bbox': ['51.5330', '25.2866', '51.5330', '25.2866'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [51.5329679, 25.286556]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Doha',\n", + " 'sov0name': 'Qatar',\n", + " 'latitude': 25.286556,\n", + " 'longitude': 51.532968,\n", + " 'pop_max': 1450000,\n", + " 'pop_min': 731310,\n", + " 'meganame': None,\n", + " 'min_areakm': 270,\n", + " 'max_areakm': 270,\n", + " 'pop1950': 0,\n", + " 'pop1960': 0,\n", + " 'pop1970': 0,\n", + " 'pop1980': 0,\n", + " 'pop1990': 0,\n", + " 'pop2000': 0,\n", + " 'pop2010': 0,\n", + " 'pop2020': 0,\n", + " 'pop2050': 0}},\n", + " {'id': 26,\n", + " 'bbox': ['35.7500', '-6.1833', '35.7500', '-6.1833'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [35.7500036, -6.1833061]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Dodoma',\n", + " 'sov0name': 'United Republic of Tanzania',\n", + " 'latitude': -6.183306,\n", + " 'longitude': 35.750004,\n", + " 'pop_max': 218269,\n", + " 'pop_min': 180541,\n", + " 'meganame': None,\n", + " 'min_areakm': 55,\n", + " 'max_areakm': 55,\n", + " 'pop1950': 0,\n", + " 'pop1960': 0,\n", + " 'pop1970': 0,\n", + " 'pop1980': 0,\n", + " 'pop1990': 0,\n", + " 'pop2000': 0,\n", + " 'pop2010': 0,\n", + " 'pop2020': 0,\n", + " 'pop2050': 0}},\n", + " {'id': 31,\n", + " 'bbox': ['43.1480', '11.5950', '43.1480', '11.5950'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [43.1480017, 11.5950145]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Djibouti',\n", + " 'sov0name': 'Djibouti',\n", + " 'latitude': 11.595015,\n", + " 'longitude': 43.148002,\n", + " 'pop_max': 923000,\n", + " 'pop_min': 604013,\n", + " 'meganame': None,\n", + " 'min_areakm': 42,\n", + " 'max_areakm': 42,\n", + " 'pop1950': 0,\n", + " 'pop1960': 0,\n", + " 'pop1970': 0,\n", + " 'pop1980': 0,\n", + " 'pop1990': 0,\n", + " 'pop2000': 0,\n", + " 'pop2010': 0,\n", + " 'pop2020': 0,\n", + " 'pop2050': 0}},\n", + " {'id': 44,\n", + " 'bbox': ['50.5831', '26.2361', '50.5831', '26.2361'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [50.5830517, 26.2361363]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Manama',\n", + " 'sov0name': 'Bahrain',\n", + " 'latitude': 26.236136,\n", + " 'longitude': 50.583052,\n", + " 'pop_max': 563920,\n", + " 'pop_min': 157474,\n", + " 'meganame': None,\n", + " 'min_areakm': 178,\n", + " 'max_areakm': 178,\n", + " 'pop1950': 0,\n", + " 'pop1960': 0,\n", + " 'pop1970': 0,\n", + " 'pop1980': 0,\n", + " 'pop1990': 0,\n", + " 'pop2000': 0,\n", + " 'pop2010': 0,\n", + " 'pop2020': 0,\n", + " 'pop2050': 0}},\n", + " {'id': 49,\n", + " 'bbox': ['54.3666', '24.4667', '54.3666', '24.4667'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [54.3665934, 24.4666836]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Abu Dhabi',\n", + " 'sov0name': 'United Arab Emirates',\n", + " 'latitude': 24.466684,\n", + " 'longitude': 54.366593,\n", + " 'pop_max': 603492,\n", + " 'pop_min': 560230,\n", + " 'meganame': None,\n", + " 'min_areakm': 96,\n", + " 'max_areakm': 96,\n", + " 'pop1950': 0,\n", + " 'pop1960': 0,\n", + " 'pop1970': 0,\n", + " 'pop1980': 0,\n", + " 'pop1990': 0,\n", + " 'pop2000': 0,\n", + " 'pop2010': 0,\n", + " 'pop2020': 0,\n", + " 'pop2050': 0}},\n", + " {'id': 50,\n", + " 'bbox': ['58.3833', '37.9500', '58.3833', '37.9500'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [58.3832991, 37.9499949]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Ashgabat',\n", + " 'sov0name': 'Turkmenistan',\n", + " 'latitude': 37.949995,\n", + " 'longitude': 58.383299,\n", + " 'pop_max': 727700,\n", + " 'pop_min': 577982,\n", + " 'meganame': None,\n", + " 'min_areakm': 108,\n", + " 'max_areakm': 128,\n", + " 'pop1950': 0,\n", + " 'pop1960': 0,\n", + " 'pop1970': 0,\n", + " 'pop1980': 0,\n", + " 'pop1990': 0,\n", + " 'pop2000': 0,\n", + " 'pop2010': 0,\n", + " 'pop2020': 0,\n", + " 'pop2050': 0}},\n", + " {'id': 62,\n", + " 'bbox': ['68.7739', '38.5600', '68.7739', '38.5600'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [68.7738794, 38.5600352]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Dushanbe',\n", + " 'sov0name': 'Tajikistan',\n", + " 'latitude': 38.560035,\n", + " 'longitude': 68.773879,\n", + " 'pop_max': 1086244,\n", + " 'pop_min': 679400,\n", + " 'meganame': None,\n", + " 'min_areakm': 415,\n", + " 'max_areakm': 415,\n", + " 'pop1950': 0,\n", + " 'pop1960': 0,\n", + " 'pop1970': 0,\n", + " 'pop1980': 0,\n", + " 'pop1990': 0,\n", + " 'pop2000': 0,\n", + " 'pop2010': 0,\n", + " 'pop2020': 0,\n", + " 'pop2050': 0}},\n", + " {'id': 76,\n", + " 'bbox': ['45.3647', '2.0686', '45.3647', '2.0686'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [45.3647318, 2.0686272]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Mogadishu',\n", + " 'sov0name': 'Somalia',\n", + " 'latitude': 2.068627,\n", + " 'longitude': 45.364732,\n", + " 'pop_max': 1100000,\n", + " 'pop_min': 875388,\n", + " 'meganame': 'Muqdisho',\n", + " 'min_areakm': 99,\n", + " 'max_areakm': 99,\n", + " 'pop1950': 69,\n", + " 'pop1960': 94,\n", + " 'pop1970': 272,\n", + " 'pop1980': 551,\n", + " 'pop1990': 1035,\n", + " 'pop2000': 1201,\n", + " 'pop2010': 1100,\n", + " 'pop2020': 1794,\n", + " 'pop2050': 2529}},\n", + " {'id': 77,\n", + " 'bbox': ['58.5933', '23.6133', '58.5933', '23.6133'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [58.5933121, 23.6133248]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Muscat',\n", + " 'sov0name': 'Oman',\n", + " 'latitude': 23.613325,\n", + " 'longitude': 58.593312,\n", + " 'pop_max': 734697,\n", + " 'pop_min': 586861,\n", + " 'meganame': None,\n", + " 'min_areakm': 104,\n", + " 'max_areakm': 104,\n", + " 'pop1950': 0,\n", + " 'pop1960': 0,\n", + " 'pop1970': 0,\n", + " 'pop1980': 0,\n", + " 'pop1990': 0,\n", + " 'pop2000': 0,\n", + " 'pop2010': 0,\n", + " 'pop2020': 0,\n", + " 'pop2050': 0}},\n", + " {'id': 83,\n", + " 'bbox': ['35.9314', '31.9520', '35.9314', '31.9520'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [35.9313541, 31.9519711]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Amman',\n", + " 'sov0name': 'Jordan',\n", + " 'latitude': 31.951971,\n", + " 'longitude': 35.931354,\n", + " 'pop_max': 1060000,\n", + " 'pop_min': 1060000,\n", + " 'meganame': 'Amman',\n", + " 'min_areakm': 403,\n", + " 'max_areakm': 545,\n", + " 'pop1950': 90,\n", + " 'pop1960': 218,\n", + " 'pop1970': 388,\n", + " 'pop1980': 636,\n", + " 'pop1990': 851,\n", + " 'pop2000': 1007,\n", + " 'pop2010': 1060,\n", + " 'pop2020': 1185,\n", + " 'pop2050': 1359}},\n", + " {'id': 95,\n", + " 'bbox': ['38.9333', '15.3333', '38.9333', '15.3333'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [38.9333235, 15.3333393]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Asmara',\n", + " 'sov0name': 'Eritrea',\n", + " 'latitude': 15.333339,\n", + " 'longitude': 38.933324,\n", + " 'pop_max': 620802,\n", + " 'pop_min': 563930,\n", + " 'meganame': None,\n", + " 'min_areakm': 90,\n", + " 'max_areakm': 90,\n", + " 'pop1950': 0,\n", + " 'pop1960': 0,\n", + " 'pop1970': 0,\n", + " 'pop1980': 0,\n", + " 'pop1990': 0,\n", + " 'pop2000': 0,\n", + " 'pop2010': 0,\n", + " 'pop2020': 0,\n", + " 'pop2050': 0}},\n", + " {'id': 105,\n", + " 'bbox': ['35.5078', '33.8739', '35.5078', '33.8739'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [35.5077624, 33.873921]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Beirut',\n", + " 'sov0name': 'Lebanon',\n", + " 'latitude': 33.873921,\n", + " 'longitude': 35.507762,\n", + " 'pop_max': 1846000,\n", + " 'pop_min': 1712125,\n", + " 'meganame': 'Bayrut',\n", + " 'min_areakm': 429,\n", + " 'max_areakm': 471,\n", + " 'pop1950': 322,\n", + " 'pop1960': 561,\n", + " 'pop1970': 923,\n", + " 'pop1980': 1623,\n", + " 'pop1990': 1293,\n", + " 'pop2000': 1487,\n", + " 'pop2010': 1846,\n", + " 'pop2020': 2051,\n", + " 'pop2050': 2173}},\n", + " {'id': 106,\n", + " 'bbox': ['44.7888', '41.7270', '44.7888', '41.7270'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [44.7888496, 41.7269558]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Tbilisi',\n", + " 'sov0name': 'Georgia',\n", + " 'latitude': 41.726956,\n", + " 'longitude': 44.78885,\n", + " 'pop_max': 1100000,\n", + " 'pop_min': 1005257,\n", + " 'meganame': 'Tbilisi',\n", + " 'min_areakm': 131,\n", + " 'max_areakm': 135,\n", + " 'pop1950': 612,\n", + " 'pop1960': 718,\n", + " 'pop1970': 897,\n", + " 'pop1980': 1090,\n", + " 'pop1990': 1224,\n", + " 'pop2000': 1100,\n", + " 'pop2010': 1100,\n", + " 'pop2020': 1113,\n", + " 'pop2050': 1114}},\n", + " {'id': 120,\n", + " 'bbox': ['44.5116', '40.1831', '44.5116', '40.1831'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [44.5116055, 40.1830966]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Yerevan',\n", + " 'sov0name': 'Armenia',\n", + " 'latitude': 40.183097,\n", + " 'longitude': 44.511606,\n", + " 'pop_max': 1102000,\n", + " 'pop_min': 1093485,\n", + " 'meganame': 'Yerevan',\n", + " 'min_areakm': 191,\n", + " 'max_areakm': 191,\n", + " 'pop1950': 341,\n", + " 'pop1960': 538,\n", + " 'pop1970': 778,\n", + " 'pop1980': 1042,\n", + " 'pop1990': 1175,\n", + " 'pop2000': 1111,\n", + " 'pop2010': 1102,\n", + " 'pop2020': 1102,\n", + " 'pop2050': 1102}},\n", + " {'id': 121,\n", + " 'bbox': ['49.8603', '40.3972', '49.8603', '40.3972'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [49.8602713, 40.3972179]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Baku',\n", + " 'sov0name': 'Azerbaijan',\n", + " 'latitude': 40.397218,\n", + " 'longitude': 49.860271,\n", + " 'pop_max': 2122300,\n", + " 'pop_min': 1892000,\n", + " 'meganame': 'Baku',\n", + " 'min_areakm': 246,\n", + " 'max_areakm': 249,\n", + " 'pop1950': 897,\n", + " 'pop1960': 1005,\n", + " 'pop1970': 1274,\n", + " 'pop1980': 1574,\n", + " 'pop1990': 1733,\n", + " 'pop2000': 1806,\n", + " 'pop2010': 1892,\n", + " 'pop2020': 2006,\n", + " 'pop2050': 2187}},\n", + " {'id': 134,\n", + " 'bbox': ['44.0653', '9.5600', '44.0653', '9.5600'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [44.06531, 9.5600224]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Hargeysa',\n", + " 'sov0name': 'Somaliland',\n", + " 'latitude': 9.560022,\n", + " 'longitude': 44.06531,\n", + " 'pop_max': 477876,\n", + " 'pop_min': 247018,\n", + " 'meganame': None,\n", + " 'min_areakm': 40,\n", + " 'max_areakm': 40,\n", + " 'pop1950': 0,\n", + " 'pop1960': 0,\n", + " 'pop1970': 0,\n", + " 'pop1980': 0,\n", + " 'pop1990': 0,\n", + " 'pop2000': 0,\n", + " 'pop2010': 0,\n", + " 'pop2020': 0,\n", + " 'pop2050': 0}},\n", + " {'id': 135,\n", + " 'bbox': ['55.4500', '-4.6166', '55.4500', '-4.6166'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [55.4499898, -4.6166317]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Victoria',\n", + " 'sov0name': 'Seychelles',\n", + " 'latitude': -4.616632,\n", + " 'longitude': 55.44999,\n", + " 'pop_max': 33576,\n", + " 'pop_min': 22881,\n", + " 'meganame': None,\n", + " 'min_areakm': 15,\n", + " 'max_areakm': 15,\n", + " 'pop1950': 0,\n", + " 'pop1960': 0,\n", + " 'pop1970': 0,\n", + " 'pop1980': 0,\n", + " 'pop1990': 0,\n", + " 'pop2000': 0,\n", + " 'pop2010': 0,\n", + " 'pop2020': 0,\n", + " 'pop2050': 0}},\n", + " {'id': 140,\n", + " 'bbox': ['35.2066', '31.7784', '35.2066', '31.7784'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [35.2066259, 31.7784078]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Jerusalem',\n", + " 'sov0name': 'Israel',\n", + " 'latitude': 31.778408,\n", + " 'longitude': 35.206626,\n", + " 'pop_max': 1029300,\n", + " 'pop_min': 801000,\n", + " 'meganame': None,\n", + " 'min_areakm': 246,\n", + " 'max_areakm': 246,\n", + " 'pop1950': 0,\n", + " 'pop1960': 0,\n", + " 'pop1970': 0,\n", + " 'pop1980': 0,\n", + " 'pop1990': 0,\n", + " 'pop2000': 0,\n", + " 'pop2010': 0,\n", + " 'pop2020': 0,\n", + " 'pop2050': 0}},\n", + " {'id': 143,\n", + " 'bbox': ['33.3666', '35.1667', '33.3666', '35.1667'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [33.3666349, 35.1666765]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Nicosia',\n", + " 'sov0name': 'Cyprus',\n", + " 'latitude': 35.166677,\n", + " 'longitude': 33.366635,\n", + " 'pop_max': 224300,\n", + " 'pop_min': 200452,\n", + " 'meganame': None,\n", + " 'min_areakm': 128,\n", + " 'max_areakm': 128,\n", + " 'pop1950': 0,\n", + " 'pop1960': 0,\n", + " 'pop1970': 0,\n", + " 'pop1980': 0,\n", + " 'pop1990': 0,\n", + " 'pop2000': 0,\n", + " 'pop2010': 0,\n", + " 'pop2020': 0,\n", + " 'pop2050': 0}},\n", + " {'id': 148,\n", + " 'bbox': ['44.2046', '15.3567', '44.2046', '15.3567'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [44.2046475, 15.3566792]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Sanaa',\n", + " 'sov0name': 'Yemen',\n", + " 'latitude': 15.356679,\n", + " 'longitude': 44.204648,\n", + " 'pop_max': 2008000,\n", + " 'pop_min': 1835853,\n", + " 'meganame': \"Sana'a'\",\n", + " 'min_areakm': 160,\n", + " 'max_areakm': 160,\n", + " 'pop1950': 46,\n", + " 'pop1960': 72,\n", + " 'pop1970': 111,\n", + " 'pop1980': 238,\n", + " 'pop1990': 653,\n", + " 'pop2000': 1365,\n", + " 'pop2010': 2008,\n", + " 'pop2020': 2955,\n", + " 'pop2050': 4382}},\n", + " {'id': 150,\n", + " 'bbox': ['36.2981', '33.5020', '36.2981', '33.5020'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [36.29805, 33.5019799]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Damascus',\n", + " 'sov0name': 'Syria',\n", + " 'latitude': 33.50198,\n", + " 'longitude': 36.29805,\n", + " 'pop_max': 2466000,\n", + " 'pop_min': 2466000,\n", + " 'meganame': 'Dimashq',\n", + " 'min_areakm': 532,\n", + " 'max_areakm': 705,\n", + " 'pop1950': 367,\n", + " 'pop1960': 579,\n", + " 'pop1970': 914,\n", + " 'pop1980': 1376,\n", + " 'pop1990': 1691,\n", + " 'pop2000': 2044,\n", + " 'pop2010': 2466,\n", + " 'pop2020': 2981,\n", + " 'pop2050': 3605}},\n", + " {'id': 156,\n", + " 'bbox': ['39.2664', '-6.7981', '39.2664', '-6.7981'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [39.266396, -6.7980667]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Dar es Salaam',\n", + " 'sov0name': 'United Republic of Tanzania',\n", + " 'latitude': -6.798067,\n", + " 'longitude': 39.266396,\n", + " 'pop_max': 2930000,\n", + " 'pop_min': 2698652,\n", + " 'meganame': 'Dar es Salaam',\n", + " 'min_areakm': 211,\n", + " 'max_areakm': 211,\n", + " 'pop1950': 67,\n", + " 'pop1960': 162,\n", + " 'pop1970': 357,\n", + " 'pop1980': 836,\n", + " 'pop1990': 1316,\n", + " 'pop2000': 2116,\n", + " 'pop2010': 2930,\n", + " 'pop2020': 4020,\n", + " 'pop2050': 5688}},\n", + " {'id': 162,\n", + " 'bbox': ['47.9764', '29.3717', '47.9764', '29.3717'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [47.9763553, 29.3716635]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Kuwait City',\n", + " 'sov0name': 'Kuwait',\n", + " 'latitude': 29.371664,\n", + " 'longitude': 47.976355,\n", + " 'pop_max': 2063000,\n", + " 'pop_min': 60064,\n", + " 'meganame': 'Al Kuwayt (Kuwait City)',\n", + " 'min_areakm': 264,\n", + " 'max_areakm': 366,\n", + " 'pop1950': 63,\n", + " 'pop1960': 179,\n", + " 'pop1970': 553,\n", + " 'pop1980': 891,\n", + " 'pop1990': 1392,\n", + " 'pop2000': 1499,\n", + " 'pop2010': 2063,\n", + " 'pop2020': 2592,\n", + " 'pop2050': 2956}},\n", + " {'id': 166,\n", + " 'bbox': ['34.7681', '32.0819', '34.7681', '32.0819'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [34.7680659, 32.0819373]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Tel Aviv-Yafo',\n", + " 'sov0name': 'Israel',\n", + " 'latitude': 32.081937,\n", + " 'longitude': 34.768066,\n", + " 'pop_max': 3112000,\n", + " 'pop_min': 378358,\n", + " 'meganame': 'Tel Aviv-Yafo',\n", + " 'min_areakm': 436,\n", + " 'max_areakm': 436,\n", + " 'pop1950': 418,\n", + " 'pop1960': 738,\n", + " 'pop1970': 1029,\n", + " 'pop1980': 1416,\n", + " 'pop1990': 2026,\n", + " 'pop2000': 2752,\n", + " 'pop2010': 3112,\n", + " 'pop2020': 3453,\n", + " 'pop2050': 3726}},\n", + " {'id': 184,\n", + " 'bbox': ['55.2780', '25.2319', '55.2780', '25.2319'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [55.2780285, 25.231942]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Dubai',\n", + " 'sov0name': 'United Arab Emirates',\n", + " 'latitude': 25.231942,\n", + " 'longitude': 55.278029,\n", + " 'pop_max': 1379000,\n", + " 'pop_min': 1137347,\n", + " 'meganame': 'Dubayy',\n", + " 'min_areakm': 187,\n", + " 'max_areakm': 407,\n", + " 'pop1950': 20,\n", + " 'pop1960': 40,\n", + " 'pop1970': 80,\n", + " 'pop1980': 254,\n", + " 'pop1990': 473,\n", + " 'pop2000': 938,\n", + " 'pop2010': 1379,\n", + " 'pop2020': 1709,\n", + " 'pop2050': 2077}},\n", + " {'id': 185,\n", + " 'bbox': ['69.2930', '41.3136', '69.2930', '41.3136'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [69.292987, 41.3136477]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Tashkent',\n", + " 'sov0name': 'Uzbekistan',\n", + " 'latitude': 41.313648,\n", + " 'longitude': 69.292987,\n", + " 'pop_max': 2184000,\n", + " 'pop_min': 1978028,\n", + " 'meganame': 'Tashkent',\n", + " 'min_areakm': 639,\n", + " 'max_areakm': 643,\n", + " 'pop1950': 755,\n", + " 'pop1960': 964,\n", + " 'pop1970': 1403,\n", + " 'pop1980': 1818,\n", + " 'pop1990': 2100,\n", + " 'pop2000': 2135,\n", + " 'pop2010': 2184,\n", + " 'pop2020': 2416,\n", + " 'pop2050': 2892}},\n", + " {'id': 206,\n", + " 'bbox': ['44.3919', '33.3406', '44.3919', '33.3406'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [44.3919229, 33.3405944]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Baghdad',\n", + " 'sov0name': 'Iraq',\n", + " 'latitude': 33.340594,\n", + " 'longitude': 44.391923,\n", + " 'pop_max': 5054000,\n", + " 'pop_min': 5054000,\n", + " 'meganame': 'Baghdad',\n", + " 'min_areakm': 587,\n", + " 'max_areakm': 587,\n", + " 'pop1950': 579,\n", + " 'pop1960': 1019,\n", + " 'pop1970': 2070,\n", + " 'pop1980': 3145,\n", + " 'pop1990': 4092,\n", + " 'pop2000': 5200,\n", + " 'pop2010': 5054,\n", + " 'pop2020': 6618,\n", + " 'pop2050': 8060}},\n", + " {'id': 207,\n", + " 'bbox': ['38.6981', '9.0353', '38.6981', '9.0353'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [38.6980586, 9.0352562]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Addis Ababa',\n", + " 'sov0name': 'Ethiopia',\n", + " 'latitude': 9.035256,\n", + " 'longitude': 38.698059,\n", + " 'pop_max': 3100000,\n", + " 'pop_min': 2757729,\n", + " 'meganame': 'Addis Ababa',\n", + " 'min_areakm': 462,\n", + " 'max_areakm': 1182,\n", + " 'pop1950': 392,\n", + " 'pop1960': 519,\n", + " 'pop1970': 729,\n", + " 'pop1980': 1175,\n", + " 'pop1990': 1791,\n", + " 'pop2000': 2493,\n", + " 'pop2010': 3100,\n", + " 'pop2020': 4184,\n", + " 'pop2050': 6156}},\n", + " {'id': 208,\n", + " 'bbox': ['51.4224', '35.6739', '51.4224', '35.6739'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [51.4223982, 35.6738886]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Tehran',\n", + " 'sov0name': 'Iran',\n", + " 'latitude': 35.673889,\n", + " 'longitude': 51.422398,\n", + " 'pop_max': 7873000,\n", + " 'pop_min': 7153309,\n", + " 'meganame': 'Tehran',\n", + " 'min_areakm': 496,\n", + " 'max_areakm': 496,\n", + " 'pop1950': 1041,\n", + " 'pop1960': 1873,\n", + " 'pop1970': 3290,\n", + " 'pop1980': 5079,\n", + " 'pop1990': 6365,\n", + " 'pop2000': 7128,\n", + " 'pop2010': 7873,\n", + " 'pop2020': 8832,\n", + " 'pop2050': 9814}},\n", + " {'id': 212,\n", + " 'bbox': ['69.1813', '34.5186', '69.1813', '34.5186'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [69.1813142, 34.5186361]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Kabul',\n", + " 'sov0name': 'Afghanistan',\n", + " 'latitude': 34.518636,\n", + " 'longitude': 69.181314,\n", + " 'pop_max': 3277000,\n", + " 'pop_min': 3043532,\n", + " 'meganame': 'Kabul',\n", + " 'min_areakm': 594,\n", + " 'max_areakm': 1471,\n", + " 'pop1950': 129,\n", + " 'pop1960': 263,\n", + " 'pop1970': 472,\n", + " 'pop1980': 978,\n", + " 'pop1990': 1306,\n", + " 'pop2000': 1963,\n", + " 'pop2010': 3277,\n", + " 'pop2020': 4730,\n", + " 'pop2050': 7175}},\n", + " {'id': 222,\n", + " 'bbox': ['46.7708', '24.6428', '46.7708', '24.6428'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [46.7707958, 24.642779]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Riyadh',\n", + " 'sov0name': 'Saudi Arabia',\n", + " 'latitude': 24.642779,\n", + " 'longitude': 46.770796,\n", + " 'pop_max': 4465000,\n", + " 'pop_min': 4205961,\n", + " 'meganame': 'Ar-Riyadh',\n", + " 'min_areakm': 854,\n", + " 'max_areakm': 854,\n", + " 'pop1950': 111,\n", + " 'pop1960': 156,\n", + " 'pop1970': 408,\n", + " 'pop1980': 1055,\n", + " 'pop1990': 2325,\n", + " 'pop2000': 3567,\n", + " 'pop2010': 4465,\n", + " 'pop2020': 5405,\n", + " 'pop2050': 6275}},\n", + " {'id': 229,\n", + " 'bbox': ['36.8147', '-1.2814', '36.8147', '-1.2814'],\n", + " 'geometry': {'type': 'Point', 'coordinates': [36.814711, -1.2814009]},\n", + " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", + " 'modified_at': None,\n", + " 'name': 'Nairobi',\n", + " 'sov0name': 'Kenya',\n", + " 'latitude': -1.281401,\n", + " 'longitude': 36.814711,\n", + " 'pop_max': 3010000,\n", + " 'pop_min': 2750547,\n", + " 'meganame': 'Nairobi',\n", + " 'min_areakm': 698,\n", + " 'max_areakm': 719,\n", + " 'pop1950': 137,\n", + " 'pop1960': 293,\n", + " 'pop1970': 531,\n", + " 'pop1980': 862,\n", + " 'pop1990': 1380,\n", + " 'pop2000': 2233,\n", + " 'pop2010': 3010,\n", + " 'pop2020': 4052,\n", + " 'pop2050': 5871}}]" + ] }, - "execution_count": 21, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } From a4c9404b9a0b92dcecd457c3792495ea69b7ba57 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 19 Jul 2022 23:33:05 +0200 Subject: [PATCH 069/163] added documentation --- how-to-deploy.md | 106 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 how-to-deploy.md diff --git a/how-to-deploy.md b/how-to-deploy.md new file mode 100644 index 0000000..25e6b87 --- /dev/null +++ b/how-to-deploy.md @@ -0,0 +1,106 @@ +# xcube-geodb-openeo deployment + +This document is intended to show all necessary steps to deploy the geoDB- +openEO server to the BC K8s stage cluster. + +There is quite a large number of actors which have to be correctly configured +for the service to work: +- a GitHub action inside this repository +- a Dockerfile inside this repository +- a Helm chart, residing within the bc-org k8s-configs repository +- BC's internet provider IONOS +- the bc-org k8s-namespaces repository +- ArgoCD + +### GitHub action + +A GitHub action has been set up at `.github/workflows/workflow.yaml` +This workflow: +- runs the unit-level tests +- builds a docker image using the steps + 1) check out (of xcube-geodb-openeo) + 2) get tag of release or branch to set it to the docker image + 3) retrieve the version of geoDB-openEO + 4) deployment phase (dev/stage/prod/ignore), to determine if docker image + actually shall be built + 5) Build docker image + - name: `bcdev/xcube-geodb-openeo-server`, tag: fetched in previous + step 2 +- Uploads docker image to [quay.io](https://quay.io/repository/bcdev/xcube-geodb-openeo-server) + - uses + - `secrets.QUAY_REG_USERNAME` + - `secrets.QUAY_REG_PASSWORD` +- can be configured with the following variables: + - `SKIP_UNITTESTS:` "0" or "1"; if set to "1", unit tests are skipped + - `FORCE_DOCKER_BUILD`: "1"; if set to "1", a docker image will be built and + uploaded to quay.io, regardless of the tag or release +- The GH action does no change on the helm chart. This may be added later. + +### Dockerfile + +The Dockerfile is based on miniconda. It +1) activates the base environment +2) clones the xcube-GitHub repository +3) checks out the branch that contains the server +4) and installs it into the base environment +5) then installs the current repository, i.e. xcube-geodb-openeo, into the base + environment + +In its `CMD` call, it passes the file `/etc/config/config.yml` to the starting +server. + +### Helm chart + +The helm chart for the xcube-geodb-openeo-server is located in [k8s-configs](https://github.com/bc-org/k8s-configs/tree/thomas_xxx_add-geodb-openeo/xcube-geodb-openeo/helm). +It consists of: +1) templates for + - config-map (`api-config-map.yaml`), where the config is specified, and + configured to reside in a file `config.yml` + - deployment (`api-deployment.yaml`), where the container is defined + (i.e. the docker image), credentials are put into the environment, and + the config map is written into a file at `/etc/config` + - ingress (`api-ingress.yaml`), where the exposure to the public internet + is configured + - service (`api-service.yaml`), where port and protocol are configured +2) a values file used to fill in the templates. Currently in use: + `values-dev.yaml` and `values.yaml`. Currently not used, but kept as + reference: `values-stage.yaml`. + In these files, the following values are set: + - the actual Docker image value + - the ingress encryption method + - the host name + +### IONOS + +Needed to add a CNAME, so the server can be reached on a human-readable URL. +This has been done using these +[directions](https://github.com/bc-org/k8s-configs/blob/main/howtos/How_to_add_new_CNAME_record.md). + +### k8s-namespaces + +Used to store secrets securely in a deployment, instead of putting them +insecurely into the config map. Usage: every time the values change in +[values-xcube-geodb.yaml](https://github.com/bc-org/k8s-namespaces/blob/main/helm/namespaces/values-xcube-geodb.yaml), +run the [workflow](https://github.com/bc-org/k8s-namespaces/actions/workflows/create-xcube-geodb-namespaces-workflow.yaml) +manually. Then, the namespace on the K8s cluster on AWS is updated. + +The values inside that file will change if a secret is added, changed or +removed. Currently, these are the secret credentials for the geodb-access. + +The workflow is defined [here](https://github.com/bc-org/k8s-namespaces/blob/main/.github/workflows/create-xcube-geodb-namespaces-workflow.yaml). +Note that there are different ones on the same level; this one is the one used +for xcube-geodb-openeo, because xcube-geodb-openeo uses the xcube-geodb +namespace, as configured in `values-dev.yaml` in k8s-configs. + +### ArgoCD-Deployment + +The purpose of the argoCD deployment is to take the helm chart and deploy it to +BCs AWS K8s. It can be found [here](https://argocd.dev.xcube.brockmann-consult.de/applications/geodb-openeo). + +The relevant configuration values are: +- Cluster: `xc-dev-v2` +- Namespace: `xc-geodb` +- Using helm chart from + - `git@github.com:bc-org/k8s-configs.git` + - at branch `thomas_xxx_add-geodb-openeo` + - path `xcube-geodb-openeo/helm` \ No newline at end of file From 2b00278e90e5cb9035945581d44191208aa92931 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 19 Jul 2022 23:58:03 +0200 Subject: [PATCH 070/163] tests are waiting for server to start up --- tests/server/app/test_capabilities.py | 14 ++++++++++++-- tests/server/app/test_data_discovery.py | 9 +++++++++ tests/server/app/test_processing.py | 9 +++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/tests/server/app/test_capabilities.py b/tests/server/app/test_capabilities.py index 41d3dec..9cb5c60 100644 --- a/tests/server/app/test_capabilities.py +++ b/tests/server/app/test_capabilities.py @@ -1,5 +1,7 @@ import json +import os import pkgutil +import time from typing import Dict import yaml @@ -11,9 +13,17 @@ class CapabilitiesTest(ServerTest): + def setUp(self) -> None: + super().setUp() + wait_for_server_startup = os.environ.get('WAIT_FOR_STARTUP', + '0') == '1' + if wait_for_server_startup: + time.sleep(10) + def add_extension(self, er: ExtensionRegistry) -> None: - er.add_extension(loader=extension.import_component('xcube_geodb_openeo.api:api'), - point=EXTENSION_POINT_SERVER_APIS, name='geodb-openeo') + er.add_extension( + loader=extension.import_component('xcube_geodb_openeo.api:api'), + point=EXTENSION_POINT_SERVER_APIS, name='geodb-openeo') def add_config(self, config: Dict): data = pkgutil.get_data('tests', 'test_config.yml') diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index 80c1640..08040fb 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -1,5 +1,7 @@ import json +import os import pkgutil +import time from typing import Dict import yaml @@ -12,6 +14,13 @@ class DataDiscoveryTest(ServerTest): + def setUp(self) -> None: + super().setUp() + wait_for_server_startup = os.environ.get('WAIT_FOR_STARTUP', + '0') == '1' + if wait_for_server_startup: + time.sleep(10) + def add_extension(self, er: ExtensionRegistry) -> None: er.add_extension(loader=extension.import_component('xcube_geodb_openeo.api:api'), point=EXTENSION_POINT_SERVER_APIS, name='geodb-openeo') diff --git a/tests/server/app/test_processing.py b/tests/server/app/test_processing.py index 776e0a6..9d18640 100644 --- a/tests/server/app/test_processing.py +++ b/tests/server/app/test_processing.py @@ -19,7 +19,9 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. import json +import os import pkgutil +import time from typing import Dict import yaml @@ -35,6 +37,13 @@ class ProcessingTest(ServerTest): + def setUp(self) -> None: + super().setUp() + wait_for_server_startup = os.environ.get('WAIT_FOR_STARTUP', + '0') == '1' + if wait_for_server_startup: + time.sleep(10) + def add_extension(self, er: ExtensionRegistry) -> None: er.add_extension( loader=extension.import_component('xcube_geodb_openeo.api:api'), From 1c20dc75b669c38b67a98b8ab4fa2f4e8c90b8dd Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 20 Jul 2022 00:46:04 +0200 Subject: [PATCH 071/163] trying to move property from default to k8s-configs --- .github/workflows/workflow.yaml | 2 +- xcube_geodb_openeo/server/config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 19ed645..40d66d3 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -14,7 +14,7 @@ env: WAIT_FOR_STARTUP: "1" # If set to 1, docker build is performed - FORCE_DOCKER_BUILD: "0" + FORCE_DOCKER_BUILD: "1" jobs: diff --git a/xcube_geodb_openeo/server/config.py b/xcube_geodb_openeo/server/config.py index 40d2123..4fea852 100644 --- a/xcube_geodb_openeo/server/config.py +++ b/xcube_geodb_openeo/server/config.py @@ -35,5 +35,5 @@ client_secret=JsonStringSchema(), auth_domain=JsonStringSchema()) )), - additional_properties=False + additional_properties=True ) From 4f590c79ef75e8f7525eeab8fb48cc6fa57ca6a4 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 20 Jul 2022 02:17:10 +0200 Subject: [PATCH 072/163] fix! --- xcube_geodb_openeo/api/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcube_geodb_openeo/api/context.py b/xcube_geodb_openeo/api/context.py index 6aafb0f..b00efcc 100644 --- a/xcube_geodb_openeo/api/context.py +++ b/xcube_geodb_openeo/api/context.py @@ -79,7 +79,7 @@ def __init__(self, root: Context): self._request = None self.config = root.config for key in default_config.keys(): - if key not in self.config: + if key not in self.config['geodb_openeo']: self.config['geodb_openeo'][key] = default_config[key] self._collections = {} From 70177103d04adfb554240d0a621b1f7a576791c5 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 20 Jul 2022 12:52:06 +0200 Subject: [PATCH 073/163] addressing PR comments --- tests/server/app/base_test.py | 34 +++++++++++++++++++++++++ tests/server/app/test_capabilities.py | 12 ++------- tests/server/app/test_data_discovery.py | 20 +++++---------- tests/server/app/test_processing.py | 15 +++-------- 4 files changed, 46 insertions(+), 35 deletions(-) create mode 100644 tests/server/app/base_test.py diff --git a/tests/server/app/base_test.py b/tests/server/app/base_test.py new file mode 100644 index 0000000..34aa0c9 --- /dev/null +++ b/tests/server/app/base_test.py @@ -0,0 +1,34 @@ +# The MIT License (MIT) +# Copyright (c) 2021/2022 by the xcube team and contributors +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +import os +import time +from xcube.server.testing import ServerTest + + +class BaseTest(ServerTest): + + def setUp(self) -> None: + super().setUp() + wait_for_server_startup = os.environ.get('WAIT_FOR_STARTUP', + '0') == '1' + if wait_for_server_startup: + time.sleep(10) diff --git a/tests/server/app/test_capabilities.py b/tests/server/app/test_capabilities.py index 9cb5c60..f4d99b8 100644 --- a/tests/server/app/test_capabilities.py +++ b/tests/server/app/test_capabilities.py @@ -1,24 +1,16 @@ import json -import os import pkgutil -import time from typing import Dict import yaml -from xcube.server.testing import ServerTest from xcube.util import extension from xcube.constants import EXTENSION_POINT_SERVER_APIS from xcube.util.extension import ExtensionRegistry +from tests.server.app.base_test import BaseTest -class CapabilitiesTest(ServerTest): - def setUp(self) -> None: - super().setUp() - wait_for_server_startup = os.environ.get('WAIT_FOR_STARTUP', - '0') == '1' - if wait_for_server_startup: - time.sleep(10) +class CapabilitiesTest(BaseTest): def add_extension(self, er: ExtensionRegistry) -> None: er.add_extension( diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index 08040fb..5a42423 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -1,29 +1,23 @@ import json -import os import pkgutil -import time from typing import Dict import yaml from xcube.constants import EXTENSION_POINT_SERVER_APIS -from xcube.server.testing import ServerTest from xcube.util import extension from xcube.util.extension import ExtensionRegistry -from . import test_utils +from . import test_utils +from .base_test import BaseTest -class DataDiscoveryTest(ServerTest): - def setUp(self) -> None: - super().setUp() - wait_for_server_startup = os.environ.get('WAIT_FOR_STARTUP', - '0') == '1' - if wait_for_server_startup: - time.sleep(10) +class DataDiscoveryTest(BaseTest): def add_extension(self, er: ExtensionRegistry) -> None: - er.add_extension(loader=extension.import_component('xcube_geodb_openeo.api:api'), - point=EXTENSION_POINT_SERVER_APIS, name='geodb-openeo') + er.add_extension( + loader=extension.import_component('xcube_geodb_openeo.api:api'), + point=EXTENSION_POINT_SERVER_APIS, + name='geodb-openeo') def add_config(self, config: Dict): data = pkgutil.get_data('tests', 'test_config.yml') diff --git a/tests/server/app/test_processing.py b/tests/server/app/test_processing.py index 9d18640..2ab4b5a 100644 --- a/tests/server/app/test_processing.py +++ b/tests/server/app/test_processing.py @@ -19,30 +19,21 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. import json -import os import pkgutil -import time from typing import Dict import yaml from xcube.constants import EXTENSION_POINT_SERVER_APIS -from xcube.server.testing import ServerTest from xcube.util import extension from xcube.util.extension import ExtensionRegistry -from . import test_utils from xcube_geodb_openeo.backend import processes from xcube_geodb_openeo.backend.processes import LoadCollection +from . import test_utils +from .base_test import BaseTest -class ProcessingTest(ServerTest): - - def setUp(self) -> None: - super().setUp() - wait_for_server_startup = os.environ.get('WAIT_FOR_STARTUP', - '0') == '1' - if wait_for_server_startup: - time.sleep(10) +class ProcessingTest(BaseTest): def add_extension(self, er: ExtensionRegistry) -> None: er.add_extension( From 6541ac1c448aa98684b2a1b4c04ebda6d9f46f97 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 20 Jul 2022 12:52:25 +0200 Subject: [PATCH 074/163] addressing PR comments #2 --- .github/workflows/workflow.yaml | 73 --------------------------------- 1 file changed, 73 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 40d66d3..ee583bd 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -118,76 +118,3 @@ jobs: buildArgs: GEODB_OPENEO_VERSION=${{ steps.real-version.outputs.version }} username: ${{ secrets.QUAY_REG_USERNAME }} password: ${{ secrets.QUAY_REG_PASSWORD }} - #update-version-deployment: - # env: - # PUSH: 1 - # runs-on: ubuntu-latest - # needs: build-docker-image - # name: update-tag - # steps: - # - name: git-checkout - # uses: actions/checkout@v2 - # # Clone k8s-config into path 'k8s' - # - uses: actions/checkout@v2 - # with: - # repository: bc-org/k8s-configs - # token: ${{ secrets.API_TOKEN_GITHUB }} - # path: k8s - # # Get the release tag (or main on push) - # - name: get-release-tag - # id: release - # run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} - # # Determine the deployment phase - # - name: deployment-phase - # id: deployment-phase - # uses: bc-org/gha-determine-phase@v0.1 - # with: - # event_name: ${{ github.event_name }} - # tag: ${{ steps.release.outputs.tag }} - # - name: get-hash - # id: get-hash - # run: | - # HASH=$(skopeo inspect docker://quay.io/bcdev/${{ env.APP_NAME }}-lab:${{ steps.release.outputs.tag }} | jq '.Digest') - # if [[ "$HASH" == *"sha256"* ]]; then - # echo ::set-output name=hash::$HASH - # else - # echo "No has present. Using none as hash. This will use the version tag instead for deployment." - # echo ::set-output name=hash::none - # fi - # - name: info - # run: | - # echo "Event: ${{ github.event_name }}" - # echo "Deployment Stage: ${{ steps.deployment-phase.outputs.phase }}" -# - # echo "Release Tag: ${{ steps.release.outputs.tag }}" - # echo "Deployment Release Tag: ${{ steps.deployment-phase.outputs.tag }}" - # echo "Deployment Digest: ${{ steps.get-hash.outputs.hash }}" - # - name: set-version-tag - # uses: bc-org/update-application-version-tags@main - # with: - # app: ${{ env.APP_NAME }} - # phase: ${{ steps.deployment-phase.outputs.phase }} - # delimiter: ' ' - # tag: ${{ steps.deployment-phase.outputs.tag }} - # hash: ${{ steps.get-hash.outputs.hash }} - # working-directory: "./k8s/${{ env.APP_NAME }}-jh/helm" - # - name: cat-result - # working-directory: "./k8s/${{ env.APP_NAME }}-jh/helm" - # run: | - # head values-dev.yaml - # head values-stage.yaml - # # No production deployment at the moment - # # head values-prod.yaml - # - name: Pushes to another repository - # # Don't run if run locally and should be ignored - # if: ${{ steps.deployment-phase.outputs.phase != 'ignore' && !env.ACT }} - # uses: cpina/github-action-push-to-another-repository@main - # env: - # API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} - # with: - # source-directory: 'k8s' - # destination-github-username: 'bc-org' - # destination-repository-name: 'k8s-configs' - # user-email: bcdev@brockmann-consult.de - # target-branch: main - # commit-message: ${{ github.event.release }}. Set version to ${{ steps.release.outputs.tag }} From a7a50addece1df3e914e0740293019c49a45e30e Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 20 Jul 2022 12:52:37 +0200 Subject: [PATCH 075/163] addressing PR comments #3 --- .github/workflows/workflow.yaml | 1 - docker/Dockerfile | 2 -- 2 files changed, 3 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index ee583bd..f4bb79f 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -115,6 +115,5 @@ jobs: dockerfile: docker/Dockerfile addLatest: true registry: quay.io - buildArgs: GEODB_OPENEO_VERSION=${{ steps.real-version.outputs.version }} username: ${{ secrets.QUAY_REG_USERNAME }} password: ${{ secrets.QUAY_REG_PASSWORD }} diff --git a/docker/Dockerfile b/docker/Dockerfile index 3fbbc45..db0994d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -3,8 +3,6 @@ FROM continuumio/miniconda3:4.12.0 LABEL maintainer="xcube-team@brockmann-consult.de" LABEL name=xcube_geodb_openeo -ARG GEODB_OPENEO_VERSION=0.0.1.dev0 - RUN conda install -n base -c conda-forge mamba pip #ADD environment.yml /tmp/environment.yml From 5e889c4810597995107e28e2753753fee607a72c Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 20 Jul 2022 13:01:23 +0200 Subject: [PATCH 076/163] addressing PR comments #4 --- xcube_geodb_openeo/core/geodb_datastore.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/xcube_geodb_openeo/core/geodb_datastore.py b/xcube_geodb_openeo/core/geodb_datastore.py index 7742889..4febf47 100644 --- a/xcube_geodb_openeo/core/geodb_datastore.py +++ b/xcube_geodb_openeo/core/geodb_datastore.py @@ -42,15 +42,16 @@ def __init__(self, config: Mapping[str, Any]): def geodb(self): assert self.config - server_url = self.config['geodb_openeo']['postgrest_url'] - server_port = self.config['geodb_openeo']['postgrest_port'] - client_id = self.config['geodb_openeo']['client_id'] \ - if 'client_id' in self.config['geodb_openeo'] \ + api_config = self.config['geodb_openeo'] + server_url = api_config['postgrest_url'] + server_port = api_config['postgrest_port'] + client_id = api_config['client_id'] \ + if 'client_id' in api_config \ else os.getenv('XC_GEODB_OPENEO_CLIENT_ID') - client_secret = self.config['geodb_openeo']['client_secret'] \ - if 'client_secret' in self.config['geodb_openeo'] \ + client_secret = api_config['client_secret'] \ + if 'client_secret' in api_config \ else os.getenv('XC_GEODB_OPENEO_CLIENT_SECRET') - auth_domain = self.config['geodb_openeo']['auth_domain'] + auth_domain = api_config['auth_domain'] return GeoDBClient( server_url=server_url, From a36bab3e82d1c7d767d6b37796a5ebee92e73c5a Mon Sep 17 00:00:00 2001 From: thomas Date: Thu, 21 Jul 2022 16:39:45 +0200 Subject: [PATCH 077/163] list all available endpoints --- xcube_geodb_openeo/api/routes.py | 28 +++++++++++----------- xcube_geodb_openeo/backend/capabilities.py | 9 +++++-- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/xcube_geodb_openeo/api/routes.py b/xcube_geodb_openeo/api/routes.py index 46e3db3..bc94a90 100644 --- a/xcube_geodb_openeo/api/routes.py +++ b/xcube_geodb_openeo/api/routes.py @@ -158,6 +158,20 @@ def ensure_parameters(self, expected_parameters, process_parameters): f' \'{ep["name"]}\'.')) +@api.route('/conformance') +class ConformanceHandler(ApiHandler): + """ + Lists all conformance classes specified in OGC standards that the server + conforms to. + """ + + def get(self): + """ + Lists the conformance classes. + """ + self.response.finish(capabilities.get_conformance()) + + @api.route('/collections') class CollectionsHandler(ApiHandler): """ @@ -183,20 +197,6 @@ def get(self): self.response.finish(self.ctx.collections) -@api.route('/conformance') -class ConformanceHandler(ApiHandler): - """ - Lists all conformance classes specified in OGC standards that the server - conforms to. - """ - - def get(self): - """ - Lists the conformance classes. - """ - self.response.finish(capabilities.get_conformance()) - - @api.route('/collections/{collection_id}') class CollectionHandler(ApiHandler): """ diff --git a/xcube_geodb_openeo/backend/capabilities.py b/xcube_geodb_openeo/backend/capabilities.py index df5e0f8..b793c58 100644 --- a/xcube_geodb_openeo/backend/capabilities.py +++ b/xcube_geodb_openeo/backend/capabilities.py @@ -41,9 +41,14 @@ def get_root(config: Mapping[str, Any], base_url: str): "title": config['geodb_openeo']['SERVER_TITLE'], "description": config['geodb_openeo']['SERVER_DESCRIPTION'], 'endpoints': [ + {'path': '/.well-known/openeo', 'methods': ['GET']}, + {'path': '/file_formats', 'methods': ['GET']}, + {'path': '/result', 'methods': ['GET']}, + {'path': '/conformance', 'methods': ['GET']}, {'path': '/collections', 'methods': ['GET']}, - # TODO - only list endpoints, which are implemented and are - # fully compatible to the API specification. + {'path': '/collections/{collection_id}', 'methods': ['GET']}, + {'path': '/collections/{collection_id}/items', 'methods': ['GET']}, + {'path': '/collections/{collection_id}/items/{feature_id}', 'methods': ['GET']}, ], "links": [ # todo - links are incorrect { From 52a92576873da2270e3c31429a31c0b2cda7f4f5 Mon Sep 17 00:00:00 2001 From: thomas Date: Thu, 21 Jul 2022 16:55:57 +0200 Subject: [PATCH 078/163] list all available endpoints --- tests/server/app/test_capabilities.py | 12 +++++++++++- xcube_geodb_openeo/backend/capabilities.py | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/server/app/test_capabilities.py b/tests/server/app/test_capabilities.py index f4d99b8..9ce9e2f 100644 --- a/tests/server/app/test_capabilities.py +++ b/tests/server/app/test_capabilities.py @@ -39,9 +39,19 @@ def test_root(self): self.assertEqual( 'Catalog of geoDB collections.', metainfo['description']) self.assertEqual( - '/collections', metainfo['endpoints'][0]['path']) + '/.well-known/openeo', metainfo['endpoints'][0]['path']) self.assertEqual( 'GET', metainfo['endpoints'][0]['methods'][0]) + + self.assertEqual( + '/result', metainfo['endpoints'][2]['path']) + self.assertEqual( + 'POST', metainfo['endpoints'][2]['methods'][0]) + + self.assertEqual( + '/collections/{collection_id}/items', metainfo['endpoints'][6]['path']) + self.assertEqual( + 'GET', metainfo['endpoints'][6]['methods'][0]) self.assertIsNotNone(metainfo['links']) def test_well_known_info(self): diff --git a/xcube_geodb_openeo/backend/capabilities.py b/xcube_geodb_openeo/backend/capabilities.py index b793c58..e3236c3 100644 --- a/xcube_geodb_openeo/backend/capabilities.py +++ b/xcube_geodb_openeo/backend/capabilities.py @@ -43,7 +43,7 @@ def get_root(config: Mapping[str, Any], base_url: str): 'endpoints': [ {'path': '/.well-known/openeo', 'methods': ['GET']}, {'path': '/file_formats', 'methods': ['GET']}, - {'path': '/result', 'methods': ['GET']}, + {'path': '/result', 'methods': ['POST']}, {'path': '/conformance', 'methods': ['GET']}, {'path': '/collections', 'methods': ['GET']}, {'path': '/collections/{collection_id}', 'methods': ['GET']}, From 5b274452a75333a054a8522a2e29d3479066749d Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 22 Jul 2022 00:37:55 +0200 Subject: [PATCH 079/163] fixed temporal interval of collections --- tests/core/mock_datastore.py | 6 ++++++ tests/server/app/test_data_discovery.py | 9 ++++++++ xcube_geodb_openeo/backend/capabilities.py | 2 +- xcube_geodb_openeo/core/geodb_datastore.py | 24 +++++++++++++++------- 4 files changed, 33 insertions(+), 8 deletions(-) diff --git a/tests/core/mock_datastore.py b/tests/core/mock_datastore.py index c8c2996..d9c363c 100644 --- a/tests/core/mock_datastore.py +++ b/tests/core/mock_datastore.py @@ -27,9 +27,11 @@ from typing import Tuple import geopandas +from pandas import DataFrame from shapely.geometry import Polygon from xcube_geodb_openeo.core.datastore import DataStore +from xcube_geodb_openeo.core.geodb_datastore import GeoDBDataStore from xcube_geodb_openeo.core.vectorcube import VectorCube import importlib.resources as resources @@ -73,6 +75,10 @@ def get_vector_cube(self, collection_id: str, with_items: bool, vector_cube['total_feature_count'] = len(collection) if with_items and collection_id != 'empty_collection': self.add_items_to_vector_cube(collection, vector_cube) + GeoDBDataStore.add_metadata( + (8, 51, 12, 52), collection_id, + DataFrame(columns=["collection", "column_name", "data_type"]), + vector_cube) return vector_cube # noinspection PyUnusedLocal diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index 5a42423..d104ca2 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -37,6 +37,15 @@ def test_collection(self): self.assertEqual(200, response.status) collection_data = json.loads(response.data) self.assertIsNotNone(collection_data) + self.assertIsNotNone(collection_data['extent']) + self.assertEqual(2, len(collection_data['extent'])) + expected_spatial_extent = {'bbox': [8, 51, 12, 52], + 'crs': 'http://www.opengis.net/def/crs/OGC/1.3/CRS84'} + expected_temporal_extent = {'interval' : [['null', 'null']]} + self.assertEqual(expected_spatial_extent, + collection_data['extent']['spatial']) + self.assertEqual(expected_temporal_extent, + collection_data['extent']['temporal']) def test_get_items(self): url = f'http://localhost:{self.port}/collections/collection_1/items' diff --git a/xcube_geodb_openeo/backend/capabilities.py b/xcube_geodb_openeo/backend/capabilities.py index e3236c3..c86172b 100644 --- a/xcube_geodb_openeo/backend/capabilities.py +++ b/xcube_geodb_openeo/backend/capabilities.py @@ -113,4 +113,4 @@ def get_conformance(): "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/html", "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson" ] - } \ No newline at end of file + } diff --git a/xcube_geodb_openeo/core/geodb_datastore.py b/xcube_geodb_openeo/core/geodb_datastore.py index 4febf47..6ed750b 100644 --- a/xcube_geodb_openeo/core/geodb_datastore.py +++ b/xcube_geodb_openeo/core/geodb_datastore.py @@ -20,16 +20,16 @@ # DEALINGS IN THE SOFTWARE. import os - from functools import cached_property -from typing import Tuple -from typing import Optional -from typing import Mapping from typing import Any +from typing import Mapping +from typing import Optional +from typing import Tuple -from .datastore import DataStore +from pandas import DataFrame from xcube_geodb.core.geodb import GeoDBClient +from .datastore import DataStore from .vectorcube import VectorCube @@ -108,6 +108,14 @@ def get_vector_cube(self, collection_id: str, with_items: bool, ) properties = self.geodb.get_properties(collection_id) + + self.add_metadata(collection_bbox, collection_id, properties, + vector_cube) + return vector_cube + + @staticmethod + def add_metadata(collection_bbox: Tuple, collection_id: str, + properties: DataFrame, vector_cube: VectorCube): summaries = { 'properties': [] } @@ -121,12 +129,14 @@ def get_vector_cube(self, collection_id: str, with_items: bool, 'crs': 'http://www.opengis.net/def/crs/OGC/1.3/CRS84' }, 'temporal': { - 'interval': [['null']] + 'interval': [['null', 'null']] + # todo - maybe define a list of possible property names to + # scan for the temporal interval, such as start_date, + # end_date, } }, 'summaries': summaries } - return vector_cube def transform_bbox(self, collection_id: str, bbox: Tuple[float, float, float, float], From 71ac69b3ee2b8c64ee25edc6e66ab95043df8ef3 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 22 Jul 2022 13:20:33 +0200 Subject: [PATCH 080/163] fixed JNB pt. 1 --- notebooks/geoDB-openEO_use_case_1.ipynb | 878 ++---------------------- 1 file changed, 69 insertions(+), 809 deletions(-) diff --git a/notebooks/geoDB-openEO_use_case_1.ipynb b/notebooks/geoDB-openEO_use_case_1.ipynb index fdd7723..c57a994 100644 --- a/notebooks/geoDB-openEO_use_case_1.ipynb +++ b/notebooks/geoDB-openEO_use_case_1.ipynb @@ -2,12 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "execution_count": 2, "outputs": [], "source": [ "import urllib3\n", @@ -15,11 +10,7 @@ "\n", "http = urllib3.PoolManager(cert_reqs='CERT_NONE')\n", "base_url = 'https://geodb.openeo.dev.brockmann-consult.de'" - ] - }, - { - "cell_type": "code", - "execution_count": 2, + ], "metadata": { "collapsed": false, "pycharm": { @@ -29,7 +20,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 3, "outputs": [], "source": [ "def print_endpoint(url):\n", @@ -38,17 +29,17 @@ " data = json.loads(r.data)\n", " print(f\"Status: {r.status}\")\n", " print(f\"Result: {json.dumps(data, indent=2, sort_keys=True)}\")" - ] - }, - { - "cell_type": "code", - "execution_count": 3, + ], "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } - }, + } + }, + { + "cell_type": "code", + "execution_count": 4, "outputs": [ { "name": "stdout", @@ -117,24 +108,24 @@ "name": "stderr", "output_type": "stream", "text": [ - "d:\\Miniconda3\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'geodb.openeo.dev.brockmann-consult.de'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n", + "d:\\conda-envs\\xcube-geodb-openeo-orig\\lib\\site-packages\\urllib3\\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'geodb.openeo.dev.brockmann-consult.de'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n", " warnings.warn(\n" ] } ], "source": [ "print_endpoint(f'{base_url}/')" - ] - }, - { - "cell_type": "code", - "execution_count": 4, + ], "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } - }, + } + }, + { + "cell_type": "code", + "execution_count": 5, "outputs": [ { "name": "stdout", @@ -146,7 +137,7 @@ " \"versions\": [\n", " {\n", " \"api_version\": \"1.1.0\",\n", - " \"url\": \"http://www.brockmann-consult.de/xcube-geoDB-openEO\"\n", + " \"url\": \"https://geodb.openeo.dev.brockmann-consult.de/\"\n", " }\n", " ]\n", "}\n" @@ -156,24 +147,24 @@ "name": "stderr", "output_type": "stream", "text": [ - "d:\\Miniconda3\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'geodb.openeo.dev.brockmann-consult.de'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n", + "d:\\conda-envs\\xcube-geodb-openeo-orig\\lib\\site-packages\\urllib3\\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'geodb.openeo.dev.brockmann-consult.de'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n", " warnings.warn(\n" ] } ], "source": [ "print_endpoint(f'{base_url}/.well-known/openeo')" - ] - }, - { - "cell_type": "code", - "execution_count": 5, + ], "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } - }, + } + }, + { + "cell_type": "code", + "execution_count": 15, "outputs": [ { "name": "stdout", @@ -198,17 +189,17 @@ ], "source": [ "print_endpoint(f'{base_url}/file_formats')" - ] - }, - { - "cell_type": "code", - "execution_count": 6, + ], "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } - }, + } + }, + { + "cell_type": "code", + "execution_count": 16, "outputs": [ { "name": "stdout", @@ -237,18 +228,25 @@ ], "source": [ "print_endpoint(f'{base_url}/conformance')" - ] - }, - { - "cell_type": "code", - "execution_count": 7, + ], "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } - }, + } + }, + { + "cell_type": "code", + "execution_count": 17, "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "https://geodb.openeo.dev.brockmann-consult.de/collections/AT_2021_EC21\n" + ] + }, { "name": "stderr", "output_type": "stream", @@ -261,7 +259,6 @@ "name": "stdout", "output_type": "stream", "text": [ - "https://geodb.openeo.dev.brockmann-consult.de/collections/AT_2021_EC21\n", "Status: 200\n", "Result: {\n", " \"description\": \"No description available.\",\n", @@ -378,17 +375,17 @@ ], "source": [ "print_endpoint(f'{base_url}/collections/AT_2021_EC21')" - ] - }, - { - "cell_type": "code", - "execution_count": 8, + ], "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } - }, + } + }, + { + "cell_type": "code", + "execution_count": 19, "outputs": [ { "name": "stdout", @@ -1059,17 +1056,17 @@ ], "source": [ "print_endpoint(f'{base_url}/collections')" - ] - }, - { - "cell_type": "code", - "execution_count": 9, + ], "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } - }, + } + }, + { + "cell_type": "code", + "execution_count": 18, "outputs": [ { "name": "stdout", @@ -1180,17 +1177,17 @@ ], "source": [ "print_endpoint(f'{base_url}/processes')" - ] - }, - { - "cell_type": "code", - "execution_count": 10, + ], "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } - }, + } + }, + { + "cell_type": "code", + "execution_count": 20, "outputs": [ { "name": "stderr", @@ -1215,760 +1212,23 @@ " headers={'Content-Type': 'application/json'},\n", " body=body)\n", "vector_cube = json.loads(r.data)" - ] - }, - { - "cell_type": "code", - "execution_count": 11, + ], "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } - }, + } + }, + { + "cell_type": "code", + "execution_count": 21, "outputs": [ { "data": { - "text/plain": [ - "[{'id': 22,\n", - " 'bbox': ['51.5330', '25.2866', '51.5330', '25.2866'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [51.5329679, 25.286556]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Doha',\n", - " 'sov0name': 'Qatar',\n", - " 'latitude': 25.286556,\n", - " 'longitude': 51.532968,\n", - " 'pop_max': 1450000,\n", - " 'pop_min': 731310,\n", - " 'meganame': None,\n", - " 'min_areakm': 270,\n", - " 'max_areakm': 270,\n", - " 'pop1950': 0,\n", - " 'pop1960': 0,\n", - " 'pop1970': 0,\n", - " 'pop1980': 0,\n", - " 'pop1990': 0,\n", - " 'pop2000': 0,\n", - " 'pop2010': 0,\n", - " 'pop2020': 0,\n", - " 'pop2050': 0}},\n", - " {'id': 26,\n", - " 'bbox': ['35.7500', '-6.1833', '35.7500', '-6.1833'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [35.7500036, -6.1833061]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Dodoma',\n", - " 'sov0name': 'United Republic of Tanzania',\n", - " 'latitude': -6.183306,\n", - " 'longitude': 35.750004,\n", - " 'pop_max': 218269,\n", - " 'pop_min': 180541,\n", - " 'meganame': None,\n", - " 'min_areakm': 55,\n", - " 'max_areakm': 55,\n", - " 'pop1950': 0,\n", - " 'pop1960': 0,\n", - " 'pop1970': 0,\n", - " 'pop1980': 0,\n", - " 'pop1990': 0,\n", - " 'pop2000': 0,\n", - " 'pop2010': 0,\n", - " 'pop2020': 0,\n", - " 'pop2050': 0}},\n", - " {'id': 31,\n", - " 'bbox': ['43.1480', '11.5950', '43.1480', '11.5950'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [43.1480017, 11.5950145]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Djibouti',\n", - " 'sov0name': 'Djibouti',\n", - " 'latitude': 11.595015,\n", - " 'longitude': 43.148002,\n", - " 'pop_max': 923000,\n", - " 'pop_min': 604013,\n", - " 'meganame': None,\n", - " 'min_areakm': 42,\n", - " 'max_areakm': 42,\n", - " 'pop1950': 0,\n", - " 'pop1960': 0,\n", - " 'pop1970': 0,\n", - " 'pop1980': 0,\n", - " 'pop1990': 0,\n", - " 'pop2000': 0,\n", - " 'pop2010': 0,\n", - " 'pop2020': 0,\n", - " 'pop2050': 0}},\n", - " {'id': 44,\n", - " 'bbox': ['50.5831', '26.2361', '50.5831', '26.2361'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [50.5830517, 26.2361363]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Manama',\n", - " 'sov0name': 'Bahrain',\n", - " 'latitude': 26.236136,\n", - " 'longitude': 50.583052,\n", - " 'pop_max': 563920,\n", - " 'pop_min': 157474,\n", - " 'meganame': None,\n", - " 'min_areakm': 178,\n", - " 'max_areakm': 178,\n", - " 'pop1950': 0,\n", - " 'pop1960': 0,\n", - " 'pop1970': 0,\n", - " 'pop1980': 0,\n", - " 'pop1990': 0,\n", - " 'pop2000': 0,\n", - " 'pop2010': 0,\n", - " 'pop2020': 0,\n", - " 'pop2050': 0}},\n", - " {'id': 49,\n", - " 'bbox': ['54.3666', '24.4667', '54.3666', '24.4667'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [54.3665934, 24.4666836]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Abu Dhabi',\n", - " 'sov0name': 'United Arab Emirates',\n", - " 'latitude': 24.466684,\n", - " 'longitude': 54.366593,\n", - " 'pop_max': 603492,\n", - " 'pop_min': 560230,\n", - " 'meganame': None,\n", - " 'min_areakm': 96,\n", - " 'max_areakm': 96,\n", - " 'pop1950': 0,\n", - " 'pop1960': 0,\n", - " 'pop1970': 0,\n", - " 'pop1980': 0,\n", - " 'pop1990': 0,\n", - " 'pop2000': 0,\n", - " 'pop2010': 0,\n", - " 'pop2020': 0,\n", - " 'pop2050': 0}},\n", - " {'id': 50,\n", - " 'bbox': ['58.3833', '37.9500', '58.3833', '37.9500'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [58.3832991, 37.9499949]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Ashgabat',\n", - " 'sov0name': 'Turkmenistan',\n", - " 'latitude': 37.949995,\n", - " 'longitude': 58.383299,\n", - " 'pop_max': 727700,\n", - " 'pop_min': 577982,\n", - " 'meganame': None,\n", - " 'min_areakm': 108,\n", - " 'max_areakm': 128,\n", - " 'pop1950': 0,\n", - " 'pop1960': 0,\n", - " 'pop1970': 0,\n", - " 'pop1980': 0,\n", - " 'pop1990': 0,\n", - " 'pop2000': 0,\n", - " 'pop2010': 0,\n", - " 'pop2020': 0,\n", - " 'pop2050': 0}},\n", - " {'id': 62,\n", - " 'bbox': ['68.7739', '38.5600', '68.7739', '38.5600'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [68.7738794, 38.5600352]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Dushanbe',\n", - " 'sov0name': 'Tajikistan',\n", - " 'latitude': 38.560035,\n", - " 'longitude': 68.773879,\n", - " 'pop_max': 1086244,\n", - " 'pop_min': 679400,\n", - " 'meganame': None,\n", - " 'min_areakm': 415,\n", - " 'max_areakm': 415,\n", - " 'pop1950': 0,\n", - " 'pop1960': 0,\n", - " 'pop1970': 0,\n", - " 'pop1980': 0,\n", - " 'pop1990': 0,\n", - " 'pop2000': 0,\n", - " 'pop2010': 0,\n", - " 'pop2020': 0,\n", - " 'pop2050': 0}},\n", - " {'id': 76,\n", - " 'bbox': ['45.3647', '2.0686', '45.3647', '2.0686'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [45.3647318, 2.0686272]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Mogadishu',\n", - " 'sov0name': 'Somalia',\n", - " 'latitude': 2.068627,\n", - " 'longitude': 45.364732,\n", - " 'pop_max': 1100000,\n", - " 'pop_min': 875388,\n", - " 'meganame': 'Muqdisho',\n", - " 'min_areakm': 99,\n", - " 'max_areakm': 99,\n", - " 'pop1950': 69,\n", - " 'pop1960': 94,\n", - " 'pop1970': 272,\n", - " 'pop1980': 551,\n", - " 'pop1990': 1035,\n", - " 'pop2000': 1201,\n", - " 'pop2010': 1100,\n", - " 'pop2020': 1794,\n", - " 'pop2050': 2529}},\n", - " {'id': 77,\n", - " 'bbox': ['58.5933', '23.6133', '58.5933', '23.6133'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [58.5933121, 23.6133248]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Muscat',\n", - " 'sov0name': 'Oman',\n", - " 'latitude': 23.613325,\n", - " 'longitude': 58.593312,\n", - " 'pop_max': 734697,\n", - " 'pop_min': 586861,\n", - " 'meganame': None,\n", - " 'min_areakm': 104,\n", - " 'max_areakm': 104,\n", - " 'pop1950': 0,\n", - " 'pop1960': 0,\n", - " 'pop1970': 0,\n", - " 'pop1980': 0,\n", - " 'pop1990': 0,\n", - " 'pop2000': 0,\n", - " 'pop2010': 0,\n", - " 'pop2020': 0,\n", - " 'pop2050': 0}},\n", - " {'id': 83,\n", - " 'bbox': ['35.9314', '31.9520', '35.9314', '31.9520'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [35.9313541, 31.9519711]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Amman',\n", - " 'sov0name': 'Jordan',\n", - " 'latitude': 31.951971,\n", - " 'longitude': 35.931354,\n", - " 'pop_max': 1060000,\n", - " 'pop_min': 1060000,\n", - " 'meganame': 'Amman',\n", - " 'min_areakm': 403,\n", - " 'max_areakm': 545,\n", - " 'pop1950': 90,\n", - " 'pop1960': 218,\n", - " 'pop1970': 388,\n", - " 'pop1980': 636,\n", - " 'pop1990': 851,\n", - " 'pop2000': 1007,\n", - " 'pop2010': 1060,\n", - " 'pop2020': 1185,\n", - " 'pop2050': 1359}},\n", - " {'id': 95,\n", - " 'bbox': ['38.9333', '15.3333', '38.9333', '15.3333'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [38.9333235, 15.3333393]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Asmara',\n", - " 'sov0name': 'Eritrea',\n", - " 'latitude': 15.333339,\n", - " 'longitude': 38.933324,\n", - " 'pop_max': 620802,\n", - " 'pop_min': 563930,\n", - " 'meganame': None,\n", - " 'min_areakm': 90,\n", - " 'max_areakm': 90,\n", - " 'pop1950': 0,\n", - " 'pop1960': 0,\n", - " 'pop1970': 0,\n", - " 'pop1980': 0,\n", - " 'pop1990': 0,\n", - " 'pop2000': 0,\n", - " 'pop2010': 0,\n", - " 'pop2020': 0,\n", - " 'pop2050': 0}},\n", - " {'id': 105,\n", - " 'bbox': ['35.5078', '33.8739', '35.5078', '33.8739'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [35.5077624, 33.873921]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Beirut',\n", - " 'sov0name': 'Lebanon',\n", - " 'latitude': 33.873921,\n", - " 'longitude': 35.507762,\n", - " 'pop_max': 1846000,\n", - " 'pop_min': 1712125,\n", - " 'meganame': 'Bayrut',\n", - " 'min_areakm': 429,\n", - " 'max_areakm': 471,\n", - " 'pop1950': 322,\n", - " 'pop1960': 561,\n", - " 'pop1970': 923,\n", - " 'pop1980': 1623,\n", - " 'pop1990': 1293,\n", - " 'pop2000': 1487,\n", - " 'pop2010': 1846,\n", - " 'pop2020': 2051,\n", - " 'pop2050': 2173}},\n", - " {'id': 106,\n", - " 'bbox': ['44.7888', '41.7270', '44.7888', '41.7270'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [44.7888496, 41.7269558]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Tbilisi',\n", - " 'sov0name': 'Georgia',\n", - " 'latitude': 41.726956,\n", - " 'longitude': 44.78885,\n", - " 'pop_max': 1100000,\n", - " 'pop_min': 1005257,\n", - " 'meganame': 'Tbilisi',\n", - " 'min_areakm': 131,\n", - " 'max_areakm': 135,\n", - " 'pop1950': 612,\n", - " 'pop1960': 718,\n", - " 'pop1970': 897,\n", - " 'pop1980': 1090,\n", - " 'pop1990': 1224,\n", - " 'pop2000': 1100,\n", - " 'pop2010': 1100,\n", - " 'pop2020': 1113,\n", - " 'pop2050': 1114}},\n", - " {'id': 120,\n", - " 'bbox': ['44.5116', '40.1831', '44.5116', '40.1831'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [44.5116055, 40.1830966]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Yerevan',\n", - " 'sov0name': 'Armenia',\n", - " 'latitude': 40.183097,\n", - " 'longitude': 44.511606,\n", - " 'pop_max': 1102000,\n", - " 'pop_min': 1093485,\n", - " 'meganame': 'Yerevan',\n", - " 'min_areakm': 191,\n", - " 'max_areakm': 191,\n", - " 'pop1950': 341,\n", - " 'pop1960': 538,\n", - " 'pop1970': 778,\n", - " 'pop1980': 1042,\n", - " 'pop1990': 1175,\n", - " 'pop2000': 1111,\n", - " 'pop2010': 1102,\n", - " 'pop2020': 1102,\n", - " 'pop2050': 1102}},\n", - " {'id': 121,\n", - " 'bbox': ['49.8603', '40.3972', '49.8603', '40.3972'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [49.8602713, 40.3972179]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Baku',\n", - " 'sov0name': 'Azerbaijan',\n", - " 'latitude': 40.397218,\n", - " 'longitude': 49.860271,\n", - " 'pop_max': 2122300,\n", - " 'pop_min': 1892000,\n", - " 'meganame': 'Baku',\n", - " 'min_areakm': 246,\n", - " 'max_areakm': 249,\n", - " 'pop1950': 897,\n", - " 'pop1960': 1005,\n", - " 'pop1970': 1274,\n", - " 'pop1980': 1574,\n", - " 'pop1990': 1733,\n", - " 'pop2000': 1806,\n", - " 'pop2010': 1892,\n", - " 'pop2020': 2006,\n", - " 'pop2050': 2187}},\n", - " {'id': 134,\n", - " 'bbox': ['44.0653', '9.5600', '44.0653', '9.5600'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [44.06531, 9.5600224]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Hargeysa',\n", - " 'sov0name': 'Somaliland',\n", - " 'latitude': 9.560022,\n", - " 'longitude': 44.06531,\n", - " 'pop_max': 477876,\n", - " 'pop_min': 247018,\n", - " 'meganame': None,\n", - " 'min_areakm': 40,\n", - " 'max_areakm': 40,\n", - " 'pop1950': 0,\n", - " 'pop1960': 0,\n", - " 'pop1970': 0,\n", - " 'pop1980': 0,\n", - " 'pop1990': 0,\n", - " 'pop2000': 0,\n", - " 'pop2010': 0,\n", - " 'pop2020': 0,\n", - " 'pop2050': 0}},\n", - " {'id': 135,\n", - " 'bbox': ['55.4500', '-4.6166', '55.4500', '-4.6166'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [55.4499898, -4.6166317]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Victoria',\n", - " 'sov0name': 'Seychelles',\n", - " 'latitude': -4.616632,\n", - " 'longitude': 55.44999,\n", - " 'pop_max': 33576,\n", - " 'pop_min': 22881,\n", - " 'meganame': None,\n", - " 'min_areakm': 15,\n", - " 'max_areakm': 15,\n", - " 'pop1950': 0,\n", - " 'pop1960': 0,\n", - " 'pop1970': 0,\n", - " 'pop1980': 0,\n", - " 'pop1990': 0,\n", - " 'pop2000': 0,\n", - " 'pop2010': 0,\n", - " 'pop2020': 0,\n", - " 'pop2050': 0}},\n", - " {'id': 140,\n", - " 'bbox': ['35.2066', '31.7784', '35.2066', '31.7784'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [35.2066259, 31.7784078]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Jerusalem',\n", - " 'sov0name': 'Israel',\n", - " 'latitude': 31.778408,\n", - " 'longitude': 35.206626,\n", - " 'pop_max': 1029300,\n", - " 'pop_min': 801000,\n", - " 'meganame': None,\n", - " 'min_areakm': 246,\n", - " 'max_areakm': 246,\n", - " 'pop1950': 0,\n", - " 'pop1960': 0,\n", - " 'pop1970': 0,\n", - " 'pop1980': 0,\n", - " 'pop1990': 0,\n", - " 'pop2000': 0,\n", - " 'pop2010': 0,\n", - " 'pop2020': 0,\n", - " 'pop2050': 0}},\n", - " {'id': 143,\n", - " 'bbox': ['33.3666', '35.1667', '33.3666', '35.1667'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [33.3666349, 35.1666765]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Nicosia',\n", - " 'sov0name': 'Cyprus',\n", - " 'latitude': 35.166677,\n", - " 'longitude': 33.366635,\n", - " 'pop_max': 224300,\n", - " 'pop_min': 200452,\n", - " 'meganame': None,\n", - " 'min_areakm': 128,\n", - " 'max_areakm': 128,\n", - " 'pop1950': 0,\n", - " 'pop1960': 0,\n", - " 'pop1970': 0,\n", - " 'pop1980': 0,\n", - " 'pop1990': 0,\n", - " 'pop2000': 0,\n", - " 'pop2010': 0,\n", - " 'pop2020': 0,\n", - " 'pop2050': 0}},\n", - " {'id': 148,\n", - " 'bbox': ['44.2046', '15.3567', '44.2046', '15.3567'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [44.2046475, 15.3566792]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Sanaa',\n", - " 'sov0name': 'Yemen',\n", - " 'latitude': 15.356679,\n", - " 'longitude': 44.204648,\n", - " 'pop_max': 2008000,\n", - " 'pop_min': 1835853,\n", - " 'meganame': \"Sana'a'\",\n", - " 'min_areakm': 160,\n", - " 'max_areakm': 160,\n", - " 'pop1950': 46,\n", - " 'pop1960': 72,\n", - " 'pop1970': 111,\n", - " 'pop1980': 238,\n", - " 'pop1990': 653,\n", - " 'pop2000': 1365,\n", - " 'pop2010': 2008,\n", - " 'pop2020': 2955,\n", - " 'pop2050': 4382}},\n", - " {'id': 150,\n", - " 'bbox': ['36.2981', '33.5020', '36.2981', '33.5020'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [36.29805, 33.5019799]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Damascus',\n", - " 'sov0name': 'Syria',\n", - " 'latitude': 33.50198,\n", - " 'longitude': 36.29805,\n", - " 'pop_max': 2466000,\n", - " 'pop_min': 2466000,\n", - " 'meganame': 'Dimashq',\n", - " 'min_areakm': 532,\n", - " 'max_areakm': 705,\n", - " 'pop1950': 367,\n", - " 'pop1960': 579,\n", - " 'pop1970': 914,\n", - " 'pop1980': 1376,\n", - " 'pop1990': 1691,\n", - " 'pop2000': 2044,\n", - " 'pop2010': 2466,\n", - " 'pop2020': 2981,\n", - " 'pop2050': 3605}},\n", - " {'id': 156,\n", - " 'bbox': ['39.2664', '-6.7981', '39.2664', '-6.7981'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [39.266396, -6.7980667]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Dar es Salaam',\n", - " 'sov0name': 'United Republic of Tanzania',\n", - " 'latitude': -6.798067,\n", - " 'longitude': 39.266396,\n", - " 'pop_max': 2930000,\n", - " 'pop_min': 2698652,\n", - " 'meganame': 'Dar es Salaam',\n", - " 'min_areakm': 211,\n", - " 'max_areakm': 211,\n", - " 'pop1950': 67,\n", - " 'pop1960': 162,\n", - " 'pop1970': 357,\n", - " 'pop1980': 836,\n", - " 'pop1990': 1316,\n", - " 'pop2000': 2116,\n", - " 'pop2010': 2930,\n", - " 'pop2020': 4020,\n", - " 'pop2050': 5688}},\n", - " {'id': 162,\n", - " 'bbox': ['47.9764', '29.3717', '47.9764', '29.3717'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [47.9763553, 29.3716635]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Kuwait City',\n", - " 'sov0name': 'Kuwait',\n", - " 'latitude': 29.371664,\n", - " 'longitude': 47.976355,\n", - " 'pop_max': 2063000,\n", - " 'pop_min': 60064,\n", - " 'meganame': 'Al Kuwayt (Kuwait City)',\n", - " 'min_areakm': 264,\n", - " 'max_areakm': 366,\n", - " 'pop1950': 63,\n", - " 'pop1960': 179,\n", - " 'pop1970': 553,\n", - " 'pop1980': 891,\n", - " 'pop1990': 1392,\n", - " 'pop2000': 1499,\n", - " 'pop2010': 2063,\n", - " 'pop2020': 2592,\n", - " 'pop2050': 2956}},\n", - " {'id': 166,\n", - " 'bbox': ['34.7681', '32.0819', '34.7681', '32.0819'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [34.7680659, 32.0819373]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Tel Aviv-Yafo',\n", - " 'sov0name': 'Israel',\n", - " 'latitude': 32.081937,\n", - " 'longitude': 34.768066,\n", - " 'pop_max': 3112000,\n", - " 'pop_min': 378358,\n", - " 'meganame': 'Tel Aviv-Yafo',\n", - " 'min_areakm': 436,\n", - " 'max_areakm': 436,\n", - " 'pop1950': 418,\n", - " 'pop1960': 738,\n", - " 'pop1970': 1029,\n", - " 'pop1980': 1416,\n", - " 'pop1990': 2026,\n", - " 'pop2000': 2752,\n", - " 'pop2010': 3112,\n", - " 'pop2020': 3453,\n", - " 'pop2050': 3726}},\n", - " {'id': 184,\n", - " 'bbox': ['55.2780', '25.2319', '55.2780', '25.2319'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [55.2780285, 25.231942]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Dubai',\n", - " 'sov0name': 'United Arab Emirates',\n", - " 'latitude': 25.231942,\n", - " 'longitude': 55.278029,\n", - " 'pop_max': 1379000,\n", - " 'pop_min': 1137347,\n", - " 'meganame': 'Dubayy',\n", - " 'min_areakm': 187,\n", - " 'max_areakm': 407,\n", - " 'pop1950': 20,\n", - " 'pop1960': 40,\n", - " 'pop1970': 80,\n", - " 'pop1980': 254,\n", - " 'pop1990': 473,\n", - " 'pop2000': 938,\n", - " 'pop2010': 1379,\n", - " 'pop2020': 1709,\n", - " 'pop2050': 2077}},\n", - " {'id': 185,\n", - " 'bbox': ['69.2930', '41.3136', '69.2930', '41.3136'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [69.292987, 41.3136477]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Tashkent',\n", - " 'sov0name': 'Uzbekistan',\n", - " 'latitude': 41.313648,\n", - " 'longitude': 69.292987,\n", - " 'pop_max': 2184000,\n", - " 'pop_min': 1978028,\n", - " 'meganame': 'Tashkent',\n", - " 'min_areakm': 639,\n", - " 'max_areakm': 643,\n", - " 'pop1950': 755,\n", - " 'pop1960': 964,\n", - " 'pop1970': 1403,\n", - " 'pop1980': 1818,\n", - " 'pop1990': 2100,\n", - " 'pop2000': 2135,\n", - " 'pop2010': 2184,\n", - " 'pop2020': 2416,\n", - " 'pop2050': 2892}},\n", - " {'id': 206,\n", - " 'bbox': ['44.3919', '33.3406', '44.3919', '33.3406'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [44.3919229, 33.3405944]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Baghdad',\n", - " 'sov0name': 'Iraq',\n", - " 'latitude': 33.340594,\n", - " 'longitude': 44.391923,\n", - " 'pop_max': 5054000,\n", - " 'pop_min': 5054000,\n", - " 'meganame': 'Baghdad',\n", - " 'min_areakm': 587,\n", - " 'max_areakm': 587,\n", - " 'pop1950': 579,\n", - " 'pop1960': 1019,\n", - " 'pop1970': 2070,\n", - " 'pop1980': 3145,\n", - " 'pop1990': 4092,\n", - " 'pop2000': 5200,\n", - " 'pop2010': 5054,\n", - " 'pop2020': 6618,\n", - " 'pop2050': 8060}},\n", - " {'id': 207,\n", - " 'bbox': ['38.6981', '9.0353', '38.6981', '9.0353'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [38.6980586, 9.0352562]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Addis Ababa',\n", - " 'sov0name': 'Ethiopia',\n", - " 'latitude': 9.035256,\n", - " 'longitude': 38.698059,\n", - " 'pop_max': 3100000,\n", - " 'pop_min': 2757729,\n", - " 'meganame': 'Addis Ababa',\n", - " 'min_areakm': 462,\n", - " 'max_areakm': 1182,\n", - " 'pop1950': 392,\n", - " 'pop1960': 519,\n", - " 'pop1970': 729,\n", - " 'pop1980': 1175,\n", - " 'pop1990': 1791,\n", - " 'pop2000': 2493,\n", - " 'pop2010': 3100,\n", - " 'pop2020': 4184,\n", - " 'pop2050': 6156}},\n", - " {'id': 208,\n", - " 'bbox': ['51.4224', '35.6739', '51.4224', '35.6739'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [51.4223982, 35.6738886]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Tehran',\n", - " 'sov0name': 'Iran',\n", - " 'latitude': 35.673889,\n", - " 'longitude': 51.422398,\n", - " 'pop_max': 7873000,\n", - " 'pop_min': 7153309,\n", - " 'meganame': 'Tehran',\n", - " 'min_areakm': 496,\n", - " 'max_areakm': 496,\n", - " 'pop1950': 1041,\n", - " 'pop1960': 1873,\n", - " 'pop1970': 3290,\n", - " 'pop1980': 5079,\n", - " 'pop1990': 6365,\n", - " 'pop2000': 7128,\n", - " 'pop2010': 7873,\n", - " 'pop2020': 8832,\n", - " 'pop2050': 9814}},\n", - " {'id': 212,\n", - " 'bbox': ['69.1813', '34.5186', '69.1813', '34.5186'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [69.1813142, 34.5186361]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Kabul',\n", - " 'sov0name': 'Afghanistan',\n", - " 'latitude': 34.518636,\n", - " 'longitude': 69.181314,\n", - " 'pop_max': 3277000,\n", - " 'pop_min': 3043532,\n", - " 'meganame': 'Kabul',\n", - " 'min_areakm': 594,\n", - " 'max_areakm': 1471,\n", - " 'pop1950': 129,\n", - " 'pop1960': 263,\n", - " 'pop1970': 472,\n", - " 'pop1980': 978,\n", - " 'pop1990': 1306,\n", - " 'pop2000': 1963,\n", - " 'pop2010': 3277,\n", - " 'pop2020': 4730,\n", - " 'pop2050': 7175}},\n", - " {'id': 222,\n", - " 'bbox': ['46.7708', '24.6428', '46.7708', '24.6428'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [46.7707958, 24.642779]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Riyadh',\n", - " 'sov0name': 'Saudi Arabia',\n", - " 'latitude': 24.642779,\n", - " 'longitude': 46.770796,\n", - " 'pop_max': 4465000,\n", - " 'pop_min': 4205961,\n", - " 'meganame': 'Ar-Riyadh',\n", - " 'min_areakm': 854,\n", - " 'max_areakm': 854,\n", - " 'pop1950': 111,\n", - " 'pop1960': 156,\n", - " 'pop1970': 408,\n", - " 'pop1980': 1055,\n", - " 'pop1990': 2325,\n", - " 'pop2000': 3567,\n", - " 'pop2010': 4465,\n", - " 'pop2020': 5405,\n", - " 'pop2050': 6275}},\n", - " {'id': 229,\n", - " 'bbox': ['36.8147', '-1.2814', '36.8147', '-1.2814'],\n", - " 'geometry': {'type': 'Point', 'coordinates': [36.814711, -1.2814009]},\n", - " 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n", - " 'modified_at': None,\n", - " 'name': 'Nairobi',\n", - " 'sov0name': 'Kenya',\n", - " 'latitude': -1.281401,\n", - " 'longitude': 36.814711,\n", - " 'pop_max': 3010000,\n", - " 'pop_min': 2750547,\n", - " 'meganame': 'Nairobi',\n", - " 'min_areakm': 698,\n", - " 'max_areakm': 719,\n", - " 'pop1950': 137,\n", - " 'pop1960': 293,\n", - " 'pop1970': 531,\n", - " 'pop1980': 862,\n", - " 'pop1990': 1380,\n", - " 'pop2000': 2233,\n", - " 'pop2010': 3010,\n", - " 'pop2020': 4052,\n", - " 'pop2050': 5871}}]" - ] + "text/plain": "[{'id': 22,\n 'bbox': ['51.5330', '25.2866', '51.5330', '25.2866'],\n 'geometry': {'type': 'Point', 'coordinates': [51.5329679, 25.286556]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Doha',\n 'sov0name': 'Qatar',\n 'latitude': 25.286556,\n 'longitude': 51.532968,\n 'pop_max': 1450000,\n 'pop_min': 731310,\n 'meganame': None,\n 'min_areakm': 270,\n 'max_areakm': 270,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 26,\n 'bbox': ['35.7500', '-6.1833', '35.7500', '-6.1833'],\n 'geometry': {'type': 'Point', 'coordinates': [35.7500036, -6.1833061]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dodoma',\n 'sov0name': 'United Republic of Tanzania',\n 'latitude': -6.183306,\n 'longitude': 35.750004,\n 'pop_max': 218269,\n 'pop_min': 180541,\n 'meganame': None,\n 'min_areakm': 55,\n 'max_areakm': 55,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 31,\n 'bbox': ['43.1480', '11.5950', '43.1480', '11.5950'],\n 'geometry': {'type': 'Point', 'coordinates': [43.1480017, 11.5950145]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Djibouti',\n 'sov0name': 'Djibouti',\n 'latitude': 11.595015,\n 'longitude': 43.148002,\n 'pop_max': 923000,\n 'pop_min': 604013,\n 'meganame': None,\n 'min_areakm': 42,\n 'max_areakm': 42,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 44,\n 'bbox': ['50.5831', '26.2361', '50.5831', '26.2361'],\n 'geometry': {'type': 'Point', 'coordinates': [50.5830517, 26.2361363]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Manama',\n 'sov0name': 'Bahrain',\n 'latitude': 26.236136,\n 'longitude': 50.583052,\n 'pop_max': 563920,\n 'pop_min': 157474,\n 'meganame': None,\n 'min_areakm': 178,\n 'max_areakm': 178,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 49,\n 'bbox': ['54.3666', '24.4667', '54.3666', '24.4667'],\n 'geometry': {'type': 'Point', 'coordinates': [54.3665934, 24.4666836]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Abu Dhabi',\n 'sov0name': 'United Arab Emirates',\n 'latitude': 24.466684,\n 'longitude': 54.366593,\n 'pop_max': 603492,\n 'pop_min': 560230,\n 'meganame': None,\n 'min_areakm': 96,\n 'max_areakm': 96,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 50,\n 'bbox': ['58.3833', '37.9500', '58.3833', '37.9500'],\n 'geometry': {'type': 'Point', 'coordinates': [58.3832991, 37.9499949]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Ashgabat',\n 'sov0name': 'Turkmenistan',\n 'latitude': 37.949995,\n 'longitude': 58.383299,\n 'pop_max': 727700,\n 'pop_min': 577982,\n 'meganame': None,\n 'min_areakm': 108,\n 'max_areakm': 128,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 62,\n 'bbox': ['68.7739', '38.5600', '68.7739', '38.5600'],\n 'geometry': {'type': 'Point', 'coordinates': [68.7738794, 38.5600352]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dushanbe',\n 'sov0name': 'Tajikistan',\n 'latitude': 38.560035,\n 'longitude': 68.773879,\n 'pop_max': 1086244,\n 'pop_min': 679400,\n 'meganame': None,\n 'min_areakm': 415,\n 'max_areakm': 415,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 76,\n 'bbox': ['45.3647', '2.0686', '45.3647', '2.0686'],\n 'geometry': {'type': 'Point', 'coordinates': [45.3647318, 2.0686272]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Mogadishu',\n 'sov0name': 'Somalia',\n 'latitude': 2.068627,\n 'longitude': 45.364732,\n 'pop_max': 1100000,\n 'pop_min': 875388,\n 'meganame': 'Muqdisho',\n 'min_areakm': 99,\n 'max_areakm': 99,\n 'pop1950': 69,\n 'pop1960': 94,\n 'pop1970': 272,\n 'pop1980': 551,\n 'pop1990': 1035,\n 'pop2000': 1201,\n 'pop2010': 1100,\n 'pop2020': 1794,\n 'pop2050': 2529}},\n {'id': 77,\n 'bbox': ['58.5933', '23.6133', '58.5933', '23.6133'],\n 'geometry': {'type': 'Point', 'coordinates': [58.5933121, 23.6133248]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Muscat',\n 'sov0name': 'Oman',\n 'latitude': 23.613325,\n 'longitude': 58.593312,\n 'pop_max': 734697,\n 'pop_min': 586861,\n 'meganame': None,\n 'min_areakm': 104,\n 'max_areakm': 104,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 83,\n 'bbox': ['35.9314', '31.9520', '35.9314', '31.9520'],\n 'geometry': {'type': 'Point', 'coordinates': [35.9313541, 31.9519711]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Amman',\n 'sov0name': 'Jordan',\n 'latitude': 31.951971,\n 'longitude': 35.931354,\n 'pop_max': 1060000,\n 'pop_min': 1060000,\n 'meganame': 'Amman',\n 'min_areakm': 403,\n 'max_areakm': 545,\n 'pop1950': 90,\n 'pop1960': 218,\n 'pop1970': 388,\n 'pop1980': 636,\n 'pop1990': 851,\n 'pop2000': 1007,\n 'pop2010': 1060,\n 'pop2020': 1185,\n 'pop2050': 1359}},\n {'id': 95,\n 'bbox': ['38.9333', '15.3333', '38.9333', '15.3333'],\n 'geometry': {'type': 'Point', 'coordinates': [38.9333235, 15.3333393]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Asmara',\n 'sov0name': 'Eritrea',\n 'latitude': 15.333339,\n 'longitude': 38.933324,\n 'pop_max': 620802,\n 'pop_min': 563930,\n 'meganame': None,\n 'min_areakm': 90,\n 'max_areakm': 90,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 105,\n 'bbox': ['35.5078', '33.8739', '35.5078', '33.8739'],\n 'geometry': {'type': 'Point', 'coordinates': [35.5077624, 33.873921]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Beirut',\n 'sov0name': 'Lebanon',\n 'latitude': 33.873921,\n 'longitude': 35.507762,\n 'pop_max': 1846000,\n 'pop_min': 1712125,\n 'meganame': 'Bayrut',\n 'min_areakm': 429,\n 'max_areakm': 471,\n 'pop1950': 322,\n 'pop1960': 561,\n 'pop1970': 923,\n 'pop1980': 1623,\n 'pop1990': 1293,\n 'pop2000': 1487,\n 'pop2010': 1846,\n 'pop2020': 2051,\n 'pop2050': 2173}},\n {'id': 106,\n 'bbox': ['44.7888', '41.7270', '44.7888', '41.7270'],\n 'geometry': {'type': 'Point', 'coordinates': [44.7888496, 41.7269558]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tbilisi',\n 'sov0name': 'Georgia',\n 'latitude': 41.726956,\n 'longitude': 44.78885,\n 'pop_max': 1100000,\n 'pop_min': 1005257,\n 'meganame': 'Tbilisi',\n 'min_areakm': 131,\n 'max_areakm': 135,\n 'pop1950': 612,\n 'pop1960': 718,\n 'pop1970': 897,\n 'pop1980': 1090,\n 'pop1990': 1224,\n 'pop2000': 1100,\n 'pop2010': 1100,\n 'pop2020': 1113,\n 'pop2050': 1114}},\n {'id': 120,\n 'bbox': ['44.5116', '40.1831', '44.5116', '40.1831'],\n 'geometry': {'type': 'Point', 'coordinates': [44.5116055, 40.1830966]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Yerevan',\n 'sov0name': 'Armenia',\n 'latitude': 40.183097,\n 'longitude': 44.511606,\n 'pop_max': 1102000,\n 'pop_min': 1093485,\n 'meganame': 'Yerevan',\n 'min_areakm': 191,\n 'max_areakm': 191,\n 'pop1950': 341,\n 'pop1960': 538,\n 'pop1970': 778,\n 'pop1980': 1042,\n 'pop1990': 1175,\n 'pop2000': 1111,\n 'pop2010': 1102,\n 'pop2020': 1102,\n 'pop2050': 1102}},\n {'id': 121,\n 'bbox': ['49.8603', '40.3972', '49.8603', '40.3972'],\n 'geometry': {'type': 'Point', 'coordinates': [49.8602713, 40.3972179]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Baku',\n 'sov0name': 'Azerbaijan',\n 'latitude': 40.397218,\n 'longitude': 49.860271,\n 'pop_max': 2122300,\n 'pop_min': 1892000,\n 'meganame': 'Baku',\n 'min_areakm': 246,\n 'max_areakm': 249,\n 'pop1950': 897,\n 'pop1960': 1005,\n 'pop1970': 1274,\n 'pop1980': 1574,\n 'pop1990': 1733,\n 'pop2000': 1806,\n 'pop2010': 1892,\n 'pop2020': 2006,\n 'pop2050': 2187}},\n {'id': 134,\n 'bbox': ['44.0653', '9.5600', '44.0653', '9.5600'],\n 'geometry': {'type': 'Point', 'coordinates': [44.06531, 9.5600224]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Hargeysa',\n 'sov0name': 'Somaliland',\n 'latitude': 9.560022,\n 'longitude': 44.06531,\n 'pop_max': 477876,\n 'pop_min': 247018,\n 'meganame': None,\n 'min_areakm': 40,\n 'max_areakm': 40,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 135,\n 'bbox': ['55.4500', '-4.6166', '55.4500', '-4.6166'],\n 'geometry': {'type': 'Point', 'coordinates': [55.4499898, -4.6166317]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Victoria',\n 'sov0name': 'Seychelles',\n 'latitude': -4.616632,\n 'longitude': 55.44999,\n 'pop_max': 33576,\n 'pop_min': 22881,\n 'meganame': None,\n 'min_areakm': 15,\n 'max_areakm': 15,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 140,\n 'bbox': ['35.2066', '31.7784', '35.2066', '31.7784'],\n 'geometry': {'type': 'Point', 'coordinates': [35.2066259, 31.7784078]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Jerusalem',\n 'sov0name': 'Israel',\n 'latitude': 31.778408,\n 'longitude': 35.206626,\n 'pop_max': 1029300,\n 'pop_min': 801000,\n 'meganame': None,\n 'min_areakm': 246,\n 'max_areakm': 246,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 143,\n 'bbox': ['33.3666', '35.1667', '33.3666', '35.1667'],\n 'geometry': {'type': 'Point', 'coordinates': [33.3666349, 35.1666765]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Nicosia',\n 'sov0name': 'Cyprus',\n 'latitude': 35.166677,\n 'longitude': 33.366635,\n 'pop_max': 224300,\n 'pop_min': 200452,\n 'meganame': None,\n 'min_areakm': 128,\n 'max_areakm': 128,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 148,\n 'bbox': ['44.2046', '15.3567', '44.2046', '15.3567'],\n 'geometry': {'type': 'Point', 'coordinates': [44.2046475, 15.3566792]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Sanaa',\n 'sov0name': 'Yemen',\n 'latitude': 15.356679,\n 'longitude': 44.204648,\n 'pop_max': 2008000,\n 'pop_min': 1835853,\n 'meganame': \"Sana'a'\",\n 'min_areakm': 160,\n 'max_areakm': 160,\n 'pop1950': 46,\n 'pop1960': 72,\n 'pop1970': 111,\n 'pop1980': 238,\n 'pop1990': 653,\n 'pop2000': 1365,\n 'pop2010': 2008,\n 'pop2020': 2955,\n 'pop2050': 4382}},\n {'id': 150,\n 'bbox': ['36.2981', '33.5020', '36.2981', '33.5020'],\n 'geometry': {'type': 'Point', 'coordinates': [36.29805, 33.5019799]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Damascus',\n 'sov0name': 'Syria',\n 'latitude': 33.50198,\n 'longitude': 36.29805,\n 'pop_max': 2466000,\n 'pop_min': 2466000,\n 'meganame': 'Dimashq',\n 'min_areakm': 532,\n 'max_areakm': 705,\n 'pop1950': 367,\n 'pop1960': 579,\n 'pop1970': 914,\n 'pop1980': 1376,\n 'pop1990': 1691,\n 'pop2000': 2044,\n 'pop2010': 2466,\n 'pop2020': 2981,\n 'pop2050': 3605}},\n {'id': 156,\n 'bbox': ['39.2664', '-6.7981', '39.2664', '-6.7981'],\n 'geometry': {'type': 'Point', 'coordinates': [39.266396, -6.7980667]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dar es Salaam',\n 'sov0name': 'United Republic of Tanzania',\n 'latitude': -6.798067,\n 'longitude': 39.266396,\n 'pop_max': 2930000,\n 'pop_min': 2698652,\n 'meganame': 'Dar es Salaam',\n 'min_areakm': 211,\n 'max_areakm': 211,\n 'pop1950': 67,\n 'pop1960': 162,\n 'pop1970': 357,\n 'pop1980': 836,\n 'pop1990': 1316,\n 'pop2000': 2116,\n 'pop2010': 2930,\n 'pop2020': 4020,\n 'pop2050': 5688}},\n {'id': 162,\n 'bbox': ['47.9764', '29.3717', '47.9764', '29.3717'],\n 'geometry': {'type': 'Point', 'coordinates': [47.9763553, 29.3716635]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Kuwait City',\n 'sov0name': 'Kuwait',\n 'latitude': 29.371664,\n 'longitude': 47.976355,\n 'pop_max': 2063000,\n 'pop_min': 60064,\n 'meganame': 'Al Kuwayt (Kuwait City)',\n 'min_areakm': 264,\n 'max_areakm': 366,\n 'pop1950': 63,\n 'pop1960': 179,\n 'pop1970': 553,\n 'pop1980': 891,\n 'pop1990': 1392,\n 'pop2000': 1499,\n 'pop2010': 2063,\n 'pop2020': 2592,\n 'pop2050': 2956}},\n {'id': 166,\n 'bbox': ['34.7681', '32.0819', '34.7681', '32.0819'],\n 'geometry': {'type': 'Point', 'coordinates': [34.7680659, 32.0819373]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tel Aviv-Yafo',\n 'sov0name': 'Israel',\n 'latitude': 32.081937,\n 'longitude': 34.768066,\n 'pop_max': 3112000,\n 'pop_min': 378358,\n 'meganame': 'Tel Aviv-Yafo',\n 'min_areakm': 436,\n 'max_areakm': 436,\n 'pop1950': 418,\n 'pop1960': 738,\n 'pop1970': 1029,\n 'pop1980': 1416,\n 'pop1990': 2026,\n 'pop2000': 2752,\n 'pop2010': 3112,\n 'pop2020': 3453,\n 'pop2050': 3726}},\n {'id': 184,\n 'bbox': ['55.2780', '25.2319', '55.2780', '25.2319'],\n 'geometry': {'type': 'Point', 'coordinates': [55.2780285, 25.231942]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dubai',\n 'sov0name': 'United Arab Emirates',\n 'latitude': 25.231942,\n 'longitude': 55.278029,\n 'pop_max': 1379000,\n 'pop_min': 1137347,\n 'meganame': 'Dubayy',\n 'min_areakm': 187,\n 'max_areakm': 407,\n 'pop1950': 20,\n 'pop1960': 40,\n 'pop1970': 80,\n 'pop1980': 254,\n 'pop1990': 473,\n 'pop2000': 938,\n 'pop2010': 1379,\n 'pop2020': 1709,\n 'pop2050': 2077}},\n {'id': 185,\n 'bbox': ['69.2930', '41.3136', '69.2930', '41.3136'],\n 'geometry': {'type': 'Point', 'coordinates': [69.292987, 41.3136477]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tashkent',\n 'sov0name': 'Uzbekistan',\n 'latitude': 41.313648,\n 'longitude': 69.292987,\n 'pop_max': 2184000,\n 'pop_min': 1978028,\n 'meganame': 'Tashkent',\n 'min_areakm': 639,\n 'max_areakm': 643,\n 'pop1950': 755,\n 'pop1960': 964,\n 'pop1970': 1403,\n 'pop1980': 1818,\n 'pop1990': 2100,\n 'pop2000': 2135,\n 'pop2010': 2184,\n 'pop2020': 2416,\n 'pop2050': 2892}},\n {'id': 206,\n 'bbox': ['44.3919', '33.3406', '44.3919', '33.3406'],\n 'geometry': {'type': 'Point', 'coordinates': [44.3919229, 33.3405944]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Baghdad',\n 'sov0name': 'Iraq',\n 'latitude': 33.340594,\n 'longitude': 44.391923,\n 'pop_max': 5054000,\n 'pop_min': 5054000,\n 'meganame': 'Baghdad',\n 'min_areakm': 587,\n 'max_areakm': 587,\n 'pop1950': 579,\n 'pop1960': 1019,\n 'pop1970': 2070,\n 'pop1980': 3145,\n 'pop1990': 4092,\n 'pop2000': 5200,\n 'pop2010': 5054,\n 'pop2020': 6618,\n 'pop2050': 8060}},\n {'id': 207,\n 'bbox': ['38.6981', '9.0353', '38.6981', '9.0353'],\n 'geometry': {'type': 'Point', 'coordinates': [38.6980586, 9.0352562]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Addis Ababa',\n 'sov0name': 'Ethiopia',\n 'latitude': 9.035256,\n 'longitude': 38.698059,\n 'pop_max': 3100000,\n 'pop_min': 2757729,\n 'meganame': 'Addis Ababa',\n 'min_areakm': 462,\n 'max_areakm': 1182,\n 'pop1950': 392,\n 'pop1960': 519,\n 'pop1970': 729,\n 'pop1980': 1175,\n 'pop1990': 1791,\n 'pop2000': 2493,\n 'pop2010': 3100,\n 'pop2020': 4184,\n 'pop2050': 6156}},\n {'id': 208,\n 'bbox': ['51.4224', '35.6739', '51.4224', '35.6739'],\n 'geometry': {'type': 'Point', 'coordinates': [51.4223982, 35.6738886]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tehran',\n 'sov0name': 'Iran',\n 'latitude': 35.673889,\n 'longitude': 51.422398,\n 'pop_max': 7873000,\n 'pop_min': 7153309,\n 'meganame': 'Tehran',\n 'min_areakm': 496,\n 'max_areakm': 496,\n 'pop1950': 1041,\n 'pop1960': 1873,\n 'pop1970': 3290,\n 'pop1980': 5079,\n 'pop1990': 6365,\n 'pop2000': 7128,\n 'pop2010': 7873,\n 'pop2020': 8832,\n 'pop2050': 9814}},\n {'id': 212,\n 'bbox': ['69.1813', '34.5186', '69.1813', '34.5186'],\n 'geometry': {'type': 'Point', 'coordinates': [69.1813142, 34.5186361]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Kabul',\n 'sov0name': 'Afghanistan',\n 'latitude': 34.518636,\n 'longitude': 69.181314,\n 'pop_max': 3277000,\n 'pop_min': 3043532,\n 'meganame': 'Kabul',\n 'min_areakm': 594,\n 'max_areakm': 1471,\n 'pop1950': 129,\n 'pop1960': 263,\n 'pop1970': 472,\n 'pop1980': 978,\n 'pop1990': 1306,\n 'pop2000': 1963,\n 'pop2010': 3277,\n 'pop2020': 4730,\n 'pop2050': 7175}},\n {'id': 222,\n 'bbox': ['46.7708', '24.6428', '46.7708', '24.6428'],\n 'geometry': {'type': 'Point', 'coordinates': [46.7707958, 24.642779]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Riyadh',\n 'sov0name': 'Saudi Arabia',\n 'latitude': 24.642779,\n 'longitude': 46.770796,\n 'pop_max': 4465000,\n 'pop_min': 4205961,\n 'meganame': 'Ar-Riyadh',\n 'min_areakm': 854,\n 'max_areakm': 854,\n 'pop1950': 111,\n 'pop1960': 156,\n 'pop1970': 408,\n 'pop1980': 1055,\n 'pop1990': 2325,\n 'pop2000': 3567,\n 'pop2010': 4465,\n 'pop2020': 5405,\n 'pop2050': 6275}},\n {'id': 229,\n 'bbox': ['36.8147', '-1.2814', '36.8147', '-1.2814'],\n 'geometry': {'type': 'Point', 'coordinates': [36.814711, -1.2814009]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Nairobi',\n 'sov0name': 'Kenya',\n 'latitude': -1.281401,\n 'longitude': 36.814711,\n 'pop_max': 3010000,\n 'pop_min': 2750547,\n 'meganame': 'Nairobi',\n 'min_areakm': 698,\n 'max_areakm': 719,\n 'pop1950': 137,\n 'pop1960': 293,\n 'pop1970': 531,\n 'pop1980': 862,\n 'pop1990': 1380,\n 'pop2000': 2233,\n 'pop2010': 3010,\n 'pop2020': 4052,\n 'pop2050': 5871}}]" }, - "execution_count": 11, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } From 90406e283b81c4bdf62999e3255147a24e6a129b Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 22 Jul 2022 14:03:22 +0200 Subject: [PATCH 081/163] using dev branch of geodb for deployment --- docker/Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index db0994d..6cb8ac4 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -17,6 +17,12 @@ RUN git checkout forman-676-server_redesign RUN mamba env update -n base RUN pip install -e . +WORKDIR /tmp/ +RUN git clone https://github.com/dcs4cop/xcube-geodb.git +WORKDIR /tmp/xcube-geodb +RUN git checkout thomas_xxx_fix_expected_bbox +RUN pip install -e . + WORKDIR /tmp/ RUN pip install -e . From 30aadd6e277fff21adac126b82772d68cf05b085 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 22 Jul 2022 17:08:27 +0200 Subject: [PATCH 082/163] fixed "http and https is mixed up a couple of times" --- .github/workflows/workflow.yaml | 2 +- notebooks/geoDB-openEO_use_case_1.ipynb | 1108 +------------------- xcube_geodb_openeo/backend/capabilities.py | 7 +- xcube_geodb_openeo/defaults.py | 2 +- 4 files changed, 25 insertions(+), 1094 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index f4bb79f..82121d6 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -14,7 +14,7 @@ env: WAIT_FOR_STARTUP: "1" # If set to 1, docker build is performed - FORCE_DOCKER_BUILD: "1" + FORCE_DOCKER_BUILD: "0" jobs: diff --git a/notebooks/geoDB-openEO_use_case_1.ipynb b/notebooks/geoDB-openEO_use_case_1.ipynb index c57a994..48debf8 100644 --- a/notebooks/geoDB-openEO_use_case_1.ipynb +++ b/notebooks/geoDB-openEO_use_case_1.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "outputs": [], "source": [ "import urllib3\n", @@ -20,7 +20,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "outputs": [], "source": [ "def print_endpoint(url):\n", @@ -39,80 +39,8 @@ }, { "cell_type": "code", - "execution_count": 4, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "https://geodb.openeo.dev.brockmann-consult.de/\n", - "Status: 200\n", - "Result: {\n", - " \"api_version\": \"1.1.0\",\n", - " \"backend_version\": \"0.0.1.dev0\",\n", - " \"description\": \"Catalog of geoDB collections.\",\n", - " \"endpoints\": [\n", - " {\n", - " \"methods\": [\n", - " \"GET\"\n", - " ],\n", - " \"path\": \"/collections\"\n", - " }\n", - " ],\n", - " \"id\": \"xcube-geodb-openeo\",\n", - " \"links\": [\n", - " {\n", - " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/\",\n", - " \"rel\": \"self\",\n", - " \"title\": \"this document\",\n", - " \"type\": \"application/json\"\n", - " },\n", - " {\n", - " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/api\",\n", - " \"rel\": \"service-desc\",\n", - " \"title\": \"the API definition\",\n", - " \"type\": \"application/vnd.oai.openapi+json;version=3.0\"\n", - " },\n", - " {\n", - " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/api.html\",\n", - " \"rel\": \"service-doc\",\n", - " \"title\": \"the API documentation\",\n", - " \"type\": \"text/html\"\n", - " },\n", - " {\n", - " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/conformance\",\n", - " \"rel\": \"conformance\",\n", - " \"title\": \"OGC API conformance classes implemented by this server\",\n", - " \"type\": \"application/json\"\n", - " },\n", - " {\n", - " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections\",\n", - " \"rel\": \"data\",\n", - " \"title\": \"Information about the feature collections\",\n", - " \"type\": \"application/json\"\n", - " },\n", - " {\n", - " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/search\",\n", - " \"rel\": \"search\",\n", - " \"title\": \"Search across feature collections\",\n", - " \"type\": \"application/json\"\n", - " }\n", - " ],\n", - " \"stac_version\": \"0.9.0\",\n", - " \"title\": \"xcube geoDB Server, openEO API\",\n", - " \"type\": \"catalog\"\n", - "}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "d:\\conda-envs\\xcube-geodb-openeo-orig\\lib\\site-packages\\urllib3\\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'geodb.openeo.dev.brockmann-consult.de'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n", - " warnings.warn(\n" - ] - } - ], + "execution_count": null, + "outputs": [], "source": [ "print_endpoint(f'{base_url}/')" ], @@ -125,33 +53,8 @@ }, { "cell_type": "code", - "execution_count": 5, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "https://geodb.openeo.dev.brockmann-consult.de/.well-known/openeo\n", - "Status: 200\n", - "Result: {\n", - " \"versions\": [\n", - " {\n", - " \"api_version\": \"1.1.0\",\n", - " \"url\": \"https://geodb.openeo.dev.brockmann-consult.de/\"\n", - " }\n", - " ]\n", - "}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "d:\\conda-envs\\xcube-geodb-openeo-orig\\lib\\site-packages\\urllib3\\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'geodb.openeo.dev.brockmann-consult.de'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n", - " warnings.warn(\n" - ] - } - ], + "execution_count": null, + "outputs": [], "source": [ "print_endpoint(f'{base_url}/.well-known/openeo')" ], @@ -164,29 +67,8 @@ }, { "cell_type": "code", - "execution_count": 15, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "https://geodb.openeo.dev.brockmann-consult.de/file_formats\n", - "Status: 200\n", - "Result: {\n", - " \"input\": {},\n", - " \"output\": {}\n", - "}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "d:\\Miniconda3\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'geodb.openeo.dev.brockmann-consult.de'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n", - " warnings.warn(\n" - ] - } - ], + "execution_count": null, + "outputs": [], "source": [ "print_endpoint(f'{base_url}/file_formats')" ], @@ -199,33 +81,8 @@ }, { "cell_type": "code", - "execution_count": 16, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "https://geodb.openeo.dev.brockmann-consult.de/conformance\n", - "Status: 200\n", - "Result: {\n", - " \"conformsTo\": [\n", - " \"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core\",\n", - " \"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30\",\n", - " \"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/html\",\n", - " \"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson\"\n", - " ]\n", - "}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "d:\\Miniconda3\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'geodb.openeo.dev.brockmann-consult.de'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n", - " warnings.warn(\n" - ] - } - ], + "execution_count": null, + "outputs": [], "source": [ "print_endpoint(f'{base_url}/conformance')" ], @@ -238,141 +95,8 @@ }, { "cell_type": "code", - "execution_count": 17, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "https://geodb.openeo.dev.brockmann-consult.de/collections/AT_2021_EC21\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "d:\\Miniconda3\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'geodb.openeo.dev.brockmann-consult.de'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n", - " warnings.warn(\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Status: 200\n", - "Result: {\n", - " \"description\": \"No description available.\",\n", - " \"extent\": {\n", - " \"spatial\": {\n", - " \"bbox\": [\n", - " 9.596750015799916,\n", - " 46.34587798618984,\n", - " 17.232237875796603,\n", - " 48.96562893083748\n", - " ],\n", - " \"crs\": \"http://www.opengis.net/def/crs/OGC/1.3/CRS84\"\n", - " },\n", - " \"temporal\": {\n", - " \"interval\": [\n", - " [\n", - " \"null\"\n", - " ]\n", - " ]\n", - " }\n", - " },\n", - " \"id\": \"AT_2021_EC21\",\n", - " \"keywords\": [],\n", - " \"license\": \"proprietary\",\n", - " \"links\": [\n", - " {\n", - " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/AT_2021_EC21\",\n", - " \"rel\": \"self\"\n", - " },\n", - " {\n", - " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/\",\n", - " \"rel\": \"root\"\n", - " }\n", - " ],\n", - " \"providers\": [],\n", - " \"stac_extensions\": [\n", - " \"xcube-geodb\"\n", - " ],\n", - " \"stac_version\": \"0.9.0\",\n", - " \"summaries\": {\n", - " \"properties\": [\n", - " {\n", - " \"name\": \"id\"\n", - " },\n", - " {\n", - " \"name\": \"created_at\"\n", - " },\n", - " {\n", - " \"name\": \"modified_at\"\n", - " },\n", - " {\n", - " \"name\": \"fid\"\n", - " },\n", - " {\n", - " \"name\": \"fs_kennung\"\n", - " },\n", - " {\n", - " \"name\": \"snar_bezei\"\n", - " },\n", - " {\n", - " \"name\": \"sl_flaeche\"\n", - " },\n", - " {\n", - " \"name\": \"geo_id\"\n", - " },\n", - " {\n", - " \"name\": \"inspire_id\"\n", - " },\n", - " {\n", - " \"name\": \"gml_id\"\n", - " },\n", - " {\n", - " \"name\": \"gml_identi\"\n", - " },\n", - " {\n", - " \"name\": \"snar_code\"\n", - " },\n", - " {\n", - " \"name\": \"geo_part_k\"\n", - " },\n", - " {\n", - " \"name\": \"log_pkey\"\n", - " },\n", - " {\n", - " \"name\": \"geom_date_\"\n", - " },\n", - " {\n", - " \"name\": \"fart_id\"\n", - " },\n", - " {\n", - " \"name\": \"geo_type\"\n", - " },\n", - " {\n", - " \"name\": \"gml_length\"\n", - " },\n", - " {\n", - " \"name\": \"ec_trans_n\"\n", - " },\n", - " {\n", - " \"name\": \"ec_hcat_n\"\n", - " },\n", - " {\n", - " \"name\": \"ec_hcat_c\"\n", - " },\n", - " {\n", - " \"name\": \"geometry\"\n", - " }\n", - " ]\n", - " },\n", - " \"title\": \"AT_2021_EC21\"\n", - "}\n" - ] - } - ], + "execution_count": null, + "outputs": [], "source": [ "print_endpoint(f'{base_url}/collections/AT_2021_EC21')" ], @@ -385,675 +109,8 @@ }, { "cell_type": "code", - "execution_count": 19, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "https://geodb.openeo.dev.brockmann-consult.de/collections\n", - "Status: 200\n", - "Result: {\n", - " \"collections\": [\n", - " {\n", - " \"description\": \"No description available.\",\n", - " \"extent\": {\n", - " \"spatial\": {\n", - " \"bbox\": [\n", - " 53.54041278,\n", - " 9.886165746,\n", - " 53.54041278,\n", - " 9.886165746\n", - " ],\n", - " \"crs\": \"http://www.opengis.net/def/crs/OGC/1.3/CRS84\"\n", - " },\n", - " \"temporal\": {\n", - " \"interval\": [\n", - " [\n", - " \"null\"\n", - " ]\n", - " ]\n", - " }\n", - " },\n", - " \"id\": \"alster_debug\",\n", - " \"keywords\": [],\n", - " \"license\": \"proprietary\",\n", - " \"links\": [\n", - " {\n", - " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/alster_debug\",\n", - " \"rel\": \"self\"\n", - " },\n", - " {\n", - " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/\",\n", - " \"rel\": \"root\"\n", - " }\n", - " ],\n", - " \"providers\": [],\n", - " \"stac_extensions\": [\n", - " \"xcube-geodb\"\n", - " ],\n", - " \"stac_version\": \"0.9.0\",\n", - " \"summaries\": {\n", - " \"properties\": [\n", - " {\n", - " \"name\": \"id\"\n", - " },\n", - " {\n", - " \"name\": \"created_at\"\n", - " },\n", - " {\n", - " \"name\": \"modified_at\"\n", - " },\n", - " {\n", - " \"name\": \"date\"\n", - " },\n", - " {\n", - " \"name\": \"chl\"\n", - " },\n", - " {\n", - " \"name\": \"chl_min\"\n", - " },\n", - " {\n", - " \"name\": \"chl_max\"\n", - " },\n", - " {\n", - " \"name\": \"status\"\n", - " },\n", - " {\n", - " \"name\": \"geometry\"\n", - " }\n", - " ]\n", - " },\n", - " \"title\": \"alster_debug\"\n", - " },\n", - " {\n", - " \"description\": \"No description available.\",\n", - " \"extent\": {\n", - " \"spatial\": {\n", - " \"bbox\": [\n", - " 9.596750015799916,\n", - " 46.34587798618984,\n", - " 17.232237875796603,\n", - " 48.96562893083748\n", - " ],\n", - " \"crs\": \"http://www.opengis.net/def/crs/OGC/1.3/CRS84\"\n", - " },\n", - " \"temporal\": {\n", - " \"interval\": [\n", - " [\n", - " \"null\"\n", - " ]\n", - " ]\n", - " }\n", - " },\n", - " \"id\": \"AT_2021_EC21\",\n", - " \"keywords\": [],\n", - " \"license\": \"proprietary\",\n", - " \"links\": [\n", - " {\n", - " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/AT_2021_EC21\",\n", - " \"rel\": \"self\"\n", - " },\n", - " {\n", - " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/\",\n", - " \"rel\": \"root\"\n", - " }\n", - " ],\n", - " \"providers\": [],\n", - " \"stac_extensions\": [\n", - " \"xcube-geodb\"\n", - " ],\n", - " \"stac_version\": \"0.9.0\",\n", - " \"summaries\": {\n", - " \"properties\": [\n", - " {\n", - " \"name\": \"id\"\n", - " },\n", - " {\n", - " \"name\": \"created_at\"\n", - " },\n", - " {\n", - " \"name\": \"modified_at\"\n", - " },\n", - " {\n", - " \"name\": \"fid\"\n", - " },\n", - " {\n", - " \"name\": \"fs_kennung\"\n", - " },\n", - " {\n", - " \"name\": \"snar_bezei\"\n", - " },\n", - " {\n", - " \"name\": \"sl_flaeche\"\n", - " },\n", - " {\n", - " \"name\": \"geo_id\"\n", - " },\n", - " {\n", - " \"name\": \"inspire_id\"\n", - " },\n", - " {\n", - " \"name\": \"gml_id\"\n", - " },\n", - " {\n", - " \"name\": \"gml_identi\"\n", - " },\n", - " {\n", - " \"name\": \"snar_code\"\n", - " },\n", - " {\n", - " \"name\": \"geo_part_k\"\n", - " },\n", - " {\n", - " \"name\": \"log_pkey\"\n", - " },\n", - " {\n", - " \"name\": \"geom_date_\"\n", - " },\n", - " {\n", - " \"name\": \"fart_id\"\n", - " },\n", - " {\n", - " \"name\": \"geo_type\"\n", - " },\n", - " {\n", - " \"name\": \"gml_length\"\n", - " },\n", - " {\n", - " \"name\": \"ec_trans_n\"\n", - " },\n", - " {\n", - " \"name\": \"ec_hcat_n\"\n", - " },\n", - " {\n", - " \"name\": \"ec_hcat_c\"\n", - " },\n", - " {\n", - " \"name\": \"geometry\"\n", - " }\n", - " ]\n", - " },\n", - " \"title\": \"AT_2021_EC21\"\n", - " },\n", - " {\n", - " \"description\": \"No description available.\",\n", - " \"extent\": {\n", - " \"spatial\": {\n", - " \"bbox\": [\n", - " 4.4110298963594845,\n", - " 49.513108154698884,\n", - " 5.726474442684629,\n", - " 51.62918026270598\n", - " ],\n", - " \"crs\": \"http://www.opengis.net/def/crs/OGC/1.3/CRS84\"\n", - " },\n", - " \"temporal\": {\n", - " \"interval\": [\n", - " [\n", - " \"null\"\n", - " ]\n", - " ]\n", - " }\n", - " },\n", - " \"id\": \"BE_VLG_2021_EC21\",\n", - " \"keywords\": [],\n", - " \"license\": \"proprietary\",\n", - " \"links\": [\n", - " {\n", - " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/BE_VLG_2021_EC21\",\n", - " \"rel\": \"self\"\n", - " },\n", - " {\n", - " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/\",\n", - " \"rel\": \"root\"\n", - " }\n", - " ],\n", - " \"providers\": [],\n", - " \"stac_extensions\": [\n", - " \"xcube-geodb\"\n", - " ],\n", - " \"stac_version\": \"0.9.0\",\n", - " \"summaries\": {\n", - " \"properties\": [\n", - " {\n", - " \"name\": \"id\"\n", - " },\n", - " {\n", - " \"name\": \"created_at\"\n", - " },\n", - " {\n", - " \"name\": \"modified_at\"\n", - " },\n", - " {\n", - " \"name\": \"fid\"\n", - " },\n", - " {\n", - " \"name\": \"graf_opp\"\n", - " },\n", - " {\n", - " \"name\": \"ref_id\"\n", - " },\n", - " {\n", - " \"name\": \"gwscod_v\"\n", - " },\n", - " {\n", - " \"name\": \"gwsnam_v\"\n", - " },\n", - " {\n", - " \"name\": \"gwscod_h\"\n", - " },\n", - " {\n", - " \"name\": \"gwsnam_h\"\n", - " },\n", - " {\n", - " \"name\": \"gwsgrp_h\"\n", - " },\n", - " {\n", - " \"name\": \"gwsgrph_lb\"\n", - " },\n", - " {\n", - " \"name\": \"gwscod_n\"\n", - " },\n", - " {\n", - " \"name\": \"gwsnam_n\"\n", - " },\n", - " {\n", - " \"name\": \"gwscod_n2\"\n", - " },\n", - " {\n", - " \"name\": \"gwsnam_n2\"\n", - " },\n", - " {\n", - " \"name\": \"gesp_pm\"\n", - " },\n", - " {\n", - " \"name\": \"gesp_pm_lb\"\n", - " },\n", - " {\n", - " \"name\": \"ero_nam\"\n", - " },\n", - " {\n", - " \"name\": \"stat_bgv\"\n", - " },\n", - " {\n", - " \"name\": \"landbstr\"\n", - " },\n", - " {\n", - " \"name\": \"stat_aar\"\n", - " },\n", - " {\n", - " \"name\": \"pct_ekbg\"\n", - " },\n", - " {\n", - " \"name\": \"prc_gem\"\n", - " },\n", - " {\n", - " \"name\": \"prc_nis\"\n", - " },\n", - " {\n", - " \"name\": \"x_ref\"\n", - " },\n", - " {\n", - " \"name\": \"y_ref\"\n", - " },\n", - " {\n", - " \"name\": \"wgs84_lg\"\n", - " },\n", - " {\n", - " \"name\": \"wgs84_bg\"\n", - " },\n", - " {\n", - " \"name\": \"ec_nuts3\"\n", - " },\n", - " {\n", - " \"name\": \"ec_trans_n\"\n", - " },\n", - " {\n", - " \"name\": \"ec_hcat_n\"\n", - " },\n", - " {\n", - " \"name\": \"ec_hcat_c\"\n", - " },\n", - " {\n", - " \"name\": \"geometry\"\n", - " }\n", - " ]\n", - " },\n", - " \"title\": \"BE_VLG_2021_EC21\"\n", - " },\n", - " {\n", - " \"description\": \"No description available.\",\n", - " \"extent\": {\n", - " \"spatial\": {\n", - " \"bbox\": [\n", - " 51.470403111669235,\n", - " 3.506642990695565,\n", - " 51.6481401036661,\n", - " 3.5322344100893526\n", - " ],\n", - " \"crs\": \"http://www.opengis.net/def/crs/OGC/1.3/CRS84\"\n", - " },\n", - " \"temporal\": {\n", - " \"interval\": [\n", - " [\n", - " \"null\"\n", - " ]\n", - " ]\n", - " }\n", - " },\n", - " \"id\": \"eurocrops-test-1\",\n", - " \"keywords\": [],\n", - " \"license\": \"proprietary\",\n", - " \"links\": [\n", - " {\n", - " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/eurocrops-test-1\",\n", - " \"rel\": \"self\"\n", - " },\n", - " {\n", - " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/\",\n", - " \"rel\": \"root\"\n", - " }\n", - " ],\n", - " \"providers\": [],\n", - " \"stac_extensions\": [\n", - " \"xcube-geodb\"\n", - " ],\n", - " \"stac_version\": \"0.9.0\",\n", - " \"summaries\": {\n", - " \"properties\": [\n", - " {\n", - " \"name\": \"id\"\n", - " },\n", - " {\n", - " \"name\": \"created_at\"\n", - " },\n", - " {\n", - " \"name\": \"modified_at\"\n", - " },\n", - " {\n", - " \"name\": \"inspire_id\"\n", - " },\n", - " {\n", - " \"name\": \"flik\"\n", - " },\n", - " {\n", - " \"name\": \"area_ha\"\n", - " },\n", - " {\n", - " \"name\": \"code\"\n", - " },\n", - " {\n", - " \"name\": \"code_txt\"\n", - " },\n", - " {\n", - " \"name\": \"use_code\"\n", - " },\n", - " {\n", - " \"name\": \"use_txt\"\n", - " },\n", - " {\n", - " \"name\": \"d_pg\"\n", - " },\n", - " {\n", - " \"name\": \"cropdiv\"\n", - " },\n", - " {\n", - " \"name\": \"efa\"\n", - " },\n", - " {\n", - " \"name\": \"eler\"\n", - " },\n", - " {\n", - " \"name\": \"wj\"\n", - " },\n", - " {\n", - " \"name\": \"dat_bearb\"\n", - " },\n", - " {\n", - " \"name\": \"ec_trans_n\"\n", - " },\n", - " {\n", - " \"name\": \"ec_hcat_n\"\n", - " },\n", - " {\n", - " \"name\": \"ec_hcat_c\"\n", - " },\n", - " {\n", - " \"name\": \"geometry\"\n", - " }\n", - " ]\n", - " },\n", - " \"title\": \"eurocrops-test-1\"\n", - " },\n", - " {\n", - " \"description\": \"No description available.\",\n", - " \"extent\": {\n", - " \"spatial\": {\n", - " \"bbox\": [\n", - " 50.455334356316605,\n", - " 1.8967512362310952,\n", - " 52.13675045936469,\n", - " 3.5040816893950466\n", - " ],\n", - " \"crs\": \"http://www.opengis.net/def/crs/OGC/1.3/CRS84\"\n", - " },\n", - " \"temporal\": {\n", - " \"interval\": [\n", - " [\n", - " \"null\"\n", - " ]\n", - " ]\n", - " }\n", - " },\n", - " \"id\": \"eurocrops-test-nrw\",\n", - " \"keywords\": [],\n", - " \"license\": \"proprietary\",\n", - " \"links\": [\n", - " {\n", - " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/eurocrops-test-nrw\",\n", - " \"rel\": \"self\"\n", - " },\n", - " {\n", - " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/\",\n", - " \"rel\": \"root\"\n", - " }\n", - " ],\n", - " \"providers\": [],\n", - " \"stac_extensions\": [\n", - " \"xcube-geodb\"\n", - " ],\n", - " \"stac_version\": \"0.9.0\",\n", - " \"summaries\": {\n", - " \"properties\": [\n", - " {\n", - " \"name\": \"id\"\n", - " },\n", - " {\n", - " \"name\": \"created_at\"\n", - " },\n", - " {\n", - " \"name\": \"modified_at\"\n", - " },\n", - " {\n", - " \"name\": \"inspire_id\"\n", - " },\n", - " {\n", - " \"name\": \"flik\"\n", - " },\n", - " {\n", - " \"name\": \"area_ha\"\n", - " },\n", - " {\n", - " \"name\": \"code\"\n", - " },\n", - " {\n", - " \"name\": \"code_txt\"\n", - " },\n", - " {\n", - " \"name\": \"use_code\"\n", - " },\n", - " {\n", - " \"name\": \"use_txt\"\n", - " },\n", - " {\n", - " \"name\": \"d_pg\"\n", - " },\n", - " {\n", - " \"name\": \"cropdiv\"\n", - " },\n", - " {\n", - " \"name\": \"efa\"\n", - " },\n", - " {\n", - " \"name\": \"eler\"\n", - " },\n", - " {\n", - " \"name\": \"wj\"\n", - " },\n", - " {\n", - " \"name\": \"dat_bearb\"\n", - " },\n", - " {\n", - " \"name\": \"ec_trans_n\"\n", - " },\n", - " {\n", - " \"name\": \"ec_hcat_n\"\n", - " },\n", - " {\n", - " \"name\": \"ec_hcat_c\"\n", - " },\n", - " {\n", - " \"name\": \"geometry\"\n", - " }\n", - " ]\n", - " },\n", - " \"title\": \"eurocrops-test-nrw\"\n", - " },\n", - " {\n", - " \"description\": \"No description available.\",\n", - " \"extent\": {\n", - " \"spatial\": {\n", - " \"bbox\": [\n", - " -41.2999879,\n", - " -175.2205645,\n", - " 64.1500236,\n", - " 179.2166471\n", - " ],\n", - " \"crs\": \"http://www.opengis.net/def/crs/OGC/1.3/CRS84\"\n", - " },\n", - " \"temporal\": {\n", - " \"interval\": [\n", - " [\n", - " \"null\"\n", - " ]\n", - " ]\n", - " }\n", - " },\n", - " \"id\": \"populated_places_sub\",\n", - " \"keywords\": [],\n", - " \"license\": \"proprietary\",\n", - " \"links\": [\n", - " {\n", - " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/populated_places_sub\",\n", - " \"rel\": \"self\"\n", - " },\n", - " {\n", - " \"href\": \"http://geodb.openeo.dev.brockmann-consult.de/collections/\",\n", - " \"rel\": \"root\"\n", - " }\n", - " ],\n", - " \"providers\": [],\n", - " \"stac_extensions\": [\n", - " \"xcube-geodb\"\n", - " ],\n", - " \"stac_version\": \"0.9.0\",\n", - " \"summaries\": {\n", - " \"properties\": [\n", - " {\n", - " \"name\": \"id\"\n", - " },\n", - " {\n", - " \"name\": \"created_at\"\n", - " },\n", - " {\n", - " \"name\": \"modified_at\"\n", - " },\n", - " {\n", - " \"name\": \"name\"\n", - " },\n", - " {\n", - " \"name\": \"sov0name\"\n", - " },\n", - " {\n", - " \"name\": \"latitude\"\n", - " },\n", - " {\n", - " \"name\": \"longitude\"\n", - " },\n", - " {\n", - " \"name\": \"pop_max\"\n", - " },\n", - " {\n", - " \"name\": \"pop_min\"\n", - " },\n", - " {\n", - " \"name\": \"meganame\"\n", - " },\n", - " {\n", - " \"name\": \"min_areakm\"\n", - " },\n", - " {\n", - " \"name\": \"max_areakm\"\n", - " },\n", - " {\n", - " \"name\": \"pop1950\"\n", - " },\n", - " {\n", - " \"name\": \"pop1960\"\n", - " },\n", - " {\n", - " \"name\": \"pop1970\"\n", - " },\n", - " {\n", - " \"name\": \"pop1980\"\n", - " },\n", - " {\n", - " \"name\": \"pop1990\"\n", - " },\n", - " {\n", - " \"name\": \"pop2000\"\n", - " },\n", - " {\n", - " \"name\": \"pop2010\"\n", - " },\n", - " {\n", - " \"name\": \"pop2020\"\n", - " },\n", - " {\n", - " \"name\": \"pop2050\"\n", - " },\n", - " {\n", - " \"name\": \"geometry\"\n", - " }\n", - " ]\n", - " },\n", - " \"title\": \"populated_places_sub\"\n", - " }\n", - " ],\n", - " \"links\": []\n", - "}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "d:\\Miniconda3\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'geodb.openeo.dev.brockmann-consult.de'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n", - " warnings.warn(\n" - ] - } - ], + "execution_count": null, + "outputs": [], "source": [ "print_endpoint(f'{base_url}/collections')" ], @@ -1066,115 +123,8 @@ }, { "cell_type": "code", - "execution_count": 18, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "https://geodb.openeo.dev.brockmann-consult.de/processes\n", - "Status: 200\n", - "Result: {\n", - " \"links\": [\n", - " {}\n", - " ],\n", - " \"processes\": [\n", - " {\n", - " \"categories\": [\n", - " \"import\"\n", - " ],\n", - " \"description\": \"Loads a collection from the current back-end by its id and returns it as a vector cube. The data that is added to the data cube can be restricted with the parameters \\\"spatial_extent\\\" and \\\"properties\\\".\",\n", - " \"id\": \"load_collection\",\n", - " \"parameters\": [\n", - " {\n", - " \"description\": \"The collection's name\",\n", - " \"name\": \"id\",\n", - " \"schema\": {\n", - " \"type\": \"string\"\n", - " }\n", - " },\n", - " {\n", - " \"description\": \"The database of the collection\",\n", - " \"name\": \"database\",\n", - " \"optional\": true,\n", - " \"schema\": {\n", - " \"type\": \"string\"\n", - " }\n", - " },\n", - " {\n", - " \"description\": \"Limits the data to load from the collection to the specified bounding box or polygons.\\n\\nThe process puts a pixel into the data cube if the point at the pixel center intersects with the bounding box.\\n\\nSet this parameter to `null` to set no limit for the spatial extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using ``filter_bbox()`` or ``filter_spatial()`` directly after loading unbounded data.\",\n", - " \"name\": \"spatial_extent\",\n", - " \"schema\": [\n", - " {\n", - " \"properties\": {\n", - " \"crs\": {\n", - " \"default\": 4326,\n", - " \"description\": \"Coordinate reference system of the extent, specified as as [EPSG code](http://www.epsg-registry.org/), [WKT2 (ISO 19162) string] (http://docs.opengeospatial.org/is/18-010r7/18-010r7.html) or [PROJ definition (deprecated)](https://proj.org/usage/quickstart.html). Defaults to `4326` (EPSG code 4326) unless the client explicitly requests a different coordinate reference system.\",\n", - " \"examples\": [\n", - " 3857\n", - " ],\n", - " \"minimum\": 1000,\n", - " \"subtype\": \"epsg-code\",\n", - " \"title\": \"EPSG Code\",\n", - " \"type\": \"integer\"\n", - " },\n", - " \"east\": {\n", - " \"description\": \"East (upper right corner, coordinate axis 1).\",\n", - " \"type\": \"number\"\n", - " },\n", - " \"north\": {\n", - " \"description\": \"North (upper right corner, coordinate axis 2).\",\n", - " \"type\": \"number\"\n", - " },\n", - " \"south\": {\n", - " \"description\": \"South (lower left corner, coordinate axis 2).\",\n", - " \"type\": \"number\"\n", - " },\n", - " \"west\": {\n", - " \"description\": \"West (lower left corner, coordinate axis 1).\",\n", - " \"type\": \"number\"\n", - " }\n", - " },\n", - " \"required\": [\n", - " \"west\",\n", - " \"south\",\n", - " \"east\",\n", - " \"north\"\n", - " ],\n", - " \"subtype\": \"bounding-box\",\n", - " \"title\": \"Bounding Box\",\n", - " \"type\": \"object\"\n", - " },\n", - " {\n", - " \"description\": \"Don't filter spatially. All data is included in the data cube.\",\n", - " \"title\": \"No filter\",\n", - " \"type\": \"null\"\n", - " }\n", - " ]\n", - " }\n", - " ],\n", - " \"returns\": {\n", - " \"description\": \"A vector cube for further processing.\",\n", - " \"schema\": {\n", - " \"subtype\": \"vector-cube\",\n", - " \"type\": \"object\"\n", - " }\n", - " },\n", - " \"summary\": \"Load a collection\"\n", - " }\n", - " ]\n", - "}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "d:\\Miniconda3\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'geodb.openeo.dev.brockmann-consult.de'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n", - " warnings.warn(\n" - ] - } - ], + "execution_count": null, + "outputs": [], "source": [ "print_endpoint(f'{base_url}/processes')" ], @@ -1187,17 +137,8 @@ }, { "cell_type": "code", - "execution_count": 20, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "d:\\Miniconda3\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'geodb.openeo.dev.brockmann-consult.de'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n", - " warnings.warn(\n" - ] - } - ], + "execution_count": null, + "outputs": [], "source": [ "body = json.dumps({\"process\": {\n", " \"id\": \"load_collection\",\n", @@ -1222,17 +163,8 @@ }, { "cell_type": "code", - "execution_count": 21, - "outputs": [ - { - "data": { - "text/plain": "[{'id': 22,\n 'bbox': ['51.5330', '25.2866', '51.5330', '25.2866'],\n 'geometry': {'type': 'Point', 'coordinates': [51.5329679, 25.286556]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Doha',\n 'sov0name': 'Qatar',\n 'latitude': 25.286556,\n 'longitude': 51.532968,\n 'pop_max': 1450000,\n 'pop_min': 731310,\n 'meganame': None,\n 'min_areakm': 270,\n 'max_areakm': 270,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 26,\n 'bbox': ['35.7500', '-6.1833', '35.7500', '-6.1833'],\n 'geometry': {'type': 'Point', 'coordinates': [35.7500036, -6.1833061]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dodoma',\n 'sov0name': 'United Republic of Tanzania',\n 'latitude': -6.183306,\n 'longitude': 35.750004,\n 'pop_max': 218269,\n 'pop_min': 180541,\n 'meganame': None,\n 'min_areakm': 55,\n 'max_areakm': 55,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 31,\n 'bbox': ['43.1480', '11.5950', '43.1480', '11.5950'],\n 'geometry': {'type': 'Point', 'coordinates': [43.1480017, 11.5950145]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Djibouti',\n 'sov0name': 'Djibouti',\n 'latitude': 11.595015,\n 'longitude': 43.148002,\n 'pop_max': 923000,\n 'pop_min': 604013,\n 'meganame': None,\n 'min_areakm': 42,\n 'max_areakm': 42,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 44,\n 'bbox': ['50.5831', '26.2361', '50.5831', '26.2361'],\n 'geometry': {'type': 'Point', 'coordinates': [50.5830517, 26.2361363]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Manama',\n 'sov0name': 'Bahrain',\n 'latitude': 26.236136,\n 'longitude': 50.583052,\n 'pop_max': 563920,\n 'pop_min': 157474,\n 'meganame': None,\n 'min_areakm': 178,\n 'max_areakm': 178,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 49,\n 'bbox': ['54.3666', '24.4667', '54.3666', '24.4667'],\n 'geometry': {'type': 'Point', 'coordinates': [54.3665934, 24.4666836]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Abu Dhabi',\n 'sov0name': 'United Arab Emirates',\n 'latitude': 24.466684,\n 'longitude': 54.366593,\n 'pop_max': 603492,\n 'pop_min': 560230,\n 'meganame': None,\n 'min_areakm': 96,\n 'max_areakm': 96,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 50,\n 'bbox': ['58.3833', '37.9500', '58.3833', '37.9500'],\n 'geometry': {'type': 'Point', 'coordinates': [58.3832991, 37.9499949]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Ashgabat',\n 'sov0name': 'Turkmenistan',\n 'latitude': 37.949995,\n 'longitude': 58.383299,\n 'pop_max': 727700,\n 'pop_min': 577982,\n 'meganame': None,\n 'min_areakm': 108,\n 'max_areakm': 128,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 62,\n 'bbox': ['68.7739', '38.5600', '68.7739', '38.5600'],\n 'geometry': {'type': 'Point', 'coordinates': [68.7738794, 38.5600352]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dushanbe',\n 'sov0name': 'Tajikistan',\n 'latitude': 38.560035,\n 'longitude': 68.773879,\n 'pop_max': 1086244,\n 'pop_min': 679400,\n 'meganame': None,\n 'min_areakm': 415,\n 'max_areakm': 415,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 76,\n 'bbox': ['45.3647', '2.0686', '45.3647', '2.0686'],\n 'geometry': {'type': 'Point', 'coordinates': [45.3647318, 2.0686272]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Mogadishu',\n 'sov0name': 'Somalia',\n 'latitude': 2.068627,\n 'longitude': 45.364732,\n 'pop_max': 1100000,\n 'pop_min': 875388,\n 'meganame': 'Muqdisho',\n 'min_areakm': 99,\n 'max_areakm': 99,\n 'pop1950': 69,\n 'pop1960': 94,\n 'pop1970': 272,\n 'pop1980': 551,\n 'pop1990': 1035,\n 'pop2000': 1201,\n 'pop2010': 1100,\n 'pop2020': 1794,\n 'pop2050': 2529}},\n {'id': 77,\n 'bbox': ['58.5933', '23.6133', '58.5933', '23.6133'],\n 'geometry': {'type': 'Point', 'coordinates': [58.5933121, 23.6133248]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Muscat',\n 'sov0name': 'Oman',\n 'latitude': 23.613325,\n 'longitude': 58.593312,\n 'pop_max': 734697,\n 'pop_min': 586861,\n 'meganame': None,\n 'min_areakm': 104,\n 'max_areakm': 104,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 83,\n 'bbox': ['35.9314', '31.9520', '35.9314', '31.9520'],\n 'geometry': {'type': 'Point', 'coordinates': [35.9313541, 31.9519711]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Amman',\n 'sov0name': 'Jordan',\n 'latitude': 31.951971,\n 'longitude': 35.931354,\n 'pop_max': 1060000,\n 'pop_min': 1060000,\n 'meganame': 'Amman',\n 'min_areakm': 403,\n 'max_areakm': 545,\n 'pop1950': 90,\n 'pop1960': 218,\n 'pop1970': 388,\n 'pop1980': 636,\n 'pop1990': 851,\n 'pop2000': 1007,\n 'pop2010': 1060,\n 'pop2020': 1185,\n 'pop2050': 1359}},\n {'id': 95,\n 'bbox': ['38.9333', '15.3333', '38.9333', '15.3333'],\n 'geometry': {'type': 'Point', 'coordinates': [38.9333235, 15.3333393]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Asmara',\n 'sov0name': 'Eritrea',\n 'latitude': 15.333339,\n 'longitude': 38.933324,\n 'pop_max': 620802,\n 'pop_min': 563930,\n 'meganame': None,\n 'min_areakm': 90,\n 'max_areakm': 90,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 105,\n 'bbox': ['35.5078', '33.8739', '35.5078', '33.8739'],\n 'geometry': {'type': 'Point', 'coordinates': [35.5077624, 33.873921]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Beirut',\n 'sov0name': 'Lebanon',\n 'latitude': 33.873921,\n 'longitude': 35.507762,\n 'pop_max': 1846000,\n 'pop_min': 1712125,\n 'meganame': 'Bayrut',\n 'min_areakm': 429,\n 'max_areakm': 471,\n 'pop1950': 322,\n 'pop1960': 561,\n 'pop1970': 923,\n 'pop1980': 1623,\n 'pop1990': 1293,\n 'pop2000': 1487,\n 'pop2010': 1846,\n 'pop2020': 2051,\n 'pop2050': 2173}},\n {'id': 106,\n 'bbox': ['44.7888', '41.7270', '44.7888', '41.7270'],\n 'geometry': {'type': 'Point', 'coordinates': [44.7888496, 41.7269558]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tbilisi',\n 'sov0name': 'Georgia',\n 'latitude': 41.726956,\n 'longitude': 44.78885,\n 'pop_max': 1100000,\n 'pop_min': 1005257,\n 'meganame': 'Tbilisi',\n 'min_areakm': 131,\n 'max_areakm': 135,\n 'pop1950': 612,\n 'pop1960': 718,\n 'pop1970': 897,\n 'pop1980': 1090,\n 'pop1990': 1224,\n 'pop2000': 1100,\n 'pop2010': 1100,\n 'pop2020': 1113,\n 'pop2050': 1114}},\n {'id': 120,\n 'bbox': ['44.5116', '40.1831', '44.5116', '40.1831'],\n 'geometry': {'type': 'Point', 'coordinates': [44.5116055, 40.1830966]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Yerevan',\n 'sov0name': 'Armenia',\n 'latitude': 40.183097,\n 'longitude': 44.511606,\n 'pop_max': 1102000,\n 'pop_min': 1093485,\n 'meganame': 'Yerevan',\n 'min_areakm': 191,\n 'max_areakm': 191,\n 'pop1950': 341,\n 'pop1960': 538,\n 'pop1970': 778,\n 'pop1980': 1042,\n 'pop1990': 1175,\n 'pop2000': 1111,\n 'pop2010': 1102,\n 'pop2020': 1102,\n 'pop2050': 1102}},\n {'id': 121,\n 'bbox': ['49.8603', '40.3972', '49.8603', '40.3972'],\n 'geometry': {'type': 'Point', 'coordinates': [49.8602713, 40.3972179]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Baku',\n 'sov0name': 'Azerbaijan',\n 'latitude': 40.397218,\n 'longitude': 49.860271,\n 'pop_max': 2122300,\n 'pop_min': 1892000,\n 'meganame': 'Baku',\n 'min_areakm': 246,\n 'max_areakm': 249,\n 'pop1950': 897,\n 'pop1960': 1005,\n 'pop1970': 1274,\n 'pop1980': 1574,\n 'pop1990': 1733,\n 'pop2000': 1806,\n 'pop2010': 1892,\n 'pop2020': 2006,\n 'pop2050': 2187}},\n {'id': 134,\n 'bbox': ['44.0653', '9.5600', '44.0653', '9.5600'],\n 'geometry': {'type': 'Point', 'coordinates': [44.06531, 9.5600224]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Hargeysa',\n 'sov0name': 'Somaliland',\n 'latitude': 9.560022,\n 'longitude': 44.06531,\n 'pop_max': 477876,\n 'pop_min': 247018,\n 'meganame': None,\n 'min_areakm': 40,\n 'max_areakm': 40,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 135,\n 'bbox': ['55.4500', '-4.6166', '55.4500', '-4.6166'],\n 'geometry': {'type': 'Point', 'coordinates': [55.4499898, -4.6166317]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Victoria',\n 'sov0name': 'Seychelles',\n 'latitude': -4.616632,\n 'longitude': 55.44999,\n 'pop_max': 33576,\n 'pop_min': 22881,\n 'meganame': None,\n 'min_areakm': 15,\n 'max_areakm': 15,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 140,\n 'bbox': ['35.2066', '31.7784', '35.2066', '31.7784'],\n 'geometry': {'type': 'Point', 'coordinates': [35.2066259, 31.7784078]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Jerusalem',\n 'sov0name': 'Israel',\n 'latitude': 31.778408,\n 'longitude': 35.206626,\n 'pop_max': 1029300,\n 'pop_min': 801000,\n 'meganame': None,\n 'min_areakm': 246,\n 'max_areakm': 246,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 143,\n 'bbox': ['33.3666', '35.1667', '33.3666', '35.1667'],\n 'geometry': {'type': 'Point', 'coordinates': [33.3666349, 35.1666765]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Nicosia',\n 'sov0name': 'Cyprus',\n 'latitude': 35.166677,\n 'longitude': 33.366635,\n 'pop_max': 224300,\n 'pop_min': 200452,\n 'meganame': None,\n 'min_areakm': 128,\n 'max_areakm': 128,\n 'pop1950': 0,\n 'pop1960': 0,\n 'pop1970': 0,\n 'pop1980': 0,\n 'pop1990': 0,\n 'pop2000': 0,\n 'pop2010': 0,\n 'pop2020': 0,\n 'pop2050': 0}},\n {'id': 148,\n 'bbox': ['44.2046', '15.3567', '44.2046', '15.3567'],\n 'geometry': {'type': 'Point', 'coordinates': [44.2046475, 15.3566792]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Sanaa',\n 'sov0name': 'Yemen',\n 'latitude': 15.356679,\n 'longitude': 44.204648,\n 'pop_max': 2008000,\n 'pop_min': 1835853,\n 'meganame': \"Sana'a'\",\n 'min_areakm': 160,\n 'max_areakm': 160,\n 'pop1950': 46,\n 'pop1960': 72,\n 'pop1970': 111,\n 'pop1980': 238,\n 'pop1990': 653,\n 'pop2000': 1365,\n 'pop2010': 2008,\n 'pop2020': 2955,\n 'pop2050': 4382}},\n {'id': 150,\n 'bbox': ['36.2981', '33.5020', '36.2981', '33.5020'],\n 'geometry': {'type': 'Point', 'coordinates': [36.29805, 33.5019799]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Damascus',\n 'sov0name': 'Syria',\n 'latitude': 33.50198,\n 'longitude': 36.29805,\n 'pop_max': 2466000,\n 'pop_min': 2466000,\n 'meganame': 'Dimashq',\n 'min_areakm': 532,\n 'max_areakm': 705,\n 'pop1950': 367,\n 'pop1960': 579,\n 'pop1970': 914,\n 'pop1980': 1376,\n 'pop1990': 1691,\n 'pop2000': 2044,\n 'pop2010': 2466,\n 'pop2020': 2981,\n 'pop2050': 3605}},\n {'id': 156,\n 'bbox': ['39.2664', '-6.7981', '39.2664', '-6.7981'],\n 'geometry': {'type': 'Point', 'coordinates': [39.266396, -6.7980667]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dar es Salaam',\n 'sov0name': 'United Republic of Tanzania',\n 'latitude': -6.798067,\n 'longitude': 39.266396,\n 'pop_max': 2930000,\n 'pop_min': 2698652,\n 'meganame': 'Dar es Salaam',\n 'min_areakm': 211,\n 'max_areakm': 211,\n 'pop1950': 67,\n 'pop1960': 162,\n 'pop1970': 357,\n 'pop1980': 836,\n 'pop1990': 1316,\n 'pop2000': 2116,\n 'pop2010': 2930,\n 'pop2020': 4020,\n 'pop2050': 5688}},\n {'id': 162,\n 'bbox': ['47.9764', '29.3717', '47.9764', '29.3717'],\n 'geometry': {'type': 'Point', 'coordinates': [47.9763553, 29.3716635]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Kuwait City',\n 'sov0name': 'Kuwait',\n 'latitude': 29.371664,\n 'longitude': 47.976355,\n 'pop_max': 2063000,\n 'pop_min': 60064,\n 'meganame': 'Al Kuwayt (Kuwait City)',\n 'min_areakm': 264,\n 'max_areakm': 366,\n 'pop1950': 63,\n 'pop1960': 179,\n 'pop1970': 553,\n 'pop1980': 891,\n 'pop1990': 1392,\n 'pop2000': 1499,\n 'pop2010': 2063,\n 'pop2020': 2592,\n 'pop2050': 2956}},\n {'id': 166,\n 'bbox': ['34.7681', '32.0819', '34.7681', '32.0819'],\n 'geometry': {'type': 'Point', 'coordinates': [34.7680659, 32.0819373]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tel Aviv-Yafo',\n 'sov0name': 'Israel',\n 'latitude': 32.081937,\n 'longitude': 34.768066,\n 'pop_max': 3112000,\n 'pop_min': 378358,\n 'meganame': 'Tel Aviv-Yafo',\n 'min_areakm': 436,\n 'max_areakm': 436,\n 'pop1950': 418,\n 'pop1960': 738,\n 'pop1970': 1029,\n 'pop1980': 1416,\n 'pop1990': 2026,\n 'pop2000': 2752,\n 'pop2010': 3112,\n 'pop2020': 3453,\n 'pop2050': 3726}},\n {'id': 184,\n 'bbox': ['55.2780', '25.2319', '55.2780', '25.2319'],\n 'geometry': {'type': 'Point', 'coordinates': [55.2780285, 25.231942]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Dubai',\n 'sov0name': 'United Arab Emirates',\n 'latitude': 25.231942,\n 'longitude': 55.278029,\n 'pop_max': 1379000,\n 'pop_min': 1137347,\n 'meganame': 'Dubayy',\n 'min_areakm': 187,\n 'max_areakm': 407,\n 'pop1950': 20,\n 'pop1960': 40,\n 'pop1970': 80,\n 'pop1980': 254,\n 'pop1990': 473,\n 'pop2000': 938,\n 'pop2010': 1379,\n 'pop2020': 1709,\n 'pop2050': 2077}},\n {'id': 185,\n 'bbox': ['69.2930', '41.3136', '69.2930', '41.3136'],\n 'geometry': {'type': 'Point', 'coordinates': [69.292987, 41.3136477]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tashkent',\n 'sov0name': 'Uzbekistan',\n 'latitude': 41.313648,\n 'longitude': 69.292987,\n 'pop_max': 2184000,\n 'pop_min': 1978028,\n 'meganame': 'Tashkent',\n 'min_areakm': 639,\n 'max_areakm': 643,\n 'pop1950': 755,\n 'pop1960': 964,\n 'pop1970': 1403,\n 'pop1980': 1818,\n 'pop1990': 2100,\n 'pop2000': 2135,\n 'pop2010': 2184,\n 'pop2020': 2416,\n 'pop2050': 2892}},\n {'id': 206,\n 'bbox': ['44.3919', '33.3406', '44.3919', '33.3406'],\n 'geometry': {'type': 'Point', 'coordinates': [44.3919229, 33.3405944]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Baghdad',\n 'sov0name': 'Iraq',\n 'latitude': 33.340594,\n 'longitude': 44.391923,\n 'pop_max': 5054000,\n 'pop_min': 5054000,\n 'meganame': 'Baghdad',\n 'min_areakm': 587,\n 'max_areakm': 587,\n 'pop1950': 579,\n 'pop1960': 1019,\n 'pop1970': 2070,\n 'pop1980': 3145,\n 'pop1990': 4092,\n 'pop2000': 5200,\n 'pop2010': 5054,\n 'pop2020': 6618,\n 'pop2050': 8060}},\n {'id': 207,\n 'bbox': ['38.6981', '9.0353', '38.6981', '9.0353'],\n 'geometry': {'type': 'Point', 'coordinates': [38.6980586, 9.0352562]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Addis Ababa',\n 'sov0name': 'Ethiopia',\n 'latitude': 9.035256,\n 'longitude': 38.698059,\n 'pop_max': 3100000,\n 'pop_min': 2757729,\n 'meganame': 'Addis Ababa',\n 'min_areakm': 462,\n 'max_areakm': 1182,\n 'pop1950': 392,\n 'pop1960': 519,\n 'pop1970': 729,\n 'pop1980': 1175,\n 'pop1990': 1791,\n 'pop2000': 2493,\n 'pop2010': 3100,\n 'pop2020': 4184,\n 'pop2050': 6156}},\n {'id': 208,\n 'bbox': ['51.4224', '35.6739', '51.4224', '35.6739'],\n 'geometry': {'type': 'Point', 'coordinates': [51.4223982, 35.6738886]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Tehran',\n 'sov0name': 'Iran',\n 'latitude': 35.673889,\n 'longitude': 51.422398,\n 'pop_max': 7873000,\n 'pop_min': 7153309,\n 'meganame': 'Tehran',\n 'min_areakm': 496,\n 'max_areakm': 496,\n 'pop1950': 1041,\n 'pop1960': 1873,\n 'pop1970': 3290,\n 'pop1980': 5079,\n 'pop1990': 6365,\n 'pop2000': 7128,\n 'pop2010': 7873,\n 'pop2020': 8832,\n 'pop2050': 9814}},\n {'id': 212,\n 'bbox': ['69.1813', '34.5186', '69.1813', '34.5186'],\n 'geometry': {'type': 'Point', 'coordinates': [69.1813142, 34.5186361]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Kabul',\n 'sov0name': 'Afghanistan',\n 'latitude': 34.518636,\n 'longitude': 69.181314,\n 'pop_max': 3277000,\n 'pop_min': 3043532,\n 'meganame': 'Kabul',\n 'min_areakm': 594,\n 'max_areakm': 1471,\n 'pop1950': 129,\n 'pop1960': 263,\n 'pop1970': 472,\n 'pop1980': 978,\n 'pop1990': 1306,\n 'pop2000': 1963,\n 'pop2010': 3277,\n 'pop2020': 4730,\n 'pop2050': 7175}},\n {'id': 222,\n 'bbox': ['46.7708', '24.6428', '46.7708', '24.6428'],\n 'geometry': {'type': 'Point', 'coordinates': [46.7707958, 24.642779]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Riyadh',\n 'sov0name': 'Saudi Arabia',\n 'latitude': 24.642779,\n 'longitude': 46.770796,\n 'pop_max': 4465000,\n 'pop_min': 4205961,\n 'meganame': 'Ar-Riyadh',\n 'min_areakm': 854,\n 'max_areakm': 854,\n 'pop1950': 111,\n 'pop1960': 156,\n 'pop1970': 408,\n 'pop1980': 1055,\n 'pop1990': 2325,\n 'pop2000': 3567,\n 'pop2010': 4465,\n 'pop2020': 5405,\n 'pop2050': 6275}},\n {'id': 229,\n 'bbox': ['36.8147', '-1.2814', '36.8147', '-1.2814'],\n 'geometry': {'type': 'Point', 'coordinates': [36.814711, -1.2814009]},\n 'properties': {'created_at': '2022-04-29T20:51:01.520298+00:00',\n 'modified_at': None,\n 'name': 'Nairobi',\n 'sov0name': 'Kenya',\n 'latitude': -1.281401,\n 'longitude': 36.814711,\n 'pop_max': 3010000,\n 'pop_min': 2750547,\n 'meganame': 'Nairobi',\n 'min_areakm': 698,\n 'max_areakm': 719,\n 'pop1950': 137,\n 'pop1960': 293,\n 'pop1970': 531,\n 'pop1980': 862,\n 'pop1990': 1380,\n 'pop2000': 2233,\n 'pop2010': 3010,\n 'pop2020': 4052,\n 'pop2050': 5871}}]" - }, - "execution_count": 21, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "outputs": [], "source": [ "vector_cube" ], diff --git a/xcube_geodb_openeo/backend/capabilities.py b/xcube_geodb_openeo/backend/capabilities.py index c86172b..f1bcf78 100644 --- a/xcube_geodb_openeo/backend/capabilities.py +++ b/xcube_geodb_openeo/backend/capabilities.py @@ -108,9 +108,8 @@ def get_conformance(): return { "conformsTo": [ # TODO: fix this list so it becomes true - "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core", - "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30", - "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/html", - "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson" + "http://www.opengis.net/doc/IS/ogcapi-features-1/1.0", + "http://www.opengis.net/spec/ogcapi-features-1/1.0/req/oas30", + "https://datatracker.ietf.org/doc/html/rfc7946" ] } diff --git a/xcube_geodb_openeo/defaults.py b/xcube_geodb_openeo/defaults.py index dd4109b..10785ef 100644 --- a/xcube_geodb_openeo/defaults.py +++ b/xcube_geodb_openeo/defaults.py @@ -20,7 +20,7 @@ # DEALINGS IN THE SOFTWARE. default_config = { - 'SERVER_URL': 'http://www.brockmann-consult.de/xcube-geoDB-openEO', + 'SERVER_URL': 'https://www.brockmann-consult.de/xcube-geoDB-openEO', 'SERVER_ID': 'xcube-geodb-openeo', 'SERVER_TITLE': 'xcube geoDB Server, openEO API', 'SERVER_DESCRIPTION': 'Catalog of geoDB collections.' From 9db1581344f146bd8515d50f4a2d5740c03d95f3 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 22 Jul 2022 17:21:08 +0200 Subject: [PATCH 083/163] fixed test --- tests/server/app/test_capabilities.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/server/app/test_capabilities.py b/tests/server/app/test_capabilities.py index 9ce9e2f..3e2c6d9 100644 --- a/tests/server/app/test_capabilities.py +++ b/tests/server/app/test_capabilities.py @@ -60,7 +60,7 @@ def test_well_known_info(self): ) self.assertEqual(200, response.status) well_known_data = json.loads(response.data) - self.assertEqual('http://www.brockmann-consult.de/xcube-geoDB-openEO', + self.assertEqual('https://www.brockmann-consult.de/xcube-geoDB-openEO', well_known_data['versions'][0]['url']) self.assertEqual('1.1.0', well_known_data['versions'][0]['api_version']) From 271434739cd30edfd64cc1d95ce42be9ca85a697 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 29 Aug 2022 23:57:07 +0200 Subject: [PATCH 084/163] adding processes endpoint to server capabilities --- .github/workflows/workflow.yaml | 2 +- xcube_geodb_openeo/backend/capabilities.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 82121d6..f4bb79f 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -14,7 +14,7 @@ env: WAIT_FOR_STARTUP: "1" # If set to 1, docker build is performed - FORCE_DOCKER_BUILD: "0" + FORCE_DOCKER_BUILD: "1" jobs: diff --git a/xcube_geodb_openeo/backend/capabilities.py b/xcube_geodb_openeo/backend/capabilities.py index f1bcf78..e5e920a 100644 --- a/xcube_geodb_openeo/backend/capabilities.py +++ b/xcube_geodb_openeo/backend/capabilities.py @@ -46,9 +46,11 @@ def get_root(config: Mapping[str, Any], base_url: str): {'path': '/result', 'methods': ['POST']}, {'path': '/conformance', 'methods': ['GET']}, {'path': '/collections', 'methods': ['GET']}, + {'path': '/processes', 'methods': ['GET']}, {'path': '/collections/{collection_id}', 'methods': ['GET']}, {'path': '/collections/{collection_id}/items', 'methods': ['GET']}, - {'path': '/collections/{collection_id}/items/{feature_id}', 'methods': ['GET']}, + {'path': '/collections/{collection_id}/items/{feature_id}', + 'methods': ['GET']}, ], "links": [ # todo - links are incorrect { From ca35ad52fc86e33897221871c68ef9383183c4d9 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 30 Aug 2022 00:36:36 +0200 Subject: [PATCH 085/163] fixed test --- tests/server/app/test_capabilities.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/server/app/test_capabilities.py b/tests/server/app/test_capabilities.py index 3e2c6d9..27a323f 100644 --- a/tests/server/app/test_capabilities.py +++ b/tests/server/app/test_capabilities.py @@ -49,9 +49,9 @@ def test_root(self): 'POST', metainfo['endpoints'][2]['methods'][0]) self.assertEqual( - '/collections/{collection_id}/items', metainfo['endpoints'][6]['path']) + '/collections/{collection_id}/items', metainfo['endpoints'][7]['path']) self.assertEqual( - 'GET', metainfo['endpoints'][6]['methods'][0]) + 'GET', metainfo['endpoints'][7]['methods'][0]) self.assertIsNotNone(metainfo['links']) def test_well_known_info(self): From ba1b654f1129fa4ce8b39d2f125df258d4d82aa4 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 30 Aug 2022 01:03:30 +0200 Subject: [PATCH 086/163] fixed Docker build --- docker/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 6cb8ac4..bfe6dfb 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -20,7 +20,6 @@ RUN pip install -e . WORKDIR /tmp/ RUN git clone https://github.com/dcs4cop/xcube-geodb.git WORKDIR /tmp/xcube-geodb -RUN git checkout thomas_xxx_fix_expected_bbox RUN pip install -e . WORKDIR /tmp/ From fa036e54c1588903744533d361706710928b2b98 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 30 Aug 2022 22:24:28 +0200 Subject: [PATCH 087/163] minor fix according to spec --- tests/server/app/test_data_discovery.py | 2 +- xcube_geodb_openeo/core/geodb_datastore.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index d104ca2..0bace46 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -39,7 +39,7 @@ def test_collection(self): self.assertIsNotNone(collection_data) self.assertIsNotNone(collection_data['extent']) self.assertEqual(2, len(collection_data['extent'])) - expected_spatial_extent = {'bbox': [8, 51, 12, 52], + expected_spatial_extent = {'bbox': [[8, 51, 12, 52]], 'crs': 'http://www.opengis.net/def/crs/OGC/1.3/CRS84'} expected_temporal_extent = {'interval' : [['null', 'null']]} self.assertEqual(expected_spatial_extent, diff --git a/xcube_geodb_openeo/core/geodb_datastore.py b/xcube_geodb_openeo/core/geodb_datastore.py index 6ed750b..1aa0d15 100644 --- a/xcube_geodb_openeo/core/geodb_datastore.py +++ b/xcube_geodb_openeo/core/geodb_datastore.py @@ -125,7 +125,7 @@ def add_metadata(collection_bbox: Tuple, collection_id: str, 'title': collection_id, 'extent': { 'spatial': { - 'bbox': collection_bbox, + 'bbox': [collection_bbox], 'crs': 'http://www.opengis.net/def/crs/OGC/1.3/CRS84' }, 'temporal': { From 028cd924376c3bb20a98228f306d7a20d03f9c02 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 21 Feb 2023 10:07:21 +0100 Subject: [PATCH 088/163] various minor fixes --- environment.yml | 20 +- notebooks/geoDB-openEO_use_case_1.ipynb | 261 ++++++++++++++------- xcube_geodb_openeo/api/context.py | 96 ++++---- xcube_geodb_openeo/core/datastore.py | 7 +- xcube_geodb_openeo/core/geodb_datastore.py | 20 +- 5 files changed, 246 insertions(+), 158 deletions(-) diff --git a/environment.yml b/environment.yml index 29fb09d..f333a2c 100644 --- a/environment.yml +++ b/environment.yml @@ -6,21 +6,13 @@ dependencies: # Python - python >=3.8,<3.10 # Required - - click >=8.0 - - deprecated >=1.2 - geopandas - - pyjwt >=1.7 - - pyproj >=3.0,<3.3 # tests fail with 3.3.0, missing database on Windows - - pyyaml >=5.4 - - requests >=2.25 - - requests-oauthlib >=1.3 - - setuptools >=41.0 - - shapely >=1.6 - - tornado >=6.0 - - flask >=2.0 - - xcube_geodb >= 1.0.2 + - pandas + - shapely + - xcube >= 0.13.0 +# - xcube_geodb >= 1.0.4 + - yaml # Testing - - flake8 >=3.7 - pytest >=4.4 - pytest-cov >=2.6 - - requests-mock >=1.8.0 + - requests-mock >=1.8 diff --git a/notebooks/geoDB-openEO_use_case_1.ipynb b/notebooks/geoDB-openEO_use_case_1.ipynb index 48debf8..b22842f 100644 --- a/notebooks/geoDB-openEO_use_case_1.ipynb +++ b/notebooks/geoDB-openEO_use_case_1.ipynb @@ -1,143 +1,180 @@ { "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Demonstration of basic geoDB capabilities + Use Case #1\n", + "\n", + "## Preparations\n", + "First, some imports are done, and the base URL is set.\n", + "The base URL is where the backend is running, and it will be used in all later examples." + ] + }, { "cell_type": "code", "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "import urllib3\n", "import json\n", "\n", - "http = urllib3.PoolManager(cert_reqs='CERT_NONE')\n", + "http = urllib3.PoolManager()\n", "base_url = 'https://geodb.openeo.dev.brockmann-consult.de'" - ], - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - } + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Definition of a helper method that pretty prints the HTTP responses:" + ] }, { "cell_type": "code", "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "def print_endpoint(url):\n", - " print(url)\n", " r = http.request('GET', url)\n", " data = json.loads(r.data)\n", " print(f\"Status: {r.status}\")\n", - " print(f\"Result: {json.dumps(data, indent=2, sort_keys=True)}\")" + " print(f\"Result: {json.dumps(data, indent=2)}\")" + ] + }, + { + "cell_type": "markdown", + "source": [ + "Print the general metadata:" ], "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } + "collapsed": false } }, { "cell_type": "code", "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "print_endpoint(f'{base_url}/')" - ], - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - } + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Print the response of the well-known endpoint:" + ] }, { "cell_type": "code", "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "print_endpoint(f'{base_url}/.well-known/openeo')" - ], - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - } + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Show the file formats the geoDB-openEO-backend supports (currently empty):" + ] }, { "cell_type": "code", "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "print_endpoint(f'{base_url}/file_formats')" - ], - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - } + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Print the standards the geoDB-openEO-backend conforms to (TBC):" + ] }, { "cell_type": "code", "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "print_endpoint(f'{base_url}/conformance')" - ], - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - } + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Collections listing - STAC part\n", + "List the collections currently available using the geoDB-openEO-backend:" + ] }, { "cell_type": "code", "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "print_endpoint(f'{base_url}/collections')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "List details of the `AT_2021_EC21` collection:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "print_endpoint(f'{base_url}/collections/AT_2021_EC21')" - ], - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - } + ] }, { "cell_type": "code", "execution_count": null, "outputs": [], "source": [ - "print_endpoint(f'{base_url}/collections')" + "## Processes listing of the geoDB-openEO backend" ], "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } + "collapsed": false } }, { "cell_type": "code", "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "print_endpoint(f'{base_url}/processes')" - ], - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - } + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Use Case 1\n", + "Run the function `load_collection`, and store the result in a local variable:" + ] }, { "cell_type": "code", "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "body = json.dumps({\"process\": {\n", @@ -152,61 +189,111 @@ "r = http.request('POST', f'{base_url}/result',\n", " headers={'Content-Type': 'application/json'},\n", " body=body)\n", - "vector_cube = json.loads(r.data)" - ], - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - } + "vector_cube = json.loads(r.data)\n", + "vector_cube" + ] }, { "cell_type": "code", "execution_count": null, + "metadata": {}, "outputs": [], "source": [ - "vector_cube" + "vector_cube[20]" + ] + }, + { + "cell_type": "markdown", + "source": [ + "Note: as there is no final specification of the VectorCube datatype, a vector_cube in the geoDB-openEO backend is simply a Python dictionary. This is sufficient to support this use case, but in order to ensure interoperability with raster data, a more sophisticated concept will be needed." + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "markdown", + "source": [ + "## Validating some collections responses using the (3rd party) STAC validator software\n", + "Preparation:" ], "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } + "collapsed": false } }, { "cell_type": "code", "execution_count": null, + "metadata": {}, "outputs": [], - "source": [], - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - } + "source": [ + "from stac_validator import stac_validator\n", + "import json" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Validate response for collection `AT_2021_EC21`:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "stac = stac_validator.StacValidate(f'{base_url}/collections/AT_2021_EC21')\n", + "stac.run()\n", + "print(json.dumps(stac.message[0], indent=2))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Validate response for collection `populated_places_sub`:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "stac = stac_validator.StacValidate(f'{base_url}/collections/populated_places_sub')\n", + "stac.run()\n", + "print(json.dumps(stac.message[0], indent=2))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", - "version": 2 + "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.6" + "pygments_lexer": "ipython3", + "version": "3.9.12" } }, "nbformat": 4, - "nbformat_minor": 0 -} \ No newline at end of file + "nbformat_minor": 1 +} diff --git a/xcube_geodb_openeo/api/context.py b/xcube_geodb_openeo/api/context.py index b00efcc..3ff9577 100644 --- a/xcube_geodb_openeo/api/context.py +++ b/xcube_geodb_openeo/api/context.py @@ -37,6 +37,8 @@ from ..defaults import default_config from ..server.config import STAC_VERSION +from xcube.constants import LOG + STAC_DEFAULT_COLLECTIONS_LIMIT = 10 STAC_DEFAULT_ITEMS_LIMIT = 10 STAC_MAX_ITEMS_LIMIT = 10000 @@ -77,10 +79,14 @@ def request(self) -> Mapping[str, Any]: def __init__(self, root: Context): super().__init__(root) self._request = None - self.config = root.config + # necessary because root.config and its sub-configs are not writable + # so copy their config in a new dict + self.config = dict(root.config) for key in default_config.keys(): if key not in self.config['geodb_openeo']: - self.config['geodb_openeo'][key] = default_config[key] + unfrozen_dict = dict(self.config['geodb_openeo']) + self.config['geodb_openeo'] = unfrozen_dict + unfrozen_dict[key] = default_config[key] self._collections = {} def update(self, prev_ctx: Optional["Context"]): @@ -110,9 +116,11 @@ def fetch_collections(self, base_url: str, limit: int, offset: int): len(self.collection_ids)) collection_list = [] for collection_id in self.collection_ids[offset:offset + limit]: + LOG.info(f'Building vector cube for collection {collection_id}...') vector_cube = self.get_vector_cube(collection_id, with_items=False, bbox=None, limit=limit, offset=offset) + LOG.info("...done") collection = _get_vector_cube_collection(base_url, vector_cube) collection_list.append(collection) @@ -204,33 +212,33 @@ def search(): def _get_vector_cube_collection(base_url: str, vector_cube: VectorCube): - vector_cube_id = vector_cube["id"] - metadata = vector_cube.get("metadata", {}) + vector_cube_id = vector_cube['id'] + metadata = vector_cube.get('metadata', {}) return { - "stac_version": STAC_VERSION, - "stac_extensions": ["xcube-geodb"], - "id": vector_cube_id, - "title": metadata.get("title", ""), - "description": metadata.get("description", "No description " - "available."), - "license": metadata.get("license", "proprietary"), - "keywords": metadata.get("keywords", []), - "providers": metadata.get("providers", []), - "extent": metadata.get("extent", {}), - "summaries": metadata.get("summaries", {}), - "links": [ + 'stac_version': STAC_VERSION, + 'stac_extensions': ['xcube-geodb'], + 'id': vector_cube_id, + 'title': metadata.get('title', ''), + 'description': metadata.get('description', 'No description ' + 'available.'), + 'license': metadata.get('license', 'proprietary'), + 'keywords': metadata.get('keywords', []), + 'providers': metadata.get('providers', []), + 'extent': metadata.get('extent', {}), + 'summaries': metadata.get('summaries', {}), + 'links': [ { - "rel": "self", - "href": f"{base_url}/collections/{vector_cube_id}" + 'rel': 'self', + 'href': f'{base_url}/collections/{vector_cube_id}' }, { - "rel": "root", - "href": f"{base_url}/collections/" + 'rel': 'root', + 'href': f'{base_url}/collections/' }, # { - # "rel": "license", - # "href": ctx.get_url("TODO"), - # "title": "TODO" + # 'rel': 'license', + # 'href': ctx.get_url('TODO'), + # 'title': 'TODO' # } ] } @@ -238,36 +246,36 @@ def _get_vector_cube_collection(base_url: str, def _get_vector_cube_item(base_url: str, vector_cube: VectorCube, feature: Feature): - collection_id = vector_cube["id"] - feature_id = feature["id"] - feature_bbox = feature.get("bbox") - feature_geometry = feature.get("geometry") - feature_properties = feature.get("properties", {}) + collection_id = vector_cube['id'] + feature_id = feature['id'] + feature_bbox = feature.get('bbox') + feature_geometry = feature.get('geometry') + feature_properties = feature.get('properties', {}) return { - "stac_version": STAC_VERSION, - "stac_extensions": ["xcube-geodb"], - "type": "Feature", - "id": feature_id, - "bbox": feature_bbox, - "geometry": feature_geometry, - "properties": feature_properties, - "collection": collection_id, - "links": [ + 'stac_version': STAC_VERSION, + 'stac_extensions': ['xcube-geodb'], + 'type': 'Feature', + 'id': feature_id, + 'bbox': feature_bbox, + 'geometry': feature_geometry, + 'properties': feature_properties, + 'collection': collection_id, + 'links': [ { - "rel": "self", - "href": f"{base_url}/collections/" - f"{collection_id}/items/{feature_id}" + 'rel': 'self', + 'href': f'{base_url}/collections/' + f'{collection_id}/items/{feature_id}' } ], - "assets": { - "analytic": { + 'assets': { + 'analytic': { # TODO }, - "visual": { + 'visual': { # TODO }, - "thumbnail": { + 'thumbnail': { # TODO } } diff --git a/xcube_geodb_openeo/core/datastore.py b/xcube_geodb_openeo/core/datastore.py index 15f4ab6..4529686 100644 --- a/xcube_geodb_openeo/core/datastore.py +++ b/xcube_geodb_openeo/core/datastore.py @@ -20,6 +20,7 @@ # DEALINGS IN THE SOFTWARE. import abc +import math from typing import Dict, Tuple, Optional import shapely.geometry @@ -62,7 +63,11 @@ def add_items_to_vector_cube( for k, key in enumerate(feature.keys()): if not key == 'id' and not \ collection.dtypes.values[k].name == 'geometry': - properties[key] = feature[key] + if isinstance(feature[key], float) \ + and math.isnan(float(feature[key])): + properties[key] = 'NaN' + else: + properties[key] = feature[key] vector_cube['features'].append({ 'stac_version': STAC_VERSION, diff --git a/xcube_geodb_openeo/core/geodb_datastore.py b/xcube_geodb_openeo/core/geodb_datastore.py index 1aa0d15..b951b05 100644 --- a/xcube_geodb_openeo/core/geodb_datastore.py +++ b/xcube_geodb_openeo/core/geodb_datastore.py @@ -21,13 +21,15 @@ import os from functools import cached_property -from typing import Any +from typing import Any, List from typing import Mapping from typing import Optional from typing import Tuple +import pandas from pandas import DataFrame from xcube_geodb.core.geodb import GeoDBClient +from xcube.constants import LOG from .datastore import DataStore from .vectorcube import VectorCube @@ -61,12 +63,12 @@ def geodb(self): auth_aud=auth_domain ) - def get_collection_keys(self): + def get_collection_keys(self) -> List[str]: database_names = self.geodb.get_my_databases().get('name').array collections = None for n in database_names: - if collections: - collections.concat(self.geodb.get_my_collections(n)) + if collections is not None: + pandas.concat([collections, self.geodb.get_my_collections(n)]) else: collections = self.geodb.get_my_collections(n) return collections.get('collection') @@ -79,14 +81,6 @@ def get_vector_cube(self, collection_id: str, with_items: bool, vector_cube = self.geodb.get_collection_info(collection_id) vector_cube['id'] = collection_id vector_cube['features'] = [] - if bbox: - vector_cube['total_feature_count'] = \ - int(self.geodb.count_collection_by_bbox( - collection_id, bbox)['ct'][0]) - else: - vector_cube['total_feature_count'] = \ - int(self.geodb.count_collection_by_bbox( - collection_id, (-180, 90, 180, -90))['ct'][0]) if with_items: if bbox: @@ -96,6 +90,8 @@ def get_vector_cube(self, collection_id: str, with_items: bool, else: items = self.geodb.get_collection(collection_id, limit=limit, offset=offset) + + vector_cube['total_feature_count'] = len(items) self.add_items_to_vector_cube(items, vector_cube) collection_bbox = self.geodb.get_collection_bbox(collection_id) From f6dc13aa73f45b286bf354e9784138d07b5c6c53 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 7 Mar 2023 11:39:14 +0100 Subject: [PATCH 089/163] using main branch of xcube --- .github/workflows/workflow.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index f4bb79f..9db50db 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -33,7 +33,6 @@ jobs: with: repository: dcs4cop/xcube path: "xcube" - ref: forman-676-server_redesign - uses: conda-incubator/setup-miniconda@v2 if: ${{ env.SKIP_UNITTESTS == '0' }} with: From 2c50cb4080b79a91b974be125bbbba51905d4249 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 7 Mar 2023 11:57:24 +0100 Subject: [PATCH 090/163] fixing and moving workflow to mamba --- .github/workflows/workflow.yaml | 3 ++- environment.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 9db50db..49ab32d 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -47,11 +47,12 @@ jobs: conda config --show-sources conda config --show printenv | sort + conda install mamba - name: setup-xcube if: ${{ env.SKIP_UNITTESTS == '0' }} run: | cd xcube - conda env update -n xcube-geodb-openeo -f environment.yml + mamba env update -n xcube-geodb-openeo -f environment.yml pip install -e . cd .. - name: setup-xcube-geodb-openeo diff --git a/environment.yml b/environment.yml index f333a2c..c32fb3e 100644 --- a/environment.yml +++ b/environment.yml @@ -10,7 +10,7 @@ dependencies: - pandas - shapely - xcube >= 0.13.0 -# - xcube_geodb >= 1.0.4 + - xcube_geodb >= 1.0.4 - yaml # Testing - pytest >=4.4 From f33222ff4617ffb78e934291595cb38eb4497e3c Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 7 Mar 2023 12:23:58 +0100 Subject: [PATCH 091/163] updated Dockerfile --- docker/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index bfe6dfb..ae04d78 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -13,7 +13,6 @@ RUN . activate base RUN git clone https://github.com/dcs4cop/xcube.git WORKDIR /tmp/xcube -RUN git checkout forman-676-server_redesign RUN mamba env update -n base RUN pip install -e . @@ -25,4 +24,4 @@ RUN pip install -e . WORKDIR /tmp/ RUN pip install -e . -CMD ["python", "-m", "xcube.cli.main", "--loglevel=DETAIL", "--traceback", "serve2", "-vvv", "-c", "/etc/config/config.yml"] \ No newline at end of file +CMD ["python", "-m", "xcube.cli.main", "--loglevel=DETAIL", "--traceback", "serve", "-vvv", "-c", "/etc/config/config.yml"] \ No newline at end of file From ca9476626e55216245dd4487ab6fc423c0a8bc74 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 7 Mar 2023 12:59:44 +0100 Subject: [PATCH 092/163] updated documentation --- how-to-deploy.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/how-to-deploy.md b/how-to-deploy.md index 25e6b87..c09cdaa 100644 --- a/how-to-deploy.md +++ b/how-to-deploy.md @@ -51,7 +51,7 @@ server. ### Helm chart -The helm chart for the xcube-geodb-openeo-server is located in [k8s-configs](https://github.com/bc-org/k8s-configs/tree/thomas_xxx_add-geodb-openeo/xcube-geodb-openeo/helm). +The helm chart for the xcube-geodb-openeo-server is located in [k8s-configs](https://github.com/bc-org/k8s-configs/tree/main/xcube-geodb-openeo/helm). It consists of: 1) templates for - config-map (`api-config-map.yaml`), where the config is specified, and @@ -63,9 +63,8 @@ It consists of: is configured - service (`api-service.yaml`), where port and protocol are configured 2) a values file used to fill in the templates. Currently in use: - `values-dev.yaml` and `values.yaml`. Currently not used, but kept as - reference: `values-stage.yaml`. - In these files, the following values are set: + `values-dev.yaml`. + In this file, the following values are set: - the actual Docker image value - the ingress encryption method - the host name @@ -95,12 +94,11 @@ namespace, as configured in `values-dev.yaml` in k8s-configs. ### ArgoCD-Deployment The purpose of the argoCD deployment is to take the helm chart and deploy it to -BCs AWS K8s. It can be found [here](https://argocd.dev.xcube.brockmann-consult.de/applications/geodb-openeo). +BCs AWS K8s. It can be found [here](https://argocd.management.brockmann-consult.de/applications/geodb-openeo). The relevant configuration values are: - Cluster: `xc-dev-v2` - Namespace: `xc-geodb` - Using helm chart from - `git@github.com:bc-org/k8s-configs.git` - - at branch `thomas_xxx_add-geodb-openeo` - path `xcube-geodb-openeo/helm` \ No newline at end of file From a54a7f07052cae2c1c495d6006c2e71b765872d5 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 7 Mar 2023 17:00:12 +0100 Subject: [PATCH 093/163] minor doc fixes --- docker/README.md | 2 +- how-to-deploy.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docker/README.md b/docker/README.md index efac494..4e963d9 100644 --- a/docker/README.md +++ b/docker/README.md @@ -7,7 +7,7 @@ in the step `build-docker-image`. It can be run locally using docker like so: ```bash -docker run -p 8080:8080 -env-file env.list quay.io/bcdev/xcube-geoserv +docker run -p 8080:8080 -env-file env.list quay.io/bcdev/xcube-geodb-openeo ``` where `env.list` contains the following values: diff --git a/how-to-deploy.md b/how-to-deploy.md index c09cdaa..82025f2 100644 --- a/how-to-deploy.md +++ b/how-to-deploy.md @@ -31,9 +31,9 @@ This workflow: - `secrets.QUAY_REG_USERNAME` - `secrets.QUAY_REG_PASSWORD` - can be configured with the following variables: - - `SKIP_UNITTESTS:` "0" or "1"; if set to "1", unit tests are skipped - - `FORCE_DOCKER_BUILD`: "1"; if set to "1", a docker image will be built and - uploaded to quay.io, regardless of the tag or release + - `SKIP_UNITTESTS:` "0" or "1"; if set to "1", unit tests are skipped + - `FORCE_DOCKER_BUILD`: "1"; if set to "1", a docker image will be built and + uploaded to quay.io, regardless of the tag or release - The GH action does no change on the helm chart. This may be added later. ### Dockerfile @@ -54,7 +54,7 @@ server. The helm chart for the xcube-geodb-openeo-server is located in [k8s-configs](https://github.com/bc-org/k8s-configs/tree/main/xcube-geodb-openeo/helm). It consists of: 1) templates for - - config-map (`api-config-map.yaml`), where the config is specified, and + - config-map (`api-config-map.yaml`), where the config is specified, and configured to reside in a file `config.yml` - deployment (`api-deployment.yaml`), where the container is defined (i.e. the docker image), credentials are put into the environment, and From 38301906da9cb6de20cd79897ad7ed95f155baca Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 7 Mar 2023 17:34:29 +0100 Subject: [PATCH 094/163] fixed #006 --- tests/core/mock_datasource.py | 2 +- tests/server/app/test_data_discovery.py | 59 +++++++++++++++++++-- tests/server/app/test_utils.py | 28 +++++++++- xcube_geodb_openeo/api/context.py | 38 ++++++------- xcube_geodb_openeo/api/routes.py | 2 +- xcube_geodb_openeo/core/datasource.py | 4 +- xcube_geodb_openeo/core/geodb_datasource.py | 15 +++++- xcube_geodb_openeo/defaults.py | 5 ++ 8 files changed, 121 insertions(+), 32 deletions(-) diff --git a/tests/core/mock_datasource.py b/tests/core/mock_datasource.py index 62890bb..763159e 100644 --- a/tests/core/mock_datasource.py +++ b/tests/core/mock_datasource.py @@ -78,7 +78,7 @@ def get_vector_cube(self, collection_id: str, with_items: bool, GeoDBDataSource.add_metadata( (8, 51, 12, 52), collection_id, DataFrame(columns=["collection", "column_name", "data_type"]), - vector_cube) + '0.3.1', vector_cube) return vector_cube # noinspection PyUnusedLocal diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index 0bace46..521b579 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -1,3 +1,24 @@ +# The MIT License (MIT) +# Copyright (c) 2021/2022 by the xcube team and contributors +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + import json import pkgutil from typing import Dict @@ -31,21 +52,49 @@ def test_collections(self): self.assertIsNotNone(collections_data['collections']) self.assertIsNotNone(collections_data['links']) + first_collection = collections_data['collections'][0] + self.assertEqual("1.0.0", first_collection['stac_version']) + self.assertEqual( + ['datacube', + 'https://stac-extensions.github.io/version/v1.0.0/schema.json'], + first_collection['stac_extensions']) + response_type = first_collection['type'] + self.assertEqual(response_type, "Collection") + self.assertIsNotNone(first_collection['id']) + self.assertIsNotNone(first_collection['description']) + self.assertEqual("0.3.1", first_collection['version']) + self.assertIsNotNone(first_collection['license']) + self.assertIsNotNone(first_collection['extent']) + self.assertIsNotNone(first_collection['links']) + def test_collection(self): url = f'http://localhost:{self.port}/collections/collection_1' response = self.http.request('GET', url) self.assertEqual(200, response.status) collection_data = json.loads(response.data) - self.assertIsNotNone(collection_data) - self.assertIsNotNone(collection_data['extent']) + self.assertEqual("1.0.0", collection_data['stac_version']) + self.assertEqual( + ['datacube', + 'https://stac-extensions.github.io/version/v1.0.0/schema.json'], + collection_data['stac_extensions']) + response_type = collection_data['type'] + self.assertEqual(response_type, "Collection") + self.assertIsNotNone(collection_data['id']) + self.assertIsNotNone(collection_data['description']) + self.assertEqual("0.3.1", collection_data['version']) + self.assertIsNotNone(collection_data['license']) self.assertEqual(2, len(collection_data['extent'])) - expected_spatial_extent = {'bbox': [[8, 51, 12, 52]], - 'crs': 'http://www.opengis.net/def/crs/OGC/1.3/CRS84'} - expected_temporal_extent = {'interval' : [['null', 'null']]} + expected_spatial_extent = \ + {'bbox': [[8, 51, 12, 52]], + 'crs': 'http://www.opengis.net/def/crs/OGC/1.3/CRS84'} + expected_temporal_extent = {'interval': [['null', 'null']]} self.assertEqual(expected_spatial_extent, collection_data['extent']['spatial']) self.assertEqual(expected_temporal_extent, collection_data['extent']['temporal']) + self.assertEqual({'vector_dim': {'type': 'other'}}, + collection_data['cube:dimensions']) + self.assertIsNotNone(collection_data['summaries']) def test_get_items(self): url = f'http://localhost:{self.port}/collections/collection_1/items' diff --git a/tests/server/app/test_utils.py b/tests/server/app/test_utils.py index 36c5165..3fc3946 100644 --- a/tests/server/app/test_utils.py +++ b/tests/server/app/test_utils.py @@ -1,7 +1,31 @@ +# The MIT License (MIT) +# Copyright (c) 2021/2022 by the xcube team and contributors +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +from xcube_geodb_openeo.defaults import STAC_EXTENSIONS + + def assert_paderborn(cls, vector_cube): cls.assertIsNotNone(vector_cube) cls.assertEqual('1.0.0', vector_cube['stac_version']) - cls.assertEqual(['xcube-geodb'], vector_cube['stac_extensions']) + cls.assertEqual(STAC_EXTENSIONS, vector_cube['stac_extensions']) cls.assertEqual('Feature', vector_cube['type']) cls.assertEqual('1', vector_cube['id']) assert_paderborn_data(cls, vector_cube) @@ -23,7 +47,7 @@ def assert_paderborn_data(cls, vector_cube): def assert_hamburg(cls, vector_cube): cls.assertEqual('1.0.0', vector_cube['stac_version']) - cls.assertEqual(['xcube-geodb'], vector_cube['stac_extensions']) + cls.assertEqual(STAC_EXTENSIONS, vector_cube['stac_extensions']) cls.assertEqual('Feature', vector_cube['type']) cls.assertEqual('0', vector_cube['id']) assert_hamburg_data(cls, vector_cube) diff --git a/xcube_geodb_openeo/api/context.py b/xcube_geodb_openeo/api/context.py index e121fd1..2f103b7 100644 --- a/xcube_geodb_openeo/api/context.py +++ b/xcube_geodb_openeo/api/context.py @@ -30,18 +30,13 @@ from xcube.server.api import ApiContext from xcube.server.api import Context +from xcube.constants import LOG from ..core.datasource import DataSource from ..core.vectorcube import VectorCube from ..core.vectorcube import Feature -from ..defaults import default_config -from ..defaults import STAC_VERSION - -from xcube.constants import LOG - -STAC_DEFAULT_COLLECTIONS_LIMIT = 10 -STAC_DEFAULT_ITEMS_LIMIT = 10 -STAC_MAX_ITEMS_LIMIT = 10000 +from ..defaults import default_config, STAC_VERSION, STAC_EXTENSIONS, \ + STAC_MAX_ITEMS_LIMIT class GeoDbContext(ApiContext): @@ -145,15 +140,15 @@ def get_collection_items(self, base_url: str, offset=offset) stac_features = [ _get_vector_cube_item(base_url, vector_cube, feature) - for feature in vector_cube.get("features", []) + for feature in vector_cube.get('features', []) ] return { - "type": "FeatureCollection", - "features": stac_features, - "timeStamp": _utc_now(), - "numberMatched": vector_cube['total_feature_count'], - "numberReturned": len(stac_features), + 'type': 'FeatureCollection', + 'features': stac_features, + 'timeStamp': _utc_now(), + 'numberMatched': vector_cube['total_feature_count'], + 'numberReturned': len(stac_features), } def get_collection_item(self, base_url: str, @@ -162,8 +157,8 @@ def get_collection_item(self, base_url: str, # nah. use different geodb-function, don't get full vector cube vector_cube = self.get_vector_cube(collection_id, with_items=True, bbox=None, limit=None, offset=0) - for feature in vector_cube.get("features", []): - if str(feature.get("id")) == feature_id: + for feature in vector_cube.get('features', []): + if str(feature.get('id')) == feature_id: return _get_vector_cube_item(base_url, vector_cube, feature) raise ItemNotFoundException( f'feature {feature_id!r} not found in collection {collection_id!r}' @@ -214,9 +209,10 @@ def _get_vector_cube_collection(base_url: str, vector_cube: VectorCube): vector_cube_id = vector_cube['id'] metadata = vector_cube.get('metadata', {}) - return { + vector_cube_collection = { 'stac_version': STAC_VERSION, - 'stac_extensions': ['xcube-geodb'], + 'stac_extensions': STAC_EXTENSIONS, + 'type': 'Collection', 'id': vector_cube_id, 'title': metadata.get('title', ''), 'description': metadata.get('description', 'No description ' @@ -225,6 +221,7 @@ def _get_vector_cube_collection(base_url: str, 'keywords': metadata.get('keywords', []), 'providers': metadata.get('providers', []), 'extent': metadata.get('extent', {}), + 'cube:dimensions': {'vector_dim': {'type': 'other'}}, 'summaries': metadata.get('summaries', {}), 'links': [ { @@ -242,6 +239,9 @@ def _get_vector_cube_collection(base_url: str, # } ] } + if 'version' in metadata: + vector_cube_collection['version'] = metadata['version'] + return vector_cube_collection def _get_vector_cube_item(base_url: str, vector_cube: VectorCube, @@ -254,7 +254,7 @@ def _get_vector_cube_item(base_url: str, vector_cube: VectorCube, return { 'stac_version': STAC_VERSION, - 'stac_extensions': ['xcube-geodb'], + 'stac_extensions': STAC_EXTENSIONS, 'type': 'Feature', 'id': feature_id, 'bbox': feature_bbox, diff --git a/xcube_geodb_openeo/api/routes.py b/xcube_geodb_openeo/api/routes.py index bc94a90..b19709c 100644 --- a/xcube_geodb_openeo/api/routes.py +++ b/xcube_geodb_openeo/api/routes.py @@ -25,7 +25,7 @@ from .api import api from xcube.server.api import ApiHandler from xcube.server.api import ApiError -from .context import STAC_DEFAULT_COLLECTIONS_LIMIT +from ..defaults import STAC_DEFAULT_COLLECTIONS_LIMIT def get_limit(request): diff --git a/xcube_geodb_openeo/core/datasource.py b/xcube_geodb_openeo/core/datasource.py index b5f5b3e..a904f23 100644 --- a/xcube_geodb_openeo/core/datasource.py +++ b/xcube_geodb_openeo/core/datasource.py @@ -28,7 +28,7 @@ from geopandas import GeoDataFrame from .vectorcube import VectorCube -from ..defaults import STAC_VERSION +from ..defaults import STAC_VERSION, STAC_EXTENSIONS class DataSource(abc.ABC): @@ -71,7 +71,7 @@ def add_items_to_vector_cube( vector_cube['features'].append({ 'stac_version': STAC_VERSION, - 'stac_extensions': ['xcube-geodb'], + 'stac_extensions': STAC_EXTENSIONS, 'type': 'Feature', 'id': feature['id'], 'bbox': [f'{bbox["minx"]:.4f}', diff --git a/xcube_geodb_openeo/core/geodb_datasource.py b/xcube_geodb_openeo/core/geodb_datasource.py index beebd93..6b32abf 100644 --- a/xcube_geodb_openeo/core/geodb_datasource.py +++ b/xcube_geodb_openeo/core/geodb_datasource.py @@ -80,6 +80,14 @@ def get_vector_cube(self, collection_id: str, with_items: bool, vector_cube = self.geodb.get_collection_info(collection_id) vector_cube['id'] = collection_id vector_cube['features'] = [] + if bbox: + vector_cube['total_feature_count'] = \ + int(self.geodb.count_collection_by_bbox( + collection_id, bbox)['ct'][0]) + else: + vector_cube['total_feature_count'] = \ + int(self.geodb.count_collection_by_bbox( + collection_id, (-180, 90, 180, -90))['ct'][0]) if with_items: if bbox: @@ -105,12 +113,13 @@ def get_vector_cube(self, collection_id: str, with_items: bool, properties = self.geodb.get_properties(collection_id) self.add_metadata(collection_bbox, collection_id, properties, - vector_cube) + None, vector_cube) return vector_cube @staticmethod def add_metadata(collection_bbox: Tuple, collection_id: str, - properties: DataFrame, vector_cube: VectorCube): + properties: DataFrame, version: Optional[str], + vector_cube: VectorCube): summaries = { 'properties': [] } @@ -132,6 +141,8 @@ def add_metadata(collection_bbox: Tuple, collection_id: str, }, 'summaries': summaries } + if version: + vector_cube['metadata']['version'] = version def transform_bbox(self, collection_id: str, bbox: Tuple[float, float, float, float], diff --git a/xcube_geodb_openeo/defaults.py b/xcube_geodb_openeo/defaults.py index 273d551..aa07cb3 100644 --- a/xcube_geodb_openeo/defaults.py +++ b/xcube_geodb_openeo/defaults.py @@ -27,3 +27,8 @@ } API_VERSION = '1.1.0' # todo - check which API is meant and if value's correct STAC_VERSION = '1.0.0' +STAC_EXTENSIONS = ['datacube', + 'https://stac-extensions.github.io/version/v1.0.0/schema.json'] +STAC_DEFAULT_COLLECTIONS_LIMIT = 10 +STAC_DEFAULT_ITEMS_LIMIT = 10 +STAC_MAX_ITEMS_LIMIT = 10000 From 9d5127120c4737c22007185a7dd33e29de6f440c Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 7 Mar 2023 22:23:21 +0100 Subject: [PATCH 095/163] updated CHANGES.md --- CHANGES.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 0774eef..15a94b4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,12 @@ +## 0.0.2 (in development) + +This version: +- extends the GitHub actions workflow to build and deploy a Docker image +- adds the respective Dockerfile +- uses xcube server NG, implemented in xcube v0.13.0 +- updates the implemented STAC version to 1.0.0 +- aims to implement the complete STAC Catalog Specification + ## Initial version 0.0.1 This version comprises: From 19fad0cfac8b5f0cddca3a6c22a040f52e69a602 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 7 Mar 2023 22:31:27 +0100 Subject: [PATCH 096/163] added missing license --- tests/server/app/__init__.py | 20 ++++++++++++++++++++ tests/server/app/test_capabilities.py | 21 +++++++++++++++++++++ xcube_geodb_openeo/backend/res/__init__.py | 20 ++++++++++++++++++++ 3 files changed, 61 insertions(+) diff --git a/tests/server/app/__init__.py b/tests/server/app/__init__.py index e69de29..df1d25a 100644 --- a/tests/server/app/__init__.py +++ b/tests/server/app/__init__.py @@ -0,0 +1,20 @@ +# The MIT License (MIT) +# Copyright (c) 2021/2022 by the xcube team and contributors +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/server/app/test_capabilities.py b/tests/server/app/test_capabilities.py index 7b0b847..e40c342 100644 --- a/tests/server/app/test_capabilities.py +++ b/tests/server/app/test_capabilities.py @@ -1,3 +1,24 @@ +# The MIT License (MIT) +# Copyright (c) 2021/2022 by the xcube team and contributors +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + import json import pkgutil from typing import Dict diff --git a/xcube_geodb_openeo/backend/res/__init__.py b/xcube_geodb_openeo/backend/res/__init__.py index e69de29..df1d25a 100644 --- a/xcube_geodb_openeo/backend/res/__init__.py +++ b/xcube_geodb_openeo/backend/res/__init__.py @@ -0,0 +1,20 @@ +# The MIT License (MIT) +# Copyright (c) 2021/2022 by the xcube team and contributors +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. \ No newline at end of file From 90fffe98fae8ada7d4d80a45920feec3711136b7 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 7 Mar 2023 23:50:17 +0100 Subject: [PATCH 097/163] implemented and removed todos --- tests/mock_collections.json | 4 ++- tests/server/app/test_capabilities.py | 8 +++--- tests/server/app/test_data_discovery.py | 9 ++++--- tests/server/app/test_utils.py | 2 ++ xcube_geodb_openeo/api/context.py | 24 ++--------------- xcube_geodb_openeo/api/routes.py | 17 ++---------- xcube_geodb_openeo/backend/capabilities.py | 30 ++-------------------- xcube_geodb_openeo/defaults.py | 9 ++++--- xcube_geodb_openeo/version.py | 2 +- 9 files changed, 26 insertions(+), 79 deletions(-) diff --git a/tests/mock_collections.json b/tests/mock_collections.json index 6d3f8d0..6e49e1e 100644 --- a/tests/mock_collections.json +++ b/tests/mock_collections.json @@ -3,7 +3,9 @@ { "id": "collection_1", "metadata": { - "title": "I am collection #1" + "title": "I am collection #1", + "license_title": "MIT", + "license_url": "https://opensource.org/license/mit/" }, "features": [ { diff --git a/tests/server/app/test_capabilities.py b/tests/server/app/test_capabilities.py index e40c342..05e5f7b 100644 --- a/tests/server/app/test_capabilities.py +++ b/tests/server/app/test_capabilities.py @@ -50,7 +50,7 @@ def test_root(self): ) metainfo = json.loads(response.data) self.assertEqual('1.1.0', metainfo['api_version']) - self.assertEqual('0.0.1.dev0', metainfo['backend_version']) + self.assertEqual('0.0.2.dev0', metainfo['backend_version']) self.assertEqual('1.0.0', metainfo['stac_version']) self.assertEqual('catalog', metainfo['type']) self.assertEqual('xcube-geodb-openeo', metainfo['id']) @@ -70,7 +70,7 @@ def test_root(self): 'POST', metainfo['endpoints'][2]['methods'][0]) self.assertEqual( - '/collections/{collection_id}/items', metainfo['endpoints'][7]['path']) + '/collections/{collection_id}/items', metainfo['endpoints'][6]['path']) self.assertEqual( 'GET', metainfo['endpoints'][7]['methods'][0]) self.assertIsNotNone(metainfo['links']) @@ -90,6 +90,4 @@ def test_conformance(self): response = self.http.request( 'GET', f'http://localhost:{self.port}/conformance' ) - self.assertEqual(200, response.status) - conformance_data = json.loads(response.data) - self.assertIsNotNone(conformance_data['conformsTo']) + self.assertEqual(404, response.status) diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index 521b579..637e8f8 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -58,14 +58,14 @@ def test_collections(self): ['datacube', 'https://stac-extensions.github.io/version/v1.0.0/schema.json'], first_collection['stac_extensions']) - response_type = first_collection['type'] - self.assertEqual(response_type, "Collection") - self.assertIsNotNone(first_collection['id']) + self.assertEqual(first_collection['type'], 'Collection') + self.assertEqual('collection_1', first_collection['id']) self.assertIsNotNone(first_collection['description']) self.assertEqual("0.3.1", first_collection['version']) self.assertIsNotNone(first_collection['license']) self.assertIsNotNone(first_collection['extent']) self.assertIsNotNone(first_collection['links']) + self.assertEqual(2, len(first_collection['links'])) def test_collection(self): url = f'http://localhost:{self.port}/collections/collection_1' @@ -110,7 +110,8 @@ def test_get_items(self): test_utils.assert_paderborn(self, items_data['features'][1]) def test_get_items_no_results(self): - url = f'http://localhost:{self.port}/collections/empty_collection/items' + url = f'http://localhost:{self.port}/collections/' \ + f'empty_collection/items' response = self.http.request('GET', url) self.assertEqual(200, response.status) items_data = json.loads(response.data) diff --git a/tests/server/app/test_utils.py b/tests/server/app/test_utils.py index 3fc3946..00d8c3d 100644 --- a/tests/server/app/test_utils.py +++ b/tests/server/app/test_utils.py @@ -28,6 +28,7 @@ def assert_paderborn(cls, vector_cube): cls.assertEqual(STAC_EXTENSIONS, vector_cube['stac_extensions']) cls.assertEqual('Feature', vector_cube['type']) cls.assertEqual('1', vector_cube['id']) + cls.assertDictEqual({}, vector_cube['assets']) assert_paderborn_data(cls, vector_cube) @@ -50,6 +51,7 @@ def assert_hamburg(cls, vector_cube): cls.assertEqual(STAC_EXTENSIONS, vector_cube['stac_extensions']) cls.assertEqual('Feature', vector_cube['type']) cls.assertEqual('0', vector_cube['id']) + cls.assertDictEqual({}, vector_cube['assets']) assert_hamburg_data(cls, vector_cube) diff --git a/xcube_geodb_openeo/api/context.py b/xcube_geodb_openeo/api/context.py index 2f103b7..2049b14 100644 --- a/xcube_geodb_openeo/api/context.py +++ b/xcube_geodb_openeo/api/context.py @@ -200,11 +200,6 @@ def get_collections_links(limit: int, offset: int, url: str, return links -def search(): - # TODO: implement me - return {} - - def _get_vector_cube_collection(base_url: str, vector_cube: VectorCube): vector_cube_id = vector_cube['id'] @@ -231,12 +226,7 @@ def _get_vector_cube_collection(base_url: str, { 'rel': 'root', 'href': f'{base_url}/collections/' - }, - # { - # 'rel': 'license', - # 'href': ctx.get_url('TODO'), - # 'title': 'TODO' - # } + } ] } if 'version' in metadata: @@ -268,17 +258,7 @@ def _get_vector_cube_item(base_url: str, vector_cube: VectorCube, f'{collection_id}/items/{feature_id}' } ], - 'assets': { - 'analytic': { - # TODO - }, - 'visual': { - # TODO - }, - 'thumbnail': { - # TODO - } - } + 'assets': {} } diff --git a/xcube_geodb_openeo/api/routes.py b/xcube_geodb_openeo/api/routes.py index b19709c..1548e69 100644 --- a/xcube_geodb_openeo/api/routes.py +++ b/xcube_geodb_openeo/api/routes.py @@ -149,7 +149,8 @@ def post(self): result = processes.submit_process_sync(process, self.ctx) self.response.finish(result) - def ensure_parameters(self, expected_parameters, process_parameters): + @staticmethod + def ensure_parameters(expected_parameters, process_parameters): for ep in expected_parameters: is_optional_param = 'optional' in ep and ep['optional'] if not is_optional_param: @@ -158,20 +159,6 @@ def ensure_parameters(self, expected_parameters, process_parameters): f' \'{ep["name"]}\'.')) -@api.route('/conformance') -class ConformanceHandler(ApiHandler): - """ - Lists all conformance classes specified in OGC standards that the server - conforms to. - """ - - def get(self): - """ - Lists the conformance classes. - """ - self.response.finish(capabilities.get_conformance()) - - @api.route('/collections') class CollectionsHandler(ApiHandler): """ diff --git a/xcube_geodb_openeo/backend/capabilities.py b/xcube_geodb_openeo/backend/capabilities.py index 26521a5..35da82b 100644 --- a/xcube_geodb_openeo/backend/capabilities.py +++ b/xcube_geodb_openeo/backend/capabilities.py @@ -44,7 +44,6 @@ def get_root(config: Mapping[str, Any], base_url: str): {'path': '/.well-known/openeo', 'methods': ['GET']}, {'path': '/file_formats', 'methods': ['GET']}, {'path': '/result', 'methods': ['POST']}, - {'path': '/conformance', 'methods': ['GET']}, {'path': '/collections', 'methods': ['GET']}, {'path': '/processes', 'methods': ['GET']}, {'path': '/collections/{collection_id}', 'methods': ['GET']}, @@ -52,7 +51,7 @@ def get_root(config: Mapping[str, Any], base_url: str): {'path': '/collections/{collection_id}/items/{feature_id}', 'methods': ['GET']}, ], - "links": [ # todo - links are incorrect + "links": [ { "rel": "self", "href": f"{base_url}/", @@ -71,24 +70,11 @@ def get_root(config: Mapping[str, Any], base_url: str): "type": "text/html", "title": "the API documentation" }, - { - "rel": "conformance", - "href": f"{base_url}/conformance", - "type": "application/json", - "title": "OGC API conformance classes" - " implemented by this server" - }, { "rel": "data", "href": f"{base_url}/collections", "type": "application/json", "title": "Information about the feature collections" - }, - { - "rel": "search", - "href": f"{base_url}/search", - "type": "application/json", - "title": "Search across feature collections" } ] } @@ -102,16 +88,4 @@ def get_well_known(config: Mapping[str, Any]): 'api_version': API_VERSION } ] - } - - -# noinspection PyUnusedLocal -def get_conformance(): - return { - "conformsTo": [ - # TODO: fix this list so it becomes true - "http://www.opengis.net/doc/IS/ogcapi-features-1/1.0", - "http://www.opengis.net/spec/ogcapi-features-1/1.0/req/oas30", - "https://datatracker.ietf.org/doc/html/rfc7946" - ] - } + } \ No newline at end of file diff --git a/xcube_geodb_openeo/defaults.py b/xcube_geodb_openeo/defaults.py index aa07cb3..294d38a 100644 --- a/xcube_geodb_openeo/defaults.py +++ b/xcube_geodb_openeo/defaults.py @@ -25,10 +25,13 @@ 'SERVER_TITLE': 'xcube geoDB Server, openEO API', 'SERVER_DESCRIPTION': 'Catalog of geoDB collections.' } -API_VERSION = '1.1.0' # todo - check which API is meant and if value's correct + +# Version number of the openEO specification this back-end implements. +API_VERSION = '1.1.0' STAC_VERSION = '1.0.0' -STAC_EXTENSIONS = ['datacube', - 'https://stac-extensions.github.io/version/v1.0.0/schema.json'] +STAC_EXTENSIONS = \ + ['datacube', + 'https://stac-extensions.github.io/version/v1.0.0/schema.json'] STAC_DEFAULT_COLLECTIONS_LIMIT = 10 STAC_DEFAULT_ITEMS_LIMIT = 10 STAC_MAX_ITEMS_LIMIT = 10000 diff --git a/xcube_geodb_openeo/version.py b/xcube_geodb_openeo/version.py index 538e88f..eac0ed9 100644 --- a/xcube_geodb_openeo/version.py +++ b/xcube_geodb_openeo/version.py @@ -20,4 +20,4 @@ # DEALINGS IN THE SOFTWARE. -__version__ = '0.0.1.dev0' +__version__ = '0.0.2.dev0' From d3a54977ee0b4523857f45fc96fc4d02efab2f12 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 8 Mar 2023 00:35:47 +0100 Subject: [PATCH 098/163] reverting parts of last commit; followed first STAC validator hints --- tests/core/mock_datasource.py | 4 +++- tests/server/app/test_capabilities.py | 4 +++- tests/server/app/test_data_discovery.py | 8 +++++++- xcube_geodb_openeo/api/context.py | 5 ++++- xcube_geodb_openeo/api/routes.py | 20 +++++++++++++++++++- xcube_geodb_openeo/backend/capabilities.py | 16 +++++++++++++++- xcube_geodb_openeo/core/datasource.py | 2 +- xcube_geodb_openeo/core/geodb_datasource.py | 11 +++++++---- 8 files changed, 59 insertions(+), 11 deletions(-) diff --git a/tests/core/mock_datasource.py b/tests/core/mock_datasource.py index 763159e..a47153d 100644 --- a/tests/core/mock_datasource.py +++ b/tests/core/mock_datasource.py @@ -50,7 +50,9 @@ def get_collection_keys(self) -> Sequence: def get_vector_cube(self, collection_id: str, with_items: bool, bbox: Tuple[float, float, float, float] = None, limit: Optional[int] = None, offset: Optional[int] = - 0) -> VectorCube: + 0) -> Optional[VectorCube]: + if collection_id == 'non-existent-collection': + return None vector_cube = {} data = { 'id': ['0', '1'], diff --git a/tests/server/app/test_capabilities.py b/tests/server/app/test_capabilities.py index 05e5f7b..b9efac1 100644 --- a/tests/server/app/test_capabilities.py +++ b/tests/server/app/test_capabilities.py @@ -90,4 +90,6 @@ def test_conformance(self): response = self.http.request( 'GET', f'http://localhost:{self.port}/conformance' ) - self.assertEqual(404, response.status) + self.assertEqual(200, response.status) + conformance_data = json.loads(response.data) + self.assertIsNotNone(conformance_data['conformsTo']) diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index 637e8f8..0212727 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -87,7 +87,7 @@ def test_collection(self): expected_spatial_extent = \ {'bbox': [[8, 51, 12, 52]], 'crs': 'http://www.opengis.net/def/crs/OGC/1.3/CRS84'} - expected_temporal_extent = {'interval': [['null', 'null']]} + expected_temporal_extent = {'interval': [[None, None]]} self.assertEqual(expected_spatial_extent, collection_data['extent']['spatial']) self.assertEqual(expected_temporal_extent, @@ -158,3 +158,9 @@ def test_get_items_by_bbox(self): self.assertEqual('FeatureCollection', items_data['type']) self.assertIsNotNone(items_data['features']) self.assertEqual(1, len(items_data['features'])) + + def test_not_existing_collection(self): + url = f'http://localhost:{self.port}' \ + f'/collections/non-existent-collection' + response = self.http.request('GET', url) + self.assertEqual(404, response.status) diff --git a/xcube_geodb_openeo/api/context.py b/xcube_geodb_openeo/api/context.py index 2049b14..ea423f5 100644 --- a/xcube_geodb_openeo/api/context.py +++ b/xcube_geodb_openeo/api/context.py @@ -128,7 +128,10 @@ def get_collection(self, base_url: str, collection_id: str): vector_cube = self.get_vector_cube(collection_id, with_items=False, bbox=None, limit=None, offset=0) - return _get_vector_cube_collection(base_url, vector_cube) + if vector_cube: + return _get_vector_cube_collection(base_url, vector_cube) + else: + return None def get_collection_items(self, base_url: str, collection_id: str, limit: int, offset: int, diff --git a/xcube_geodb_openeo/api/routes.py b/xcube_geodb_openeo/api/routes.py index 1548e69..b3084ec 100644 --- a/xcube_geodb_openeo/api/routes.py +++ b/xcube_geodb_openeo/api/routes.py @@ -159,6 +159,20 @@ def ensure_parameters(expected_parameters, process_parameters): f' \'{ep["name"]}\'.')) +@api.route('/conformance') +class ConformanceHandler(ApiHandler): + """ + Lists all conformance classes specified in OGC standards that the server + conforms to. + """ + + def get(self): + """ + Lists the conformance classes. + """ + self.response.finish(capabilities.get_conformance()) + + @api.route('/collections') class CollectionsHandler(ApiHandler): """ @@ -197,7 +211,11 @@ def get(self, collection_id: str): """ base_url = get_base_url(self.request) collection = self.ctx.get_collection(base_url, collection_id) - self.response.finish(collection) + if collection: + self.response.finish(collection) + else: + self.response.set_status(404, f'Collection {collection_id} does ' + f'not exist') @api.route('/collections/{collection_id}/items') diff --git a/xcube_geodb_openeo/backend/capabilities.py b/xcube_geodb_openeo/backend/capabilities.py index 35da82b..beb590c 100644 --- a/xcube_geodb_openeo/backend/capabilities.py +++ b/xcube_geodb_openeo/backend/capabilities.py @@ -70,6 +70,13 @@ def get_root(config: Mapping[str, Any], base_url: str): "type": "text/html", "title": "the API documentation" }, + { + "rel": "conformance", + "href": f"{base_url}/conformance", + "type": "application/json", + "title": "OGC API conformance classes" + " implemented by this server" + }, { "rel": "data", "href": f"{base_url}/collections", @@ -88,4 +95,11 @@ def get_well_known(config: Mapping[str, Any]): 'api_version': API_VERSION } ] - } \ No newline at end of file + } + + +# noinspection PyUnusedLocal +def get_conformance(): + return { + "conformsTo": [] + } diff --git a/xcube_geodb_openeo/core/datasource.py b/xcube_geodb_openeo/core/datasource.py index a904f23..d0d45e6 100644 --- a/xcube_geodb_openeo/core/datasource.py +++ b/xcube_geodb_openeo/core/datasource.py @@ -41,7 +41,7 @@ def get_collection_keys(self): def get_vector_cube(self, collection_id: str, with_items: bool, bbox: Tuple[float, float, float, float], limit: Optional[int] = None, - offset: Optional[int] = 0) -> VectorCube: + offset: Optional[int] = 0) -> Optional[VectorCube]: pass @staticmethod diff --git a/xcube_geodb_openeo/core/geodb_datasource.py b/xcube_geodb_openeo/core/geodb_datasource.py index 6b32abf..5cdb748 100644 --- a/xcube_geodb_openeo/core/geodb_datasource.py +++ b/xcube_geodb_openeo/core/geodb_datasource.py @@ -28,7 +28,7 @@ import pandas from pandas import DataFrame -from xcube_geodb.core.geodb import GeoDBClient +from xcube_geodb.core.geodb import GeoDBClient, GeoDBError from .datasource import DataSource from .vectorcube import VectorCube @@ -76,8 +76,11 @@ def get_vector_cube(self, collection_id: str, with_items: bool, bbox: Tuple[float, float, float, float] = None, limit: Optional[int] = None, offset: Optional[int] = 0) \ - -> VectorCube: - vector_cube = self.geodb.get_collection_info(collection_id) + -> Optional[VectorCube]: + try: + vector_cube = self.geodb.get_collection_info(collection_id) + except GeoDBError: + return None vector_cube['id'] = collection_id vector_cube['features'] = [] if bbox: @@ -133,7 +136,7 @@ def add_metadata(collection_bbox: Tuple, collection_id: str, 'crs': 'http://www.opengis.net/def/crs/OGC/1.3/CRS84' }, 'temporal': { - 'interval': [['null', 'null']] + 'interval': [[None, None]] # todo - maybe define a list of possible property names to # scan for the temporal interval, such as start_date, # end_date, From ecd789ca2a23e0aeb255f3dd72c767c0472ad89b Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 9 Mar 2023 10:19:32 +0100 Subject: [PATCH 099/163] minor update --- xcube_geodb_openeo/api/context.py | 2 -- xcube_geodb_openeo/core/geodb_datasource.py | 24 ++++++++++++++------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/xcube_geodb_openeo/api/context.py b/xcube_geodb_openeo/api/context.py index ea423f5..8a77c1b 100644 --- a/xcube_geodb_openeo/api/context.py +++ b/xcube_geodb_openeo/api/context.py @@ -111,11 +111,9 @@ def fetch_collections(self, base_url: str, limit: int, offset: int): len(self.collection_ids)) collection_list = [] for collection_id in self.collection_ids[offset:offset + limit]: - LOG.info(f'Building vector cube for collection {collection_id}...') vector_cube = self.get_vector_cube(collection_id, with_items=False, bbox=None, limit=limit, offset=offset) - LOG.info("...done") collection = _get_vector_cube_collection(base_url, vector_cube) collection_list.append(collection) diff --git a/xcube_geodb_openeo/core/geodb_datasource.py b/xcube_geodb_openeo/core/geodb_datasource.py index 5cdb748..cf352c5 100644 --- a/xcube_geodb_openeo/core/geodb_datasource.py +++ b/xcube_geodb_openeo/core/geodb_datasource.py @@ -29,6 +29,7 @@ import pandas from pandas import DataFrame from xcube_geodb.core.geodb import GeoDBClient, GeoDBError +from xcube.constants import LOG from .datasource import DataSource from .vectorcube import VectorCube @@ -77,21 +78,25 @@ def get_vector_cube(self, collection_id: str, with_items: bool, limit: Optional[int] = None, offset: Optional[int] = 0) \ -> Optional[VectorCube]: + LOG.debug(f'Building vector cube for collection {collection_id}...') try: vector_cube = self.geodb.get_collection_info(collection_id) except GeoDBError: return None vector_cube['id'] = collection_id vector_cube['features'] = [] - if bbox: - vector_cube['total_feature_count'] = \ - int(self.geodb.count_collection_by_bbox( - collection_id, bbox)['ct'][0]) - else: - vector_cube['total_feature_count'] = \ - int(self.geodb.count_collection_by_bbox( - collection_id, (-180, 90, 180, -90))['ct'][0]) + if not with_items: + LOG.debug(f' starting to count features, bbox = {bbox}') + if bbox: + vector_cube['total_feature_count'] = \ + int(self.geodb.count_collection_by_bbox( + collection_id, bbox)['ct'][0]) + else: + vector_cube['total_feature_count'] = \ + int(self.geodb.count_collection_by_bbox( + collection_id, (-180, 90, 180, -90))['ct'][0]) + LOG.debug(f' ...done counting features.') if with_items: if bbox: items = self.geodb.get_collection_by_bbox(collection_id, bbox, @@ -104,6 +109,7 @@ def get_vector_cube(self, collection_id: str, with_items: bool, vector_cube['total_feature_count'] = len(items) self.add_items_to_vector_cube(items, vector_cube) + LOG.debug(f' starting to get collection bbox...') collection_bbox = self.geodb.get_collection_bbox(collection_id) if collection_bbox: srid = self.geodb.get_collection_srid(collection_id) @@ -112,11 +118,13 @@ def get_vector_cube(self, collection_id: str, with_items: bool, collection_bbox, srid, '4326', ) + LOG.debug(f' ...done getting collection bbox.') properties = self.geodb.get_properties(collection_id) self.add_metadata(collection_bbox, collection_id, properties, None, vector_cube) + LOG.debug("...done building vector cube.") return vector_cube @staticmethod From 30082c3b2561afb424005e69136dd3f6eac03e74 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 13 Mar 2023 21:53:21 +0100 Subject: [PATCH 100/163] minor update --- environment.yml | 2 +- xcube_geodb_openeo/core/geodb_datasource.py | 32 ++++++++++++++------- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/environment.yml b/environment.yml index c32fb3e..cf632d7 100644 --- a/environment.yml +++ b/environment.yml @@ -10,7 +10,7 @@ dependencies: - pandas - shapely - xcube >= 0.13.0 - - xcube_geodb >= 1.0.4 + - xcube_geodb >= 1.0.5 - yaml # Testing - pytest >=4.4 diff --git a/xcube_geodb_openeo/core/geodb_datasource.py b/xcube_geodb_openeo/core/geodb_datasource.py index cf352c5..a1825dd 100644 --- a/xcube_geodb_openeo/core/geodb_datasource.py +++ b/xcube_geodb_openeo/core/geodb_datasource.py @@ -78,6 +78,7 @@ def get_vector_cube(self, collection_id: str, with_items: bool, limit: Optional[int] = None, offset: Optional[int] = 0) \ -> Optional[VectorCube]: + # todo - replace by builder pattern, and build correct vector cube LOG.debug(f'Building vector cube for collection {collection_id}...') try: vector_cube = self.geodb.get_collection_info(collection_id) @@ -93,10 +94,9 @@ def get_vector_cube(self, collection_id: str, with_items: bool, collection_id, bbox)['ct'][0]) else: vector_cube['total_feature_count'] = \ - int(self.geodb.count_collection_by_bbox( - collection_id, (-180, 90, 180, -90))['ct'][0]) - - LOG.debug(f' ...done counting features.') + self.geodb.count_collection_rows(collection_id) + LOG.debug(f' ...done counting features: ' + f'{vector_cube["total_feature_count"]}.') if with_items: if bbox: items = self.geodb.get_collection_by_bbox(collection_id, bbox, @@ -112,12 +112,15 @@ def get_vector_cube(self, collection_id: str, with_items: bool, LOG.debug(f' starting to get collection bbox...') collection_bbox = self.geodb.get_collection_bbox(collection_id) if collection_bbox: - srid = self.geodb.get_collection_srid(collection_id) - if srid is not None and srid != '4326': - collection_bbox = self.geodb.transform_bbox_crs( - collection_bbox, - srid, '4326', - ) + collection_bbox = self.transform_bbox_crs(collection_bbox, + collection_id) + if not collection_bbox: + collection_bbox = self.geodb.get_collection_bbox(collection_id, + exact=True) + if collection_bbox: + collection_bbox = self.transform_bbox_crs(collection_bbox, + collection_id) + LOG.debug(f' ...done getting collection bbox.') properties = self.geodb.get_properties(collection_id) @@ -127,6 +130,15 @@ def get_vector_cube(self, collection_id: str, with_items: bool, LOG.debug("...done building vector cube.") return vector_cube + def transform_bbox_crs(self, collection_bbox, collection_id): + srid = self.geodb.get_collection_srid(collection_id) + if srid is not None and srid != '4326': + collection_bbox = self.geodb.transform_bbox_crs( + collection_bbox, + srid, '4326' + ) + return collection_bbox + @staticmethod def add_metadata(collection_bbox: Tuple, collection_id: str, properties: DataFrame, version: Optional[str], From abdd03e194cbdae7de475d522f55d4cbc27bd881 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 20 Jun 2023 11:43:56 +0200 Subject: [PATCH 101/163] adapted to xcube 1.1.1 --- tests/server/app/test_capabilities.py | 5 +- tests/server/app/test_data_discovery.py | 4 +- tests/server/app/test_processing.py | 4 +- xcube_geodb_openeo/backend/processes.py | 5 +- .../res/datacube-extension-schema.json | 622 ++++++++++++++++++ .../backend/res/processes/__init__.py | 14 - .../res/{ => processes}/load_collection.json | 0 7 files changed, 631 insertions(+), 23 deletions(-) create mode 100644 xcube_geodb_openeo/backend/res/datacube-extension-schema.json rename tests/server/app/base_test.py => xcube_geodb_openeo/backend/res/processes/__init__.py (76%) rename xcube_geodb_openeo/backend/res/{ => processes}/load_collection.json (100%) diff --git a/tests/server/app/test_capabilities.py b/tests/server/app/test_capabilities.py index b9efac1..fbb15d5 100644 --- a/tests/server/app/test_capabilities.py +++ b/tests/server/app/test_capabilities.py @@ -24,14 +24,13 @@ from typing import Dict import yaml +from xcube.server.testing import ServerTestCase from xcube.util import extension from xcube.constants import EXTENSION_POINT_SERVER_APIS from xcube.util.extension import ExtensionRegistry -from tests.server.app.base_test import BaseTest - -class CapabilitiesTest(BaseTest): +class CapabilitiesTest(ServerTestCase): def add_extension(self, er: ExtensionRegistry) -> None: er.add_extension( diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index 0212727..5801756 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -25,14 +25,14 @@ import yaml from xcube.constants import EXTENSION_POINT_SERVER_APIS +from xcube.server.testing import ServerTestCase from xcube.util import extension from xcube.util.extension import ExtensionRegistry from . import test_utils -from .base_test import BaseTest -class DataDiscoveryTest(BaseTest): +class DataDiscoveryTest(ServerTestCase): def add_extension(self, er: ExtensionRegistry) -> None: er.add_extension( diff --git a/tests/server/app/test_processing.py b/tests/server/app/test_processing.py index 2ab4b5a..e7b7ead 100644 --- a/tests/server/app/test_processing.py +++ b/tests/server/app/test_processing.py @@ -24,16 +24,16 @@ import yaml from xcube.constants import EXTENSION_POINT_SERVER_APIS +from xcube.server.testing import ServerTestCase from xcube.util import extension from xcube.util.extension import ExtensionRegistry from xcube_geodb_openeo.backend import processes from xcube_geodb_openeo.backend.processes import LoadCollection from . import test_utils -from .base_test import BaseTest -class ProcessingTest(BaseTest): +class ProcessingTest(ServerTestCase): def add_extension(self, er: ExtensionRegistry) -> None: er.add_extension( diff --git a/xcube_geodb_openeo/backend/processes.py b/xcube_geodb_openeo/backend/processes.py index 9020c9a..d433095 100644 --- a/xcube_geodb_openeo/backend/processes.py +++ b/xcube_geodb_openeo/backend/processes.py @@ -70,11 +70,12 @@ def translate_parameters(self, parameters: dict) -> dict: def read_default_processes() -> List[Process]: - processes_specs = [j for j in resources.contents(f'{__package__}.res') + processes_specs = [j for j in + resources.contents(f'{__package__}.res.processes') if j.lower().endswith('json')] processes = [] for spec in processes_specs: - with resources.open_binary(f'{__package__}.res', spec) as f: + with resources.open_binary(f'{__package__}.res.processes', spec) as f: metadata = json.loads(f.read()) module = importlib.import_module(metadata['module']) class_name = metadata['class_name'] diff --git a/xcube_geodb_openeo/backend/res/datacube-extension-schema.json b/xcube_geodb_openeo/backend/res/datacube-extension-schema.json new file mode 100644 index 0000000..7647760 --- /dev/null +++ b/xcube_geodb_openeo/backend/res/datacube-extension-schema.json @@ -0,0 +1,622 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://stac-extensions.github.io/datacube/v2.2.0/schema.json", + "title": "Datacube Extension", + "description": "STAC Datacube Extension for STAC Items and STAC Collections.", + "oneOf": [ + { + "$comment": "This is the schema for STAC Items.", + "allOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "const": "Feature" + } + } + }, + { + "$ref": "#/definitions/stac_extensions" + } + ], + "anyOf": [ + { + "type": "object", + "required": [ + "properties" + ], + "properties": { + "properties": { + "allOf": [ + { + "$ref": "#/definitions/require_field" + }, + { + "$ref": "#/definitions/fields" + } + ] + } + } + }, + { + "$comment": "This validates the fields in Item Assets.", + "required": [ + "assets" + ], + "properties": { + "assets": { + "type": "object", + "not": { + "additionalProperties": { + "not": { + "allOf": [ + { + "$ref": "#/definitions/require_field" + }, + { + "$ref": "#/definitions/fields" + } + ] + } + } + } + } + } + } + ] + }, + { + "$comment": "This is the schema for STAC Collections.", + "type": "object", + "allOf": [ + { + "required": [ + "type" + ], + "properties": { + "type": { + "const": "Collection" + } + } + }, + { + "$ref": "#/definitions/stac_extensions" + } + ], + "anyOf": [ + { + "$comment": "This is the schema for the top-level fields in a Collection.", + "allOf": [ + { + "$ref": "#/definitions/require_field" + }, + { + "$ref": "#/definitions/fields" + } + ] + }, + { + "$comment": "This validates the fields in Collection Assets.", + "required": [ + "assets" + ], + "properties": { + "assets": { + "type": "object", + "not": { + "additionalProperties": { + "not": { + "allOf": [ + { + "$ref": "#/definitions/require_field" + }, + { + "$ref": "#/definitions/fields" + } + ] + } + } + } + } + } + }, + { + "$comment": "This is the schema for the fields in Item Asset Definitions.", + "required": [ + "item_assets" + ], + "properties": { + "item_assets": { + "type": "object", + "not": { + "additionalProperties": { + "not": { + "allOf": [ + { + "$ref": "#/definitions/require_any_field" + }, + { + "$ref": "#/definitions/fields" + } + ] + } + } + } + } + } + }, + { + "$comment": "This is the schema for the fields in Summaries. By default, only checks the existance of the properties, but not the schema of the summaries.", + "required": [ + "summaries" + ], + "properties": { + "summaries": { + "$ref": "#/definitions/require_any_field" + } + } + } + ] + } + ], + "definitions": { + "stac_extensions": { + "type": "object", + "required": [ + "stac_extensions" + ], + "properties": { + "stac_extensions": { + "type": "array", + "contains": { + "const": "https://stac-extensions.github.io/datacube/v2.2.0/schema.json" + } + } + } + }, + "require_any_field": { + "$comment": "Please list all fields here so that we can force the existance of one of them in other parts of the schemas.", + "anyOf": [ + {"required": ["cube:dimensions"]}, + {"required": ["cube:variables"]} + ] + }, + "require_field": { + "required": [ + "cube:dimensions" + ] + }, + "fields": { + "$comment": "Add your new fields here. Don't require them here, do that above in the corresponding schema.", + "type": "object", + "properties": { + "cube:dimensions": { + "$ref": "#/definitions/cube:dimensions" + }, + "cube:variables": { + "$ref": "#/definitions/cube:variables" + } + }, + "patternProperties": { + "^(?!cube:)": {} + }, + "additionalProperties": false + }, + "cube:dimensions": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/definitions/vector_dimension" + }, + { + "$ref": "#/definitions/horizontal_spatial_dimension" + }, + { + "$ref": "#/definitions/vertical_spatial_dimension" + }, + { + "$ref": "#/definitions/temporal_dimension" + }, + { + "$ref": "#/definitions/additional_dimension" + } + ] + } + }, + "cube:variables": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/variable" + } + }, + "additional_dimension": { + "title": "Additional Dimension Object", + "type": "object", + "anyOf": [ + { + "required": [ + "type", + "extent" + ] + }, + { + "required": [ + "type", + "values" + ] + } + ], + "not": { + "required": [ + "axis" + ] + }, + "properties": { + "type": { + "type": "string", + "not": { + "enum": [ + "spatial", + "geometry" + ] + } + }, + "description": { + "$ref": "#/definitions/description" + }, + "extent": { + "$ref": "#/definitions/extent_open" + }, + "values": { + "$ref": "#/definitions/values" + }, + "step": { + "$ref": "#/definitions/step" + }, + "unit": { + "$ref": "#/definitions/unit" + }, + "reference_system": { + "type": "string" + }, + "dimensions": { + "type": "array", + "items": { + "type": [ + "string" + ] + } + } + } + }, + "horizontal_spatial_dimension": { + "title": "Horizontal Spatial Raster Dimension Object", + "type": "object", + "required": [ + "type", + "axis", + "extent" + ], + "properties": { + "type": { + "$ref": "#/definitions/type_spatial" + }, + "axis": { + "$ref": "#/definitions/axis_xy" + }, + "description": { + "$ref": "#/definitions/description" + }, + "extent": { + "$ref": "#/definitions/extent_closed" + }, + "values": { + "$ref": "#/definitions/values_numeric" + }, + "step": { + "$ref": "#/definitions/step" + }, + "reference_system": { + "$ref": "#/definitions/reference_system_spatial" + } + } + }, + "vertical_spatial_dimension": { + "title": "Vertical Spatial Dimension Object", + "type": "object", + "anyOf": [ + { + "required": [ + "type", + "axis", + "extent" + ] + }, + { + "required": [ + "type", + "axis", + "values" + ] + } + ], + "properties": { + "type": { + "$ref": "#/definitions/type_spatial" + }, + "axis": { + "$ref": "#/definitions/axis_z" + }, + "description": { + "$ref": "#/definitions/description" + }, + "extent": { + "$ref": "#/definitions/extent_open" + }, + "values": { + "$ref": "#/definitions/values" + }, + "step": { + "$ref": "#/definitions/step" + }, + "unit": { + "$ref": "#/definitions/unit" + }, + "reference_system": { + "$ref": "#/definitions/reference_system_spatial" + } + } + }, + "vector_dimension": { + "title": "Spatial Vector Dimension Object", + "type": "object", + "required": [ + "type", + "bbox" + ], + "properties": { + "type": { + "type": "string", + "const": "geometry" + }, + "axes": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "enum": [ + "x", + "y", + "z" + ] + } + }, + "description": { + "$ref": "#/definitions/description" + }, + "bbox": { + "title": "Spatial extent", + "type": "array", + "oneOf": [ + { + "minItems":4, + "maxItems":4 + }, + { + "minItems":6, + "maxItems":6 + } + ], + "items": { + "type": "number" + } + }, + "values": { + "type": "array", + "minItems": 1, + "items": { + "description": "WKT or Identifier", + "type": "string" + } + }, + "geometry_types": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "enum": [ + "Point", + "MultiPoint", + "LineString", + "MultiLineString", + "Polygon", + "MultiPolygon", + "GeometryCollection" + ] + } + }, + "reference_system": { + "$ref": "#/definitions/reference_system_spatial" + } + } + }, + "temporal_dimension": { + "title": "Temporal Dimension Object", + "type": "object", + "required": [ + "type", + "extent" + ], + "not": { + "required": [ + "axis" + ] + }, + "properties": { + "type": { + "type": "string", + "const": "temporal" + }, + "description": { + "$ref": "#/definitions/description" + }, + "values": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "extent": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "items": { + "type": [ + "string", + "null" + ] + } + }, + "step": { + "type": [ + "string", + "null" + ] + } + } + }, + "variable": { + "title": "Variable Object", + "type": "object", + "required": [ + "dimensions" + ], + "properties": { + "variable_type": { + "type": "string", + "enum": [ + "data", + "auxiliary" + ] + }, + "description": { + "$ref": "#/definitions/description" + }, + "dimensions": { + "type": "array", + "items": { + "type": "string" + } + }, + "values": { + "type": "array", + "minItems": 1 + }, + "extent": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "items": { + "type": [ + "string", + "number", + "null" + ] + } + }, + "unit": { + "$ref": "#/definitions/unit" + } + } + }, + "type_spatial": { + "type": "string", + "const": "spatial" + }, + "axis_xy": { + "type": "string", + "enum": [ + "x", + "y" + ] + }, + "axis_z": { + "type": "string", + "const": "z" + }, + "extent_closed": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "items": { + "type": "number" + } + }, + "extent_open": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "items": { + "type": [ + "number", + "null" + ] + } + }, + "values_numeric": { + "type": "array", + "minItems": 1, + "items": { + "type": "number" + } + }, + "values": { + "type": "array", + "minItems": 1, + "items": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "step": { + "type": [ + "number", + "null" + ] + }, + "unit": { + "type": "string" + }, + "reference_system_spatial": { + "oneOf": [ + { + "description": "WKT2", + "type": "string" + }, + { + "description": "EPSG code", + "type": "integer", + "minimum": 0 + }, + { + "$ref": "https://proj.org/schemas/v0.4/projjson.schema.json" + } + ], + "default": 4326 + }, + "description": { + "type": "string" + } + } +} \ No newline at end of file diff --git a/tests/server/app/base_test.py b/xcube_geodb_openeo/backend/res/processes/__init__.py similarity index 76% rename from tests/server/app/base_test.py rename to xcube_geodb_openeo/backend/res/processes/__init__.py index 34aa0c9..2f1eda6 100644 --- a/tests/server/app/base_test.py +++ b/xcube_geodb_openeo/backend/res/processes/__init__.py @@ -18,17 +18,3 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. - -import os -import time -from xcube.server.testing import ServerTest - - -class BaseTest(ServerTest): - - def setUp(self) -> None: - super().setUp() - wait_for_server_startup = os.environ.get('WAIT_FOR_STARTUP', - '0') == '1' - if wait_for_server_startup: - time.sleep(10) diff --git a/xcube_geodb_openeo/backend/res/load_collection.json b/xcube_geodb_openeo/backend/res/processes/load_collection.json similarity index 100% rename from xcube_geodb_openeo/backend/res/load_collection.json rename to xcube_geodb_openeo/backend/res/processes/load_collection.json From af797960135563cb0831e46842f0e46e47ecaf96 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 21 Jun 2023 23:10:02 +0200 Subject: [PATCH 102/163] very intermediate --- tests/server/app/test_data_discovery.py | 12 +++++++----- xcube_geodb_openeo/api/context.py | 1 - xcube_geodb_openeo/api/routes.py | 12 ++++++++---- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index 5801756..d375f91 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -55,8 +55,9 @@ def test_collections(self): first_collection = collections_data['collections'][0] self.assertEqual("1.0.0", first_collection['stac_version']) self.assertEqual( - ['datacube', - 'https://stac-extensions.github.io/version/v1.0.0/schema.json'], + [ + 'https://stac-extensions.github.io/datacube/v2.2.0/schema.json' + ], first_collection['stac_extensions']) self.assertEqual(first_collection['type'], 'Collection') self.assertEqual('collection_1', first_collection['id']) @@ -74,8 +75,9 @@ def test_collection(self): collection_data = json.loads(response.data) self.assertEqual("1.0.0", collection_data['stac_version']) self.assertEqual( - ['datacube', - 'https://stac-extensions.github.io/version/v1.0.0/schema.json'], + [ + 'https://stac-extensions.github.io/datacube/v2.2.0/schema.json' + ], collection_data['stac_extensions']) response_type = collection_data['type'] self.assertEqual(response_type, "Collection") @@ -92,7 +94,7 @@ def test_collection(self): collection_data['extent']['spatial']) self.assertEqual(expected_temporal_extent, collection_data['extent']['temporal']) - self.assertEqual({'vector_dim': {'type': 'other'}}, + self.assertEqual({'vector': {'type': 'geometry', 'axes': ['']}}, # todo collection_data['cube:dimensions']) self.assertIsNotNone(collection_data['summaries']) diff --git a/xcube_geodb_openeo/api/context.py b/xcube_geodb_openeo/api/context.py index 8a77c1b..7882bea 100644 --- a/xcube_geodb_openeo/api/context.py +++ b/xcube_geodb_openeo/api/context.py @@ -94,7 +94,6 @@ def get_vector_cube(self, collection_id: str, with_items: bool, return self.data_source.get_vector_cube(collection_id, with_items, bbox, limit, offset) - @property def collections(self) -> Dict: assert self._collections is not None diff --git a/xcube_geodb_openeo/api/routes.py b/xcube_geodb_openeo/api/routes.py index b3084ec..df89885 100644 --- a/xcube_geodb_openeo/api/routes.py +++ b/xcube_geodb_openeo/api/routes.py @@ -109,22 +109,26 @@ def get(self): @api.route('/file_formats') class FormatsHandler(ApiHandler): """ - Lists supported input and output file formats. Input file formats specify which file a back-end can read from. + Lists supported input and output file formats. Input file formats specify + which file a back-end can read from. Output file formats specify which file a back-end can write to. """ - @api.operation(operationId='file_formats', summary='Listing of supported file formats') + @api.operation(operationId='file_formats', + summary='Listing of supported file formats') def get(self): """ Returns the supported file formats. """ - self.response.finish(processes.get_processes_registry().get_file_formats()) + self.response.finish(processes.get_processes_registry() + .get_file_formats()) @api.route('/result') class ResultHandler(ApiHandler): """ - Executes a user-defined process directly (synchronously) and the result will be downloaded. + Executes a user-defined process directly (synchronously) and the result + will be downloaded. """ @api.operation(operationId='result', summary='Execute process' From a9b4448a9550a10d00dc65e9c9c9025626d00594 Mon Sep 17 00:00:00 2001 From: thomas Date: Thu, 22 Jun 2023 17:07:56 +0200 Subject: [PATCH 103/163] added some thoughts about vector cubes --- xcube_geodb_openeo/core/vectorcube.py | 76 ++++++++++++++++++++++++++- 1 file changed, 75 insertions(+), 1 deletion(-) diff --git a/xcube_geodb_openeo/core/vectorcube.py b/xcube_geodb_openeo/core/vectorcube.py index 73d362d..b4d81f8 100644 --- a/xcube_geodb_openeo/core/vectorcube.py +++ b/xcube_geodb_openeo/core/vectorcube.py @@ -18,10 +18,84 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. - +from datetime import datetime from typing import Any from typing import Dict +from typing import List +from geojson.geometry import Geometry + VectorCube = Dict[str, Any] Feature = Dict[str, Any] + +class VectorCube: + + """ + Representation of a VectorCube, according to + https://r-spatial.org/r/2022/09/12/vdc.html. + + When is a geoDB table column a dimension? + In a vector cube, the geometry always is a dimensions. If the geometry in + the geoDB is 3-dimensional (is that possible anyway?), we have to split + that into a 2d geometry and an additional vertical dimension. + The time column translates to a dimension as well. + Other columns (say, chl_mean) never translate to a dimension; rather, each + position in the cube (given by geometry, maybe z, and time) contains an + array of unspecific type. Thus, we do not have additional dimensions for + geoDB tables. + It could be useful to make a column a dimension, if the column changes + its value only if all combinations of values of the other dimensions + change. Wavelength is a good example: for 440nm, there are entries for all + geometries and datetimes, and for 550nm, there are others. + However, detecting this from a table is hard. + """ + + @property + def vector_dim(self) -> List[Geometry]: + """ + Represents the vector dimension of the vector cube. By definition, + vector data cubes have (at least) a single spatial dimension. + + What is a geometry dim? + Explicitly defined: a list of all the different values, e.g. [POINT(5 7), POINT(1.3 4), POINT(8 3)] + Implicitly defined: simply a name, which can be used to get the values from a dict or something + -> we define it explicitly + # shall we support multiple geometry dimensions? + - check openEO requirements/specifications on this + # shall we return GeoJSON? Or CovJSON? + - use what's best suited for internal use + - go with GeoJSON first + # shall support lazy loading: read values and dimensions only when asked for, i.e. when this method is called + + :return: list of geojson geometries + """ + pass + + @property + def vertical_dim(self) -> List[Any]: + """ + Represents the vertical geometry dimension of the vector cube, if it + exists. Returns the explicit list of dimension values. If the vector + cube does not have a vertical dimension, returns an empty list. + :return: list of dimension values, typically a list of float values. + """ + pass + + @property + def time_dim(self) -> List[datetime]: + """ + Returns the time dimension of the vector cube as an explicit list of + datetime objects. If the vector cube does not have a time dimension, + an empty list is returned. + """ + pass + + @property + def additional_dims(self) -> List[Any]: + """ + Returns all dimensions of the vector cube, which are neither the + vector dimension, nor the vertical dimension, nor the time dimension. + For example: colors with values R,G,B is a dimension. + """ + pass \ No newline at end of file From e0d99687e87e8fe2b1f5001fedba44e0d50cd2eb Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 28 Jun 2023 17:10:52 +0200 Subject: [PATCH 104/163] continue dev --- environment.yml | 1 + xcube_geodb_openeo/core/geodb_datasource.py | 35 ++++++----- xcube_geodb_openeo/core/vectorcube.py | 70 +++++++++++++++++---- 3 files changed, 79 insertions(+), 27 deletions(-) diff --git a/environment.yml b/environment.yml index cf632d7..f817319 100644 --- a/environment.yml +++ b/environment.yml @@ -11,6 +11,7 @@ dependencies: - shapely - xcube >= 0.13.0 - xcube_geodb >= 1.0.5 + - geojson - yaml # Testing - pytest >=4.4 diff --git a/xcube_geodb_openeo/core/geodb_datasource.py b/xcube_geodb_openeo/core/geodb_datasource.py index a1825dd..4282f5c 100644 --- a/xcube_geodb_openeo/core/geodb_datasource.py +++ b/xcube_geodb_openeo/core/geodb_datasource.py @@ -32,7 +32,7 @@ from xcube.constants import LOG from .datasource import DataSource -from .vectorcube import VectorCube +from .vectorcube import VectorCube, VectorCubeBuilder class GeoDBDataSource(DataSource): @@ -78,25 +78,28 @@ def get_vector_cube(self, collection_id: str, with_items: bool, limit: Optional[int] = None, offset: Optional[int] = 0) \ -> Optional[VectorCube]: - # todo - replace by builder pattern, and build correct vector cube LOG.debug(f'Building vector cube for collection {collection_id}...') try: - vector_cube = self.geodb.get_collection_info(collection_id) + collection_info = self.geodb.get_collection_info(collection_id) except GeoDBError: return None - vector_cube['id'] = collection_id - vector_cube['features'] = [] - if not with_items: - LOG.debug(f' starting to count features, bbox = {bbox}') - if bbox: - vector_cube['total_feature_count'] = \ - int(self.geodb.count_collection_by_bbox( - collection_id, bbox)['ct'][0]) - else: - vector_cube['total_feature_count'] = \ - self.geodb.count_collection_rows(collection_id) - LOG.debug(f' ...done counting features: ' - f'{vector_cube["total_feature_count"]}.') + builder = VectorCubeBuilder(collection_id) + builder.base_info = collection_info + time_var_name = builder.get_time_var_name() + query = f'select=geometry,{time_var_name}' if time_var_name \ + else 'select=geometry' + gdf = self.geodb.get_collection(collection_id, + query=query, + limit=limit, + offset=offset) + if bbox: + gdf = gdf.cx[bbox[0]:bbox[1], bbox[2]:bbox[3]] + builder.geometries = gdf['geometry'] + builder.times = gdf[time_var_name] + builder.count = gdf.count() + builder.set_z_dim() + vector_cube = builder.build() + if with_items: if bbox: items = self.geodb.get_collection_by_bbox(collection_id, bbox, diff --git a/xcube_geodb_openeo/core/vectorcube.py b/xcube_geodb_openeo/core/vectorcube.py index b4d81f8..f9785c9 100644 --- a/xcube_geodb_openeo/core/vectorcube.py +++ b/xcube_geodb_openeo/core/vectorcube.py @@ -19,14 +19,15 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. from datetime import datetime -from typing import Any +from typing import Any, Optional from typing import Dict from typing import List from geojson.geometry import Geometry +import dask.dataframe as dd -VectorCube = Dict[str, Any] - +# VectorCube = Dict[str, Any] +# Feature = Dict[str, Any] class VectorCube: @@ -48,9 +49,18 @@ class VectorCube: its value only if all combinations of values of the other dimensions change. Wavelength is a good example: for 440nm, there are entries for all geometries and datetimes, and for 550nm, there are others. - However, detecting this from a table is hard. + However, detecting this from a table is hard, therefore we don't do it. + + The actual values within this VectorCube are provided by a dask Dataframe. """ + def __init__(self, identifier: str) -> None: + self._id = identifier + + @property + def id(self) -> str: + return self._id + @property def vector_dim(self) -> List[Geometry]: """ @@ -68,9 +78,10 @@ def vector_dim(self) -> List[Geometry]: - go with GeoJSON first # shall support lazy loading: read values and dimensions only when asked for, i.e. when this method is called - :return: list of geojson geometries + :return: list of geojson geometries, which all together form the + vector dimension """ - pass + return self._vector_dim or self._read_vector_dim() @property def vertical_dim(self) -> List[Any]: @@ -91,11 +102,48 @@ def time_dim(self) -> List[datetime]: """ pass + @property - def additional_dims(self) -> List[Any]: + def values(self): """ - Returns all dimensions of the vector cube, which are neither the - vector dimension, nor the vertical dimension, nor the time dimension. - For example: colors with values R,G,B is a dimension. + Returns the plain values array. If not yet loaded, get from geoDB. + + :return: """ - pass \ No newline at end of file + self.datasource.load_data() + + def _read_vector_dim(self): + self.datasource.load_data() + + +class VectorCubeBuilder: + + def __init__(self, collection_id: str) -> None: + self._collection_id = collection_id + self._geometries = None + self.base_info = {} + + @property + def geometries(self) -> List[Geometry]: + return self._geometries + + @geometries.setter + def geometries(self, geometries: List[Geometry]): + self._geometries = geometries + + def build(self) -> VectorCube: + return VectorCube(self._collection_id, + self.datasource) + + def get_time_var_name(self) -> Optional[str]: + for key in self.base_info['properties'].keys(): + if key == 'date' or key == 'time' or key == 'timestamp' \ + or key == 'datetime': + return key + return None + + def set_z_dim(self): + for key in self.base_info['properties'].keys(): + if key == 'z' or key == 'vertical': + return key + return None From 685c3bddd7770745e757e2e883b68f3ab6a48a14 Mon Sep 17 00:00:00 2001 From: thomas Date: Thu, 29 Jun 2023 17:27:02 +0200 Subject: [PATCH 105/163] intermediate --- environment.yml | 2 +- tests/core/mock_datasource.py | 8 +- xcube_geodb_openeo/api/context.py | 21 +- xcube_geodb_openeo/core/datasource.py | 83 ------ xcube_geodb_openeo/core/geodb_datasource.py | 161 +---------- xcube_geodb_openeo/core/vectorcube.py | 70 ++--- .../core/vectorcube_provider.py | 262 ++++++++++++++++++ 7 files changed, 321 insertions(+), 286 deletions(-) delete mode 100644 xcube_geodb_openeo/core/datasource.py create mode 100644 xcube_geodb_openeo/core/vectorcube_provider.py diff --git a/environment.yml b/environment.yml index f817319..75260ee 100644 --- a/environment.yml +++ b/environment.yml @@ -9,7 +9,7 @@ dependencies: - geopandas - pandas - shapely - - xcube >= 0.13.0 + - xcube >= 1.1.1 - xcube_geodb >= 1.0.5 - geojson - yaml diff --git a/tests/core/mock_datasource.py b/tests/core/mock_datasource.py index a47153d..ea797fe 100644 --- a/tests/core/mock_datasource.py +++ b/tests/core/mock_datasource.py @@ -30,13 +30,13 @@ from pandas import DataFrame from shapely.geometry import Polygon -from xcube_geodb_openeo.core.datasource import DataSource -from xcube_geodb_openeo.core.geodb_datasource import GeoDBDataSource +from xcube_geodb_openeo.core.datasource import VectorSource +from xcube_geodb_openeo.core.geodb_datasource import GeoDBVectorSource from xcube_geodb_openeo.core.vectorcube import VectorCube import importlib.resources as resources -class MockDataSource(DataSource): +class MockVectorSource(VectorSource): # noinspection PyUnusedLocal def __init__(self, config: Mapping[str, Any]): @@ -77,7 +77,7 @@ def get_vector_cube(self, collection_id: str, with_items: bool, vector_cube['total_feature_count'] = len(collection) if with_items and collection_id != 'empty_collection': self.add_items_to_vector_cube(collection, vector_cube) - GeoDBDataSource.add_metadata( + GeoDBVectorSource.add_metadata( (8, 51, 12, 52), collection_id, DataFrame(columns=["collection", "column_name", "data_type"]), '0.3.1', vector_cube) diff --git a/xcube_geodb_openeo/api/context.py b/xcube_geodb_openeo/api/context.py index 7882bea..05d68cd 100644 --- a/xcube_geodb_openeo/api/context.py +++ b/xcube_geodb_openeo/api/context.py @@ -30,11 +30,10 @@ from xcube.server.api import ApiContext from xcube.server.api import Context -from xcube.constants import LOG -from ..core.datasource import DataSource from ..core.vectorcube import VectorCube from ..core.vectorcube import Feature +from ..core.vectorcube_provider import VectorCubeProvider from ..defaults import default_config, STAC_VERSION, STAC_EXTENSIONS, \ STAC_MAX_ITEMS_LIMIT @@ -43,7 +42,7 @@ class GeoDbContext(ApiContext): @cached_property def collection_ids(self) -> Sequence[str]: - return tuple(self.data_source.get_collection_keys()) + return tuple(self.cube_provider.get_collection_keys()) @property def config(self) -> Mapping[str, Any]: @@ -56,13 +55,13 @@ def config(self, config: Mapping[str, Any]): self._config = dict(config) @cached_property - def data_source(self) -> DataSource: + def cube_provider(self) -> VectorCubeProvider: if not self.config: raise RuntimeError('config not set') - data_source_class = self.config['geodb_openeo']['datasource_class'] - data_source_module = data_source_class[:data_source_class.rindex('.')] - class_name = data_source_class[data_source_class.rindex('.') + 1:] - module = importlib.import_module(data_source_module) + cube_provider_class = self.config['geodb_openeo']['datasource_class'] + cube_provider_module = cube_provider_class[:cube_provider_class.rindex('.')] + class_name = cube_provider_class[cube_provider_class.rindex('.') + 1:] + module = importlib.import_module(cube_provider_module) cls = getattr(module, class_name) return cls(self.config) @@ -91,8 +90,8 @@ def get_vector_cube(self, collection_id: str, with_items: bool, bbox: Optional[Tuple[float, float, float, float]], limit: Optional[int], offset: Optional[int]) \ -> VectorCube: - return self.data_source.get_vector_cube(collection_id, with_items, - bbox, limit, offset) + return self.cube_provider.get_vector_cube(collection_id, with_items, + bbox, limit, offset) @property def collections(self) -> Dict: @@ -167,7 +166,7 @@ def get_collection_item(self, base_url: str, def transform_bbox(self, collection_id: str, bbox: Tuple[float, float, float, float], crs: int) -> Tuple[float, float, float, float]: - return self.data_source.transform_bbox(collection_id, bbox, crs) + return self.cube_provider._transform_bbox(collection_id, bbox, crs) def get_collections_links(limit: int, offset: int, url: str, diff --git a/xcube_geodb_openeo/core/datasource.py b/xcube_geodb_openeo/core/datasource.py deleted file mode 100644 index d0d45e6..0000000 --- a/xcube_geodb_openeo/core/datasource.py +++ /dev/null @@ -1,83 +0,0 @@ -# The MIT License (MIT) -# Copyright (c) 2021/2022 by the xcube team and contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. - -import abc -import math -from typing import Dict, Tuple, Optional - -import shapely.geometry -import shapely.wkt -from geopandas import GeoDataFrame - -from .vectorcube import VectorCube -from ..defaults import STAC_VERSION, STAC_EXTENSIONS - - -class DataSource(abc.ABC): - - @abc.abstractmethod - def get_collection_keys(self): - pass - - @abc.abstractmethod - def get_vector_cube(self, collection_id: str, with_items: bool, - bbox: Tuple[float, float, float, float], - limit: Optional[int] = None, - offset: Optional[int] = 0) -> Optional[VectorCube]: - pass - - @staticmethod - def _get_coords(feature: Dict) -> Dict: - geometry = feature['geometry'] - feature_wkt = shapely.wkt.loads(geometry.wkt) - coords = shapely.geometry.mapping(feature_wkt) - return coords - - @staticmethod - def add_items_to_vector_cube( - collection: GeoDataFrame, vector_cube: VectorCube): - bounds = collection.bounds - for i, row in enumerate(collection.iterrows()): - bbox = bounds.iloc[i] - feature = row[1] - coords = DataSource._get_coords(feature) - properties = {} - for k, key in enumerate(feature.keys()): - if not key == 'id' and not \ - collection.dtypes.values[k].name == 'geometry': - if isinstance(feature[key], float) \ - and math.isnan(float(feature[key])): - properties[key] = 'NaN' - else: - properties[key] = feature[key] - - vector_cube['features'].append({ - 'stac_version': STAC_VERSION, - 'stac_extensions': STAC_EXTENSIONS, - 'type': 'Feature', - 'id': feature['id'], - 'bbox': [f'{bbox["minx"]:.4f}', - f'{bbox["miny"]:.4f}', - f'{bbox["maxx"]:.4f}', - f'{bbox["maxy"]:.4f}'], - 'geometry': coords, - 'properties': properties - }) \ No newline at end of file diff --git a/xcube_geodb_openeo/core/geodb_datasource.py b/xcube_geodb_openeo/core/geodb_datasource.py index 4282f5c..94a1340 100644 --- a/xcube_geodb_openeo/core/geodb_datasource.py +++ b/xcube_geodb_openeo/core/geodb_datasource.py @@ -18,162 +18,31 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. - -import os +import abc from functools import cached_property -from typing import Any, List -from typing import Mapping -from typing import Optional +from typing import Optional, List, Mapping, Any from typing import Tuple -import pandas -from pandas import DataFrame -from xcube_geodb.core.geodb import GeoDBClient, GeoDBError -from xcube.constants import LOG +from geojson.geometry import Geometry +from xcube_geodb.core.geodb import GeoDBClient + +from .vectorcube_provider import GeoDBProvider + -from .datasource import DataSource -from .vectorcube import VectorCube, VectorCubeBuilder +class DataSource(abc.ABC): + @abc.abstractmethod + def get_values(self) -> List[Geometry]: + pass -class GeoDBDataSource(DataSource): + +class GeoDBVectorSource(DataSource): def __init__(self, config: Mapping[str, Any]): self.config = config @cached_property - def geodb(self): + def geodb(self) -> GeoDBClient: assert self.config - api_config = self.config['geodb_openeo'] - server_url = api_config['postgrest_url'] - server_port = api_config['postgrest_port'] - client_id = api_config['client_id'] \ - if 'client_id' in api_config \ - else os.getenv('XC_GEODB_OPENEO_CLIENT_ID') - client_secret = api_config['client_secret'] \ - if 'client_secret' in api_config \ - else os.getenv('XC_GEODB_OPENEO_CLIENT_SECRET') - auth_domain = api_config['auth_domain'] - - return GeoDBClient( - server_url=server_url, - server_port=server_port, - client_id=client_id, - client_secret=client_secret, - auth_aud=auth_domain - ) - - def get_collection_keys(self) -> List[str]: - database_names = self.geodb.get_my_databases().get('name').array - collections = None - for n in database_names: - if collections is not None: - pandas.concat([collections, self.geodb.get_my_collections(n)]) - else: - collections = self.geodb.get_my_collections(n) - return collections.get('collection') - - def get_vector_cube(self, collection_id: str, with_items: bool, - bbox: Tuple[float, float, float, float] = None, - limit: Optional[int] = None, offset: Optional[int] = - 0) \ - -> Optional[VectorCube]: - LOG.debug(f'Building vector cube for collection {collection_id}...') - try: - collection_info = self.geodb.get_collection_info(collection_id) - except GeoDBError: - return None - builder = VectorCubeBuilder(collection_id) - builder.base_info = collection_info - time_var_name = builder.get_time_var_name() - query = f'select=geometry,{time_var_name}' if time_var_name \ - else 'select=geometry' - gdf = self.geodb.get_collection(collection_id, - query=query, - limit=limit, - offset=offset) - if bbox: - gdf = gdf.cx[bbox[0]:bbox[1], bbox[2]:bbox[3]] - builder.geometries = gdf['geometry'] - builder.times = gdf[time_var_name] - builder.count = gdf.count() - builder.set_z_dim() - vector_cube = builder.build() - - if with_items: - if bbox: - items = self.geodb.get_collection_by_bbox(collection_id, bbox, - limit=limit, - offset=offset) - else: - items = self.geodb.get_collection(collection_id, limit=limit, - offset=offset) - - vector_cube['total_feature_count'] = len(items) - self.add_items_to_vector_cube(items, vector_cube) - - LOG.debug(f' starting to get collection bbox...') - collection_bbox = self.geodb.get_collection_bbox(collection_id) - if collection_bbox: - collection_bbox = self.transform_bbox_crs(collection_bbox, - collection_id) - if not collection_bbox: - collection_bbox = self.geodb.get_collection_bbox(collection_id, - exact=True) - if collection_bbox: - collection_bbox = self.transform_bbox_crs(collection_bbox, - collection_id) - - LOG.debug(f' ...done getting collection bbox.') - - properties = self.geodb.get_properties(collection_id) - - self.add_metadata(collection_bbox, collection_id, properties, - None, vector_cube) - LOG.debug("...done building vector cube.") - return vector_cube - - def transform_bbox_crs(self, collection_bbox, collection_id): - srid = self.geodb.get_collection_srid(collection_id) - if srid is not None and srid != '4326': - collection_bbox = self.geodb.transform_bbox_crs( - collection_bbox, - srid, '4326' - ) - return collection_bbox - - @staticmethod - def add_metadata(collection_bbox: Tuple, collection_id: str, - properties: DataFrame, version: Optional[str], - vector_cube: VectorCube): - summaries = { - 'properties': [] - } - for p in properties['column_name'].to_list(): - summaries['properties'].append({'name': p}) - vector_cube['metadata'] = { - 'title': collection_id, - 'extent': { - 'spatial': { - 'bbox': [collection_bbox], - 'crs': 'http://www.opengis.net/def/crs/OGC/1.3/CRS84' - }, - 'temporal': { - 'interval': [[None, None]] - # todo - maybe define a list of possible property names to - # scan for the temporal interval, such as start_date, - # end_date, - } - }, - 'summaries': summaries - } - if version: - vector_cube['metadata']['version'] = version - - def transform_bbox(self, collection_id: str, - bbox: Tuple[float, float, float, float], - crs: int) -> Tuple[float, float, float, float]: - srid = self.geodb.get_collection_srid(collection_id) - if srid == crs: - return bbox - return self.geodb.transform_bbox_crs(bbox, crs, srid) + return GeoDBProvider.create_geodb_client(api_config) diff --git a/xcube_geodb_openeo/core/vectorcube.py b/xcube_geodb_openeo/core/vectorcube.py index f9785c9..ae7fc3d 100644 --- a/xcube_geodb_openeo/core/vectorcube.py +++ b/xcube_geodb_openeo/core/vectorcube.py @@ -19,12 +19,14 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. from datetime import datetime -from typing import Any, Optional +from typing import Any, Optional, Tuple from typing import Dict from typing import List from geojson.geometry import Geometry import dask.dataframe as dd +from pandas import DataFrame +from xcube_geodb_openeo.core.geodb_datasource import DataSource # VectorCube = Dict[str, Any] # @@ -54,8 +56,14 @@ class VectorCube: The actual values within this VectorCube are provided by a dask Dataframe. """ - def __init__(self, identifier: str) -> None: + def __init__(self, identifier: str, datasource: DataSource) -> None: self._id = identifier + self._datasource = datasource + self._metadata = {} + self._version = '' + self._vector_dim = [] + self._vertical_dim = [] + self._time_dim = [] @property def id(self) -> str: @@ -76,12 +84,13 @@ def vector_dim(self) -> List[Geometry]: # shall we return GeoJSON? Or CovJSON? - use what's best suited for internal use - go with GeoJSON first - # shall support lazy loading: read values and dimensions only when asked for, i.e. when this method is called + # no need for lazy loading: we want to read the geometries at once as + they form the cube. So they can be read while building the cube. :return: list of geojson geometries, which all together form the vector dimension """ - return self._vector_dim or self._read_vector_dim() + return self._vector_dim @property def vertical_dim(self) -> List[Any]: @@ -91,7 +100,7 @@ def vertical_dim(self) -> List[Any]: cube does not have a vertical dimension, returns an empty list. :return: list of dimension values, typically a list of float values. """ - pass + return self._vertical_dim @property def time_dim(self) -> List[datetime]: @@ -100,50 +109,29 @@ def time_dim(self) -> List[datetime]: datetime objects. If the vector cube does not have a time dimension, an empty list is returned. """ - pass - + return self._time_dim @property def values(self): """ - Returns the plain values array. If not yet loaded, get from geoDB. + Returns the plain values array. If not yet loaded, do it now. :return: """ - self.datasource.load_data() - - def _read_vector_dim(self): - self.datasource.load_data() + return self._values +''' + if with_items: + if bbox: + items = self.geodb.get_collection_by_bbox(collection_id, bbox, + limit=limit, + offset=offset) + else: + items = self.geodb.get_collection(collection_id, limit=limit, + offset=offset) -class VectorCubeBuilder: + vector_cube['total_feature_count'] = len(items) + self.add_items_to_vector_cube(items, vector_cube) - def __init__(self, collection_id: str) -> None: - self._collection_id = collection_id - self._geometries = None - self.base_info = {} - @property - def geometries(self) -> List[Geometry]: - return self._geometries - - @geometries.setter - def geometries(self, geometries: List[Geometry]): - self._geometries = geometries - - def build(self) -> VectorCube: - return VectorCube(self._collection_id, - self.datasource) - - def get_time_var_name(self) -> Optional[str]: - for key in self.base_info['properties'].keys(): - if key == 'date' or key == 'time' or key == 'timestamp' \ - or key == 'datetime': - return key - return None - - def set_z_dim(self): - for key in self.base_info['properties'].keys(): - if key == 'z' or key == 'vertical': - return key - return None +''' diff --git a/xcube_geodb_openeo/core/vectorcube_provider.py b/xcube_geodb_openeo/core/vectorcube_provider.py new file mode 100644 index 0000000..1bcde92 --- /dev/null +++ b/xcube_geodb_openeo/core/vectorcube_provider.py @@ -0,0 +1,262 @@ +# The MIT License (MIT) +# Copyright (c) 2021/2022 by the xcube team and contributors +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +import abc +import math +import os +from functools import cached_property +from typing import Dict, Tuple, Optional, List, Mapping, Any + +import shapely.geometry +import shapely.wkt +from geopandas import GeoDataFrame +from pandas import DataFrame + +from .geodb_datasource import GeoDBVectorSource +from ..defaults import STAC_VERSION, STAC_EXTENSIONS + +import pandas +from xcube_geodb.core.geodb import GeoDBClient, GeoDBError +from xcube.constants import LOG + +from .vectorcube import VectorCube + + +class VectorCubeProvider(abc.ABC): + + @abc.abstractmethod + def get_collection_keys(self): + pass + + @abc.abstractmethod + def get_vector_cube(self, collection_id: str, with_items: bool, + bbox: Tuple[float, float, float, float], + limit: Optional[int] = None, + offset: Optional[int] = 0) -> Optional[VectorCube]: + pass + + @staticmethod + def _get_coords(feature: Dict) -> Dict: + geometry = feature['geometry'] + feature_wkt = shapely.wkt.loads(geometry.wkt) + coords = shapely.geometry.mapping(feature_wkt) + return coords + + @staticmethod + def add_items_to_vector_cube( + collection: GeoDataFrame, vector_cube: VectorCube): + bounds = collection.bounds + for i, row in enumerate(collection.iterrows()): + bbox = bounds.iloc[i] + feature = row[1] + coords = VectorCubeProvider._get_coords(feature) + properties = {} + for k, key in enumerate(feature.keys()): + if not key == 'id' and not \ + collection.dtypes.values[k].name == 'geometry': + if isinstance(feature[key], float) \ + and math.isnan(float(feature[key])): + properties[key] = 'NaN' + else: + properties[key] = feature[key] + + vector_cube['features'].append({ + 'stac_version': STAC_VERSION, + 'stac_extensions': STAC_EXTENSIONS, + 'type': 'Feature', + 'id': feature['id'], + 'bbox': [f'{bbox["minx"]:.4f}', + f'{bbox["miny"]:.4f}', + f'{bbox["maxx"]:.4f}', + f'{bbox["maxy"]:.4f}'], + 'geometry': coords, + 'properties': properties + }) + + +class GeoDBProvider(VectorCubeProvider): + + def __init__(self, config: Mapping[str, Any]): + self.config = config + + @staticmethod + def create_geodb_client(api_config: dict) -> GeoDBClient: + server_url = api_config['postgrest_url'] + server_port = api_config['postgrest_port'] + client_id = api_config['client_id'] \ + if 'client_id' in api_config \ + else os.getenv('XC_GEODB_OPENEO_CLIENT_ID') + client_secret = api_config['client_secret'] \ + if 'client_secret' in api_config \ + else os.getenv('XC_GEODB_OPENEO_CLIENT_SECRET') + auth_domain = api_config['auth_domain'] + + return GeoDBClient( + server_url=server_url, + server_port=server_port, + client_id=client_id, + client_secret=client_secret, + auth_aud=auth_domain + ) + + @cached_property + def geodb(self) -> GeoDBClient: + assert self.config + api_config = self.config['geodb_openeo'] + return GeoDBProvider.create_geodb_client(api_config) + + def get_collection_keys(self) -> List[str]: + database_names = self.geodb.get_my_databases().get('name').array + collections = None + for n in database_names: + if collections is not None: + pandas.concat([collections, self.geodb.get_my_collections(n)]) + else: + collections = self.geodb.get_my_collections(n) + return collections.get('collection') + + def get_vector_cube(self, collection_id: str, with_items: bool, + bbox: Tuple[float, float, float, float] = None, + limit: Optional[int] = None, offset: Optional[int] = + 0) \ + -> Optional[VectorCube]: + LOG.debug(f'Building vector cube for collection {collection_id}...') + try: + collection_info = self.geodb.get_collection_info(collection_id) + except GeoDBError: + return None + + vector_cube = VectorCube(collection_id, GeoDBVectorSource(self.config)) + time_var_name = self._get_col_name( + collection_info, ['date', 'time', 'timestamp', 'datetime']) + vertical_dim_name = self._get_col_name( + collection_info, ['z', 'vertical']) + time_var_appendix = f',{time_var_name}' if time_var_name else '' + z_dim_appendix = f',{vertical_dim_name}' if vertical_dim_name else '' + select = f'geometry{time_var_appendix}{z_dim_appendix}' + if bbox: + srid = self.geodb.get_collection_srid(collection_id) + where = f'ST_Intersects(geometry, ST_GeomFromText(\'POLYGON((' \ + f'{bbox[0]},{bbox[1]},' \ + f'{bbox[0]},{bbox[3]},' \ + f'{bbox[2]},{bbox[3]},' \ + f'{bbox[2]},{bbox[1]},' \ + f'{bbox[0]},{bbox[1]},' \ + f'))\',' \ + f'{srid}))' + gdf = self.geodb.get_collection_pg(collection_id, + select=select, + where=where, + limit=limit, + offset=offset) + else: + gdf = self.geodb.get_collection_pg(collection_id, + select=select, + limit=limit, offset=offset) + LOG.debug(f' ...done.') + vector_cube._vector_dim = gdf['geometry'] + vector_cube._vertical_dim = gdf[vertical_dim_name] + vector_cube._time_dim = gdf[time_var_name] + LOG.debug(f' counting collection items...') + count = self.geodb.count_collection_by_bbox(collection_id, bbox) \ + if bbox \ + else self.geodb.count_collection_rows(collection_id, + exact_count=True) + LOG.debug(f' ...done.') + + collection_bbox = self._get_collection_bbox(collection_id) + properties = self.geodb.get_properties(collection_id) + + metadata = self._create_metadata(properties, collection_id, + collection_bbox, count) + + vector_cube._metadata = metadata + LOG.debug("...done building vector cube.") + return vector_cube + + def _get_collection_bbox(self, collection_id: str): + LOG.debug(f' starting to get collection bbox...') + collection_bbox = self.geodb.get_collection_bbox(collection_id) + if collection_bbox: + collection_bbox = self._transform_bbox_crs(collection_bbox, + collection_id) + if not collection_bbox: + collection_bbox = self.geodb.get_collection_bbox(collection_id, + exact=True) + if collection_bbox: + collection_bbox = self._transform_bbox_crs(collection_bbox, + collection_id) + + LOG.debug(f' ...done getting collection bbox.') + return collection_bbox + + def _transform_bbox(self, collection_id: str, + bbox: Tuple[float, float, float, float], + crs: int) -> Tuple[float, float, float, float]: + srid = self.geodb.get_collection_srid(collection_id) + if srid == crs: + return bbox + return self.geodb.transform_bbox_crs(bbox, crs, srid) + + def _transform_bbox_crs(self, collection_bbox, collection_id): + srid = self.geodb.get_collection_srid(collection_id) + if srid is not None and srid != '4326': + collection_bbox = self.geodb.transform_bbox_crs( + collection_bbox, + srid, '4326' + ) + return collection_bbox + + @staticmethod + def _get_col_name(collection_info: dict, possible_names: List[str])\ + -> Optional[str]: + for key in collection_info['properties'].keys(): + if key in possible_names: + return key + return None + + @staticmethod + def _create_metadata(properties: DataFrame, collection_id: str, + collection_bbox: Tuple[float, float, float, float], + count: int) -> {}: + summaries = { + 'properties': [] + } + for p in properties['column_name'].to_list(): + summaries['properties'].append({'name': p}) + metadata = { + 'title': collection_id, + 'extent': { + 'spatial': { + 'bbox': [collection_bbox], + 'crs': 'http://www.opengis.net/def/crs/OGC/1.3/CRS84' + }, + 'temporal': { + 'interval': [[None, None]] + # todo - maybe define a list of possible property names to + # scan for the temporal interval, such as start_date, + # end_date, + } + }, + 'summaries': summaries, + 'total_feature_count': count + } + return metadata From b5a4eb3a5470551fe927e4708f9b735e39c6822c Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 3 Jul 2023 16:11:42 +0200 Subject: [PATCH 106/163] continue dev, still intermediate --- xcube_geodb_openeo/api/context.py | 98 +++++---- xcube_geodb_openeo/api/routes.py | 34 +-- xcube_geodb_openeo/core/geodb_datasource.py | 197 +++++++++++++++++- xcube_geodb_openeo/core/tools.py | 75 +++++++ xcube_geodb_openeo/core/vectorcube.py | 102 +++++---- .../core/vectorcube_provider.py | 173 +++------------ xcube_geodb_openeo/defaults.py | 3 + 7 files changed, 434 insertions(+), 248 deletions(-) create mode 100644 xcube_geodb_openeo/core/tools.py diff --git a/xcube_geodb_openeo/api/context.py b/xcube_geodb_openeo/api/context.py index 05d68cd..3a62bba 100644 --- a/xcube_geodb_openeo/api/context.py +++ b/xcube_geodb_openeo/api/context.py @@ -21,28 +21,29 @@ import datetime import importlib from functools import cached_property -from typing import Any +from typing import Any, List from typing import Dict from typing import Mapping from typing import Optional -from typing import Sequence from typing import Tuple from xcube.server.api import ApiContext from xcube.server.api import Context -from ..core.vectorcube import VectorCube +from ..core.tools import Cache from ..core.vectorcube import Feature +from ..core.vectorcube import VectorCube from ..core.vectorcube_provider import VectorCubeProvider from ..defaults import default_config, STAC_VERSION, STAC_EXTENSIONS, \ - STAC_MAX_ITEMS_LIMIT + STAC_MAX_ITEMS_LIMIT, DEFAULT_VC_CACHE_SIZE, \ + MAX_NUMBER_OF_GEOMETRIES_DISPLAYED class GeoDbContext(ApiContext): @cached_property - def collection_ids(self) -> Sequence[str]: - return tuple(self.cube_provider.get_collection_keys()) + def collection_ids(self) -> List[Tuple[str, str]]: + return self.cube_provider.get_collection_keys() @property def config(self) -> Mapping[str, Any]: @@ -82,16 +83,20 @@ def __init__(self, root: Context): self.config['geodb_openeo'] = unfrozen_dict unfrozen_dict[key] = default_config[key] self._collections = {} + self._vector_cube_cache = Cache(DEFAULT_VC_CACHE_SIZE) def update(self, prev_ctx: Optional["Context"]): pass - def get_vector_cube(self, collection_id: str, with_items: bool, - bbox: Optional[Tuple[float, float, float, float]], - limit: Optional[int], offset: Optional[int]) \ + def get_vector_cube(self, collection_id: Tuple[str, str], + bbox: Optional[Tuple[float, float, float, float]]) \ -> VectorCube: - return self.cube_provider.get_vector_cube(collection_id, with_items, - bbox, limit, offset) + vector_cube = self._vector_cube_cache.get((collection_id, bbox)) + if vector_cube: + return vector_cube + vector_cube = self.cube_provider.get_vector_cube(collection_id, bbox) + self._vector_cube_cache.insert((collection_id, bbox), vector_cube) + return vector_cube @property def collections(self) -> Dict: @@ -109,9 +114,7 @@ def fetch_collections(self, base_url: str, limit: int, offset: int): len(self.collection_ids)) collection_list = [] for collection_id in self.collection_ids[offset:offset + limit]: - vector_cube = self.get_vector_cube(collection_id, with_items=False, - bbox=None, limit=limit, - offset=offset) + vector_cube = self.get_vector_cube(collection_id, bbox=None) collection = _get_vector_cube_collection(base_url, vector_cube) collection_list.append(collection) @@ -121,53 +124,43 @@ def fetch_collections(self, base_url: str, limit: int, offset: int): } def get_collection(self, base_url: str, - collection_id: str): - vector_cube = self.get_vector_cube(collection_id, with_items=False, - bbox=None, limit=None, offset=0) + collection_dn: Tuple[str, str]): + vector_cube = self.get_vector_cube(collection_dn, bbox=None) if vector_cube: return _get_vector_cube_collection(base_url, vector_cube) else: return None - def get_collection_items(self, base_url: str, - collection_id: str, limit: int, offset: int, - bbox: Optional[Tuple[float, float, float, - float]] = None): + def get_collection_items( + self, base_url: str, collection_id: Tuple[str, str], limit: int, + offset: int, bbox: Optional[Tuple[float, float, float, float]] + = None): _validate(limit) - vector_cube = self.get_vector_cube(collection_id, with_items=True, - bbox=bbox, limit=limit, - offset=offset) + vector_cube = self.get_vector_cube(collection_id, bbox=bbox) stac_features = [ _get_vector_cube_item(base_url, vector_cube, feature) - for feature in vector_cube.get('features', []) + for feature in vector_cube.load_features(limit, offset) ] return { 'type': 'FeatureCollection', 'features': stac_features, 'timeStamp': _utc_now(), - 'numberMatched': vector_cube['total_feature_count'], + 'numberMatched': vector_cube.metadata['total_feature_count'], 'numberReturned': len(stac_features), } def get_collection_item(self, base_url: str, - collection_id: str, + collection_id: Tuple[str, str], feature_id: str): - # nah. use different geodb-function, don't get full vector cube - vector_cube = self.get_vector_cube(collection_id, with_items=True, - bbox=None, limit=None, offset=0) - for feature in vector_cube.get('features', []): - if str(feature.get('id')) == feature_id: - return _get_vector_cube_item(base_url, vector_cube, feature) + vector_cube = self.get_vector_cube(collection_id, bbox=None) + feature = vector_cube.get_feature(feature_id) + if feature: + return _get_vector_cube_item(base_url, vector_cube, feature) raise ItemNotFoundException( f'feature {feature_id!r} not found in collection {collection_id!r}' ) - def transform_bbox(self, collection_id: str, - bbox: Tuple[float, float, float, float], - crs: int) -> Tuple[float, float, float, float]: - return self.cube_provider._transform_bbox(collection_id, bbox, crs) - def get_collections_links(limit: int, offset: int, url: str, collection_count: int): @@ -201,8 +194,16 @@ def get_collections_links(limit: int, offset: int, url: str, def _get_vector_cube_collection(base_url: str, vector_cube: VectorCube): - vector_cube_id = vector_cube['id'] - metadata = vector_cube.get('metadata', {}) + vector_cube_id = vector_cube.id + metadata = vector_cube.metadata + v_dim = vector_cube.get_vector_dim() + if len(v_dim) > MAX_NUMBER_OF_GEOMETRIES_DISPLAYED: + start = ','.join(str(v_dim[0:2])) + v_dim = f'{start}...{v_dim[-1]}' + z_dim = vector_cube.get_vertical_dim() + axes = ['x', 'y', 'z'] if z_dim else ['x', 'y'] + bbox = vector_cube.get_bbox() + vector_cube_collection = { 'stac_version': STAC_VERSION, 'stac_extensions': STAC_EXTENSIONS, @@ -215,7 +216,14 @@ def _get_vector_cube_collection(base_url: str, 'keywords': metadata.get('keywords', []), 'providers': metadata.get('providers', []), 'extent': metadata.get('extent', {}), - 'cube:dimensions': {'vector_dim': {'type': 'other'}}, + 'cube:dimensions': { + 'vector': { + 'type': 'geometry', + 'axes': axes, + 'bbox': str(bbox), + "values": v_dim, + } + }, 'summaries': metadata.get('summaries', {}), 'links': [ { @@ -235,13 +243,14 @@ def _get_vector_cube_collection(base_url: str, def _get_vector_cube_item(base_url: str, vector_cube: VectorCube, feature: Feature): - collection_id = vector_cube['id'] + collection_id = vector_cube.id feature_id = feature['id'] feature_bbox = feature.get('bbox') feature_geometry = feature.get('geometry') feature_properties = feature.get('properties', {}) + feature_datetime = feature.get('datetime') if 'datetime' in feature else None - return { + item = { 'stac_version': STAC_VERSION, 'stac_extensions': STAC_EXTENSIONS, 'type': 'Feature', @@ -259,6 +268,9 @@ def _get_vector_cube_item(base_url: str, vector_cube: VectorCube, ], 'assets': {} } + if feature_datetime: + item['datetime'] = feature_datetime + return item def _utc_now(): diff --git a/xcube_geodb_openeo/api/routes.py b/xcube_geodb_openeo/api/routes.py index df89885..cf8e789 100644 --- a/xcube_geodb_openeo/api/routes.py +++ b/xcube_geodb_openeo/api/routes.py @@ -25,17 +25,17 @@ from .api import api from xcube.server.api import ApiHandler from xcube.server.api import ApiError -from ..defaults import STAC_DEFAULT_COLLECTIONS_LIMIT +from ..defaults import STAC_DEFAULT_COLLECTIONS_LIMIT, STAC_DEFAULT_ITEMS_LIMIT -def get_limit(request): +def get_limit(request, default: int) -> int: limit = int(request.get_query_arg('limit')) if \ request.get_query_arg('limit') \ - else STAC_DEFAULT_COLLECTIONS_LIMIT + else default return limit -def get_offset(request): +def get_offset(request) -> int: return int(request.get_query_arg('offset')) if \ request.get_query_arg('offset') \ else 0 @@ -194,11 +194,10 @@ def get(self): items that are presented in the response document. offset (int): Collections are listed starting at offset. """ - limit = get_limit(self.request) + limit = get_limit(self.request, STAC_DEFAULT_COLLECTIONS_LIMIT) offset = get_offset(self.request) base_url = get_base_url(self.request) - if not self.ctx.collections: - self.ctx.fetch_collections(base_url, limit, offset) + self.ctx.fetch_collections(base_url, limit, offset) self.response.finish(self.ctx.collections) @@ -214,7 +213,9 @@ def get(self, collection_id: str): Lists the collection information. """ base_url = get_base_url(self.request) - collection = self.ctx.get_collection(base_url, collection_id) + db = collection_id.split('~')[0] + name = collection_id.split('~')[1] + collection = self.ctx.get_collection(base_url, (db, name)) if collection: self.response.finish(collection) else: @@ -240,26 +241,31 @@ def get(self, collection_id: str): bbox (array of numbers): Only features that intersect the bounding box are selected. Example: bbox=160.6,-55.95,-170,-25.89 """ - limit = get_limit(self.request) + limit = get_limit(self.request, STAC_DEFAULT_ITEMS_LIMIT) offset = get_offset(self.request) bbox = get_bbox(self.request) base_url = get_base_url(self.request) - items = self.ctx.get_collection_items(base_url, collection_id, + db = collection_id.split('~')[0] + name = collection_id.split('~')[1] + items = self.ctx.get_collection_items(base_url, (db, name), limit, offset, bbox) self.response.finish(items) -@api.route('/collections/{collection_id}/items/{feature_id}') +@api.route('/collections/{collection_id}/items/{item_id}') class FeatureHandler(ApiHandler): """ - Fetch a single feature. + Fetch a single item. """ - def get(self, collection_id: str, feature_id: str): + def get(self, collection_id: str, item_id: str): """ Returns the feature. """ + feature_id = item_id + db = collection_id.split('~')[0] + name = collection_id.split('~')[1] base_url = get_base_url(self.request) - feature = self.ctx.get_collection_item(base_url, collection_id, + feature = self.ctx.get_collection_item(base_url, (db, name), feature_id) self.response.finish(feature) diff --git a/xcube_geodb_openeo/core/geodb_datasource.py b/xcube_geodb_openeo/core/geodb_datasource.py index 94a1340..43c24e9 100644 --- a/xcube_geodb_openeo/core/geodb_datasource.py +++ b/xcube_geodb_openeo/core/geodb_datasource.py @@ -19,30 +19,213 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. import abc +from datetime import datetime from functools import cached_property -from typing import Optional, List, Mapping, Any -from typing import Tuple +from typing import List, Mapping, Any, Optional, Tuple, Dict +import dateutil.parser +import shapely from geojson.geometry import Geometry -from xcube_geodb.core.geodb import GeoDBClient +from pandas import Series +from xcube.constants import LOG +from xcube_geodb.core.geodb import GeoDBClient, GeoDBError -from .vectorcube_provider import GeoDBProvider +from .tools import create_geodb_client +from ..defaults import STAC_VERSION, STAC_EXTENSIONS, STAC_DEFAULT_ITEMS_LIMIT + +Feature = Dict[str, Any] class DataSource(abc.ABC): @abc.abstractmethod - def get_values(self) -> List[Geometry]: + def get_geometry(self, + bbox: Optional[Tuple[float, float, float, float]] = None + ) -> List[Geometry]: + pass + + @abc.abstractmethod + def get_time_dim( + self, + bbox: Optional[Tuple[float, float, float, float]] = None) \ + -> List[datetime]: + pass + + @abc.abstractmethod + def get_vertical_dim( + self, + bbox: Optional[Tuple[float, float, float, float]] = None) \ + -> List[Any]: + pass + + @abc.abstractmethod + def load_features(self, limit: int = STAC_DEFAULT_ITEMS_LIMIT, + offset: int = 0, + feature_id: Optional[str] = None) -> List[Feature]: pass class GeoDBVectorSource(DataSource): - def __init__(self, config: Mapping[str, Any]): + def __init__(self, config: Mapping[str, Any], + collection_id: Tuple[str, str]): self.config = config + self.collection_id = collection_id @cached_property def geodb(self) -> GeoDBClient: assert self.config api_config = self.config['geodb_openeo'] - return GeoDBProvider.create_geodb_client(api_config) + return create_geodb_client(api_config) + + @cached_property + def collection_info(self): + (db, name) = self.collection_id + try: + collection_info = self.geodb.get_collection_info(name, db) + except GeoDBError: + return None # todo - raise meaningful error + return collection_info + + def load_features(self, limit: int = STAC_DEFAULT_ITEMS_LIMIT, + offset: int = 0, + feature_id: Optional[str] = None) -> List[Feature]: + LOG.debug(f'Loading features of collection {self.collection_id} from ' + f'geoDB...') + (db, name) = self.collection_id + select = 'id,geometry' + time = self._get_col_name(['date', 'time', 'timestamp', 'datetime']) + if time: + select = f'{select},{time}' + if feature_id: + gdf = self.geodb.get_collection_pg( + name, select=select, where=f'id = {feature_id}', database=db) + else: + gdf = self.geodb.get_collection_pg( + name, select=select, limit=limit, offset=offset, database=db) + + features = [] + + for i, row in enumerate(gdf.iterrows()): + bbox = gdf.bounds.iloc[i] + coords = self._get_coords(row[1]) + properties = list(gdf.columns) + + feature = { + 'stac_version': STAC_VERSION, + 'stac_extensions': STAC_EXTENSIONS, + 'type': 'Feature', + 'id': str(row[1]['id']), + 'bbox': [f'{bbox["minx"]:.4f}', + f'{bbox["miny"]:.4f}', + f'{bbox["maxx"]:.4f}', + f'{bbox["maxy"]:.4f}'], + 'geometry': coords, + 'properties': properties + } + if time: + feature['datetime'] = row[1][time] + features.append(feature) + LOG.debug('...done.') + return features + + def get_geometry(self, + bbox: Optional[Tuple[float, float, float, float]] = None + ) -> List[Geometry]: + select = f'geometry' + LOG.debug(f'Loading geometry for {self.collection_id} from geoDB...') + if bbox: + gdf = self._fetch_from_geodb(select, bbox) + else: + (db, name) = self.collection_id + gdf = self.geodb.get_collection_pg( + name, select=select, group=select, database=db) + LOG.debug('...done.') + + return list(gdf['geometry']) + + def get_time_dim( + self, bbox: Optional[Tuple[float, float, float, float]] = None) \ + -> Optional[List[datetime]]: + select = self._get_col_name(['date', 'time', 'timestamp', 'datetime']) + if not select: + return None + if bbox: + gdf = self._fetch_from_geodb(select, bbox) + else: + (db, name) = self.collection_id + gdf = self.geodb.get_collection_pg( + name, select=select, database=db) + + return [dateutil.parser.parse(d) for d in gdf[select]] + + def get_vertical_dim( + self, bbox: Optional[Tuple[float, float, float, float]] = None) \ + -> List[Any]: + pass + + def _get_vector_cube_bbox(self): + (db, name) = self.collection_id + LOG.debug(f'Loading collection bbox for {self.collection_id} from ' + f'geoDB...') + vector_cube_bbox = self.geodb.get_vector_cube_bbox(name, database=db) + if vector_cube_bbox: + vector_cube_bbox = self._transform_bbox_crs(vector_cube_bbox, + name, db) + if not vector_cube_bbox: + vector_cube_bbox = self.geodb.get_vector_cube_bbox(name, db, + exact=True) + if vector_cube_bbox: + vector_cube_bbox = self._transform_bbox_crs(vector_cube_bbox, + name, db) + + LOG.debug(f'...done.') + return vector_cube_bbox + + def _transform_bbox(self, collection_id: Tuple[str, str], + bbox: Tuple[float, float, float, float], + crs: int) -> Tuple[float, float, float, float]: + (db, name) = collection_id + srid = self.geodb.get_collection_srid(name, database=db) + if srid == crs: + return bbox + return self.geodb.transform_bbox_crs(bbox, crs, srid) + + def _transform_bbox_crs(self, collection_bbox, name: str, db: str): + srid = self.geodb.get_collection_srid(name, database=db) + if srid is not None and srid != '4326': + collection_bbox = self.geodb.transform_bbox_crs( + collection_bbox, + srid, '4326' + ) + return collection_bbox + + def _get_col_name(self, possible_names: List[str]) -> Optional[str]: + for key in self.collection_info['properties'].keys(): + if key in possible_names: + return key + return None + + def _fetch_from_geodb(self, select: str, + bbox: Tuple[float, float, float, float]): + (db, name) = self.collection_id + srid = self.geodb.get_collection_srid(name, database=db) + where = f'ST_Intersects(geometry, ST_GeomFromText(\'POLYGON((' \ + f'{bbox[0]},{bbox[1]},' \ + f'{bbox[0]},{bbox[3]},' \ + f'{bbox[2]},{bbox[3]},' \ + f'{bbox[2]},{bbox[1]},' \ + f'{bbox[0]},{bbox[1]},' \ + f'))\',' \ + f'{srid}))' + return self.geodb.get_collection_pg(name, + select=select, + where=where, + group=select, + database=db) + + @staticmethod + def _get_coords(feature: Series) -> Dict: + geometry = feature['geometry'] + feature_wkt = shapely.wkt.loads(geometry.wkt) + return shapely.geometry.mapping(feature_wkt) diff --git a/xcube_geodb_openeo/core/tools.py b/xcube_geodb_openeo/core/tools.py new file mode 100644 index 0000000..afb2d85 --- /dev/null +++ b/xcube_geodb_openeo/core/tools.py @@ -0,0 +1,75 @@ +# The MIT License (MIT) +# Copyright (c) 2021/2022 by the xcube team and contributors +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +import os +from typing import Optional, TypeVar +from typing import OrderedDict, Hashable + +from xcube_geodb.core.geodb import GeoDBClient + + +def create_geodb_client(api_config: dict) -> GeoDBClient: + server_url = api_config['postgrest_url'] + server_port = api_config['postgrest_port'] + client_id = api_config['client_id'] \ + if 'client_id' in api_config \ + else os.getenv('XC_GEODB_OPENEO_CLIENT_ID') + client_secret = api_config['client_secret'] \ + if 'client_secret' in api_config \ + else os.getenv('XC_GEODB_OPENEO_CLIENT_SECRET') + auth_domain = api_config['auth_domain'] + + return GeoDBClient( + server_url=server_url, + server_port=server_port, + client_id=client_id, + client_secret=client_secret, + auth_aud=auth_domain + ) + + +T = TypeVar('T') + + +class Cache: + def __init__(self, capacity: int): + self.capacity = capacity + self._cache: OrderedDict[Hashable, T] = OrderedDict() + + def get(self, key: Hashable) -> Optional[T]: + if key not in self._cache: + return None + self._cache.move_to_end(key) + return self._cache[key] + + def insert(self, key: Hashable, item: T) -> None: + if len(self._cache) == self.capacity: + self._cache.popitem(last=False) + self._cache[key] = item + self._cache.move_to_end(key) + + def clear(self) -> None: + self._cache.clear() + + def get_keys(self): + return list(self._cache.keys()) + + def __len__(self) -> int: + return len(self._cache) diff --git a/xcube_geodb_openeo/core/vectorcube.py b/xcube_geodb_openeo/core/vectorcube.py index ae7fc3d..0d2321a 100644 --- a/xcube_geodb_openeo/core/vectorcube.py +++ b/xcube_geodb_openeo/core/vectorcube.py @@ -20,17 +20,13 @@ # DEALINGS IN THE SOFTWARE. from datetime import datetime from typing import Any, Optional, Tuple -from typing import Dict from typing import List from geojson.geometry import Geometry -import dask.dataframe as dd -from pandas import DataFrame +from xcube.constants import LOG -from xcube_geodb_openeo.core.geodb_datasource import DataSource +from xcube_geodb_openeo.core.geodb_datasource import DataSource, Feature +from xcube_geodb_openeo.core.tools import Cache -# VectorCube = Dict[str, Any] -# -Feature = Dict[str, Any] class VectorCube: @@ -56,10 +52,13 @@ class VectorCube: The actual values within this VectorCube are provided by a dask Dataframe. """ - def __init__(self, identifier: str, datasource: DataSource) -> None: - self._id = identifier + def __init__(self, collection_dn: Tuple[str, str], + datasource: DataSource) -> None: + (self._database, self._id) = collection_dn self._datasource = datasource self._metadata = {} + self._feature_cache = Cache(1000) + self._geometry_cache = Cache(100) self._version = '' self._vector_dim = [] self._vertical_dim = [] @@ -67,10 +66,11 @@ def __init__(self, identifier: str, datasource: DataSource) -> None: @property def id(self) -> str: - return self._id + return self._database + '~' + self._id - @property - def vector_dim(self) -> List[Geometry]: + def get_vector_dim( + self, bbox: Optional[Tuple[float, float, float, float]] = None) \ + -> List[Geometry]: """ Represents the vector dimension of the vector cube. By definition, vector data cubes have (at least) a single spatial dimension. @@ -90,48 +90,64 @@ def vector_dim(self) -> List[Geometry]: :return: list of geojson geometries, which all together form the vector dimension """ - return self._vector_dim - - @property - def vertical_dim(self) -> List[Any]: + global_key = 'GLOBAL' + if bbox and bbox in self._geometry_cache.get_keys(): + return self._geometry_cache.get(bbox) + if not bbox and global_key in self._geometry_cache.get_keys(): + return self._geometry_cache.get(global_key) + geometry = self._datasource.get_geometry(bbox) + self._geometry_cache.insert(bbox if bbox else global_key, geometry) + return geometry + + def get_vertical_dim( + self, + bbox: Optional[Tuple[float, float, float, float]] = None) \ + -> List[Any]: """ Represents the vertical geometry dimension of the vector cube, if it exists. Returns the explicit list of dimension values. If the vector cube does not have a vertical dimension, returns an empty list. :return: list of dimension values, typically a list of float values. """ - return self._vertical_dim + return self._datasource.get_vertical_dim(bbox) - @property - def time_dim(self) -> List[datetime]: + def get_time_dim( + self, bbox: Optional[Tuple[float, float, float, float]] = None) \ + -> List[datetime]: """ Returns the time dimension of the vector cube as an explicit list of datetime objects. If the vector cube does not have a time dimension, an empty list is returned. """ - return self._time_dim + return self._datasource.get_time_dim(bbox) + + def get_feature(self, feature_id: str) -> Feature: + for key in self._feature_cache.get_keys(): + for feature in self._feature_cache.get(key): + if feature['id'] == feature_id: + return feature + feature = self._datasource.load_features(feature_id=feature_id)[0] + self._feature_cache.insert(feature_id, [feature]) + return feature + + def load_features(self, limit: int, offset: int) -> List[Feature]: + LOG.debug('loading features...') + key = (limit, offset) + if key in self._feature_cache.get_keys(): + LOG.debug('...returning from cache - done!') + return self._feature_cache.get(key) + features = self._datasource.load_features(limit, offset) + self._feature_cache.insert(key, features) + LOG.debug('...read from geoDB.') + return features + + def get_bbox(self): + LOG.debug(f'loading bounding box for vector cube {self.id}....') + if self.bbox: + return self.bbox + self.bbox = self._datasource._get_vector_cube_bbox() + return self.bbox @property - def values(self): - """ - Returns the plain values array. If not yet loaded, do it now. - - :return: - """ - return self._values - -''' - if with_items: - if bbox: - items = self.geodb.get_collection_by_bbox(collection_id, bbox, - limit=limit, - offset=offset) - else: - items = self.geodb.get_collection(collection_id, limit=limit, - offset=offset) - - vector_cube['total_feature_count'] = len(items) - self.add_items_to_vector_cube(items, vector_cube) - - -''' + def metadata(self): + return self._metadata diff --git a/xcube_geodb_openeo/core/vectorcube_provider.py b/xcube_geodb_openeo/core/vectorcube_provider.py index 1bcde92..123f51c 100644 --- a/xcube_geodb_openeo/core/vectorcube_provider.py +++ b/xcube_geodb_openeo/core/vectorcube_provider.py @@ -21,7 +21,6 @@ import abc import math -import os from functools import cached_property from typing import Dict, Tuple, Optional, List, Mapping, Any @@ -29,37 +28,27 @@ import shapely.wkt from geopandas import GeoDataFrame from pandas import DataFrame - -from .geodb_datasource import GeoDBVectorSource -from ..defaults import STAC_VERSION, STAC_EXTENSIONS - -import pandas -from xcube_geodb.core.geodb import GeoDBClient, GeoDBError from xcube.constants import LOG +from xcube_geodb.core.geodb import GeoDBClient +from .geodb_datasource import GeoDBVectorSource +from .tools import create_geodb_client from .vectorcube import VectorCube +from ..defaults import STAC_VERSION, STAC_EXTENSIONS class VectorCubeProvider(abc.ABC): @abc.abstractmethod - def get_collection_keys(self): + def get_collection_keys(self) -> List[Tuple[str, str]]: pass @abc.abstractmethod - def get_vector_cube(self, collection_id: str, with_items: bool, - bbox: Tuple[float, float, float, float], - limit: Optional[int] = None, - offset: Optional[int] = 0) -> Optional[VectorCube]: + def get_vector_cube(self, collection_id: Tuple[str, str], + bbox: Tuple[float, float, float, float])\ + -> Optional[VectorCube]: pass - @staticmethod - def _get_coords(feature: Dict) -> Dict: - geometry = feature['geometry'] - feature_wkt = shapely.wkt.loads(geometry.wkt) - coords = shapely.geometry.mapping(feature_wkt) - return coords - @staticmethod def add_items_to_vector_cube( collection: GeoDataFrame, vector_cube: VectorCube): @@ -97,144 +86,46 @@ class GeoDBProvider(VectorCubeProvider): def __init__(self, config: Mapping[str, Any]): self.config = config - @staticmethod - def create_geodb_client(api_config: dict) -> GeoDBClient: - server_url = api_config['postgrest_url'] - server_port = api_config['postgrest_port'] - client_id = api_config['client_id'] \ - if 'client_id' in api_config \ - else os.getenv('XC_GEODB_OPENEO_CLIENT_ID') - client_secret = api_config['client_secret'] \ - if 'client_secret' in api_config \ - else os.getenv('XC_GEODB_OPENEO_CLIENT_SECRET') - auth_domain = api_config['auth_domain'] - - return GeoDBClient( - server_url=server_url, - server_port=server_port, - client_id=client_id, - client_secret=client_secret, - auth_aud=auth_domain - ) - @cached_property def geodb(self) -> GeoDBClient: assert self.config api_config = self.config['geodb_openeo'] - return GeoDBProvider.create_geodb_client(api_config) + return create_geodb_client(api_config) - def get_collection_keys(self) -> List[str]: - database_names = self.geodb.get_my_databases().get('name').array - collections = None - for n in database_names: - if collections is not None: - pandas.concat([collections, self.geodb.get_my_collections(n)]) - else: - collections = self.geodb.get_my_collections(n) - return collections.get('collection') + def get_collection_keys(self) -> List[Tuple[str, str]]: + collections = self.geodb.get_my_collections() + result = [] + collection_list = collections.get('collection') + for idx, database in enumerate(collections.get('database')): + collection_id = collection_list[idx] + if collection_id: + result.append((database, collection_id)) - def get_vector_cube(self, collection_id: str, with_items: bool, - bbox: Tuple[float, float, float, float] = None, - limit: Optional[int] = None, offset: Optional[int] = - 0) \ + return result + + def get_vector_cube(self, collection_id: Tuple[str, str], + bbox: Tuple[float, float, float, float] = None) \ -> Optional[VectorCube]: - LOG.debug(f'Building vector cube for collection {collection_id}...') - try: - collection_info = self.geodb.get_collection_info(collection_id) - except GeoDBError: - return None + (db, name) = collection_id + LOG.debug(f'Building vector cube for collection ' + f'{db}~{name}...') - vector_cube = VectorCube(collection_id, GeoDBVectorSource(self.config)) - time_var_name = self._get_col_name( - collection_info, ['date', 'time', 'timestamp', 'datetime']) - vertical_dim_name = self._get_col_name( - collection_info, ['z', 'vertical']) - time_var_appendix = f',{time_var_name}' if time_var_name else '' - z_dim_appendix = f',{vertical_dim_name}' if vertical_dim_name else '' - select = f'geometry{time_var_appendix}{z_dim_appendix}' - if bbox: - srid = self.geodb.get_collection_srid(collection_id) - where = f'ST_Intersects(geometry, ST_GeomFromText(\'POLYGON((' \ - f'{bbox[0]},{bbox[1]},' \ - f'{bbox[0]},{bbox[3]},' \ - f'{bbox[2]},{bbox[3]},' \ - f'{bbox[2]},{bbox[1]},' \ - f'{bbox[0]},{bbox[1]},' \ - f'))\',' \ - f'{srid}))' - gdf = self.geodb.get_collection_pg(collection_id, - select=select, - where=where, - limit=limit, - offset=offset) - else: - gdf = self.geodb.get_collection_pg(collection_id, - select=select, - limit=limit, offset=offset) - LOG.debug(f' ...done.') - vector_cube._vector_dim = gdf['geometry'] - vector_cube._vertical_dim = gdf[vertical_dim_name] - vector_cube._time_dim = gdf[time_var_name] + vector_cube = VectorCube(collection_id, + GeoDBVectorSource(self.config, collection_id)) LOG.debug(f' counting collection items...') - count = self.geodb.count_collection_by_bbox(collection_id, bbox) \ + count = self.geodb.count_collection_by_bbox(name, bbox, database=db) \ if bbox \ - else self.geodb.count_collection_rows(collection_id, + else self.geodb.count_collection_rows(name, database=db, exact_count=True) LOG.debug(f' ...done.') - - collection_bbox = self._get_collection_bbox(collection_id) - properties = self.geodb.get_properties(collection_id) - - metadata = self._create_metadata(properties, collection_id, - collection_bbox, count) - + properties = self.geodb.get_properties(name, db) + metadata = self._create_metadata(properties, f'{name}', count) vector_cube._metadata = metadata LOG.debug("...done building vector cube.") return vector_cube - def _get_collection_bbox(self, collection_id: str): - LOG.debug(f' starting to get collection bbox...') - collection_bbox = self.geodb.get_collection_bbox(collection_id) - if collection_bbox: - collection_bbox = self._transform_bbox_crs(collection_bbox, - collection_id) - if not collection_bbox: - collection_bbox = self.geodb.get_collection_bbox(collection_id, - exact=True) - if collection_bbox: - collection_bbox = self._transform_bbox_crs(collection_bbox, - collection_id) - - LOG.debug(f' ...done getting collection bbox.') - return collection_bbox - - def _transform_bbox(self, collection_id: str, - bbox: Tuple[float, float, float, float], - crs: int) -> Tuple[float, float, float, float]: - srid = self.geodb.get_collection_srid(collection_id) - if srid == crs: - return bbox - return self.geodb.transform_bbox_crs(bbox, crs, srid) - - def _transform_bbox_crs(self, collection_bbox, collection_id): - srid = self.geodb.get_collection_srid(collection_id) - if srid is not None and srid != '4326': - collection_bbox = self.geodb.transform_bbox_crs( - collection_bbox, - srid, '4326' - ) - return collection_bbox - - @staticmethod - def _get_col_name(collection_info: dict, possible_names: List[str])\ - -> Optional[str]: - for key in collection_info['properties'].keys(): - if key in possible_names: - return key - return None - @staticmethod - def _create_metadata(properties: DataFrame, collection_id: str, + def _create_metadata(properties: DataFrame, title: str, collection_bbox: Tuple[float, float, float, float], count: int) -> {}: summaries = { @@ -243,7 +134,7 @@ def _create_metadata(properties: DataFrame, collection_id: str, for p in properties['column_name'].to_list(): summaries['properties'].append({'name': p}) metadata = { - 'title': collection_id, + 'title': title, 'extent': { 'spatial': { 'bbox': [collection_bbox], diff --git a/xcube_geodb_openeo/defaults.py b/xcube_geodb_openeo/defaults.py index 294d38a..c4be458 100644 --- a/xcube_geodb_openeo/defaults.py +++ b/xcube_geodb_openeo/defaults.py @@ -35,3 +35,6 @@ STAC_DEFAULT_COLLECTIONS_LIMIT = 10 STAC_DEFAULT_ITEMS_LIMIT = 10 STAC_MAX_ITEMS_LIMIT = 10000 + +DEFAULT_VC_CACHE_SIZE = 150 +MAX_NUMBER_OF_GEOMETRIES_DISPLAYED = 20 \ No newline at end of file From c4a3ea9d83ac8db6f8e2fa157bfceef804012010 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 4 Jul 2023 17:25:20 +0200 Subject: [PATCH 107/163] finalised dev of VectorCubes + STAC --- xcube_geodb_openeo/api/context.py | 86 ++++++++------- xcube_geodb_openeo/api/routes.py | 61 ++++++----- xcube_geodb_openeo/core/geodb_datasource.py | 103 ++++++++++++++++-- xcube_geodb_openeo/core/vectorcube.py | 79 +++++++++----- .../core/vectorcube_provider.py | 47 +------- xcube_geodb_openeo/defaults.py | 6 +- 6 files changed, 227 insertions(+), 155 deletions(-) diff --git a/xcube_geodb_openeo/api/context.py b/xcube_geodb_openeo/api/context.py index 3a62bba..f398542 100644 --- a/xcube_geodb_openeo/api/context.py +++ b/xcube_geodb_openeo/api/context.py @@ -108,14 +108,14 @@ def collections(self, collections: Dict): assert isinstance(collections, Dict) self._collections = collections - def fetch_collections(self, base_url: str, limit: int, offset: int): + def get_collections(self, base_url: str, limit: int, offset: int): url = f'{base_url}/collections' links = get_collections_links(limit, offset, url, len(self.collection_ids)) collection_list = [] for collection_id in self.collection_ids[offset:offset + limit]: - vector_cube = self.get_vector_cube(collection_id, bbox=None) - collection = _get_vector_cube_collection(base_url, vector_cube) + collection = self.get_collection(base_url, collection_id, + full=False) collection_list.append(collection) self.collections = { @@ -124,32 +124,41 @@ def fetch_collections(self, base_url: str, limit: int, offset: int): } def get_collection(self, base_url: str, - collection_dn: Tuple[str, str]): - vector_cube = self.get_vector_cube(collection_dn, bbox=None) - if vector_cube: - return _get_vector_cube_collection(base_url, vector_cube) - else: - return None + collection_id: Tuple[str, str], + full: bool = False): + vector_cube = self.get_vector_cube(collection_id, bbox=None) + return _get_vector_cube_collection(base_url, vector_cube, full) def get_collection_items( self, base_url: str, collection_id: Tuple[str, str], limit: int, offset: int, bbox: Optional[Tuple[float, float, float, float]] - = None): - _validate(limit) + = None) -> Dict: vector_cube = self.get_vector_cube(collection_id, bbox=bbox) stac_features = [ _get_vector_cube_item(base_url, vector_cube, feature) for feature in vector_cube.load_features(limit, offset) ] - return { + result = { 'type': 'FeatureCollection', 'features': stac_features, 'timeStamp': _utc_now(), - 'numberMatched': vector_cube.metadata['total_feature_count'], - 'numberReturned': len(stac_features), + 'numberMatched': vector_cube.feature_count, + 'numberReturned': len(stac_features) } + if offset + limit < vector_cube.feature_count: + new_offset = offset + limit + result['links'] = [ + { + 'rel': 'next', + 'href': f'{base_url}/collections/{vector_cube.id}' + f'/items?limit={limit}&offset={new_offset}' + }, + ] + + return result + def get_collection_item(self, base_url: str, collection_id: Tuple[str, str], feature_id: str): @@ -193,17 +202,11 @@ def get_collections_links(limit: int, offset: int, url: str, def _get_vector_cube_collection(base_url: str, - vector_cube: VectorCube): + vector_cube: VectorCube, + full: bool = False): vector_cube_id = vector_cube.id - metadata = vector_cube.metadata - v_dim = vector_cube.get_vector_dim() - if len(v_dim) > MAX_NUMBER_OF_GEOMETRIES_DISPLAYED: - start = ','.join(str(v_dim[0:2])) - v_dim = f'{start}...{v_dim[-1]}' - z_dim = vector_cube.get_vertical_dim() - axes = ['x', 'y', 'z'] if z_dim else ['x', 'y'] bbox = vector_cube.get_bbox() - + metadata = vector_cube.metadata vector_cube_collection = { 'stac_version': STAC_VERSION, 'stac_extensions': STAC_EXTENSIONS, @@ -216,15 +219,6 @@ def _get_vector_cube_collection(base_url: str, 'keywords': metadata.get('keywords', []), 'providers': metadata.get('providers', []), 'extent': metadata.get('extent', {}), - 'cube:dimensions': { - 'vector': { - 'type': 'geometry', - 'axes': axes, - 'bbox': str(bbox), - "values": v_dim, - } - }, - 'summaries': metadata.get('summaries', {}), 'links': [ { 'rel': 'self', @@ -236,6 +230,22 @@ def _get_vector_cube_collection(base_url: str, } ] } + if full: + geometry_types = vector_cube.get_geometry_types() + z_dim = vector_cube.get_vertical_dim() + axes = ['x', 'y', 'z'] if z_dim else ['x', 'y'] + srid = vector_cube.srid + vector_cube_collection['cube:dimensions'] = { + 'vector': { + 'type': 'geometry', + 'axes': axes, + 'bbox': str(bbox), + 'geometry_types': geometry_types, + 'reference_system': srid + } + } + vector_cube_collection['summaries'] = metadata.get('summaries', {}), + if 'version' in metadata: vector_cube_collection['version'] = metadata['version'] return vector_cube_collection @@ -248,7 +258,8 @@ def _get_vector_cube_item(base_url: str, vector_cube: VectorCube, feature_bbox = feature.get('bbox') feature_geometry = feature.get('geometry') feature_properties = feature.get('properties', {}) - feature_datetime = feature.get('datetime') if 'datetime' in feature else None + feature_datetime = feature.get('datetime') \ + if 'datetime' in feature else None item = { 'stac_version': STAC_VERSION, @@ -279,15 +290,6 @@ def _utc_now(): .utcnow() \ .replace(microsecond=0) \ .isoformat() + 'Z' - - -def _validate(limit: int): - if limit < 1 or limit > STAC_MAX_ITEMS_LIMIT: - raise InvalidParameterException(f'if specified, limit has to be ' - f'between 1 and ' - f'{STAC_MAX_ITEMS_LIMIT}') - - class CollectionNotFoundException(Exception): pass diff --git a/xcube_geodb_openeo/api/routes.py b/xcube_geodb_openeo/api/routes.py index cf8e789..190f20f 100644 --- a/xcube_geodb_openeo/api/routes.py +++ b/xcube_geodb_openeo/api/routes.py @@ -25,28 +25,8 @@ from .api import api from xcube.server.api import ApiHandler from xcube.server.api import ApiError -from ..defaults import STAC_DEFAULT_COLLECTIONS_LIMIT, STAC_DEFAULT_ITEMS_LIMIT - - -def get_limit(request, default: int) -> int: - limit = int(request.get_query_arg('limit')) if \ - request.get_query_arg('limit') \ - else default - return limit - - -def get_offset(request) -> int: - return int(request.get_query_arg('offset')) if \ - request.get_query_arg('offset') \ - else 0 - - -def get_bbox(request): - if request.get_query_arg('bbox'): - bbox = str(request.get_query_arg('bbox')) - return tuple(bbox.split(',')) - else: - return None +from ..defaults import STAC_DEFAULT_COLLECTIONS_LIMIT, \ + STAC_DEFAULT_ITEMS_LIMIT, STAC_MAX_ITEMS_LIMIT, STAC_MIN_ITEMS_LIMIT def get_base_url(request): @@ -194,10 +174,10 @@ def get(self): items that are presented in the response document. offset (int): Collections are listed starting at offset. """ - limit = get_limit(self.request, STAC_DEFAULT_COLLECTIONS_LIMIT) - offset = get_offset(self.request) + limit = _get_limit(self.request, STAC_DEFAULT_COLLECTIONS_LIMIT) + offset = _get_offset(self.request) base_url = get_base_url(self.request) - self.ctx.fetch_collections(base_url, limit, offset) + self.ctx.get_collections(base_url, limit, offset) self.response.finish(self.ctx.collections) @@ -215,7 +195,7 @@ def get(self, collection_id: str): base_url = get_base_url(self.request) db = collection_id.split('~')[0] name = collection_id.split('~')[1] - collection = self.ctx.get_collection(base_url, (db, name)) + collection = self.ctx.get_collection(base_url, (db, name), True) if collection: self.response.finish(collection) else: @@ -241,9 +221,11 @@ def get(self, collection_id: str): bbox (array of numbers): Only features that intersect the bounding box are selected. Example: bbox=160.6,-55.95,-170,-25.89 """ - limit = get_limit(self.request, STAC_DEFAULT_ITEMS_LIMIT) - offset = get_offset(self.request) - bbox = get_bbox(self.request) + limit = _get_limit(self.request, STAC_DEFAULT_ITEMS_LIMIT) + limit = STAC_MAX_ITEMS_LIMIT if limit > STAC_MAX_ITEMS_LIMIT else limit + limit = STAC_MIN_ITEMS_LIMIT if limit < STAC_MIN_ITEMS_LIMIT else limit + offset = _get_offset(self.request) + bbox = _get_bbox(self.request) base_url = get_base_url(self.request) db = collection_id.split('~')[0] name = collection_id.split('~')[1] @@ -269,3 +251,24 @@ def get(self, collection_id: str, item_id: str): feature = self.ctx.get_collection_item(base_url, (db, name), feature_id) self.response.finish(feature) + + +def _get_limit(request, default: int) -> int: + limit = int(request.get_query_arg('limit')) if \ + request.get_query_arg('limit') \ + else default + return limit + + +def _get_offset(request) -> int: + return int(request.get_query_arg('offset')) if \ + request.get_query_arg('offset') \ + else 0 + + +def _get_bbox(request): + if request.get_query_arg('bbox'): + bbox = str(request.get_query_arg('bbox')) + return tuple(bbox.split(',')) + else: + return None \ No newline at end of file diff --git a/xcube_geodb_openeo/core/geodb_datasource.py b/xcube_geodb_openeo/core/geodb_datasource.py index 43c24e9..15dd670 100644 --- a/xcube_geodb_openeo/core/geodb_datasource.py +++ b/xcube_geodb_openeo/core/geodb_datasource.py @@ -39,9 +39,17 @@ class DataSource(abc.ABC): @abc.abstractmethod - def get_geometry(self, - bbox: Optional[Tuple[float, float, float, float]] = None - ) -> List[Geometry]: + def get_vector_dim(self, + bbox: Optional[Tuple[float, float, float, float]] = None + ) -> List[Geometry]: + pass + + @abc.abstractmethod + def get_srid(self) -> int: + pass + + @abc.abstractmethod + def get_feature_count(self) -> int: pass @abc.abstractmethod @@ -64,6 +72,18 @@ def load_features(self, limit: int = STAC_DEFAULT_ITEMS_LIMIT, feature_id: Optional[str] = None) -> List[Feature]: pass + @abc.abstractmethod + def get_vector_cube_bbox(self) -> Tuple[float, float, float, float]: + pass + + @abc.abstractmethod + def get_geometry_types(self) -> List[str]: + pass + + @abc.abstractmethod + def get_metadata(self, bbox: Tuple[float, float, float, float]) -> Dict: + pass + class GeoDBVectorSource(DataSource): @@ -87,6 +107,25 @@ def collection_info(self): return None # todo - raise meaningful error return collection_info + def get_feature_count(self) -> int: + (db, name) = self.collection_id + LOG.debug(f'Retrieving count from geoDB...') + count = self.geodb.count_collection_rows(name, database=db, + exact_count=True) + LOG.debug(f'...done.') + return count + + def get_srid(self) -> int: + (db, name) = self.collection_id + return int(self.geodb.get_collection_srid(name, db)) + + def get_geometry_types(self) -> List[str]: + LOG.debug(f'Loading geometry types for vector cube ' + f'{self.collection_id} from geoDB...') + (db, name) = self.collection_id + return self.geodb.get_geometry_types(collection=name, aggregate=True, + database=db) + def load_features(self, limit: int = STAC_DEFAULT_ITEMS_LIMIT, offset: int = 0, feature_id: Optional[str] = None) -> List[Feature]: @@ -105,11 +144,11 @@ def load_features(self, limit: int = STAC_DEFAULT_ITEMS_LIMIT, name, select=select, limit=limit, offset=offset, database=db) features = [] + properties = list(self.collection_info['properties'].keys()) for i, row in enumerate(gdf.iterrows()): bbox = gdf.bounds.iloc[i] coords = self._get_coords(row[1]) - properties = list(gdf.columns) feature = { 'stac_version': STAC_VERSION, @@ -129,14 +168,16 @@ def load_features(self, limit: int = STAC_DEFAULT_ITEMS_LIMIT, LOG.debug('...done.') return features - def get_geometry(self, - bbox: Optional[Tuple[float, float, float, float]] = None - ) -> List[Geometry]: + def get_vector_dim(self, + bbox: Optional[Tuple[float, float, float, float]] = None + ) -> List[Geometry]: select = f'geometry' - LOG.debug(f'Loading geometry for {self.collection_id} from geoDB...') if bbox: + LOG.debug(f'Loading geometry for {self.collection_id} from geoDB...') gdf = self._fetch_from_geodb(select, bbox) else: + LOG.debug(f'Loading global geometry for {self.collection_id} ' + f'from geoDB...') (db, name) = self.collection_id gdf = self.geodb.get_collection_pg( name, select=select, group=select, database=db) @@ -164,17 +205,17 @@ def get_vertical_dim( -> List[Any]: pass - def _get_vector_cube_bbox(self): + def get_vector_cube_bbox(self) -> Tuple[float, float, float, float]: (db, name) = self.collection_id LOG.debug(f'Loading collection bbox for {self.collection_id} from ' f'geoDB...') - vector_cube_bbox = self.geodb.get_vector_cube_bbox(name, database=db) + vector_cube_bbox = self.geodb.get_collection_bbox(name, database=db) if vector_cube_bbox: vector_cube_bbox = self._transform_bbox_crs(vector_cube_bbox, name, db) if not vector_cube_bbox: - vector_cube_bbox = self.geodb.get_vector_cube_bbox(name, db, - exact=True) + vector_cube_bbox = self.geodb.get_collection_bbox(name, db, + exact=True) if vector_cube_bbox: vector_cube_bbox = self._transform_bbox_crs(vector_cube_bbox, name, db) @@ -182,6 +223,44 @@ def _get_vector_cube_bbox(self): LOG.debug(f'...done.') return vector_cube_bbox + def get_metadata(self, bbox: Tuple[float, float, float, float]) -> Dict: + (db, name) = self.collection_id + col_names = list(self.collection_info['properties'].keys()) + time_column = self._get_col_name( + ['date', 'time', 'timestamp', 'datetime']) + if time_column: + LOG.debug(f'Loading time interval for {self.collection_id} from ' + f'geoDB...') + earliest = self.geodb.get_collection_pg( + name, select=time_column, + order=time_column, limit=1, + database=db)[time_column][0] + earliest = dateutil.parser.parse(earliest).isoformat() + latest = self.geodb.get_collection_pg( + name, select=time_column, + order=f'{time_column} DESC', + limit=1, database=db)[time_column][0] + latest = dateutil.parser.parse(latest).isoformat() + LOG.debug(f'...done.') + else: + earliest, latest = None, None + + metadata = { + 'title': f'{name}', + 'extent': { + 'spatial': { + 'bbox': [bbox], + }, + 'temporal': { + 'interval': [[earliest, latest]] + } + }, + 'summaries': { + 'column_names': col_names + }, + } + return metadata + def _transform_bbox(self, collection_id: Tuple[str, str], bbox: Tuple[float, float, float, float], crs: int) -> Tuple[float, float, float, float]: diff --git a/xcube_geodb_openeo/core/vectorcube.py b/xcube_geodb_openeo/core/vectorcube.py index 0d2321a..1d0af26 100644 --- a/xcube_geodb_openeo/core/vectorcube.py +++ b/xcube_geodb_openeo/core/vectorcube.py @@ -19,10 +19,10 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. from datetime import datetime +from functools import cached_property from typing import Any, Optional, Tuple from typing import List from geojson.geometry import Geometry -from xcube.constants import LOG from xcube_geodb_openeo.core.geodb_datasource import DataSource, Feature from xcube_geodb_openeo.core.tools import Cache @@ -58,16 +58,28 @@ def __init__(self, collection_dn: Tuple[str, str], self._datasource = datasource self._metadata = {} self._feature_cache = Cache(1000) - self._geometry_cache = Cache(100) + self._vector_dim_cache = Cache(100) + self._vertical_dim_cache = Cache(1000) + self._time_dim_cache = Cache(1000) self._version = '' + self._bbox = None + self._geometry_types = None self._vector_dim = [] self._vertical_dim = [] self._time_dim = [] - @property + @cached_property def id(self) -> str: return self._database + '~' + self._id + @cached_property + def srid(self) -> str: + return str(self._datasource.get_srid()) + + @cached_property + def feature_count(self) -> int: + return self._datasource.get_feature_count() + def get_vector_dim( self, bbox: Optional[Tuple[float, float, float, float]] = None) \ -> List[Geometry]: @@ -91,13 +103,13 @@ def get_vector_dim( vector dimension """ global_key = 'GLOBAL' - if bbox and bbox in self._geometry_cache.get_keys(): - return self._geometry_cache.get(bbox) - if not bbox and global_key in self._geometry_cache.get_keys(): - return self._geometry_cache.get(global_key) - geometry = self._datasource.get_geometry(bbox) - self._geometry_cache.insert(bbox if bbox else global_key, geometry) - return geometry + if bbox and bbox in self._vector_dim_cache.get_keys(): + return self._vector_dim_cache.get(bbox) + if not bbox and global_key in self._vector_dim_cache.get_keys(): + return self._vector_dim_cache.get(global_key) + vector_dim = self._datasource.get_vector_dim(bbox) + self._vector_dim_cache.insert(bbox if bbox else global_key, vector_dim) + return vector_dim def get_vertical_dim( self, @@ -109,7 +121,14 @@ def get_vertical_dim( cube does not have a vertical dimension, returns an empty list. :return: list of dimension values, typically a list of float values. """ - return self._datasource.get_vertical_dim(bbox) + global_key = 'GLOBAL' + if bbox and bbox in self._vertical_dim_cache.get_keys(): + return self._vertical_dim_cache.get(bbox) + if not bbox and global_key in self._vertical_dim_cache.get_keys(): + return self._vertical_dim_cache.get(global_key) + v_dim = self._datasource.get_vertical_dim(bbox) + self._vertical_dim_cache.insert(bbox if bbox else global_key, v_dim) + return v_dim def get_time_dim( self, bbox: Optional[Tuple[float, float, float, float]] = None) \ @@ -119,7 +138,14 @@ def get_time_dim( datetime objects. If the vector cube does not have a time dimension, an empty list is returned. """ - return self._datasource.get_time_dim(bbox) + global_key = 'GLOBAL' + if bbox and bbox in self._time_dim_cache.get_keys(): + return self._time_dim_cache.get(bbox) + if not bbox and global_key in self._time_dim_cache.get_keys(): + return self._time_dim_cache.get(global_key) + time_dim = self._datasource.get_time_dim(bbox) + self._time_dim_cache.insert(bbox if bbox else global_key, time_dim) + return time_dim def get_feature(self, feature_id: str) -> Feature: for key in self._feature_cache.get_keys(): @@ -131,23 +157,26 @@ def get_feature(self, feature_id: str) -> Feature: return feature def load_features(self, limit: int, offset: int) -> List[Feature]: - LOG.debug('loading features...') key = (limit, offset) if key in self._feature_cache.get_keys(): - LOG.debug('...returning from cache - done!') return self._feature_cache.get(key) features = self._datasource.load_features(limit, offset) self._feature_cache.insert(key, features) - LOG.debug('...read from geoDB.') return features - def get_bbox(self): - LOG.debug(f'loading bounding box for vector cube {self.id}....') - if self.bbox: - return self.bbox - self.bbox = self._datasource._get_vector_cube_bbox() - return self.bbox - - @property - def metadata(self): - return self._metadata + def get_bbox(self) -> Tuple[float, float, float, float]: + if self._bbox: + return self._bbox + self._bbox = self._datasource.get_vector_cube_bbox() + return self._bbox + + def get_geometry_types(self) -> List[str]: + if self._geometry_types: + return self._geometry_types + self._geometry_types = self._datasource.get_geometry_types() + return self._geometry_types + + @cached_property + def metadata(self) -> {}: + bbox = self.get_bbox() + return self._datasource.get_metadata(bbox) diff --git a/xcube_geodb_openeo/core/vectorcube_provider.py b/xcube_geodb_openeo/core/vectorcube_provider.py index 123f51c..9ffe07f 100644 --- a/xcube_geodb_openeo/core/vectorcube_provider.py +++ b/xcube_geodb_openeo/core/vectorcube_provider.py @@ -106,48 +106,5 @@ def get_collection_keys(self) -> List[Tuple[str, str]]: def get_vector_cube(self, collection_id: Tuple[str, str], bbox: Tuple[float, float, float, float] = None) \ -> Optional[VectorCube]: - (db, name) = collection_id - LOG.debug(f'Building vector cube for collection ' - f'{db}~{name}...') - - vector_cube = VectorCube(collection_id, - GeoDBVectorSource(self.config, collection_id)) - LOG.debug(f' counting collection items...') - count = self.geodb.count_collection_by_bbox(name, bbox, database=db) \ - if bbox \ - else self.geodb.count_collection_rows(name, database=db, - exact_count=True) - LOG.debug(f' ...done.') - properties = self.geodb.get_properties(name, db) - metadata = self._create_metadata(properties, f'{name}', count) - vector_cube._metadata = metadata - LOG.debug("...done building vector cube.") - return vector_cube - - @staticmethod - def _create_metadata(properties: DataFrame, title: str, - collection_bbox: Tuple[float, float, float, float], - count: int) -> {}: - summaries = { - 'properties': [] - } - for p in properties['column_name'].to_list(): - summaries['properties'].append({'name': p}) - metadata = { - 'title': title, - 'extent': { - 'spatial': { - 'bbox': [collection_bbox], - 'crs': 'http://www.opengis.net/def/crs/OGC/1.3/CRS84' - }, - 'temporal': { - 'interval': [[None, None]] - # todo - maybe define a list of possible property names to - # scan for the temporal interval, such as start_date, - # end_date, - } - }, - 'summaries': summaries, - 'total_feature_count': count - } - return metadata + return VectorCube(collection_id, + GeoDBVectorSource(self.config, collection_id)) diff --git a/xcube_geodb_openeo/defaults.py b/xcube_geodb_openeo/defaults.py index c4be458..c33c457 100644 --- a/xcube_geodb_openeo/defaults.py +++ b/xcube_geodb_openeo/defaults.py @@ -33,8 +33,10 @@ ['datacube', 'https://stac-extensions.github.io/version/v1.0.0/schema.json'] STAC_DEFAULT_COLLECTIONS_LIMIT = 10 + STAC_DEFAULT_ITEMS_LIMIT = 10 -STAC_MAX_ITEMS_LIMIT = 10000 +STAC_MIN_ITEMS_LIMIT = 1 +STAC_MAX_ITEMS_LIMIT = 1000 DEFAULT_VC_CACHE_SIZE = 150 -MAX_NUMBER_OF_GEOMETRIES_DISPLAYED = 20 \ No newline at end of file +MAX_NUMBER_OF_GEOMETRIES_DISPLAYED = 20 From 718eb030253b9efd58eececb2836a7d2fa05fd39 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 5 Jul 2023 15:27:52 +0200 Subject: [PATCH 108/163] update --- tests/core/mock_datasource.py | 90 -------- tests/core/mock_vc_provider.py | 215 ++++++++++++++++++ tests/server/app/test_data_discovery.py | 2 +- tests/test_config.yml | 13 +- xcube_geodb_openeo/api/context.py | 7 +- xcube_geodb_openeo/config.yml.example | 2 +- xcube_geodb_openeo/core/geodb_datasource.py | 18 +- xcube_geodb_openeo/core/vectorcube.py | 4 +- .../core/vectorcube_provider.py | 46 +--- 9 files changed, 253 insertions(+), 144 deletions(-) delete mode 100644 tests/core/mock_datasource.py create mode 100644 tests/core/mock_vc_provider.py diff --git a/tests/core/mock_datasource.py b/tests/core/mock_datasource.py deleted file mode 100644 index ea797fe..0000000 --- a/tests/core/mock_datasource.py +++ /dev/null @@ -1,90 +0,0 @@ -# The MIT License (MIT) -# Copyright (c) 2021/2022 by the xcube team and contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. - -import json -from typing import Any -from typing import Mapping -from typing import Optional -from typing import Sequence -from typing import Tuple - -import geopandas -from pandas import DataFrame -from shapely.geometry import Polygon - -from xcube_geodb_openeo.core.datasource import VectorSource -from xcube_geodb_openeo.core.geodb_datasource import GeoDBVectorSource -from xcube_geodb_openeo.core.vectorcube import VectorCube -import importlib.resources as resources - - -class MockVectorSource(VectorSource): - - # noinspection PyUnusedLocal - def __init__(self, config: Mapping[str, Any]): - with resources.open_text('tests', 'mock_collections.json') as text: - mock_collections = json.load(text)['_MOCK_COLLECTIONS_LIST'] - self._MOCK_COLLECTIONS = {v["id"]: v for v in mock_collections} - - def get_collection_keys(self) -> Sequence: - return list(self._MOCK_COLLECTIONS.keys()) - - def get_vector_cube(self, collection_id: str, with_items: bool, - bbox: Tuple[float, float, float, float] = None, - limit: Optional[int] = None, offset: Optional[int] = - 0) -> Optional[VectorCube]: - if collection_id == 'non-existent-collection': - return None - vector_cube = {} - data = { - 'id': ['0', '1'], - 'name': ['hamburg', 'paderborn'], - 'geometry': [Polygon(((9, 52), (9, 54), (11, 54), (11, 52), - (10, 53), (9.8, 53.4), (9.2, 52.1), - (9, 52))), - Polygon(((8.7, 51.3), (8.7, 51.8), (8.8, 51.8), - (8.8, 51.3), (8.7, 51.3))) - ], - 'population': [1700000, 150000] - } - collection = geopandas.GeoDataFrame(data, crs="EPSG:4326") - if bbox: - # simply dropping one entry; we don't need to test this - # logic here, as it is implemented within the geoDB module - collection = collection.drop([1, 1]) - if limit: - collection = collection[offset:offset + limit] - vector_cube['id'] = collection_id - vector_cube['features'] = [] - vector_cube['total_feature_count'] = len(collection) - if with_items and collection_id != 'empty_collection': - self.add_items_to_vector_cube(collection, vector_cube) - GeoDBVectorSource.add_metadata( - (8, 51, 12, 52), collection_id, - DataFrame(columns=["collection", "column_name", "data_type"]), - '0.3.1', vector_cube) - return vector_cube - - # noinspection PyUnusedLocal - def transform_bbox(self, collection_id: str, - bbox: Tuple[float, float, float, float], - crs: int) -> Tuple[float, float, float, float]: - return bbox diff --git a/tests/core/mock_vc_provider.py b/tests/core/mock_vc_provider.py new file mode 100644 index 0000000..56704f1 --- /dev/null +++ b/tests/core/mock_vc_provider.py @@ -0,0 +1,215 @@ +# The MIT License (MIT) +# Copyright (c) 2021/2022 by the xcube team and contributors +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +import importlib.resources as resources +import json +from datetime import datetime +from typing import Any, Dict, List +from typing import Mapping +from typing import Optional +from typing import Sequence +from typing import Tuple + +import geojson +import shapely +import shapely.wkt as wkt +from geojson import coords +from geojson.geometry import Geometry +from shapely import LineString + +from xcube_geodb_openeo.core.geodb_datasource import DataSource, Feature +from xcube_geodb_openeo.core.vectorcube import VectorCube +from xcube_geodb_openeo.core.vectorcube_provider import VectorCubeProvider +from xcube_geodb_openeo.defaults import STAC_EXTENSIONS + + +class MockProvider(VectorCubeProvider, DataSource): + + # noinspection PyUnusedLocal + def __init__(self, config: Mapping[str, Any]): + with resources.open_text('tests', 'mock_collections.json') as text: + mock_collections = json.load(text)['_MOCK_COLLECTIONS_LIST'] + self._MOCK_COLLECTIONS = {v["id"]: v for v in mock_collections} + self.hh = 'POLYGON((9 52, 9 54, 11 54, 11 52, 10 53, 9.5 53.4, ' \ + '9.2 52.1, 9 52))' + self.pb = 'POLYGON((8.7 51.3, 8.7 51.8, 8.8 51.8, 8.8 51.3, 8.7 51.3))' + + self.bbox_hh = wkt.loads(self.hh).bounds + self.bbox_pb = wkt.loads(self.pb).bounds + + def get_collection_keys(self) -> Sequence: + return list(self._MOCK_COLLECTIONS.keys()) + + def get_vector_cube(self, collection_id: Tuple[str, str], + bbox: Tuple[float, float, float, float]) \ + -> VectorCube: + return VectorCube(collection_id, self) + + def get_vector_dim( + self, + bbox: Optional[Tuple[float, float, float, float]] = None) \ + -> List[Geometry]: + + hh = 'Polygon(((9, 52), (9, 54), (11, 54), (11, 52), (10, 53), ' \ + '(9.8, 53.4), (9.2, 52.1), (9, 52)))' + pb = 'Polygon(((8.7, 51.3), (8.7, 51.8), (8.8, 51.8), (8.8, 51.3), ' \ + '(8.7, 51.3)))' + + return [geojson.dumps(shapely.geometry.mapping(wkt.loads(hh))), + geojson.dumps(shapely.geometry.mapping(wkt.loads(pb)))] + + def get_srid(self) -> int: + return 3246 + + def get_feature_count(self) -> int: + return 2 + + def get_time_dim( + self, + bbox: Optional[Tuple[float, float, float, float]] = None) \ + -> Optional[List[datetime]]: + return None + + def get_vertical_dim( + self, + bbox: Optional[Tuple[float, float, float, float]] = None) \ + -> Optional[List[Any]]: + return None + + def load_features(self, limit: int = 2, + offset: int = 0, feature_id: Optional[str] = None) -> \ + List[Feature]: + + hh_feature = { + 'stac_version': 15.1, + 'stac_extensions': STAC_EXTENSIONS, + 'type': 'Feature', + 'id': '0', + 'bbox': [f'{self.bbox_hh["minx"]:.4f}', + f'{self.bbox_hh["miny"]:.4f}', + f'{self.bbox_hh["maxx"]:.4f}', + f'{self.bbox_hh["maxy"]:.4f}'], + # 'geometry': hh_coordinates, + 'properties': ['id', 'name', 'geometry', 'population'] + } + + pb_feature = { + 'stac_version': 15.1, + 'stac_extensions': STAC_EXTENSIONS, + 'type': 'Feature', + 'id': '1', + 'bbox': [f'{self.bbox_pb["minx"]:.4f}', + f'{self.bbox_pb["miny"]:.4f}', + f'{self.bbox_pb["maxx"]:.4f}', + f'{self.bbox_pb["maxy"]:.4f}'], + # 'geometry': pb_coordinates, + 'properties': ['id', 'name', 'geometry', 'population'] + } + + return [hh_feature, pb_feature] + + def get_vector_cube_bbox(self) -> Tuple[float, float, float, float]: + return wkt.loads(self.hh).bounds + + + def get_geometry_types(self) -> List[str]: + return ['Polygon'] + + def get_metadata(self, bbox: Tuple[float, float, float, float]) -> Dict: + metadata = { + 'title': 'something', + 'extent': { + 'spatial': { + 'bbox': [bbox], + }, + 'temporal': { + 'interval': [[None, None]] + } + }, + 'summaries': { + 'column_names': 'col_names' + }, + } + return metadata + +''' + @staticmethod + def add_items_to_vector_cube( + collection: GeoDataFrame, vector_cube: VectorCube): + bounds = collection.bounds + for i, row in enumerate(collection.iterrows()): + bbox = bounds.iloc[i] + feature = row[1] + coords = VectorCubeProvider._get_coords(feature) + properties = {} + for k, key in enumerate(feature.keys()): + if not key == 'id' and not \ + collection.dtypes.values[k].name == 'geometry': + if isinstance(feature[key], float) \ + and math.isnan(float(feature[key])): + properties[key] = 'NaN' + else: + properties[key] = feature[key] + + vector_cube['features'].append({ + 'stac_version': STAC_VERSION, + 'stac_extensions': STAC_EXTENSIONS, + 'type': 'Feature', + 'id': feature['id'], + 'bbox': [f'{bbox["minx"]:.4f}', + f'{bbox["miny"]:.4f}', + f'{bbox["maxx"]:.4f}', + f'{bbox["maxy"]:.4f}'], + 'geometry': coords, + 'properties': properties + }) +''' + +''' + data = { + 'id': ['0', '1'], + 'name': ['hamburg', 'paderborn'], + 'geometry': [Polygon(((9, 52), (9, 54), (11, 54), (11, 52), + (10, 53), (9.8, 53.4), (9.2, 52.1), + (9, 52))), + Polygon(((8.7, 51.3), (8.7, 51.8), (8.8, 51.8), + (8.8, 51.3), (8.7, 51.3))) + ], + 'population': [1700000, 150000] + } + collection = geopandas.GeoDataFrame(data, crs="EPSG:4326") + if bbox: + # simply dropping one entry; we don't need to test this + # logic here, as it is implemented within the geoDB module + collection = collection.drop([1, 1]) + if limit: + collection = collection[offset:offset + limit] + vector_cube['id'] = collection_id + vector_cube['features'] = [] + vector_cube['total_feature_count'] = len(collection) + if with_items and collection_id != 'empty_collection': + self.add_items_to_vector_cube(collection, vector_cube) + GeoDBVectorSource.add_metadata( + (8, 51, 12, 52), collection_id, + DataFrame(columns=["collection", "column_name", "data_type"]), + '0.3.1', vector_cube) + +''' \ No newline at end of file diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index d375f91..5df77c6 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -69,7 +69,7 @@ def test_collections(self): self.assertEqual(2, len(first_collection['links'])) def test_collection(self): - url = f'http://localhost:{self.port}/collections/collection_1' + url = f'http://localhost:{self.port}/collections/database~collection_1' response = self.http.request('GET', url) self.assertEqual(200, response.status) collection_data = json.loads(response.data) diff --git a/tests/test_config.yml b/tests/test_config.yml index 72e0307..1acd08a 100644 --- a/tests/test_config.yml +++ b/tests/test_config.yml @@ -1,6 +1,15 @@ geodb_openeo: - datasource_class: tests.core.mock_datasource.MockDataSource + vectorcube_provider_class: tests.core.mock_vc_provider.MockProvider SERVER_URL: http://xcube-geoDB-openEO.de SERVER_ID: xcube-geodb-openeo SERVER_TITLE: xcube geoDB Server, openEO API - SERVER_DESCRIPTION: Catalog of geoDB collections. \ No newline at end of file + SERVER_DESCRIPTION: Catalog of geoDB collections. + +api_spec: + includes: + - geodb-openeo + - meta + - auth + +tornado: + xheaders: true \ No newline at end of file diff --git a/xcube_geodb_openeo/api/context.py b/xcube_geodb_openeo/api/context.py index f398542..a1b0025 100644 --- a/xcube_geodb_openeo/api/context.py +++ b/xcube_geodb_openeo/api/context.py @@ -59,8 +59,10 @@ def config(self, config: Mapping[str, Any]): def cube_provider(self) -> VectorCubeProvider: if not self.config: raise RuntimeError('config not set') - cube_provider_class = self.config['geodb_openeo']['datasource_class'] - cube_provider_module = cube_provider_class[:cube_provider_class.rindex('.')] + cube_provider_class = \ + self.config['geodb_openeo']['vectorcube_provider_class'] + cube_provider_module = \ + cube_provider_class[:cube_provider_class.rindex('.')] class_name = cube_provider_class[cube_provider_class.rindex('.') + 1:] module = importlib.import_module(cube_provider_module) cls = getattr(module, class_name) @@ -73,6 +75,7 @@ def request(self) -> Mapping[str, Any]: def __init__(self, root: Context): super().__init__(root) + self._cube_provider = None self._request = None # necessary because root.config and its sub-configs are not writable # so copy their config in a new dict diff --git a/xcube_geodb_openeo/config.yml.example b/xcube_geodb_openeo/config.yml.example index d675968..017362a 100644 --- a/xcube_geodb_openeo/config.yml.example +++ b/xcube_geodb_openeo/config.yml.example @@ -1,6 +1,6 @@ # adapt to your needs and save as config.yml geodb_openeo: - datasource_class: xcube_geodb_openeo.core.geodb_datasource.GeoDBDataSource + vectorcube_provider_class: xcube_geodb_openeo.core.vectorcube_provider.GeoDBProvider postgrest_url: postgrest_port: diff --git a/xcube_geodb_openeo/core/geodb_datasource.py b/xcube_geodb_openeo/core/geodb_datasource.py index 15dd670..1d38486 100644 --- a/xcube_geodb_openeo/core/geodb_datasource.py +++ b/xcube_geodb_openeo/core/geodb_datasource.py @@ -56,14 +56,14 @@ def get_feature_count(self) -> int: def get_time_dim( self, bbox: Optional[Tuple[float, float, float, float]] = None) \ - -> List[datetime]: + -> Optional[List[datetime]]: pass @abc.abstractmethod def get_vertical_dim( self, bbox: Optional[Tuple[float, float, float, float]] = None) \ - -> List[Any]: + -> Optional[List[Any]]: pass @abc.abstractmethod @@ -202,8 +202,18 @@ def get_time_dim( def get_vertical_dim( self, bbox: Optional[Tuple[float, float, float, float]] = None) \ - -> List[Any]: - pass + -> Optional[List[Any]]: + select = self._get_col_name(['z', 'vertical']) + if not select: + return None + if bbox: + gdf = self._fetch_from_geodb(select, bbox) + else: + (db, name) = self.collection_id + gdf = self.geodb.get_collection_pg( + name, select=select, database=db) + + return gdf[select] def get_vector_cube_bbox(self) -> Tuple[float, float, float, float]: (db, name) = self.collection_id diff --git a/xcube_geodb_openeo/core/vectorcube.py b/xcube_geodb_openeo/core/vectorcube.py index 1d0af26..f815819 100644 --- a/xcube_geodb_openeo/core/vectorcube.py +++ b/xcube_geodb_openeo/core/vectorcube.py @@ -52,9 +52,9 @@ class VectorCube: The actual values within this VectorCube are provided by a dask Dataframe. """ - def __init__(self, collection_dn: Tuple[str, str], + def __init__(self, collection_id: Tuple[str, str], datasource: DataSource) -> None: - (self._database, self._id) = collection_dn + (self._database, self._id) = collection_id self._datasource = datasource self._metadata = {} self._feature_cache = Cache(1000) diff --git a/xcube_geodb_openeo/core/vectorcube_provider.py b/xcube_geodb_openeo/core/vectorcube_provider.py index 9ffe07f..8eaa264 100644 --- a/xcube_geodb_openeo/core/vectorcube_provider.py +++ b/xcube_geodb_openeo/core/vectorcube_provider.py @@ -20,21 +20,14 @@ # DEALINGS IN THE SOFTWARE. import abc -import math from functools import cached_property -from typing import Dict, Tuple, Optional, List, Mapping, Any +from typing import Tuple, Optional, List, Mapping, Any -import shapely.geometry -import shapely.wkt -from geopandas import GeoDataFrame -from pandas import DataFrame -from xcube.constants import LOG from xcube_geodb.core.geodb import GeoDBClient from .geodb_datasource import GeoDBVectorSource from .tools import create_geodb_client from .vectorcube import VectorCube -from ..defaults import STAC_VERSION, STAC_EXTENSIONS class VectorCubeProvider(abc.ABC): @@ -45,41 +38,10 @@ def get_collection_keys(self) -> List[Tuple[str, str]]: @abc.abstractmethod def get_vector_cube(self, collection_id: Tuple[str, str], - bbox: Tuple[float, float, float, float])\ - -> Optional[VectorCube]: + bbox: Tuple[float, float, float, float]) \ + -> VectorCube: pass - @staticmethod - def add_items_to_vector_cube( - collection: GeoDataFrame, vector_cube: VectorCube): - bounds = collection.bounds - for i, row in enumerate(collection.iterrows()): - bbox = bounds.iloc[i] - feature = row[1] - coords = VectorCubeProvider._get_coords(feature) - properties = {} - for k, key in enumerate(feature.keys()): - if not key == 'id' and not \ - collection.dtypes.values[k].name == 'geometry': - if isinstance(feature[key], float) \ - and math.isnan(float(feature[key])): - properties[key] = 'NaN' - else: - properties[key] = feature[key] - - vector_cube['features'].append({ - 'stac_version': STAC_VERSION, - 'stac_extensions': STAC_EXTENSIONS, - 'type': 'Feature', - 'id': feature['id'], - 'bbox': [f'{bbox["minx"]:.4f}', - f'{bbox["miny"]:.4f}', - f'{bbox["maxx"]:.4f}', - f'{bbox["maxy"]:.4f}'], - 'geometry': coords, - 'properties': properties - }) - class GeoDBProvider(VectorCubeProvider): @@ -105,6 +67,6 @@ def get_collection_keys(self) -> List[Tuple[str, str]]: def get_vector_cube(self, collection_id: Tuple[str, str], bbox: Tuple[float, float, float, float] = None) \ - -> Optional[VectorCube]: + -> VectorCube: return VectorCube(collection_id, GeoDBVectorSource(self.config, collection_id)) From ff325033d344d23a0a4862cbce30ae4b6f0ee0b1 Mon Sep 17 00:00:00 2001 From: thomas Date: Fri, 7 Jul 2023 11:07:42 +0200 Subject: [PATCH 109/163] intermediate --- tests/core/mock_vc_provider.py | 4 +--- tests/server/app/test_data_discovery.py | 8 +++----- xcube_geodb_openeo/api/context.py | 22 ++++++++++++++++----- xcube_geodb_openeo/core/geodb_datasource.py | 5 ++++- xcube_geodb_openeo/core/vectorcube.py | 2 +- 5 files changed, 26 insertions(+), 15 deletions(-) diff --git a/tests/core/mock_vc_provider.py b/tests/core/mock_vc_provider.py index 56704f1..4e9840a 100644 --- a/tests/core/mock_vc_provider.py +++ b/tests/core/mock_vc_provider.py @@ -31,9 +31,7 @@ import geojson import shapely import shapely.wkt as wkt -from geojson import coords from geojson.geometry import Geometry -from shapely import LineString from xcube_geodb_openeo.core.geodb_datasource import DataSource, Feature from xcube_geodb_openeo.core.vectorcube import VectorCube @@ -91,7 +89,7 @@ def get_time_dim( def get_vertical_dim( self, bbox: Optional[Tuple[float, float, float, float]] = None) \ - -> Optional[List[Any]]: + -> Optional[List[Any]]: return None def load_features(self, limit: int = 2, diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index 5df77c6..5131c75 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -29,6 +29,7 @@ from xcube.util import extension from xcube.util.extension import ExtensionRegistry +from xcube_geodb_openeo.defaults import STAC_EXTENSIONS from . import test_utils @@ -74,11 +75,8 @@ def test_collection(self): self.assertEqual(200, response.status) collection_data = json.loads(response.data) self.assertEqual("1.0.0", collection_data['stac_version']) - self.assertEqual( - [ - 'https://stac-extensions.github.io/datacube/v2.2.0/schema.json' - ], - collection_data['stac_extensions']) + self.assertListEqual(STAC_EXTENSIONS, + collection_data['stac_extensions']) response_type = collection_data['type'] self.assertEqual(response_type, "Collection") self.assertIsNotNone(collection_data['id']) diff --git a/xcube_geodb_openeo/api/context.py b/xcube_geodb_openeo/api/context.py index a1b0025..c9dc23e 100644 --- a/xcube_geodb_openeo/api/context.py +++ b/xcube_geodb_openeo/api/context.py @@ -116,10 +116,18 @@ def get_collections(self, base_url: str, limit: int, offset: int): links = get_collections_links(limit, offset, url, len(self.collection_ids)) collection_list = [] - for collection_id in self.collection_ids[offset:offset + limit]: + index = offset + actual_limit = limit + while index < offset + actual_limit: + # for collection_id in self.collection_ids[offset:offset + limit]: + collection_id = self.collection_ids[index] collection = self.get_collection(base_url, collection_id, full=False) - collection_list.append(collection) + if collection: + collection_list.append(collection) + else: + actual_limit = actual_limit + 1 + index += 1 self.collections = { 'collections': collection_list, @@ -128,9 +136,11 @@ def get_collections(self, base_url: str, limit: int, offset: int): def get_collection(self, base_url: str, collection_id: Tuple[str, str], - full: bool = False): + full: bool = False) -> Optional[Dict]: vector_cube = self.get_vector_cube(collection_id, bbox=None) - return _get_vector_cube_collection(base_url, vector_cube, full) + if vector_cube: + return _get_vector_cube_collection(base_url, vector_cube, full) + return None def get_collection_items( self, base_url: str, collection_id: Tuple[str, str], limit: int, @@ -206,9 +216,11 @@ def get_collections_links(limit: int, offset: int, url: str, def _get_vector_cube_collection(base_url: str, vector_cube: VectorCube, - full: bool = False): + full: bool = False) -> Optional[Dict]: vector_cube_id = vector_cube.id bbox = vector_cube.get_bbox() + if not bbox: + return None metadata = vector_cube.metadata vector_cube_collection = { 'stac_version': STAC_VERSION, diff --git a/xcube_geodb_openeo/core/geodb_datasource.py b/xcube_geodb_openeo/core/geodb_datasource.py index 1d38486..a53b2b4 100644 --- a/xcube_geodb_openeo/core/geodb_datasource.py +++ b/xcube_geodb_openeo/core/geodb_datasource.py @@ -215,7 +215,8 @@ def get_vertical_dim( return gdf[select] - def get_vector_cube_bbox(self) -> Tuple[float, float, float, float]: + def get_vector_cube_bbox(self) -> \ + Optional[Tuple[float, float, float, float]]: (db, name) = self.collection_id LOG.debug(f'Loading collection bbox for {self.collection_id} from ' f'geoDB...') @@ -231,6 +232,8 @@ def get_vector_cube_bbox(self) -> Tuple[float, float, float, float]: name, db) LOG.debug(f'...done.') + if not vector_cube_bbox: + LOG.warn(f'Empty collection {db}~{name}!') return vector_cube_bbox def get_metadata(self, bbox: Tuple[float, float, float, float]) -> Dict: diff --git a/xcube_geodb_openeo/core/vectorcube.py b/xcube_geodb_openeo/core/vectorcube.py index f815819..80f1af0 100644 --- a/xcube_geodb_openeo/core/vectorcube.py +++ b/xcube_geodb_openeo/core/vectorcube.py @@ -164,7 +164,7 @@ def load_features(self, limit: int, offset: int) -> List[Feature]: self._feature_cache.insert(key, features) return features - def get_bbox(self) -> Tuple[float, float, float, float]: + def get_bbox(self) -> Optional[Tuple[float, float, float, float]]: if self._bbox: return self._bbox self._bbox = self._datasource.get_vector_cube_bbox() From f84886a5f682a3daa0045b28d08267fc8b2c9bdc Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 7 Jul 2023 12:38:18 +0200 Subject: [PATCH 110/163] finished vector-cube-based STAC catalog --- tests/core/mock_vc_provider.py | 23 ++++----- tests/server/app/test_data_discovery.py | 53 +++++++-------------- tests/server/app/test_processing.py | 2 + tests/server/app/test_utils.py | 20 +------- xcube_geodb_openeo/api/context.py | 15 +++--- xcube_geodb_openeo/api/routes.py | 2 + xcube_geodb_openeo/core/geodb_datasource.py | 19 +++----- 7 files changed, 50 insertions(+), 84 deletions(-) diff --git a/tests/core/mock_vc_provider.py b/tests/core/mock_vc_provider.py index 4e9840a..695dea8 100644 --- a/tests/core/mock_vc_provider.py +++ b/tests/core/mock_vc_provider.py @@ -45,7 +45,7 @@ class MockProvider(VectorCubeProvider, DataSource): def __init__(self, config: Mapping[str, Any]): with resources.open_text('tests', 'mock_collections.json') as text: mock_collections = json.load(text)['_MOCK_COLLECTIONS_LIST'] - self._MOCK_COLLECTIONS = {v["id"]: v for v in mock_collections} + self._MOCK_COLLECTIONS = {('', v["id"]): v for v in mock_collections} self.hh = 'POLYGON((9 52, 9 54, 11 54, 11 52, 10 53, 9.5 53.4, ' \ '9.2 52.1, 9 52))' self.pb = 'POLYGON((8.7 51.3, 8.7 51.8, 8.8 51.8, 8.8 51.3, 8.7 51.3))' @@ -101,11 +101,10 @@ def load_features(self, limit: int = 2, 'stac_extensions': STAC_EXTENSIONS, 'type': 'Feature', 'id': '0', - 'bbox': [f'{self.bbox_hh["minx"]:.4f}', - f'{self.bbox_hh["miny"]:.4f}', - f'{self.bbox_hh["maxx"]:.4f}', - f'{self.bbox_hh["maxy"]:.4f}'], - # 'geometry': hh_coordinates, + 'bbox': [f'{self.bbox_hh[0]:.4f}', + f'{self.bbox_hh[1]:.4f}', + f'{self.bbox_hh[2]:.4f}', + f'{self.bbox_hh[3]:.4f}'], 'properties': ['id', 'name', 'geometry', 'population'] } @@ -114,14 +113,16 @@ def load_features(self, limit: int = 2, 'stac_extensions': STAC_EXTENSIONS, 'type': 'Feature', 'id': '1', - 'bbox': [f'{self.bbox_pb["minx"]:.4f}', - f'{self.bbox_pb["miny"]:.4f}', - f'{self.bbox_pb["maxx"]:.4f}', - f'{self.bbox_pb["maxy"]:.4f}'], - # 'geometry': pb_coordinates, + 'bbox': [f'{self.bbox_pb[0]:.4f}', + f'{self.bbox_pb[1]:.4f}', + f'{self.bbox_pb[2]:.4f}', + f'{self.bbox_pb[3]:.4f}'], 'properties': ['id', 'name', 'geometry', 'population'] } + if limit == 1: + return [pb_feature] + return [hh_feature, pb_feature] def get_vector_cube_bbox(self) -> Tuple[float, float, float, float]: diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index 5131c75..f1f8d3d 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -56,21 +56,19 @@ def test_collections(self): first_collection = collections_data['collections'][0] self.assertEqual("1.0.0", first_collection['stac_version']) self.assertEqual( - [ - 'https://stac-extensions.github.io/datacube/v2.2.0/schema.json' - ], + ['datacube', + 'https://stac-extensions.github.io/version/v1.0.0/schema.json'], first_collection['stac_extensions']) self.assertEqual(first_collection['type'], 'Collection') - self.assertEqual('collection_1', first_collection['id']) + self.assertEqual('~collection_1', first_collection['id']) self.assertIsNotNone(first_collection['description']) - self.assertEqual("0.3.1", first_collection['version']) self.assertIsNotNone(first_collection['license']) self.assertIsNotNone(first_collection['extent']) self.assertIsNotNone(first_collection['links']) self.assertEqual(2, len(first_collection['links'])) def test_collection(self): - url = f'http://localhost:{self.port}/collections/database~collection_1' + url = f'http://localhost:{self.port}/collections/~collection_1' response = self.http.request('GET', url) self.assertEqual(200, response.status) collection_data = json.loads(response.data) @@ -81,23 +79,25 @@ def test_collection(self): self.assertEqual(response_type, "Collection") self.assertIsNotNone(collection_data['id']) self.assertIsNotNone(collection_data['description']) - self.assertEqual("0.3.1", collection_data['version']) self.assertIsNotNone(collection_data['license']) self.assertEqual(2, len(collection_data['extent'])) expected_spatial_extent = \ - {'bbox': [[8, 51, 12, 52]], - 'crs': 'http://www.opengis.net/def/crs/OGC/1.3/CRS84'} + {'bbox': [[9.0, 52.0, 11.0, 54.0]]} expected_temporal_extent = {'interval': [[None, None]]} self.assertEqual(expected_spatial_extent, collection_data['extent']['spatial']) self.assertEqual(expected_temporal_extent, collection_data['extent']['temporal']) - self.assertEqual({'vector': {'type': 'geometry', 'axes': ['']}}, # todo + self.assertEqual({'vector': {'axes': ['x', 'y'], + 'bbox': '(9.0, 52.0, 11.0, 54.0)', + 'geometry_types': ['Polygon'], + 'reference_system': '3246', + 'type': 'geometry'}}, collection_data['cube:dimensions']) self.assertIsNotNone(collection_data['summaries']) def test_get_items(self): - url = f'http://localhost:{self.port}/collections/collection_1/items' + url = f'http://localhost:{self.port}/collections/~collection_1/items' response = self.http.request('GET', url) self.assertEqual(200, response.status) items_data = json.loads(response.data) @@ -109,26 +109,15 @@ def test_get_items(self): test_utils.assert_hamburg(self, items_data['features'][0]) test_utils.assert_paderborn(self, items_data['features'][1]) - def test_get_items_no_results(self): - url = f'http://localhost:{self.port}/collections/' \ - f'empty_collection/items' - response = self.http.request('GET', url) - self.assertEqual(200, response.status) - items_data = json.loads(response.data) - self.assertIsNotNone(items_data) - self.assertEqual('FeatureCollection', items_data['type']) - self.assertIsNotNone(items_data['features']) - self.assertEqual(0, len(items_data['features'])) - def test_get_item(self): - url = f'http://localhost:{self.port}/collections/collection_1/items/1' + url = f'http://localhost:{self.port}/collections/~collection_1/items/1' response = self.http.request('GET', url) self.assertEqual(200, response.status) item_data = json.loads(response.data) - test_utils.assert_paderborn(self, item_data) + test_utils.assert_hamburg(self, item_data) def test_get_items_filtered(self): - url = f'http://localhost:{self.port}/collections/collection_1/items' \ + url = f'http://localhost:{self.port}/collections/~collection_1/items' \ f'?limit=1&offset=1' response = self.http.request('GET', url) self.assertEqual(200, response.status) @@ -139,28 +128,20 @@ def test_get_items_filtered(self): self.assertEqual(1, len(items_data['features'])) test_utils.assert_paderborn(self, items_data['features'][0]) - def test_get_items_invalid_filter(self): - for invalid_limit in [-1, 0, 10001]: - url = f'http://localhost:{self.port}/' \ - f'collections/collection_1/items' \ - f'?limit={invalid_limit}' - response = self.http.request('GET', url) - self.assertEqual(500, response.status) - def test_get_items_by_bbox(self): bbox_param = '?bbox=9.01,50.01,10.01,51.01' url = f'http://localhost:{self.port}' \ - f'/collections/collection_1/items' \ + f'/collections/~collection_1/items' \ f'{bbox_param}' response = self.http.request('GET', url) self.assertEqual(200, response.status) items_data = json.loads(response.data) self.assertEqual('FeatureCollection', items_data['type']) self.assertIsNotNone(items_data['features']) - self.assertEqual(1, len(items_data['features'])) + self.assertEqual(2, len(items_data['features'])) def test_not_existing_collection(self): url = f'http://localhost:{self.port}' \ - f'/collections/non-existent-collection' + f'/collections/~non-existent-collection' response = self.http.request('GET', url) self.assertEqual(404, response.status) diff --git a/tests/server/app/test_processing.py b/tests/server/app/test_processing.py index e7b7ead..59c97cf 100644 --- a/tests/server/app/test_processing.py +++ b/tests/server/app/test_processing.py @@ -20,6 +20,7 @@ # DEALINGS IN THE SOFTWARE. import json import pkgutil +import unittest from typing import Dict import yaml @@ -33,6 +34,7 @@ from . import test_utils +@unittest.skip class ProcessingTest(ServerTestCase): def add_extension(self, er: ExtensionRegistry) -> None: diff --git a/tests/server/app/test_utils.py b/tests/server/app/test_utils.py index 00d8c3d..a816865 100644 --- a/tests/server/app/test_utils.py +++ b/tests/server/app/test_utils.py @@ -35,14 +35,7 @@ def assert_paderborn(cls, vector_cube): def assert_paderborn_data(cls, vector_cube): cls.assertEqual(['8.7000', '51.3000', '8.8000', '51.8000'], vector_cube['bbox']) - cls.assertEqual({'type': 'Polygon', 'coordinates': [[[8.7, 51.3], - [8.7, 51.8], - [8.8, 51.8], - [8.8, 51.3], - [8.7, 51.3] - ]]}, - vector_cube['geometry']) - cls.assertEqual({'name': 'paderborn', 'population': 150000}, + cls.assertEqual(['id', 'name', 'geometry', 'population'], vector_cube['properties']) @@ -58,14 +51,5 @@ def assert_hamburg(cls, vector_cube): def assert_hamburg_data(cls, vector_cube): cls.assertEqual(['9.0000', '52.0000', '11.0000', '54.0000'], vector_cube['bbox']) - cls.assertEqual({'type': 'Polygon', 'coordinates': [[[9, 52], - [9, 54], - [11, 54], - [11, 52], - [10, 53], - [9.8, 53.4], - [9.2, 52.1], - [9, 52]]]}, - vector_cube['geometry']) - cls.assertEqual({'name': 'hamburg', 'population': 1700000}, + cls.assertEqual(['id', 'name', 'geometry', 'population'], vector_cube['properties']) diff --git a/xcube_geodb_openeo/api/context.py b/xcube_geodb_openeo/api/context.py index c9dc23e..28ab9ab 100644 --- a/xcube_geodb_openeo/api/context.py +++ b/xcube_geodb_openeo/api/context.py @@ -113,13 +113,11 @@ def collections(self, collections: Dict): def get_collections(self, base_url: str, limit: int, offset: int): url = f'{base_url}/collections' - links = get_collections_links(limit, offset, url, - len(self.collection_ids)) collection_list = [] index = offset actual_limit = limit - while index < offset + actual_limit: - # for collection_id in self.collection_ids[offset:offset + limit]: + while index < offset + actual_limit and \ + index < len(self.collection_ids): collection_id = self.collection_ids[index] collection = self.get_collection(base_url, collection_id, full=False) @@ -129,6 +127,9 @@ def get_collections(self, base_url: str, limit: int, offset: int): actual_limit = actual_limit + 1 index += 1 + links = get_collections_links(limit, offset, url, + len(self.collection_ids)) + self.collections = { 'collections': collection_list, 'links': links @@ -137,10 +138,10 @@ def get_collections(self, base_url: str, limit: int, offset: int): def get_collection(self, base_url: str, collection_id: Tuple[str, str], full: bool = False) -> Optional[Dict]: + if collection_id not in self.collection_ids: + return None vector_cube = self.get_vector_cube(collection_id, bbox=None) - if vector_cube: - return _get_vector_cube_collection(base_url, vector_cube, full) - return None + return _get_vector_cube_collection(base_url, vector_cube, full) def get_collection_items( self, base_url: str, collection_id: Tuple[str, str], limit: int, diff --git a/xcube_geodb_openeo/api/routes.py b/xcube_geodb_openeo/api/routes.py index 190f20f..a04e1e5 100644 --- a/xcube_geodb_openeo/api/routes.py +++ b/xcube_geodb_openeo/api/routes.py @@ -158,6 +158,7 @@ def get(self): @api.route('/collections') +@api.route('/collections/') class CollectionsHandler(ApiHandler): """ Lists available collections with at least the required information. @@ -204,6 +205,7 @@ def get(self, collection_id: str): @api.route('/collections/{collection_id}/items') +@api.route('/collections/{collection_id}/items/') class CollectionItemsHandler(ApiHandler): """ Get features of the feature collection with id collectionId. diff --git a/xcube_geodb_openeo/core/geodb_datasource.py b/xcube_geodb_openeo/core/geodb_datasource.py index a53b2b4..691aa26 100644 --- a/xcube_geodb_openeo/core/geodb_datasource.py +++ b/xcube_geodb_openeo/core/geodb_datasource.py @@ -25,6 +25,7 @@ import dateutil.parser import shapely +import shapely.wkt from geojson.geometry import Geometry from pandas import Series from xcube.constants import LOG @@ -215,25 +216,19 @@ def get_vertical_dim( return gdf[select] - def get_vector_cube_bbox(self) -> \ - Optional[Tuple[float, float, float, float]]: + def get_vector_cube_bbox(self) -> Tuple[float, float, float, float]: (db, name) = self.collection_id + path = f'/geodb_bbox_lut?bbox&table_name=eq.{db}_{name}' LOG.debug(f'Loading collection bbox for {self.collection_id} from ' f'geoDB...') - vector_cube_bbox = self.geodb.get_collection_bbox(name, database=db) + get = self.geodb._get(path) + LOG.debug(f'...done.') + geometry = get.json()[0]['bbox'] + vector_cube_bbox = shapely.wkt.loads(geometry).bounds if vector_cube_bbox: vector_cube_bbox = self._transform_bbox_crs(vector_cube_bbox, name, db) - if not vector_cube_bbox: - vector_cube_bbox = self.geodb.get_collection_bbox(name, db, - exact=True) - if vector_cube_bbox: - vector_cube_bbox = self._transform_bbox_crs(vector_cube_bbox, - name, db) - LOG.debug(f'...done.') - if not vector_cube_bbox: - LOG.warn(f'Empty collection {db}~{name}!') return vector_cube_bbox def get_metadata(self, bbox: Tuple[float, float, float, float]) -> Dict: From fda60664efa004a90f900063d16ea6e6923a8556 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 7 Jul 2023 15:25:22 +0200 Subject: [PATCH 111/163] fix --- xcube_geodb_openeo/api/context.py | 2 ++ xcube_geodb_openeo/core/geodb_datasource.py | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/xcube_geodb_openeo/api/context.py b/xcube_geodb_openeo/api/context.py index 28ab9ab..0c74283 100644 --- a/xcube_geodb_openeo/api/context.py +++ b/xcube_geodb_openeo/api/context.py @@ -27,6 +27,7 @@ from typing import Optional from typing import Tuple +from xcube.constants import LOG from xcube.server.api import ApiContext from xcube.server.api import Context @@ -124,6 +125,7 @@ def get_collections(self, base_url: str, limit: int, offset: int): if collection: collection_list.append(collection) else: + LOG.warning(f'Skipped empty collection {collection_id}') actual_limit = actual_limit + 1 index += 1 diff --git a/xcube_geodb_openeo/core/geodb_datasource.py b/xcube_geodb_openeo/core/geodb_datasource.py index 691aa26..886b8e6 100644 --- a/xcube_geodb_openeo/core/geodb_datasource.py +++ b/xcube_geodb_openeo/core/geodb_datasource.py @@ -221,10 +221,16 @@ def get_vector_cube_bbox(self) -> Tuple[float, float, float, float]: path = f'/geodb_bbox_lut?bbox&table_name=eq.{db}_{name}' LOG.debug(f'Loading collection bbox for {self.collection_id} from ' f'geoDB...') - get = self.geodb._get(path) + response = self.geodb._get(path) LOG.debug(f'...done.') - geometry = get.json()[0]['bbox'] - vector_cube_bbox = shapely.wkt.loads(geometry).bounds + geometry = None + if response.json(): + geometry = response.json()[0]['bbox'] + if geometry: + vector_cube_bbox = shapely.wkt.loads(geometry).bounds + else: + vector_cube_bbox = self.geodb.get_collection_bbox(name, + database=db) if vector_cube_bbox: vector_cube_bbox = self._transform_bbox_crs(vector_cube_bbox, name, db) From 4e3c1439b76053db347ef1e417c79a6bd1a95472 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 7 Jul 2023 15:53:05 +0200 Subject: [PATCH 112/163] fix --- xcube_geodb_openeo/core/geodb_datasource.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/xcube_geodb_openeo/core/geodb_datasource.py b/xcube_geodb_openeo/core/geodb_datasource.py index 886b8e6..9dfcc5f 100644 --- a/xcube_geodb_openeo/core/geodb_datasource.py +++ b/xcube_geodb_openeo/core/geodb_datasource.py @@ -102,11 +102,7 @@ def geodb(self) -> GeoDBClient: @cached_property def collection_info(self): (db, name) = self.collection_id - try: - collection_info = self.geodb.get_collection_info(name, db) - except GeoDBError: - return None # todo - raise meaningful error - return collection_info + return self.geodb.get_collection_info(name, db) def get_feature_count(self) -> int: (db, name) = self.collection_id From 7f5345be7619b5c188937d6d36797c03c790eb41 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 7 Jul 2023 16:10:36 +0200 Subject: [PATCH 113/163] workflow fix --- .github/workflows/workflow.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 49ab32d..03e42c5 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -47,7 +47,7 @@ jobs: conda config --show-sources conda config --show printenv | sort - conda install mamba + conda install 'mamba>=0.27' - name: setup-xcube if: ${{ env.SKIP_UNITTESTS == '0' }} run: | From 03551e2d6c76aeffb743030ac58268a9204d5dbd Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 7 Jul 2023 16:15:03 +0200 Subject: [PATCH 114/163] Dockerfile fix --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index ae04d78..8a7d327 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -3,7 +3,7 @@ FROM continuumio/miniconda3:4.12.0 LABEL maintainer="xcube-team@brockmann-consult.de" LABEL name=xcube_geodb_openeo -RUN conda install -n base -c conda-forge mamba pip +RUN conda install -n base -c conda-forge 'mamba>=0.27' pip #ADD environment.yml /tmp/environment.yml ADD . /tmp/ From 64a7d43117b7e608961389c284f078f444400106 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 17 Aug 2023 15:28:26 +0200 Subject: [PATCH 115/163] finished implementation of use case 1 --- environment.yml | 2 + notebooks/geoDB-openEO_use_case_1.ipynb | 259 +++++++++++++----- tests/core/mock_vc_provider.py | 12 +- tests/core/test_vectorcube.py | 37 +++ tests/server/app/test_data_discovery.py | 2 +- xcube_geodb_openeo/api/context.py | 14 +- xcube_geodb_openeo/api/routes.py | 59 ++-- xcube_geodb_openeo/backend/processes.py | 160 ++++++++--- xcube_geodb_openeo/core/geodb_datasource.py | 123 ++++----- xcube_geodb_openeo/core/vectorcube.py | 22 +- .../core/vectorcube_provider.py | 12 +- xcube_geodb_openeo/defaults.py | 1 - 12 files changed, 503 insertions(+), 200 deletions(-) create mode 100644 tests/core/test_vectorcube.py diff --git a/environment.yml b/environment.yml index 75260ee..e609534 100644 --- a/environment.yml +++ b/environment.yml @@ -13,6 +13,8 @@ dependencies: - xcube_geodb >= 1.0.5 - geojson - yaml + - ipython + - urllib3 # Testing - pytest >=4.4 - pytest-cov >=2.6 diff --git a/notebooks/geoDB-openEO_use_case_1.ipynb b/notebooks/geoDB-openEO_use_case_1.ipynb index b22842f..ac7e2a5 100644 --- a/notebooks/geoDB-openEO_use_case_1.ipynb +++ b/notebooks/geoDB-openEO_use_case_1.ipynb @@ -13,36 +13,62 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, + "execution_count": 120, + "metadata": { + "ExecuteTime": { + "end_time": "2023-08-17T12:45:01.011814100Z", + "start_time": "2023-08-17T12:45:00.984704800Z" + } + }, "outputs": [], "source": [ "import urllib3\n", "import json\n", "\n", "http = urllib3.PoolManager()\n", - "base_url = 'https://geodb.openeo.dev.brockmann-consult.de'" + "# base_url = 'https://geodb.openeo.dev.brockmann-consult.de'\n", + "base_url = 'http://127.0.0.1:8080'" ] }, { - "cell_type": "markdown", - "metadata": {}, + "cell_type": "code", + "execution_count": 121, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.21.1\n" + ] + } + ], "source": [ - "Definition of a helper method that pretty prints the HTTP responses:" - ] + "import openeo\n", + "\n", + "print(openeo.client_version())" + ], + "metadata": { + "collapsed": false, + "ExecuteTime": { + "end_time": "2023-08-17T12:45:01.502222500Z", + "start_time": "2023-08-17T12:45:01.450535500Z" + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, + "execution_count": 122, "outputs": [], "source": [ - "def print_endpoint(url):\n", - " r = http.request('GET', url)\n", - " data = json.loads(r.data)\n", - " print(f\"Status: {r.status}\")\n", - " print(f\"Result: {json.dumps(data, indent=2)}\")" - ] + "connection = openeo.connect(base_url)" + ], + "metadata": { + "collapsed": false, + "ExecuteTime": { + "end_time": "2023-08-17T12:45:04.576098100Z", + "start_time": "2023-08-17T12:45:02.470783100Z" + } + } }, { "cell_type": "markdown", @@ -55,68 +81,131 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 78, + "metadata": { + "ExecuteTime": { + "end_time": "2023-08-17T10:50:04.429746400Z", + "start_time": "2023-08-17T10:50:04.319986900Z" + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n " + }, + "execution_count": 78, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "print_endpoint(f'{base_url}/')" + "connection.capabilities()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Print the response of the well-known endpoint:" + "Show the file formats the geoDB-openEO-backend supports (currently empty):" ] }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 79, + "metadata": { + "ExecuteTime": { + "end_time": "2023-08-17T10:50:13.715617Z", + "start_time": "2023-08-17T10:50:13.587798Z" + } + }, + "outputs": [ + { + "data": { + "text/plain": "{'output': {'GTiff': {'title': 'GeoTiff',\n 'description': \"Export to GeoTiff. Doesn't support cloud-optimized GeoTiffs (COGs) yet.\",\n 'gis_data_types': ['raster'],\n 'parameters': {'tiled': {'type': 'boolean',\n 'description': 'This option can be used to force creation of tiled TIFF files [true]. By default [false] stripped TIFF files are created.',\n 'default': 'false'},\n 'compress': {'type': 'string',\n 'description': 'Set the compression to use.',\n 'default': 'NONE',\n 'enum': ['JPEG', 'LZW', 'DEFLATE', 'NONE']},\n 'jpeg_quality': {'type': 'integer',\n 'description': 'Set the JPEG quality when using JPEG.',\n 'minimum': 1,\n 'maximum': 100,\n 'default': 75}},\n 'links': [{'href': 'https://gdal.org/drivers/raster/gtiff.html',\n 'rel': 'about',\n 'title': 'GDAL on the GeoTiff file format and storage options'}]},\n 'GPKG': {'title': 'OGC GeoPackage',\n 'gis_data_types': ['raster', 'vector'],\n 'parameters': {'version': {'type': 'string',\n 'description': 'Set GeoPackage version. In AUTO mode, this will be equivalent to 1.2 starting with GDAL 2.3.',\n 'enum': ['auto', '1', '1.1', '1.2'],\n 'default': 'auto'}},\n 'links': [{'href': 'https://gdal.org/drivers/raster/gpkg.html',\n 'rel': 'about',\n 'title': 'GDAL on GeoPackage for raster data'},\n {'href': 'https://gdal.org/drivers/vector/gpkg.html',\n 'rel': 'about',\n 'title': 'GDAL on GeoPackage for vector data'}]}},\n 'input': {'GPKG': {'title': 'OGC GeoPackage',\n 'gis_data_types': ['raster', 'vector'],\n 'parameters': {'table': {'type': 'string',\n 'description': '**RASTER ONLY.** Name of the table containing the tiles. If the GeoPackage dataset only contains one table, this option is not necessary. Otherwise, it is required.'}},\n 'links': [{'href': 'https://gdal.org/drivers/raster/gpkg.html',\n 'rel': 'about',\n 'title': 'GDAL on GeoPackage for raster data'},\n {'href': 'https://gdal.org/drivers/vector/gpkg.html',\n 'rel': 'about',\n 'title': 'GDAL on GeoPackage for vector data'}]}}}", + "text/html": "\n \n \n \n \n " + }, + "execution_count": 79, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "print_endpoint(f'{base_url}/.well-known/openeo')" + "connection.list_file_formats()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Show the file formats the geoDB-openEO-backend supports (currently empty):" + "## Collections listing - STAC part\n", + "List the collections currently available using the geoDB-openEO-backend:" ] }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 123, + "metadata": { + "ExecuteTime": { + "end_time": "2023-08-17T12:46:50.257258200Z", + "start_time": "2023-08-17T12:45:12.997044600Z" + } + }, + "outputs": [ + { + "data": { + "text/plain": "['anja~E1',\n 'anja~E10a1',\n 'anja~E10a2',\n 'anja~E11',\n 'anja~E1a',\n 'anja~E1_RACE_INDICATORS',\n 'anja~E2',\n 'anja~E4',\n 'anja~E4_RACE_INDICATORS',\n 'anja~E5',\n 'anja~E7',\n 'anja~E8',\n 'anja~Gran_Chaco',\n 'anja~N3',\n 'anja~N4a',\n 'anja~race_indicators',\n 'demo~land_use',\n 'eea-urban-atlas~AL001L1_TIRANA_UA2018',\n 'eea-urban-atlas~AL003L1_ELBASAN_UA2018',\n 'eea-urban-atlas~AL004L1_SHKODER_UA2018',\n 'eea-urban-atlas~AL005L0_VLORE_UA2018',\n 'eea-urban-atlas~AT001L3_WIEN_UA2018',\n 'eea-urban-atlas~AT002L3_GRAZ_UA2018',\n 'eea-urban-atlas~AT003L3_LINZ_UA2018',\n 'eea-urban-atlas~AT004L3_SALZBURG_UA2018',\n 'eea-urban-atlas~AT005L3_INNSBRUCK_UA2018',\n 'eea-urban-atlas~AT006L2_KLAGENFURT_UA2018',\n 'eea-urban-atlas~BA001L1_SARAJEVO_UA2018',\n 'eea-urban-atlas~BA002L1_BANJA_LUKA_UA2018',\n 'eea-urban-atlas~BA003L1_MOSTAR_UA2018',\n 'eea-urban-atlas~BA004L1_TUZLA_UA2018',\n 'eea-urban-atlas~BA005L1_ZENICA_UA2018',\n 'eea-urban-atlas~BE001L2_BRUXELLES_BRUSSEL_UA2018',\n 'eea-urban-atlas~BE002L2_ANTWERPEN_UA2018',\n 'eea-urban-atlas~BE003L2_GENT_UA2018',\n 'eea-urban-atlas~BE004L2_CHARLEROI_UA2018',\n 'eea-urban-atlas~BE005L2_LIEGE_UA2018',\n 'eea-urban-atlas~BE006L2_BRUGGE_UA2018',\n 'eea-urban-atlas~BE007L2_NAMUR_UA2018',\n 'eea-urban-atlas~BE008L1_LEUVEN_UA2018',\n 'eea-urban-atlas~BE009L1_MONS_UA2018',\n 'eea-urban-atlas~BE010L1_KORTRIJK_UA2018',\n 'eea-urban-atlas~BE011L1_OOSTENDE_UA2018',\n 'eea-urban-atlas~BG001L2_SOFIA_UA2018',\n 'eea-urban-atlas~BG002L2_PLOVDIV_UA2018',\n 'eea-urban-atlas~BG003L2_VARNA_UA2018',\n 'eea-urban-atlas~BG004L2_BURGAS_UA2018',\n 'eea-urban-atlas~BG005L1_PLEVEN_UA2018',\n 'eea-urban-atlas~BG006L2_RUSE_UA2018',\n 'eea-urban-atlas~BG007L2_VIDIN_UA2018',\n 'eea-urban-atlas~BG008L2_STARA_ZAGORA_UA2018',\n 'eea-urban-atlas~BG009L1_SLIVEN_UA2018',\n 'eea-urban-atlas~BG010L1_DOBRICH_UA2018',\n 'eea-urban-atlas~BG011L1_SHUMEN_UA2018',\n 'eea-urban-atlas~BG013L1_YAMBOL_UA2018',\n 'eea-urban-atlas~BG014L1_HASKOVO_UA2018',\n 'eea-urban-atlas~BG015L1_PAZARDZHIK_UA2018',\n 'eea-urban-atlas~BG016L1_BLAGOEVGRAD_UA2018',\n 'eea-urban-atlas~BG017L1_VELIKO_TARNOVO_UA2018',\n 'eea-urban-atlas~BG018L1_VRATSA_UA2018',\n 'eea-urban-atlas~CH001L2_ZURICH_UA2018',\n 'eea-urban-atlas~CH002L2_GENEVE_UA2018',\n 'eea-urban-atlas~CH003L2_BASEL_UA2018',\n 'eea-urban-atlas~CH004L2_BERN_UA2018',\n 'eea-urban-atlas~CH005L2_LAUSANNE_UA2018',\n 'eea-urban-atlas~CH006L1_WINTERTHUR_UA2018',\n 'eea-urban-atlas~CH007L2_ST_GALLEN_UA2018',\n 'eea-urban-atlas~CH008L2_LUZERN_UA2018',\n 'eea-urban-atlas~CH009L2_LUGANO_UA2018',\n 'eea-urban-atlas~CH010L1_BIEL_BIENNE_UA2018',\n 'eea-urban-atlas~CY001L2_LEFKOSIA_UA2018',\n 'eea-urban-atlas~CY501L2_LEMESOS_UA2018',\n 'eea-urban-atlas~CZ001L2_PRAHA_UA2018',\n 'eea-urban-atlas~CZ002L2_BRNO_UA2018',\n 'eea-urban-atlas~CZ003L2_OSTRAVA_UA2018',\n 'eea-urban-atlas~CZ004L2_PLZEN_UA2018',\n 'eea-urban-atlas~CZ005L2_USTI_NAD_LABEM_UA2018',\n 'eea-urban-atlas~CZ006L2_OLOMOUC_UA2018',\n 'eea-urban-atlas~CZ007L2_LIBEREC_UA2018',\n 'eea-urban-atlas~CZ008L2_CESKE_BUDEJOVICE_UA2018',\n 'eea-urban-atlas~CZ009L2_HRADEC_KRALOVE_UA2018',\n 'eea-urban-atlas~CZ010L2_PARDUBICE_UA2018',\n 'eea-urban-atlas~CZ011L2_ZLIN_UA2018',\n 'eea-urban-atlas~CZ013L2_KARLOVY_VARY_UA2018',\n 'eea-urban-atlas~CZ014L2_JIHLAVA_UA2018',\n 'eea-urban-atlas~CZ016L2_MOST_UA2018',\n 'eea-urban-atlas~CZ018L2_CHOMUTOV_JIRKOV_UA2018',\n 'eea-urban-atlas~DE001L1_BERLIN_UA2018',\n 'eea-urban-atlas~DE002L1_HAMBURG_UA2018',\n 'eea-urban-atlas~DE003L1_MUNCHEN_UA2018',\n 'eea-urban-atlas~DE004L1_KOLN_UA2018',\n 'eea-urban-atlas~DE005L1_FRANKFURT_AM_MAIN_UA2018',\n 'eea-urban-atlas~DE007L1_STUTTGART_UA2018',\n 'eea-urban-atlas~DE008L2_LEIPZIG_UA2018',\n 'eea-urban-atlas~DE009L2_DRESDEN_UA2018',\n 'eea-urban-atlas~DE011L1_DUSSELDORF_UA2018',\n 'eea-urban-atlas~DE012L1_BREMEN_UA2018',\n 'eea-urban-atlas~DE013L1_HANNOVER_UA2018',\n 'eea-urban-atlas~DE014L1_NURNBERG_UA2018',\n 'eea-urban-atlas~DE017L0_BIELEFELD_UA2018',\n 'eea-urban-atlas~DE018L1_HALLE_AN_DER_SAALE_UA2018',\n 'eea-urban-atlas~DE019L2_MAGDEBURG_UA2018',\n 'eea-urban-atlas~DE020L1_WIESBADEN_UA2018',\n 'eea-urban-atlas~DE021L1_GOTTINGEN_UA2018',\n 'eea-urban-atlas~DE025L1_DARMSTADT_UA2018',\n 'eea-urban-atlas~DE026L1_TRIER_UA2018',\n 'eea-urban-atlas~DE027L1_FREIBURG_IM_BREISGAU_UA2018',\n 'eea-urban-atlas~DE028L1_REGENSBURG_UA2018',\n 'eea-urban-atlas~DE029L0_FRANKFURT_ODER_UA2018',\n 'eea-urban-atlas~DE030L1_WEIMAR_UA2018',\n 'eea-urban-atlas~DE031L1_SCHWERIN_UA2018',\n 'eea-urban-atlas~DE032L1_ERFURT_UA2018',\n 'eea-urban-atlas~DE033L1_AUGSBURG_UA2018',\n 'eea-urban-atlas~DE034L1_BONN_UA2018',\n 'eea-urban-atlas~DE035L1_KARLSRUHE_UA2018',\n 'eea-urban-atlas~DE036L0_MONCHENGLADBACH_UA2018',\n 'eea-urban-atlas~DE037L1_MAINZ_UA2018',\n 'eea-urban-atlas~DE038L1_RUHRGEBIET_UA2018',\n 'eea-urban-atlas~DE039L1_KIEL_UA2018',\n 'eea-urban-atlas~DE040L1_SAARBRUCKEN_UA2018',\n 'eea-urban-atlas~DE042L1_KOBLENZ_UA2018',\n 'eea-urban-atlas~DE043L2_ROSTOCK_UA2018',\n 'eea-urban-atlas~DE044L1_KAISERSLAUTERN_UA2018',\n 'eea-urban-atlas~DE045L1_ISERLOHN_UA2018',\n 'eea-urban-atlas~DE048L1_WILHELMSHAVEN_UA2018',\n 'eea-urban-atlas~DE050L1_TUBINGEN_UA2018',\n 'eea-urban-atlas~DE051L1_VILLINGEN_SCHWENNINGEN_UA2018',\n 'eea-urban-atlas~DE052L1_FLENSBURG_UA2018',\n 'eea-urban-atlas~DE053L1_MARBURG_UA2018',\n 'eea-urban-atlas~DE054L1_KONSTANZ_UA2018',\n 'eea-urban-atlas~DE055L0_NEUMUNSTER_UA2018',\n 'eea-urban-atlas~DE056L0_BRANDENBURG_AN_DER_HAVEL_UA2018',\n 'eea-urban-atlas~DE057L1_GIESSEN_UA2018',\n 'eea-urban-atlas~DE058L1_LUNEBURG_UA2018',\n 'eea-urban-atlas~DE059L1_BAYREUTH_UA2018',\n 'eea-urban-atlas~DE060L1_CELLE_UA2018',\n 'eea-urban-atlas~DE061L1_ASCHAFFENBURG_UA2018',\n 'eea-urban-atlas~DE062L1_BAMBERG_UA2018',\n 'eea-urban-atlas~DE063L1_PLAUEN_UA2018',\n 'eea-urban-atlas~DE064L1_NEUBRANDENBURG_UA2018',\n 'eea-urban-atlas~DE065L1_FULDA_UA2018',\n 'eea-urban-atlas~DE066L1_KEMPTEN_ALLGAU_UA2018',\n 'eea-urban-atlas~DE067L1_LANDSHUT_UA2018',\n 'eea-urban-atlas~DE069L1_ROSENHEIM_UA2018',\n 'eea-urban-atlas~DE071L1_STRALSUND_UA2018',\n 'eea-urban-atlas~DE072L1_FRIEDRICHSHAFEN_UA2018',\n 'eea-urban-atlas~DE073L1_OFFENBURG_UA2018',\n 'eea-urban-atlas~DE074L1_GORLITZ_UA2018',\n 'eea-urban-atlas~DE077L1_SCHWEINFURT_UA2018',\n 'eea-urban-atlas~DE078L1_GREIFSWALD_UA2018',\n 'eea-urban-atlas~DE079L1_WETZLAR_UA2018',\n 'eea-urban-atlas~DE081L1_PASSAU_UA2018',\n 'eea-urban-atlas~DE082L0_DESSAU_ROSSLAU_UA2018',\n 'eea-urban-atlas~DE083L1_BRAUNSCHWEIG_SALZGITTER_WOLFSBURG_UA201',\n 'eea-urban-atlas~DE084L1_MANNHEIM_LUDWIGSHAFEN_UA2018',\n 'eea-urban-atlas~DE504L1_MUNSTER_UA2018',\n 'eea-urban-atlas~DE505L0_CHEMNITZ_UA2018',\n 'eea-urban-atlas~DE507L1_AACHEN_UA2018',\n 'eea-urban-atlas~DE508L0_KREFELD_UA2018',\n 'eea-urban-atlas~DE510L1_LUBECK_UA2018',\n 'eea-urban-atlas~DE513L1_KASSEL_UA2018',\n 'eea-urban-atlas~DE516L0_SOLINGEN_UA2018',\n 'eea-urban-atlas~DE517L1_OSNABRUCK_UA2018',\n 'eea-urban-atlas~DE520L1_OLDENBURG_OLDENBURG_UA2018',\n 'eea-urban-atlas~DE522L1_HEIDELBERG_UA2018',\n 'eea-urban-atlas~DE523L1_PADERBORN_UA2018',\n 'eea-urban-atlas~DE524L2_WURZBURG_UA2018',\n 'eea-urban-atlas~DE527L1_BREMERHAVEN_UA2018',\n 'eea-urban-atlas~DE529L1_HEILBRONN_UA2018',\n 'eea-urban-atlas~DE530L0_REMSCHEID_UA2018',\n 'eea-urban-atlas~DE532L1_ULM_UA2018',\n 'eea-urban-atlas~DE533L1_PFORZHEIM_UA2018',\n 'eea-urban-atlas~DE534L1_INGOLSTADT_UA2018',\n 'eea-urban-atlas~DE535L1_GERA_UA2018',\n 'eea-urban-atlas~DE537L1_REUTLINGEN_UA2018',\n 'eea-urban-atlas~DE539L1_COTTBUS_UA2018',\n 'eea-urban-atlas~DE540L2_SIEGEN_UA2018',\n 'eea-urban-atlas~DE542L1_HILDESHEIM_UA2018',\n 'eea-urban-atlas~DE544L1_ZWICKAU_UA2018',\n 'eea-urban-atlas~DE546L0_WUPPERTAL_UA2018',\n 'eea-urban-atlas~DE547L2_JENA_UA2018',\n 'eea-urban-atlas~DE548L1_DUREN_UA2018',\n 'eea-urban-atlas~DE549L1_BOCHOLT_UA2018',\n 'eea-urban-atlas~DK001L2_KOBENHAVN_UA2018',\n 'eea-urban-atlas~DK002L3_ARHUS_UA2018',\n 'eea-urban-atlas~DK003L2_ODENSE_UA2018',\n 'eea-urban-atlas~DK004L3_AALBORG_UA2018',\n 'eea-urban-atlas~EE001L1_TALLINN_UA2018',\n 'eea-urban-atlas~EE002L1_TARTU_UA2018',\n 'eea-urban-atlas~EE003L0_NARVA_UA2018',\n 'eea-urban-atlas~EL001L1_ATHINA_UA2018',\n 'eea-urban-atlas~EL002L1_THESSALONIKI_UA2018',\n 'eea-urban-atlas~EL003L1_PATRA_UA2018',\n 'eea-urban-atlas~EL004L1_IRAKLEIO_UA2018',\n 'eea-urban-atlas~EL005L1_LARISA_UA2018',\n 'eea-urban-atlas~EL006L1_VOLOS_UA2018',\n 'eea-urban-atlas~EL007L1_IOANNINA_UA2018',\n 'eea-urban-atlas~EL008L1_KAVALA_UA2018',\n 'eea-urban-atlas~EL009L1_KALAMATA_UA2018',\n 'eea-urban-atlas~ES001L3_MADRID_UA2018',\n 'eea-urban-atlas~ES002L2_BARCELONA_UA2018',\n 'eea-urban-atlas~ES003L3_VALENCIA_UA2018',\n 'eea-urban-atlas~ES004L3_SEVILLA_UA2018',\n 'eea-urban-atlas~ES005L2_ZARAGOZA_UA2018',\n 'eea-urban-atlas~ES006L2_MALAGA_UA2018',\n 'eea-urban-atlas~ES007L2_MURCIA_UA2018',\n 'eea-urban-atlas~ES008L2_LAS_PALMAS_UA2018',\n 'eea-urban-atlas~ES009L2_VALLADOLID_UA2018',\n 'eea-urban-atlas~ES010L2_PALMA_DE_MALLORCA_UA2018',\n 'eea-urban-atlas~ES011L2_SANTIAGO_DE_COMPOSTELA_UA2018',\n 'eea-urban-atlas~ES012L2_VITORIA_GASTEIZ_UA2018',\n 'eea-urban-atlas~ES013L2_OVIEDO_UA2018',\n 'eea-urban-atlas~ES014L3_PAMPLONA_IRUNA_UA2018',\n 'eea-urban-atlas~ES015L2_SANTANDER_UA2018',\n 'eea-urban-atlas~ES016L2_TOLEDO_UA2018',\n 'eea-urban-atlas~ES017L2_BADAJOZ_UA2018',\n 'eea-urban-atlas~ES018L2_LOGRONO_UA2018',\n 'eea-urban-atlas~ES019L3_BILBAO_UA2018',\n 'eea-urban-atlas~ES020L2_CORDOBA_UA2018',\n 'eea-urban-atlas~ES021L2_ALICANTE_ALACANT_UA2018',\n 'eea-urban-atlas~ES022L2_VIGO_UA2018',\n 'eea-urban-atlas~ES023L2_GIJON_UA2018',\n 'eea-urban-atlas~ES025L3_SANTA_CRUZ_DE_TENERIFE_UA2018',\n 'eea-urban-atlas~ES026L2_CORUNA_A_UA2018',\n 'eea-urban-atlas~ES028L1_REUS_UA2018',\n 'eea-urban-atlas~ES031L1_LUGO_UA2018',\n 'eea-urban-atlas~ES033L1_GIRONA_UA2018',\n 'eea-urban-atlas~ES034L1_CACERES_UA2018',\n 'eea-urban-atlas~ES035L1_TORREVIEJA_UA2018',\n 'eea-urban-atlas~ES039L1_AVILES_UA2018',\n 'eea-urban-atlas~ES040L1_TALAVERA_DE_LA_REINA_UA2018',\n 'eea-urban-atlas~ES041L1_PALENCIA_UA2018',\n 'eea-urban-atlas~ES043L1_FERROL_UA2018',\n 'eea-urban-atlas~ES044L1_PONTEVEDRA_UA2018',\n 'eea-urban-atlas~ES046L1_GANDIA_UA2018',\n 'eea-urban-atlas~ES048L1_GUADALAJARA_UA2018',\n 'eea-urban-atlas~ES050L1_MANRESA_UA2018',\n 'eea-urban-atlas~ES053L1_CIUDAD_REAL_UA2018',\n 'eea-urban-atlas~ES054L1_BENIDORM_UA2018',\n 'eea-urban-atlas~ES057L1_PONFERRADA_UA2018',\n 'eea-urban-atlas~ES059L1_ZAMORA_UA2018',\n 'eea-urban-atlas~ES070L1_IRUN_UA2018',\n 'eea-urban-atlas~ES072L1_ARRECIFE_UA2018',\n 'eea-urban-atlas~ES501L3_GRANADA_UA2018',\n 'eea-urban-atlas~ES505L1_ELCHE_ELX_UA2018',\n 'eea-urban-atlas~ES506L1_CARTAGENA_UA2018',\n 'eea-urban-atlas~ES508L1_JEREZ_DE_LA_FRONTERA_UA2018',\n 'eea-urban-atlas~ES510L1_DONOSTIA_SAN_SEBASTIAN_UA2018',\n 'eea-urban-atlas~ES514L1_ALMERIA_UA2018',\n 'eea-urban-atlas~ES515L1_BURGOS_UA2018',\n 'eea-urban-atlas~ES516L1_SALAMANCA_UA2018',\n 'eea-urban-atlas~ES519L1_ALBACETE_UA2018',\n 'eea-urban-atlas~ES520L1_CASTELLON_CASTELLO_UA2018',\n 'eea-urban-atlas~ES521L1_HUELVA_UA2018',\n 'eea-urban-atlas~ES522L1_CADIZ_UA2018',\n 'eea-urban-atlas~ES523L1_LEON_UA2018',\n 'eea-urban-atlas~ES525L1_TARRAGONA_UA2018',\n 'eea-urban-atlas~ES527L1_JAEN_UA2018',\n 'eea-urban-atlas~ES528L1_LLEIDA_UA2018',\n 'eea-urban-atlas~ES529L1_OURENSE_UA2018',\n 'eea-urban-atlas~ES532L1_ALGECIRAS_UA2018',\n 'eea-urban-atlas~ES533L1_MARBELLA_UA2018',\n 'eea-urban-atlas~ES537L1_ALCOY_UA2018',\n 'eea-urban-atlas~ES538L1_AVILA_UA2018',\n 'eea-urban-atlas~ES542L1_CUENCA_UA2018',\n 'eea-urban-atlas~ES543L1_EIVISSA_UA2018',\n 'eea-urban-atlas~ES544L1_LINARES_UA2018',\n 'eea-urban-atlas~ES545L1_LORCA_UA2018',\n 'eea-urban-atlas~ES546L1_MERIDA_UA2018',\n 'eea-urban-atlas~ES547L1_SAGUNTO_UA2018',\n 'eea-urban-atlas~ES550L1_PUERTO_DE_LA_CRUZ_UA2018',\n 'eea-urban-atlas~ES552L1_IGUALADA_UA2018',\n 'eea-urban-atlas~FI001L3_HELSINKI_UA2018',\n 'eea-urban-atlas~FI002L3_TAMPERE_UA2018',\n 'eea-urban-atlas~FI003L4_TURKU_UA2018',\n 'eea-urban-atlas~FI004L4_OULU_UA2018',\n 'eea-urban-atlas~FI007L2_LAHTI_UA2018',\n 'eea-urban-atlas~FI008L2_KUOPIO_UA2018',\n 'eea-urban-atlas~FI009L2_JYVASKYLA_UA2018',\n 'eea-urban-atlas~FR001L1_PARIS_UA2018',\n 'eea-urban-atlas~FR003L2_LYON_UA2018',\n 'eea-urban-atlas~FR004L2_TOULOUSE_UA2018',\n 'eea-urban-atlas~FR006L2_STRASBOURG_UA2018',\n 'eea-urban-atlas~FR007L2_BORDEAUX_UA2018',\n 'eea-urban-atlas~FR008L2_NANTES_UA2018',\n 'eea-urban-atlas~FR009L2_LILLE_UA2018',\n 'eea-urban-atlas~FR010L2_MONTPELLIER_UA2018',\n 'eea-urban-atlas~FR011L2_SAINT_ETIENNE_UA2018',\n 'eea-urban-atlas~FR012L2_LE_HAVRE_UA2018',\n 'eea-urban-atlas~FR013L2_RENNES_UA2018',\n 'eea-urban-atlas~FR014L2_AMIENS_UA2018',\n 'eea-urban-atlas~FR016L2_NANCY_UA2018',\n 'eea-urban-atlas~FR017L2_METZ_UA2018',\n 'eea-urban-atlas~FR018L2_REIMS_UA2018',\n 'eea-urban-atlas~FR019L2_ORLEANS_UA2018',\n 'eea-urban-atlas~FR020L2_DIJON_UA2018',\n 'eea-urban-atlas~FR021L2_POITIERS_UA2018',\n 'eea-urban-atlas~FR022L2_CLERMONT_FERRAND_UA2018',\n 'eea-urban-atlas~FR023L2_CAEN_UA2018',\n 'eea-urban-atlas~FR024L2_LIMOGES_UA2018',\n 'eea-urban-atlas~FR025L2_BESANCON_UA2018',\n 'eea-urban-atlas~FR026L2_GRENOBLE_UA2018',\n 'eea-urban-atlas~FR027L2_AJACCIO_UA2018',\n 'eea-urban-atlas~FR028L1_SAINT_DENIS_UA2018',\n 'eea-urban-atlas~FR030L1_FORT_DE_FRANCE_UA2018',\n 'eea-urban-atlas~FR032L2_TOULON_UA2018',\n 'eea-urban-atlas~FR034L2_VALENCIENNES_UA2018',\n 'eea-urban-atlas~FR035L2_TOURS_UA2018',\n 'eea-urban-atlas~FR036L2_ANGERS_UA2018',\n 'eea-urban-atlas~FR037L2_BREST_UA2018',\n 'eea-urban-atlas~FR038L2_LE_MANS_UA2018',\n 'eea-urban-atlas~FR039L1_AVIGNON_UA2018',\n 'eea-urban-atlas~FR040L2_MULHOUSE_UA2018',\n 'eea-urban-atlas~FR042L2_DUNKERQUE_UA2018',\n 'eea-urban-atlas~FR043L2_PERPIGNAN_UA2018',\n 'eea-urban-atlas~FR044L2_NIMES_UA2018',\n 'eea-urban-atlas~FR045L2_PAU_UA2018',\n 'eea-urban-atlas~FR046L2_BAYONNE_UA2018',\n 'eea-urban-atlas~FR047L0_ANNEMASSE_UA2018',\n 'eea-urban-atlas~FR048L2_ANNECY_UA2018',\n 'eea-urban-atlas~FR049L2_LORIENT_UA2018',\n 'eea-urban-atlas~FR050L2_MONTBELIARD_UA2018',\n 'eea-urban-atlas~FR051L2_TROYES_UA2018',\n 'eea-urban-atlas~FR052L2_SAINT_NAZAIRE_UA2018',\n 'eea-urban-atlas~FR053L2_LA_ROCHELLE_UA2018',\n 'eea-urban-atlas~FR056L2_ANGOULEME_UA2018',\n 'eea-urban-atlas~FR057L2_BOULOGNE_SUR_MER_UA2018',\n 'eea-urban-atlas~FR058L2_CHAMBERY_UA2018',\n 'eea-urban-atlas~FR059L2_CHALON_SUR_SAONE_UA2018',\n 'eea-urban-atlas~FR060L2_CHARTRES_UA2018',\n 'eea-urban-atlas~FR061L2_NIORT_UA2018',\n 'eea-urban-atlas~FR062L2_CALAIS_UA2018',\n 'eea-urban-atlas~FR063L2_BEZIERS_UA2018',\n 'eea-urban-atlas~FR064L2_ARRAS_UA2018',\n 'eea-urban-atlas~FR065L2_BOURGES_UA2018',\n 'eea-urban-atlas~FR066L2_SAINT_BRIEUC_UA2018',\n 'eea-urban-atlas~FR067L2_QUIMPER_UA2018',\n 'eea-urban-atlas~FR068L2_VANNES_UA2018',\n 'eea-urban-atlas~FR069L2_CHERBOURG_UA2018',\n 'eea-urban-atlas~FR073L2_TARBES_UA2018',\n 'eea-urban-atlas~FR074L2_COMPIEGNE_UA2018',\n 'eea-urban-atlas~FR076L2_BELFORT_UA2018',\n 'eea-urban-atlas~FR077L2_ROANNE_UA2018',\n 'eea-urban-atlas~FR079L2_SAINT_QUENTIN_UA2018',\n 'eea-urban-atlas~FR082L2_BEAUVAIS_UA2018',\n 'eea-urban-atlas~FR084L2_CREIL_UA2018',\n 'eea-urban-atlas~FR086L2_EVREUX_UA2018',\n 'eea-urban-atlas~FR090L2_CHATEAUROUX_UA2018',\n 'eea-urban-atlas~FR093L2_BRIVE_LA_GAILLARDE_UA2018',\n 'eea-urban-atlas~FR096L2_ALBI_UA2018',\n 'eea-urban-atlas~FR099L2_FREJUS_UA2018',\n 'eea-urban-atlas~FR104L2_CHALONS_EN_CHAMPAGNE_UA2018',\n 'eea-urban-atlas~FR203L2_MARSEILLE_UA2018',\n 'eea-urban-atlas~FR205L2_NICE_UA2018',\n 'eea-urban-atlas~FR207L2_LENS_LIEVIN_UA2018',\n 'eea-urban-atlas~FR208L1_HENIN_CARVIN_UA2018',\n 'eea-urban-atlas~FR209L2_DOUAI_UA2018',\n 'eea-urban-atlas~FR214L1_VALENCE_UA2018',\n 'eea-urban-atlas~FR215L2_ROUEN_UA2018',\n 'eea-urban-atlas~FR304L1_MELUN_UA2018',\n 'eea-urban-atlas~FR324L1_MARTIGUES_UA2018',\n 'eea-urban-atlas~FR505L1_CHARLEVILLE_MEZIERES_UA2018',\n 'eea-urban-atlas~FR506L1_COLMAR_UA2018',\n 'eea-urban-atlas~FR519L1_CANNES_UA2018',\n 'eea-urban-atlas~HR001L2_GRAD_ZAGREB_UA2018',\n 'eea-urban-atlas~HR002L2_RIJEKA_UA2018',\n 'eea-urban-atlas~HR003L2_SLAVONSKI_BROD_UA2018',\n 'eea-urban-atlas~HR004L2_OSIJEK_UA2018',\n 'eea-urban-atlas~HR005L2_SPLIT_UA2018',\n 'eea-urban-atlas~HR006L1_PULA_POLA_UA2018',\n 'eea-urban-atlas~HR007L1_ZADAR_UA2018',\n 'eea-urban-atlas~HU001L2_BUDAPEST_UA2018',\n 'eea-urban-atlas~HU002L2_MISKOLC_UA2018',\n 'eea-urban-atlas~HU003L2_NYIREGYHAZA_UA2018',\n 'eea-urban-atlas~HU004L2_PECS_UA2018',\n 'eea-urban-atlas~HU005L2_DEBRECEN_UA2018',\n 'eea-urban-atlas~HU006L2_SZEGED_UA2018',\n 'eea-urban-atlas~HU007L2_GYOR_UA2018',\n 'eea-urban-atlas~HU008L2_KECSKEMET_UA2018',\n 'eea-urban-atlas~HU009L2_SZEKESFEHERVAR_UA2018',\n 'eea-urban-atlas~HU010L1_SZOMBATHELY_UA2018',\n 'eea-urban-atlas~HU011L1_SZOLNOK_UA2018',\n 'eea-urban-atlas~HU012L1_TATABANYA_UA2018',\n 'eea-urban-atlas~HU013L1_VESZPREM_UA2018',\n 'eea-urban-atlas~HU014L1_BEKESCSABA_UA2018',\n 'eea-urban-atlas~HU015L1_KAPOSVAR_UA2018',\n 'eea-urban-atlas~HU016L1_EGER_UA2018',\n 'eea-urban-atlas~HU017L1_DUNAUJVAROS_UA2018',\n 'eea-urban-atlas~HU018L1_ZALAEGERSZEG_UA2018',\n 'eea-urban-atlas~HU019L1_SOPRON_UA2018',\n 'eea-urban-atlas~IE001L1_DUBLIN_UA2018',\n 'eea-urban-atlas~IE002L1_CORK_UA2018',\n 'eea-urban-atlas~IE003L1_LIMERICK_UA2018',\n 'eea-urban-atlas~IE004L1_GALWAY_UA2018',\n 'eea-urban-atlas~IE005L1_WATERFORD_UA2018',\n 'eea-urban-atlas~IS001L1_REYKJAVIK_UA2018',\n 'eea-urban-atlas~IT001L3_ROMA_UA2018',\n 'eea-urban-atlas~IT002L3_MILANO_UA2018',\n 'eea-urban-atlas~IT003L3_NAPOLI_UA2018',\n 'eea-urban-atlas~IT004L2_TORINO_UA2018',\n 'eea-urban-atlas~IT005L3_PALERMO_UA2018',\n 'eea-urban-atlas~IT006L3_GENOVA_UA2018',\n 'eea-urban-atlas~IT007L3_FIRENZE_UA2018',\n 'eea-urban-atlas~IT008L3_BARI_UA2018',\n 'eea-urban-atlas~IT009L1_BOLOGNA_UA2018',\n 'eea-urban-atlas~IT010L2_CATANIA_UA2018',\n 'eea-urban-atlas~IT011L2_VENEZIA_UA2018',\n 'eea-urban-atlas~IT012L3_VERONA_UA2018',\n 'eea-urban-atlas~IT013L3_CREMONA_UA2018',\n 'eea-urban-atlas~IT014L3_TRENTO_UA2018',\n 'eea-urban-atlas~IT015L1_TRIESTE_UA2018',\n 'eea-urban-atlas~IT016L3_PERUGIA_UA2018',\n 'eea-urban-atlas~IT017L3_ANCONA_UA2018',\n 'eea-urban-atlas~IT019L2_PESCARA_UA2018',\n 'eea-urban-atlas~IT020L3_CAMPOBASSO_UA2018',\n 'eea-urban-atlas~IT021L2_CASERTA_UA2018',\n 'eea-urban-atlas~IT022L2_TARANTO_UA2018',\n 'eea-urban-atlas~IT023L2_POTENZA_UA2018',\n 'eea-urban-atlas~IT024L3_CATANZARO_UA2018',\n 'eea-urban-atlas~IT025L3_REGGIO_DI_CALABRIA_UA2018',\n 'eea-urban-atlas~IT026L3_SASSARI_UA2018',\n 'eea-urban-atlas~IT027L2_CAGLIARI_UA2018',\n 'eea-urban-atlas~IT028L3_PADOVA_UA2018',\n 'eea-urban-atlas~IT029L3_BRESCIA_UA2018',\n 'eea-urban-atlas~IT030L3_MODENA_UA2018',\n 'eea-urban-atlas~IT031L3_FOGGIA_UA2018',\n 'eea-urban-atlas~IT032L3_SALERNO_UA2018',\n 'eea-urban-atlas~IT033L2_PIACENZA_UA2018',\n 'eea-urban-atlas~IT034L1_BOLZANO_UA2018',\n 'eea-urban-atlas~IT035L2_UDINE_UA2018',\n 'eea-urban-atlas~IT036L2_LA_SPEZIA_UA2018',\n 'eea-urban-atlas~IT037L1_LECCE_UA2018',\n 'eea-urban-atlas~IT038L1_BARLETTA_UA2018',\n 'eea-urban-atlas~IT039L2_PESARO_UA2018',\n 'eea-urban-atlas~IT040L2_COMO_UA2018',\n 'eea-urban-atlas~IT041L2_PISA_UA2018',\n 'eea-urban-atlas~IT042L1_TREVISO_UA2018',\n 'eea-urban-atlas~IT043L2_VARESE_UA2018',\n 'eea-urban-atlas~IT045L2_ASTI_UA2018',\n 'eea-urban-atlas~IT046L2_PAVIA_UA2018',\n 'eea-urban-atlas~IT047L1_MASSA_UA2018',\n 'eea-urban-atlas~IT048L2_COSENZA_UA2018',\n 'eea-urban-atlas~IT052L1_SAVONA_UA2018',\n 'eea-urban-atlas~IT054L1_MATERA_UA2018',\n 'eea-urban-atlas~IT056L1_ACIREALE_UA2018',\n 'eea-urban-atlas~IT057L2_AVELLINO_UA2018',\n 'eea-urban-atlas~IT058L2_PORDENONE_UA2018',\n 'eea-urban-atlas~IT060L1_LECCO_UA2018',\n 'eea-urban-atlas~IT061L0_ALTAMURA_UA2018',\n 'eea-urban-atlas~IT064L1_BATTIPAGLIA_UA2018',\n 'eea-urban-atlas~IT065L0_BISCEGLIE_UA2018',\n 'eea-urban-atlas~IT066L1_CARPI_UA2018',\n 'eea-urban-atlas~IT067L0_CERIGNOLA_UA2018',\n 'eea-urban-atlas~IT068L1_GALLARATE_UA2018',\n 'eea-urban-atlas~IT069L1_GELA_UA2018',\n 'eea-urban-atlas~IT073L1_SASSUOLO_UA2018',\n 'eea-urban-atlas~IT501L2_MESSINA_UA2018',\n 'eea-urban-atlas~IT502L2_PRATO_UA2018',\n 'eea-urban-atlas~IT503L3_PARMA_UA2018',\n 'eea-urban-atlas~IT504L3_LIVORNO_UA2018',\n 'eea-urban-atlas~IT505L3_REGGIO_NELL_EMILIA_UA2018',\n 'eea-urban-atlas~IT506L2_RAVENNA_UA2018',\n 'eea-urban-atlas~IT507L2_FERRARA_UA2018',\n 'eea-urban-atlas~IT508L3_RIMINI_UA2018',\n 'eea-urban-atlas~IT509L3_SIRACUSA_UA2018',\n 'eea-urban-atlas~IT511L2_BERGAMO_UA2018',\n 'eea-urban-atlas~IT512L3_FORLI_UA2018',\n 'eea-urban-atlas~IT513L3_LATINA_UA2018',\n 'eea-urban-atlas~IT514L2_VICENZA_UA2018',\n 'eea-urban-atlas~IT515L2_TERNI_UA2018',\n 'eea-urban-atlas~IT516L2_NOVARA_UA2018',\n 'eea-urban-atlas~IT518L1_ALESSANDRIA_UA2018',\n 'eea-urban-atlas~IT519L1_AREZZO_UA2018',\n 'eea-urban-atlas~IT520L1_GROSSETO_UA2018',\n 'eea-urban-atlas~IT521L1_BRINDISI_UA2018',\n 'eea-urban-atlas~IT522L1_TRAPANI_UA2018',\n 'eea-urban-atlas~IT523L1_RAGUSA_UA2018',\n 'eea-urban-atlas~IT524L0_ANDRIA_UA2018',\n 'eea-urban-atlas~IT525L0_TRANI_UA2018',\n 'eea-urban-atlas~IT526L1_L_AQUILA_UA2018',\n 'eea-urban-atlas~LT001L1_VILNIUS_UA2018',\n 'eea-urban-atlas~LT002L1_KAUNAS_UA2018',\n 'eea-urban-atlas~LT003L1_PANEVEZYS_UA2018',\n 'eea-urban-atlas~LT004L0_ALYTUS_UA2018',\n 'eea-urban-atlas~LT501L0_KLAIPEDA_UA2018',\n 'eea-urban-atlas~LT502L0_SIAULIAI_UA2018',\n 'eea-urban-atlas~LU001L1_LUXEMBOURG_UA2018',\n 'eea-urban-atlas~LV001L1_RIGA_UA2018',\n 'eea-urban-atlas~LV002L2_LIEPAJA_UA2018',\n 'eea-urban-atlas~LV003L1_JELGAVA_UA2018',\n 'eea-urban-atlas~LV501L1_DAUGAVPILS_UA2018',\n 'eea-urban-atlas~ME001L1_PODGORICA_UA2018',\n 'eea-urban-atlas~METADATA',\n 'eea-urban-atlas~MK001L1_SKOPJE_UA2018',\n 'eea-urban-atlas~MK003L1_BITOLA_UA2018',\n 'eea-urban-atlas~MK004L1_TETOVO_UA2018',\n 'eea-urban-atlas~MK005L1_PRILEP_UA2018',\n 'eea-urban-atlas~MT001L1_VALLETTA_UA2018',\n 'eea-urban-atlas~NL001L3_S_GRAVENHAGE_UA2018',\n 'eea-urban-atlas~NL002L3_AMSTERDAM_UA2018',\n 'eea-urban-atlas~NL003L3_ROTTERDAM_UA2018',\n 'eea-urban-atlas~NL004L3_UTRECHT_UA2018',\n 'eea-urban-atlas~NL005L3_EINDHOVEN_UA2018',\n 'eea-urban-atlas~NL006L3_TILBURG_UA2018',\n 'eea-urban-atlas~NL007L3_GRONINGEN_UA2018',\n 'eea-urban-atlas~NL008L3_ENSCHEDE_UA2018',\n 'eea-urban-atlas~NL009L3_ARNHEM_UA2018',\n 'eea-urban-atlas~NL010L3_HEERLEN_UA2018',\n 'eea-urban-atlas~NL012L3_BREDA_UA2018',\n 'eea-urban-atlas~NL013L3_NIJMEGEN_UA2018',\n 'eea-urban-atlas~NL014L3_APELDOORN_UA2018',\n 'eea-urban-atlas~NL015L3_LEEUWARDEN_UA2018',\n 'eea-urban-atlas~NL016L3_SITTARD_GELEEN_UA2018',\n 'eea-urban-atlas~NL020L3_ROOSENDAAL_UA2018',\n 'eea-urban-atlas~NL026L0_ALPHEN_AAN_DEN_RIJN_UA2018',\n 'eea-urban-atlas~NL028L3_BERGEN_OP_ZOOM_UA2018',\n 'eea-urban-atlas~NL030L0_GOUDA_UA2018',\n 'eea-urban-atlas~NL032L3_MIDDELBURG_UA2018',\n 'eea-urban-atlas~NL503L3_S_HERTOGENBOSCH_UA2018',\n 'eea-urban-atlas~NL504L3_AMERSFOORT_UA2018',\n 'eea-urban-atlas~NL505L3_MAASTRICHT_UA2018',\n 'eea-urban-atlas~NL507L3_LEIDEN_UA2018',\n 'eea-urban-atlas~NL511L3_ZWOLLE_UA2018',\n 'eea-urban-atlas~NL512L3_EDE_UA2018',\n 'eea-urban-atlas~NL513L3_DEVENTER_UA2018',\n 'eea-urban-atlas~NL514L3_ALKMAAR_UA2018',\n 'eea-urban-atlas~NL515L3_VENLO_UA2018',\n 'eea-urban-atlas~NL519L3_ALMELO_UA2018',\n 'eea-urban-atlas~NL520L3_LELYSTAD_UA2018',\n 'eea-urban-atlas~NL521L3_OSS_UA2018',\n 'eea-urban-atlas~NL522L3_ASSEN_UA2018',\n 'eea-urban-atlas~NL524L3_VEENENDAAL_UA2018',\n 'eea-urban-atlas~NL529L3_SOEST_UA2018',\n 'eea-urban-atlas~NO001L1_OSLO_UA2018',\n 'eea-urban-atlas~NO002L1_BERGEN_UA2018',\n 'eea-urban-atlas~NO003L1_TRONDHEIM_UA2018',\n 'eea-urban-atlas~NO004L1_STAVANGER_UA2018',\n 'eea-urban-atlas~NO005L1_KRISTIANSAND_UA2018',\n 'eea-urban-atlas~NO006L1_TROMSO_UA2018',\n 'eea-urban-atlas~PL001L2_WARSZAWA_UA2018',\n 'eea-urban-atlas~PL002L2_LODZ_UA2018',\n 'eea-urban-atlas~PL003L2_KRAKOW_UA2018',\n 'eea-urban-atlas~PL004L2_WROCLAW_UA2018',\n 'eea-urban-atlas~PL005L2_POZNAN_UA2018',\n 'eea-urban-atlas~PL006L2_GDANSK_UA2018',\n 'eea-urban-atlas~PL007L2_SZCZECIN_UA2018',\n 'eea-urban-atlas~PL008L2_BYDGOSZCZ_UA2018',\n 'eea-urban-atlas~PL009L2_LUBLIN_UA2018',\n 'eea-urban-atlas~PL010L2_KATOWICE_UA2018',\n 'eea-urban-atlas~PL011L2_BIALYSTOK_UA2018',\n 'eea-urban-atlas~PL012L2_KIELCE_UA2018',\n 'eea-urban-atlas~PL013L2_TORUN_UA2018',\n 'eea-urban-atlas~PL014L2_OLSZTYN_UA2018',\n 'eea-urban-atlas~PL015L2_RZESZOW_UA2018',\n 'eea-urban-atlas~PL016L2_OPOLE_UA2018',\n 'eea-urban-atlas~PL017L2_GORZOW_WIELKOPOLSKI_UA2018',\n 'eea-urban-atlas~PL018L2_ZIELONA_GORA_UA2018',\n 'eea-urban-atlas~PL019L2_JELENIA_GORA_UA2018',\n 'eea-urban-atlas~PL020L2_NOWY_SACZ_UA2018',\n 'eea-urban-atlas~PL021L2_SUWALKI_UA2018',\n 'eea-urban-atlas~PL022L2_KONIN_UA2018',\n 'eea-urban-atlas~PL024L2_CZESTOCHOWA_UA2018',\n 'eea-urban-atlas~PL025L2_RADOM_UA2018',\n 'eea-urban-atlas~PL026L2_PLOCK_UA2018',\n 'eea-urban-atlas~PL027L2_KALISZ_UA2018',\n 'eea-urban-atlas~PL028L2_KOSZALIN_UA2018',\n 'eea-urban-atlas~PL029L1_SLUPSK_UA2018',\n 'eea-urban-atlas~PL030L1_JASTRZEBIE_ZDROJ_UA2018',\n 'eea-urban-atlas~PL031L1_SIEDLCE_UA2018',\n 'eea-urban-atlas~PL032L1_PIOTRKOW_TRYBUNALSKI_UA2018',\n 'eea-urban-atlas~PL033L1_LUBIN_UA2018',\n 'eea-urban-atlas~PL034L1_PILA_UA2018',\n 'eea-urban-atlas~PL035L1_INOWROCLAW_UA2018',\n 'eea-urban-atlas~PL036L1_OSTROWIEC_SWIETOKRZYSKI_UA2018',\n 'eea-urban-atlas~PL037L1_GNIEZNO_UA2018',\n 'eea-urban-atlas~PL038L1_STARGARD_SZCZECINSKI_UA2018',\n 'eea-urban-atlas~PL039L1_OSTROW_WIELKOPOLSKI_UA2018',\n 'eea-urban-atlas~PL040L1_PRZEMYSL_UA2018',\n 'eea-urban-atlas~PL041L1_ZAMOSC_UA2018',\n 'eea-urban-atlas~PL042L1_CHELM_UA2018',\n 'eea-urban-atlas~PL043L1_PABIANICE_UA2018',\n 'eea-urban-atlas~PL044L1_GLOGOW_UA2018',\n 'eea-urban-atlas~PL045L1_STALOWA_WOLA_UA2018',\n 'eea-urban-atlas~PL046L1_TOMASZOW_MAZOWIECKI_UA2018',\n 'eea-urban-atlas~PL047L1_LOMZA_UA2018',\n 'eea-urban-atlas~PL048L1_LESZNO_UA2018',\n 'eea-urban-atlas~PL049L1_SWIDNICA_UA2018',\n 'eea-urban-atlas~PL051L1_TCZEW_UA2018',\n 'eea-urban-atlas~PL052L1_ELK_UA2018',\n 'eea-urban-atlas~PL506L2_BIELSKO_BIALA_UA2018',\n 'eea-urban-atlas~PL508L1_RYBNIK_UA2018',\n 'eea-urban-atlas~PL511L2_WALBRZYCH_UA2018',\n 'eea-urban-atlas~PL512L2_ELBLAG_UA2018',\n 'eea-urban-atlas~PL513L2_WLOCLAWEK_UA2018',\n 'eea-urban-atlas~PL514L2_TARNOW_UA2018',\n 'eea-urban-atlas~PL516L2_LEGNICA_UA2018',\n 'eea-urban-atlas~PL517L2_GRUDZIADZ_UA2018',\n 'eea-urban-atlas~PT001L3_LISBOA_UA2018',\n 'eea-urban-atlas~PT002L2_PORTO_UA2018',\n 'eea-urban-atlas~PT003L1_BRAGA_UA2018',\n 'eea-urban-atlas~PT004L2_FUNCHAL_UA2018',\n 'eea-urban-atlas~PT005L2_COIMBRA_UA2018',\n 'eea-urban-atlas~PT007L1_PONTA_DELGADA_UA2018',\n 'eea-urban-atlas~PT008L2_AVEIRO_UA2018',\n 'eea-urban-atlas~PT009L1_FARO_UA2018',\n 'eea-urban-atlas~PT014L1_VISEU_UA2018',\n 'eea-urban-atlas~PT016L0_VIANA_DO_CASTELO_UA2018',\n 'eea-urban-atlas~PT019L0_POVOA_DE_VARZIM_UA2018',\n 'eea-urban-atlas~PT505L1_GUIMARAES_UA2018',\n 'eea-urban-atlas~RO001L1_BUCURESTI_UA2018',\n 'eea-urban-atlas~RO002L1_CLUJ_NAPOCA_UA2018',\n 'eea-urban-atlas~RO003L1_TIMISOARA_UA2018',\n 'eea-urban-atlas~RO004L1_CRAIOVA_UA2018',\n 'eea-urban-atlas~RO005L1_BRAILA_UA2018',\n 'eea-urban-atlas~RO006L1_ORADEA_UA2018',\n 'eea-urban-atlas~RO007L1_BACAU_UA2018',\n 'eea-urban-atlas~RO008L1_ARAD_UA2018',\n 'eea-urban-atlas~RO009L1_SIBIU_UA2018',\n 'eea-urban-atlas~RO010L1_TARGU_MURES_UA2018',\n 'eea-urban-atlas~RO011L1_PIATRA_NEAMT_UA2018',\n 'eea-urban-atlas~RO012L1_CALARASI_UA2018',\n 'eea-urban-atlas~RO013L1_GIURGIU_UA2018',\n 'eea-urban-atlas~RO014L1_ALBA_IULIA_UA2018',\n 'eea-urban-atlas~RO015L1_FOCSANI_UA2018',\n 'eea-urban-atlas~RO016L1_TARGU_JIU_UA2018',\n 'eea-urban-atlas~RO017L1_TULCEA_UA2018',\n 'eea-urban-atlas~RO018L1_TARGOVISTE_UA2018',\n 'eea-urban-atlas~RO019L1_SLATINA_UA2018',\n 'eea-urban-atlas~RO020L1_BARLAD_UA2018',\n 'eea-urban-atlas~RO021L1_ROMAN_UA2018',\n 'eea-urban-atlas~RO022L1_BISTRITA_UA2018',\n 'eea-urban-atlas~RO501L1_CONSTANTA_UA2018',\n 'eea-urban-atlas~RO502L1_IASI_UA2018',\n 'eea-urban-atlas~RO503L1_GALATI_UA2018',\n 'eea-urban-atlas~RO504L1_BRASOV_UA2018',\n 'eea-urban-atlas~RO505L1_PLOIESTI_UA2018',\n 'eea-urban-atlas~RO506L1_PITESTI_UA2018',\n 'eea-urban-atlas~RO507L1_BAIA_MARE_UA2018',\n 'eea-urban-atlas~RO508L1_BUZAU_UA2018',\n 'eea-urban-atlas~RO509L1_SATU_MARE_UA2018',\n 'eea-urban-atlas~RO510L1_BOTOSANI_UA2018',\n 'eea-urban-atlas~RO511L1_RAMNICU_VALCEA_UA2018',\n 'eea-urban-atlas~RO512L1_SUCEAVA_UA2018',\n 'eea-urban-atlas~RO513L1_DROBETA_TURNU_SEVERIN_UA2018',\n 'eea-urban-atlas~RS001L1_BEOGRAD_UA2018',\n 'eea-urban-atlas~RS002L1_NOVI_SAD_UA2018',\n 'eea-urban-atlas~RS003L1_NIS_UA2018',\n 'eea-urban-atlas~RS004L1_KRAGUJEVAC_UA2018',\n 'eea-urban-atlas~RS005L1_SUBOTICA_UA2018',\n 'eea-urban-atlas~RS006L1_NOVI_PAZAR_UA2018',\n 'eea-urban-atlas~RS008L1_ZRENJANIN_UA2018',\n 'eea-urban-atlas~RS009L1_KRALJEVO_UA2018',\n 'eea-urban-atlas~RS011L0_CACAK_UA2018',\n 'eea-urban-atlas~RS012L1_KRUSEVAC_UA2018',\n 'eea-urban-atlas~RS013L1_LESKOVAC_UA2018',\n 'eea-urban-atlas~RS014L1_VALJEVO_UA2018',\n 'eea-urban-atlas~RS015L1_VRANJE_UA2018',\n 'eea-urban-atlas~RS016L1_SMEDEREVO_UA2018',\n 'eea-urban-atlas~SE001L1_STOCKHOLM_UA2018',\n 'eea-urban-atlas~SE002L1_GOTEBORG_UA2018',\n 'eea-urban-atlas~SE003L1_MALMO_UA2018',\n 'eea-urban-atlas~SE004L1_JONKOPING_UA2018',\n 'eea-urban-atlas~SE005L1_UMEA_UA2018',\n 'eea-urban-atlas~SE006L1_UPPSALA_UA2018',\n 'eea-urban-atlas~SE007L1_LINKOPING_UA2018',\n 'eea-urban-atlas~SE008L1_OREBRO_UA2018',\n 'eea-urban-atlas~SE501L1_VASTERAS_UA2018',\n 'eea-urban-atlas~SE502L1_NORRKOPING_UA2018',\n 'eea-urban-atlas~SE503L1_HELSINGBORG_UA2018',\n 'eea-urban-atlas~SE505L1_BORAS_UA2018',\n 'eea-urban-atlas~SI001L2_LJUBLJANA_UA2018',\n 'eea-urban-atlas~SI002L1_MARIBOR_UA2018',\n 'eea-urban-atlas~SK001L1_BRATISLAVA_UA2018',\n 'eea-urban-atlas~SK002L1_KOSICE_UA2018',\n 'eea-urban-atlas~SK003L1_BANSKA_BYSTRICA_UA2018',\n 'eea-urban-atlas~SK004L1_NITRA_UA2018',\n 'eea-urban-atlas~SK005L1_PRESOV_UA2018',\n 'eea-urban-atlas~SK006L1_ZILINA_UA2018',\n 'eea-urban-atlas~SK007L1_TRNAVA_UA2018',\n 'eea-urban-atlas~SK008L1_TRENCIN_UA2018',\n 'eea-urban-atlas~TR001L1_ANKARA_UA2018',\n 'eea-urban-atlas~TR002L1_ADANA_MERSIN_UA2018',\n 'eea-urban-atlas~TR003L1_ANTALYA_UA2018',\n 'eea-urban-atlas~TR004L1_BALIKESIR_UA2018',\n 'eea-urban-atlas~TR006L1_DENIZLI_UA2018',\n 'eea-urban-atlas~TR007L1_DIYARBAKIR_UA2018',\n 'eea-urban-atlas~TR008L1_EDIRNE_UA2018',\n 'eea-urban-atlas~TR009L1_ERZURUM_UA2018',\n 'eea-urban-atlas~TR010L1_GAZIANTEP_UA2018',\n 'eea-urban-atlas~TR011L1_ANTAKYA_UA2018',\n 'eea-urban-atlas~TR012L1_ISTANBUL_UA2018',\n 'eea-urban-atlas~TR013L1_IZMIR_UA2018',\n 'eea-urban-atlas~TR014L1_KARS_UA2018',\n 'eea-urban-atlas~TR015L1_KASTAMONU_UA2018',\n 'eea-urban-atlas~TR016L1_KAYSERI_UA2018',\n 'eea-urban-atlas~TR018L1_KONYA_UA2018',\n 'eea-urban-atlas~TR019L1_MALATYA_UA2018',\n 'eea-urban-atlas~TR021L1_NEVSEHIR_UA2018',\n 'eea-urban-atlas~TR022L1_SAMSUN_UA2018',\n 'eea-urban-atlas~TR023L1_SIIRT_UA2018',\n 'eea-urban-atlas~TR024L1_TRABZON_UA2018',\n 'eea-urban-atlas~TR025L1_VAN_UA2018',\n 'eea-urban-atlas~TR026L1_ZONGULDAK_UA2018',\n 'eea-urban-atlas~TR027L1_ESKISEHIR_UA2018',\n 'eea-urban-atlas~TR028L1_SANLIURFA_UA2018',\n 'eea-urban-atlas~TR029L1_KAHRAMANMARAS_UA2018',\n 'eea-urban-atlas~TR030L1_BATMAN_UA2018',\n 'eea-urban-atlas~TR031L1_SIVAS_UA2018',\n 'eea-urban-atlas~TR032L1_ELAZIG_UA2018',\n 'eea-urban-atlas~TR033L1_ISPARTA_UA2018',\n 'eea-urban-atlas~TR034L1_CORUM_UA2018',\n 'eea-urban-atlas~TR035L1_OSMANIYE_UA2018',\n 'eea-urban-atlas~TR036L1_AKSARAY_UA2018',\n 'eea-urban-atlas~TR037L1_AYDIN_UA2018',\n 'eea-urban-atlas~TR038L1_SIVEREK_UA2018',\n 'eea-urban-atlas~TR039L1_AFYONKARAHISAR_UA2018',\n 'eea-urban-atlas~TR040L1_ORDU_UA2018',\n 'eea-urban-atlas~TR041L1_NIGDE_UA2018',\n 'eea-urban-atlas~TR042L1_USAK_UA2018',\n 'eea-urban-atlas~TR043L1_AGRI_UA2018',\n 'eea-urban-atlas~TR044L1_KARAMAN_UA2018',\n 'eea-urban-atlas~TR045L1_YUMURTALIK_UA2018',\n 'eea-urban-atlas~TR046L1_RIZE_UA2018',\n 'eea-urban-atlas~TR047L1_ERGANI_UA2018',\n 'eea-urban-atlas~TR048L1_KUTAHYA_UA2018',\n 'eea-urban-atlas~TR049L1_KADIRLI_UA2018',\n 'eea-urban-atlas~TR050L1_KARABUK_UA2018',\n 'eea-urban-atlas~TR051L1_CANAKKALE_UA2018',\n 'eea-urban-atlas~TR052L1_AKCAKALE_UA2018',\n 'eea-urban-atlas~TR053L1_ERCIS_UA2018',\n 'eea-urban-atlas~TR054L1_EREGLI_UA2018',\n 'eea-urban-atlas~TR055L1_ADIYAMAN_UA2018',\n 'eea-urban-atlas~TR056L1_VIRANSEHIR_UA2018',\n 'eea-urban-atlas~TR057L1_FETHIYE_UA2018',\n 'eea-urban-atlas~TR058L1_CEYLANPINAR_UA2018',\n 'eea-urban-atlas~TR059L1_TOKAT_UA2018',\n 'eea-urban-atlas~TR060L1_PATNOS_UA2018',\n 'eea-urban-atlas~TR061L1_ODEMIS_UA2018',\n 'eea-urban-atlas~TR062L1_BOLU_UA2018',\n 'eea-urban-atlas~TR063L1_BANDIRMA_UA2018',\n 'eea-urban-atlas~TR064L1_MUS_UA2018',\n 'eea-urban-atlas~TR065L1_ELBISTAN_UA2018',\n 'eea-urban-atlas~TR066L1_NIZIP_UA2018',\n 'eea-urban-atlas~TR067L1_SURUC_UA2018',\n 'eea-urban-atlas~TR068L1_SALIHLI_UA2018',\n 'eea-urban-atlas~TR069L1_KILIS_UA2018',\n 'eea-urban-atlas~TR070L1_KIZILTEPE_UA2018',\n 'eea-urban-atlas~TR071L1_MIDYAT_UA2018',\n 'eea-urban-atlas~TR072L1_CIZRE_UA2018',\n 'eea-urban-atlas~TR073L1_CANKIRI_UA2018',\n 'eea-urban-atlas~TR074L1_BINGOL_UA2018',\n 'eea-urban-atlas~TR075L1_AKSEHIR_UA2018',\n 'eea-urban-atlas~TR076L1_POLATLI_UA2018',\n 'eea-urban-atlas~TR077L1_MANAVGAT_UA2018',\n 'eea-urban-atlas~TR078L1_YOZGAT_UA2018',\n 'eea-urban-atlas~TR079L1_ALASEHIR_UA2018',\n 'eea-urban-atlas~UK001L3_LONDON_UA2018',\n 'eea-urban-atlas~UK002L3_WEST_MIDLANDS_URBAN_AREA_UA2018',\n 'eea-urban-atlas~UK003L2_LEEDS_UA2018',\n 'eea-urban-atlas~UK004L1_GLASGOW_UA2018',\n 'eea-urban-atlas~UK006L3_LIVERPOOL_UA2018',\n 'eea-urban-atlas~UK007L1_EDINBURGH_UA2018',\n 'eea-urban-atlas~UK008L3_GREATER_MANCHESTER_UA2018',\n 'eea-urban-atlas~UK009L1_CARDIFF_UA2018',\n 'eea-urban-atlas~UK010L3_SHEFFIELD_UA2018',\n 'eea-urban-atlas~UK011L2_BRISTOL_UA2018',\n 'eea-urban-atlas~UK012L2_BELFAST_UA2018',\n 'eea-urban-atlas~UK013L2_NEWCASTLE_UPON_TYNE_UA2018',\n 'eea-urban-atlas~UK014L1_LEICESTER_UA2018',\n 'eea-urban-atlas~UK016L1_ABERDEEN_UA2018',\n 'eea-urban-atlas~UK017L2_CAMBRIDGE_UA2018',\n 'eea-urban-atlas~UK018L3_EXETER_UA2018',\n 'eea-urban-atlas~UK019L3_LINCOLN_UA2018',\n 'eea-urban-atlas~UK023L1_PORTSMOUTH_UA2018',\n 'eea-urban-atlas~UK024L1_WORCESTER_UA2018',\n 'eea-urban-atlas~UK025L3_COVENTRY_UA2018',\n 'eea-urban-atlas~UK026L1_KINGSTON_UPON_HULL_UA2018',\n 'eea-urban-atlas~UK027L1_STOKE_ON_TRENT_UA2018',\n 'eea-urban-atlas~UK029L1_NOTTINGHAM_UA2018',\n 'eea-urban-atlas~UK033L1_GUILDFORD_UA2018',\n 'eea-urban-atlas~UK050L1_BURNLEY_UA2018',\n 'eea-urban-atlas~UK056L1_HASTINGS_UA2018',\n 'eea-urban-atlas~UK515L1_BRIGHTON_AND_HOVE_UA2018',\n 'eea-urban-atlas~UK516L1_PLYMOUTH_UA2018',\n 'eea-urban-atlas~UK517L1_SWANSEA_UA2018',\n 'eea-urban-atlas~UK518L1_DERBY_UA2018',\n 'eea-urban-atlas~UK520L2_SOUTHAMPTON_UA2018',\n 'eea-urban-atlas~UK528L1_NORTHAMPTON_UA2018',\n 'eea-urban-atlas~UK539L1_BOURNEMOUTH_UA2018',\n 'eea-urban-atlas~UK546L1_COLCHESTER_UA2018',\n 'eea-urban-atlas~UK550L0_DUNDEE_CITY_UA2018',\n 'eea-urban-atlas~UK551L1_FALKIRK_UA2018',\n 'eea-urban-atlas~UK552L0_READING_UA2018',\n 'eea-urban-atlas~UK553L1_BLACKPOOL_UA2018',\n 'eea-urban-atlas~UK557L1_BLACKBURN_WITH_DARWEN_UA2018',\n 'eea-urban-atlas~UK558L1_NEWPORT_UA2018',\n 'eea-urban-atlas~UK559L2_MIDDLESBROUGH_UA2018',\n 'eea-urban-atlas~UK560L1_OXFORD_UA2018',\n 'eea-urban-atlas~UK562L2_PRESTON_UA2018',\n 'eea-urban-atlas~UK566L1_NORWICH_UA2018',\n 'eea-urban-atlas~UK568L1_CHESHIRE_WEST_AND_CHESTER_UA2018',\n 'eea-urban-atlas~UK569L2_IPSWICH_UA2018',\n 'eea-urban-atlas~UK571L1_CHELTENHAM_UA2018',\n 'eea-urban-atlas~XK001L1_PRISTINA_UA2018',\n 'eea-urban-atlas~XK002L1_PRIZREN_UA2018',\n 'eea-urban-atlas~XK003L1_MITROVICE_UA2018',\n 'eodash~E1',\n 'eodash~E10a10',\n 'eodash~E10a1_tri',\n 'eodash~E10a2_tri',\n 'eodash~E10a3_tri',\n 'eodash~E10a5',\n 'eodash~E10a6',\n 'eodash~E10a8',\n 'eodash~E10c_tri',\n 'eodash~E11',\n 'eodash~E12b',\n 'eodash~E13b',\n 'eodash~E13b_tri',\n 'eodash~E13c_tri',\n 'eodash~E13d',\n 'eodash~E13e',\n 'eodash~E13f',\n 'eodash~E13g',\n 'eodash~E13h',\n 'eodash~E13i',\n 'eodash~E13l',\n 'eodash~E13m',\n 'eodash~E13n',\n 'eodash~E1a_S2',\n 'eodash~E1_S2',\n 'eodash~E200',\n 'eodash~E2_S2',\n 'eodash~E4',\n 'eodash~E5',\n 'eodash~E8',\n 'eodash~E9_tri',\n 'eodash~Google_Mobility_Subregion1_Footprint',\n 'eodash~N1',\n 'eodash~N1a',\n 'eodash~N1b',\n 'eodash~N1c',\n 'eodash~N1d',\n 'eodash~N1_tri',\n 'eodash~N2_tri',\n 'eodash~N3',\n 'eodash~N3b_tri',\n 'eodash_stage~E1',\n 'eodash_stage~E1a',\n 'eodash_stage~E2',\n 'eodash_stage~E5',\n 'eodash_stage~test_accessi',\n 'geodb_06907e6f-803b-40c1-aa8c-8282f7e87d4d~reported',\n 'geodb_0b01bfcd-2d09-46f8-84e8-cb5720fba14c~delineated_parcels_s',\n 'geodb_0b01bfcd-2d09-46f8-84e8-cb5720fba14c~test_batic',\n 'geodb_0d6df427-8c09-41b9-abc9-64ce13a68125~land_use',\n 'geodb_0d6df427-8c09-41b9-abc9-64ce13a68125~lpis_aut',\n 'geodb_0e5d743f-2134-4561-8946-a073b039176f~ai4eo_bboxes',\n 'geodb_0e5d743f-2134-4561-8946-a073b039176f~ai4eo_reference',\n 'geodb_2cb121fa-cb11-49c5-99d8-7f0d8113656b~reported',\n 'geodb_5d712007-3a9e-47b3-bf93-16a6ee2e1cb8~land_use',\n 'geodb_a2b85af8-6b99-4fa2-acf6-e87d74e40431~gotland_blocks',\n 'geodb_a2b85af8-6b99-4fa2-acf6-e87d74e40431~osm_europe_roads',\n 'geodb_a2b85af8-6b99-4fa2-acf6-e87d74e40431~osm_europe_roads2',\n 'geodb_a659367d-04c2-44ff-8563-cb488da309e4~classification_at',\n 'geodb_a659367d-04c2-44ff-8563-cb488da309e4~lpis_at',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~AT_2021_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~BE_VLG_2021_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~BG_Coastal',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~deleteme',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~DE_LS_2021_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~DE_NRW_2021_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~DK_2019_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~EE_2021_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~ES_NA_2020_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~finnish_cities',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~FR_2018_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~HR_2020_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~land_use',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~land_use-scn-deletem',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~LT_2021_EC',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~LV_2021_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~NL_2021_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~PT_2021_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~RO_ny_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~SE_2021_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~SI_2021_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~SK_2021_EC21',\n 'geodb_c8ce99d8-d1ac-426a-9de1-d37b2dcae792~reported',\n 'geodb_ciuser~land_use',\n 'geodb_d2c4722a-cc19-4ec1-b575-0cdb6876d4a7~demo_1',\n 'geodb_fd3df931-a78a-4ba9-b4d4-4da1606125fd~land_use',\n 'geodb_geodb_ci~land_use',\n 'hh_ger_stationdata_hu~hu_dauermessstation_hh',\n 'lpis_iacs~land_use_slo',\n 'lpis_iacs~lpis_aut',\n 'lpis_iacs~lpis_slo',\n 'lpis_iacs~metadata',\n 'madagascar_adm_boundaries~adm0',\n 'madagascar_adm_boundaries~adm1',\n 'madagascar_adm_boundaries~adm2',\n 'madagascar_adm_boundaries~adm3',\n 'madagascar_adm_boundaries~adm4',\n 'my-urban-eea-subset-db15~SI001L2_LJUBLJANA_UA2018',\n 'my-urban-eea-subset-db16~SI001L2_LJUBLJANA_UA2018',\n 'my-urban-eea-subset-db17~SI001L2_LJUBLJANA_UA2018',\n 'my-urban-eea-subset-db18~SI001L2_LJUBLJANA_UA2018',\n 'my-urban-eea-subset-db19~SI001L2_LJUBLJANA_UA2018',\n 'my-urban-eea-subset-db20~SI001L2_LJUBLJANA_UA2018',\n 'my-urban-eea-subset-db21~SI001L2_LJUBLJANA_UA2018',\n 'my-urban-eea-subset-db22~SI001L2_LJUBLJANA_UA2018',\n 'phi_week~alster',\n 'phi_week~gran_chaco',\n 'polar~polar_icebergs',\n 'polar~polar_icebergs_3413',\n 'polar~polar_sea',\n 'polar~polar_sea_3413',\n 'polar~polar_sea_ice',\n 'polar~polar_sea_ice_3413',\n 'public~land_use',\n 'stac_test~ge_train_tier_1_labels',\n 'stac_test~ge_train_tier_1_source',\n 'stac_test~ge_train_tier_2_labels',\n 'stac_test~ge_train_tier_2_source',\n 'stac_test~ties_ai_challenge_test',\n 'test_duplicate~test']" + }, + "execution_count": 123, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "print_endpoint(f'{base_url}/file_formats')" + "connection.list_collection_ids()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Print the standards the geoDB-openEO-backend conforms to (TBC):" + "List details of the `AT_2021_EC21` collection:" ] }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 124, + "metadata": { + "ExecuteTime": { + "end_time": "2023-08-17T12:48:52.488946500Z", + "start_time": "2023-08-17T12:48:20.281421800Z" + } + }, + "outputs": [ + { + "data": { + "text/plain": "{'stac_version': '1.0.0',\n 'stac_extensions': ['datacube',\n 'https://stac-extensions.github.io/version/v1.0.0/schema.json'],\n 'type': 'Collection',\n 'id': 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~AT_2021_EC21',\n 'title': 'AT_2021_EC21',\n 'description': 'No description available.',\n 'license': 'proprietary',\n 'keywords': [],\n 'providers': [],\n 'extent': {'spatial': {'bbox': [11.798036837663492,\n 44.90274572400593,\n 15.70642984808191,\n 50.04285399640161]},\n 'temporal': {'interval': [[None, None]]}},\n 'links': [{'rel': 'self',\n 'href': 'http://localhost:8080/collections/geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~AT_2021_EC21'},\n {'rel': 'root', 'href': 'http://localhost:8080/collections/'}],\n 'cube:dimensions': {'vector': {'type': 'geometry',\n 'axes': ['x', 'y'],\n 'bbox': '(11.798036837663492, 44.90274572400593, 15.70642984808191, 50.04285399640161)',\n 'geometry_types': ['POLYGON'],\n 'reference_system': '31287'}},\n 'summaries': [{'column_names': ['id',\n 'created_at',\n 'modified_at',\n 'geometry',\n 'fid',\n 'fs_kennung',\n 'snar_bezei',\n 'sl_flaeche',\n 'geo_id',\n 'inspire_id',\n 'gml_id',\n 'gml_identi',\n 'snar_code',\n 'geo_part_k',\n 'log_pkey',\n 'geom_date_',\n 'fart_id',\n 'geo_type',\n 'gml_length',\n 'ec_trans_n',\n 'ec_hcat_n',\n 'ec_hcat_c']}]}", + "text/html": "\n \n \n \n \n " + }, + "execution_count": 124, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "print_endpoint(f'{base_url}/conformance')" + "connection.describe_collection('geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~AT_2021_EC21')" ] }, { - "cell_type": "markdown", - "metadata": {}, + "cell_type": "code", + "execution_count": null, + "outputs": [], "source": [ - "## Collections listing - STAC part\n", - "List the collections currently available using the geoDB-openEO-backend:" - ] + "## Processes listing of the geoDB-openEO backend" + ], + "metadata": { + "collapsed": false + } }, { "cell_type": "code", @@ -124,52 +213,98 @@ "metadata": {}, "outputs": [], "source": [ - "print_endpoint(f'{base_url}/collections')" + "print_endpoint(f'{base_url}/processes')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "List details of the `AT_2021_EC21` collection:" + "## Use Case 1\n", + "Run the function `load_collection`, and store the result in a local variable:" ] }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, + "execution_count": 71, "outputs": [], "source": [ - "print_endpoint(f'{base_url}/collections/AT_2021_EC21')" - ] + "a = connection.load_collection('anja~E4_RACE_INDICATORS')" + ], + "metadata": { + "collapsed": false, + "ExecuteTime": { + "end_time": "2023-08-16T13:26:04.785211Z", + "start_time": "2023-08-16T13:25:57.138856200Z" + } + } }, { "cell_type": "code", - "execution_count": null, - "outputs": [], + "execution_count": 72, + "outputs": [ + { + "data": { + "text/plain": "b'{\"type\": \"FeatureCollection\", \"features\": [{\"type\": \"Feature\", \"id\": \"1\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [8.885851, 44.408142]}, \"properties\": {\"created_at\": \"2020-05-13T08:26:13.740673+00:00\", \"modified_at\": null, \"aoi\": \"44.408142, 8.885851\", \"country\": \"IT\", \"region (optional)\": \"/\", \"city\": \"Genoa\", \"site name\": \"Port of Genova and surrounding industrial areas\", \"description\": \"industrial activity\", \"method\": \"object detection on VHR data\", \"eo sensor\": \"Pleiades\", \"input data\": \"[NEW] Pleiades COVID-19\", \"indicator code\": \"E4\", \"time [yyyy/mm/ddthh:mm:ss]\": \"2019-04-30T10:33:52\", \"measurement value [float]\": 108, \"reference description\": \"Full occupancy of the parking area\", \"reference time [yyyy/mm/ddthh:mm:ss]\": \"/\", \"reference value [float]\": 160, \"rule\": \"X is the measuremetn value. If X<20% of the absolute of reference OFF, X>20% on\", \"indicator value\": \"on\", \"sub-aoi\": \"[ [ 8.769501070372375, 44.426831629252561 ], [ 8.771405470894988, 44.426603976776292 ], [ 8.771160306689779, 44.425448202666018 ], [ 8.769864438747954, 44.425618942023213 ], [ 8.76965429800063, 44.425780925515944 ], [ 8.769522960033553, 44.425929775211962 ], [ 8.769540471762497, 44.426026089721155 ], [ 8.769317197218466, 44.426275631858601 ], [ 8.769413511727656, 44.42675282647231 ], [ 8.769501070372375, 44.426831629252561 ] ]\", \"STAC\": {\"bbox\": [\"8.8859\", \"44.4081\", \"8.8859\", \"44.4081\"], \"stac_version\": \"1.0.0\", \"stac_extensions\": [\"datacube\", \"https://stac-extensions.github.io/version/v1.0.0/schema.json\"], \"type\": \"Feature\"}}}, {\"type\": \"Feature\", \"id\": \"2\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [8.885851, 44.408142]}, \"properties\": {\"created_at\": \"2020-05-13T08:26:13.740673+00:00\", \"modified_at\": null, \"aoi\": \"44.408142, 8.885851\", \"country\": \"IT\", \"region (optional)\": \"/\", \"city\": \"Genoa\", \"site name\": \"Port of Genova and surrounding industrial areas\", \"description\": \"industrial activity\", \"method\": \"object detection on VHR data\", \"eo sensor\": \"Pleiades\", \"input data\": \"[NEW] Pleiades COVID-19\", \"indicator code\": \"E4\", \"time [yyyy/mm/ddthh:mm:ss]\": \"2020-02-22T10:41:31\", \"measurement value [float]\": 23, \"reference description\": \"Full occupancy of the parking area\", \"reference time [yyyy/mm/ddthh:mm:ss]\": \"/\", \"reference value [float]\": 160, \"rule\": \"X is the measuremetn value. If X<20% of the absolute of reference OFF, X>20% on\", \"indicator value\": \"off\", \"sub-aoi\": \"[ [ 8.769501070372375, 44.426831629252561 ], [ 8.771405470894988, 44.426603976776292 ], [ 8.771160306689779, 44.425448202666018 ], [ 8.769864438747954, 44.425618942023213 ], [ 8.76965429800063, 44.425780925515944 ], [ 8.769522960033553, 44.425929775211962 ], [ 8.769540471762497, 44.426026089721155 ], [ 8.769317197218466, 44.426275631858601 ], [ 8.769413511727656, 44.42675282647231 ], [ 8.769501070372375, 44.426831629252561 ] ]\", \"STAC\": {\"bbox\": [\"8.8859\", \"44.4081\", \"8.8859\", \"44.4081\"], \"stac_version\": \"1.0.0\", \"stac_extensions\": [\"datacube\", \"https://stac-extensions.github.io/version/v1.0.0/schema.json\"], \"type\": \"Feature\"}}}, {\"type\": \"Feature\", \"id\": \"3\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [8.885851, 44.408142]}, \"properties\": {\"created_at\": \"2020-05-13T08:26:13.740673+00:00\", \"modified_at\": null, \"aoi\": \"44.408142, 8.885851\", \"country\": \"IT\", \"region (optional)\": \"/\", \"city\": \"Genoa\", \"site name\": \"Port of Genova and surrounding industrial areas\", \"description\": \"industrial activity\", \"method\": \"object detection on VHR data\", \"eo sensor\": \"Pleiades\", \"input data\": \"[NEW] Pleiades COVID-19\", \"indicator code\": \"E4\", \"time [yyyy/mm/ddthh:mm:ss]\": \"2020-03-21T10:26:47\", \"measurement value [float]\": 18, \"reference description\": \"Full occupancy of the parking area\", \"reference time [yyyy/mm/ddthh:mm:ss]\": \"/\", \"reference value [float]\": 160, \"rule\": \"X is the measuremetn value. If X<20% of the absolute of reference OFF, X>20% on\", \"indicator value\": \"off\", \"sub-aoi\": \"[ [ 8.769501070372375, 44.426831629252561 ], [ 8.771405470894988, 44.426603976776292 ], [ 8.771160306689779, 44.425448202666018 ], [ 8.769864438747954, 44.425618942023213 ], [ 8.76965429800063, 44.425780925515944 ], [ 8.769522960033553, 44.425929775211962 ], [ 8.769540471762497, 44.426026089721155 ], [ 8.769317197218466, 44.426275631858601 ], [ 8.769413511727656, 44.42675282647231 ], [ 8.769501070372375, 44.426831629252561 ] ]\", \"STAC\": {\"bbox\": [\"8.8859\", \"44.4081\", \"8.8859\", \"44.4081\"], \"stac_version\": \"1.0.0\", \"stac_extensions\": [\"datacube\", \"https://stac-extensions.github.io/version/v1.0.0/schema.json\"], \"type\": \"Feature\"}}}, {\"type\": \"Feature\", \"id\": \"4\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [9.944467, 53.532123]}, \"properties\": {\"created_at\": \"2020-05-13T08:26:13.740673+00:00\", \"modified_at\": null, \"aoi\": \"53.532123, 9.944467\", \"country\": \"DE\", \"region (optional)\": \"/\", \"city\": \"Hamburg\", \"site name\": \"Port of Hamburg\", \"description\": \"Port and industrial area\", \"method\": \"object detection on VHR data\", \"eo sensor\": \"Pleiades\", \"input data\": \"[NEW] Pleiades COVID-20\", \"indicator code\": \"E4\", \"time [yyyy/mm/ddthh:mm:ss]\": \"2020-03-24T10:49:25\", \"measurement value [float]\": 331, \"reference description\": \"Full occupancy of the parking area\", \"reference time [yyyy/mm/ddthh:mm:ss]\": \"/\", \"reference value [float]\": 800, \"rule\": \"X is the measuremetn value. If X<20% of the absolute of reference OFF, X>20% on\", \"indicator value\": \"on\", \"sub-aoi\": \"[ [ 9.919157310812254, 53.498024928776665 ], [ 9.91951518410332, 53.508067748007193 ], [ 9.921080879751731, 53.510505759802577 ], [ 9.926202941230107, 53.509342671606611 ], [ 9.928864623832407, 53.507776975958201 ], [ 9.929714572898687, 53.497376283436608 ], [ 9.919582285345394, 53.497689422566289 ], [ 9.919157310812254, 53.498024928776665 ] ]\", \"STAC\": {\"bbox\": [\"9.9445\", \"53.5321\", \"9.9445\", \"53.5321\"], \"stac_version\": \"1.0.0\", \"stac_extensions\": [\"datacube\", \"https://stac-extensions.github.io/version/v1.0.0/schema.json\"], \"type\": \"Feature\"}}}, {\"type\": \"Feature\", \"id\": \"5\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [9.944467, 53.532123]}, \"properties\": {\"created_at\": \"2020-05-13T08:26:13.740673+00:00\", \"modified_at\": null, \"aoi\": \"53.532123, 9.944467\", \"country\": \"DE\", \"region (optional)\": \"/\", \"city\": \"Hamburg\", \"site name\": \"Port of Hamburg\", \"description\": \"Port and industrial area\", \"method\": \"object detection on VHR data\", \"eo sensor\": \"Pleiades\", \"input data\": \"[NEW] Pleiades - 2.8m COVID-20\", \"indicator code\": \"E4\", \"time [yyyy/mm/ddthh:mm:ss]\": \"2020-02-05T10:20:06 \", \"measurement value [float]\": 353, \"reference description\": \"Full occupancy of the parking area\", \"reference time [yyyy/mm/ddthh:mm:ss]\": \"/\", \"reference value [float]\": 800, \"rule\": \"X is the measuremetn value. If X<20% of the absolute of reference OFF, X>20% on\", \"indicator value\": \"on\", \"sub-aoi\": \"[ [ 9.919157310812254, 53.498024928776665 ], [ 9.91951518410332, 53.508067748007193 ], [ 9.921080879751731, 53.510505759802577 ], [ 9.926202941230107, 53.509342671606611 ], [ 9.928864623832407, 53.507776975958201 ], [ 9.929714572898687, 53.497376283436608 ], [ 9.919582285345394, 53.497689422566289 ], [ 9.919157310812254, 53.498024928776665 ] ]\", \"STAC\": {\"bbox\": [\"9.9445\", \"53.5321\", \"9.9445\", \"53.5321\"], \"stac_version\": \"1.0.0\", \"stac_extensions\": [\"datacube\", \"https://stac-extensions.github.io/version/v1.0.0/schema.json\"], \"type\": \"Feature\"}}}, {\"type\": \"Feature\", \"id\": \"6\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [8.885851, 44.408142]}, \"properties\": {\"created_at\": \"2020-05-15T10:12:46.648096+00:00\", \"modified_at\": null, \"aoi\": \"44.408142, 8.885851\", \"country\": \"IT\", \"region (optional)\": \"/\", \"city\": \"Genoa\", \"site name\": \"Port of Genova and surrounding industrial areas\", \"description\": \"industrial activity\", \"method\": \"object detection on VHR data\", \"eo sensor\": \"Pleiades\", \"input data\": \"[NEW] Pleiades COVID-19\", \"indicator code\": \"E4\", \"time [yyyy/mm/ddthh:mm:ss]\": \"2019-04-30T10:33:52\", \"measurement value [float]\": 108, \"reference description\": \"Full occupancy of the parking area\", \"reference time [yyyy/mm/ddthh:mm:ss]\": \"/\", \"reference value [float]\": 160, \"rule\": \"X is the measuremetn value. If X<20% of the absolute of reference OFF, X>20% on\", \"indicator value\": \"on\", \"sub-aoi\": \"[ [ 8.769501070372375, 44.426831629252561 ], [ 8.771405470894988, 44.426603976776292 ], [ 8.771160306689779, 44.425448202666018 ], [ 8.769864438747954, 44.425618942023213 ], [ 8.76965429800063, 44.425780925515944 ], [ 8.769522960033553, 44.425929775211962 ], [ 8.769540471762497, 44.426026089721155 ], [ 8.769317197218466, 44.426275631858601 ], [ 8.769413511727656, 44.42675282647231 ], [ 8.769501070372375, 44.426831629252561 ] ]\", \"STAC\": {\"bbox\": [\"8.8859\", \"44.4081\", \"8.8859\", \"44.4081\"], \"stac_version\": \"1.0.0\", \"stac_extensions\": [\"datacube\", \"https://stac-extensions.github.io/version/v1.0.0/schema.json\"], \"type\": \"Feature\"}}}, {\"type\": \"Feature\", \"id\": \"7\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [8.885851, 44.408142]}, \"properties\": {\"created_at\": \"2020-05-15T10:12:46.648096+00:00\", \"modified_at\": null, \"aoi\": \"44.408142, 8.885851\", \"country\": \"IT\", \"region (optional)\": \"/\", \"city\": \"Genoa\", \"site name\": \"Port of Genova and surrounding industrial areas\", \"description\": \"industrial activity\", \"method\": \"object detection on VHR data\", \"eo sensor\": \"Pleiades\", \"input data\": \"[NEW] Pleiades COVID-19\", \"indicator code\": \"E4\", \"time [yyyy/mm/ddthh:mm:ss]\": \"2020-02-22T10:41:31\", \"measurement value [float]\": 23, \"reference description\": \"Full occupancy of the parking area\", \"reference time [yyyy/mm/ddthh:mm:ss]\": \"/\", \"reference value [float]\": 160, \"rule\": \"X is the measuremetn value. If X<20% of the absolute of reference OFF, X>20% on\", \"indicator value\": \"off\", \"sub-aoi\": \"[ [ 8.769501070372375, 44.426831629252561 ], [ 8.771405470894988, 44.426603976776292 ], [ 8.771160306689779, 44.425448202666018 ], [ 8.769864438747954, 44.425618942023213 ], [ 8.76965429800063, 44.425780925515944 ], [ 8.769522960033553, 44.425929775211962 ], [ 8.769540471762497, 44.426026089721155 ], [ 8.769317197218466, 44.426275631858601 ], [ 8.769413511727656, 44.42675282647231 ], [ 8.769501070372375, 44.426831629252561 ] ]\", \"STAC\": {\"bbox\": [\"8.8859\", \"44.4081\", \"8.8859\", \"44.4081\"], \"stac_version\": \"1.0.0\", \"stac_extensions\": [\"datacube\", \"https://stac-extensions.github.io/version/v1.0.0/schema.json\"], \"type\": \"Feature\"}}}, {\"type\": \"Feature\", \"id\": \"8\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [8.885851, 44.408142]}, \"properties\": {\"created_at\": \"2020-05-15T10:12:46.648096+00:00\", \"modified_at\": null, \"aoi\": \"44.408142, 8.885851\", \"country\": \"IT\", \"region (optional)\": \"/\", \"city\": \"Genoa\", \"site name\": \"Port of Genova and surrounding industrial areas\", \"description\": \"industrial activity\", \"method\": \"object detection on VHR data\", \"eo sensor\": \"Pleiades\", \"input data\": \"[NEW] Pleiades COVID-19\", \"indicator code\": \"E4\", \"time [yyyy/mm/ddthh:mm:ss]\": \"2020-03-21T10:26:47\", \"measurement value [float]\": 18, \"reference description\": \"Full occupancy of the parking area\", \"reference time [yyyy/mm/ddthh:mm:ss]\": \"/\", \"reference value [float]\": 160, \"rule\": \"X is the measuremetn value. If X<20% of the absolute of reference OFF, X>20% on\", \"indicator value\": \"off\", \"sub-aoi\": \"[ [ 8.769501070372375, 44.426831629252561 ], [ 8.771405470894988, 44.426603976776292 ], [ 8.771160306689779, 44.425448202666018 ], [ 8.769864438747954, 44.425618942023213 ], [ 8.76965429800063, 44.425780925515944 ], [ 8.769522960033553, 44.425929775211962 ], [ 8.769540471762497, 44.426026089721155 ], [ 8.769317197218466, 44.426275631858601 ], [ 8.769413511727656, 44.42675282647231 ], [ 8.769501070372375, 44.426831629252561 ] ]\", \"STAC\": {\"bbox\": [\"8.8859\", \"44.4081\", \"8.8859\", \"44.4081\"], \"stac_version\": \"1.0.0\", \"stac_extensions\": [\"datacube\", \"https://stac-extensions.github.io/version/v1.0.0/schema.json\"], \"type\": \"Feature\"}}}, {\"type\": \"Feature\", \"id\": \"9\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [9.944467, 53.532123]}, \"properties\": {\"created_at\": \"2020-05-15T10:12:46.648096+00:00\", \"modified_at\": null, \"aoi\": \"53.532123, 9.944467\", \"country\": \"DE\", \"region (optional)\": \"/\", \"city\": \"Hamburg\", \"site name\": \"Port of Hamburg\", \"description\": \"Port and industrial area\", \"method\": \"object detection on VHR data\", \"eo sensor\": \"Pleiades\", \"input data\": \"[NEW] Pleiades COVID-20\", \"indicator code\": \"E4\", \"time [yyyy/mm/ddthh:mm:ss]\": \"2020-03-24T10:49:25\", \"measurement value [float]\": 331, \"reference description\": \"Full occupancy of the parking area\", \"reference time [yyyy/mm/ddthh:mm:ss]\": \"/\", \"reference value [float]\": 800, \"rule\": \"X is the measuremetn value. If X<20% of the absolute of reference OFF, X>20% on\", \"indicator value\": \"on\", \"sub-aoi\": \"[ [ 9.919157310812254, 53.498024928776665 ], [ 9.91951518410332, 53.508067748007193 ], [ 9.921080879751731, 53.510505759802577 ], [ 9.926202941230107, 53.509342671606611 ], [ 9.928864623832407, 53.507776975958201 ], [ 9.929714572898687, 53.497376283436608 ], [ 9.919582285345394, 53.497689422566289 ], [ 9.919157310812254, 53.498024928776665 ] ]\", \"STAC\": {\"bbox\": [\"9.9445\", \"53.5321\", \"9.9445\", \"53.5321\"], \"stac_version\": \"1.0.0\", \"stac_extensions\": [\"datacube\", \"https://stac-extensions.github.io/version/v1.0.0/schema.json\"], \"type\": \"Feature\"}}}, {\"type\": \"Feature\", \"id\": \"10\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [9.944467, 53.532123]}, \"properties\": {\"created_at\": \"2020-05-15T10:12:46.648096+00:00\", \"modified_at\": null, \"aoi\": \"53.532123, 9.944467\", \"country\": \"DE\", \"region (optional)\": \"/\", \"city\": \"Hamburg\", \"site name\": \"Port of Hamburg\", \"description\": \"Port and industrial area\", \"method\": \"object detection on VHR data\", \"eo sensor\": \"Pleiades\", \"input data\": \"[NEW] Pleiades - 2.8m COVID-20\", \"indicator code\": \"E4\", \"time [yyyy/mm/ddthh:mm:ss]\": \"2020-02-05T10:20:06 \", \"measurement value [float]\": 353, \"reference description\": \"Full occupancy of the parking area\", \"reference time [yyyy/mm/ddthh:mm:ss]\": \"/\", \"reference value [float]\": 800, \"rule\": \"X is the measuremetn value. If X<20% of the absolute of reference OFF, X>20% on\", \"indicator value\": \"on\", \"sub-aoi\": \"[ [ 9.919157310812254, 53.498024928776665 ], [ 9.91951518410332, 53.508067748007193 ], [ 9.921080879751731, 53.510505759802577 ], [ 9.926202941230107, 53.509342671606611 ], [ 9.928864623832407, 53.507776975958201 ], [ 9.929714572898687, 53.497376283436608 ], [ 9.919582285345394, 53.497689422566289 ], [ 9.919157310812254, 53.498024928776665 ] ]\", \"STAC\": {\"bbox\": [\"9.9445\", \"53.5321\", \"9.9445\", \"53.5321\"], \"stac_version\": \"1.0.0\", \"stac_extensions\": [\"datacube\", \"https://stac-extensions.github.io/version/v1.0.0/schema.json\"], \"type\": \"Feature\"}}}]}'" + }, + "execution_count": 72, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "## Processes listing of the geoDB-openEO backend" + "gj = a.download()\n", + "gj" ], "metadata": { - "collapsed": false + "collapsed": false, + "ExecuteTime": { + "end_time": "2023-08-16T13:26:24.970512500Z", + "start_time": "2023-08-16T13:26:18.883611200Z" + } } }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print_endpoint(f'{base_url}/processes')" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, + "execution_count": 57, + "outputs": [ + { + "ename": "OpenEoApiError", + "evalue": "[500] unknown: unknown error", + "output_type": "error", + "traceback": [ + "\u001B[1;31m---------------------------------------------------------------------------\u001B[0m", + "\u001B[1;31mOpenEoApiError\u001B[0m Traceback (most recent call last)", + "Cell \u001B[1;32mIn[57], line 1\u001B[0m\n\u001B[1;32m----> 1\u001B[0m result \u001B[38;5;241m=\u001B[39m \u001B[43mconnection\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mexecute\u001B[49m\u001B[43m(\u001B[49m\u001B[43m{\u001B[49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43mprocess\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m:\u001B[49m\u001B[43m \u001B[49m\u001B[43m{\u001B[49m\n\u001B[0;32m 2\u001B[0m \u001B[43m \u001B[49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43mid\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m:\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43mload_collection\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m,\u001B[49m\n\u001B[0;32m 3\u001B[0m \u001B[43m \u001B[49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43mparameters\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m:\u001B[49m\u001B[43m \u001B[49m\u001B[43m{\u001B[49m\n\u001B[0;32m 4\u001B[0m \u001B[43m \u001B[49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43mid\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m:\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43mgeodb_b34bfae7-9265-4a3e-b921-06549d3c6035~populated_places_sub\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m,\u001B[49m\n\u001B[0;32m 5\u001B[0m \u001B[43m \u001B[49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43mspatial_extent\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m:\u001B[49m\u001B[43m \u001B[49m\u001B[43m{\u001B[49m\n\u001B[0;32m 6\u001B[0m \u001B[43m \u001B[49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43mbbox\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m:\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43m(33, -10, 71, 43)\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\n\u001B[0;32m 7\u001B[0m \u001B[43m \u001B[49m\u001B[43m}\u001B[49m\n\u001B[0;32m 8\u001B[0m \u001B[43m \u001B[49m\u001B[43m}\u001B[49m\n\u001B[0;32m 9\u001B[0m \u001B[43m}\u001B[49m\u001B[43m}\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 10\u001B[0m result\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\connection.py:1422\u001B[0m, in \u001B[0;36mConnection.execute\u001B[1;34m(self, process_graph)\u001B[0m\n\u001B[0;32m 1414\u001B[0m \u001B[38;5;250m\u001B[39m\u001B[38;5;124;03m\"\"\"\u001B[39;00m\n\u001B[0;32m 1415\u001B[0m \u001B[38;5;124;03mExecute a process graph synchronously and return the result (assumed to be JSON).\u001B[39;00m\n\u001B[0;32m 1416\u001B[0m \n\u001B[1;32m (...)\u001B[0m\n\u001B[0;32m 1419\u001B[0m \u001B[38;5;124;03m:return: parsed JSON response\u001B[39;00m\n\u001B[0;32m 1420\u001B[0m \u001B[38;5;124;03m\"\"\"\u001B[39;00m\n\u001B[0;32m 1421\u001B[0m req \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_build_request_with_process_graph(process_graph\u001B[38;5;241m=\u001B[39mprocess_graph)\n\u001B[1;32m-> 1422\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mpost\u001B[49m\u001B[43m(\u001B[49m\u001B[43mpath\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43m/result\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mjson\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mreq\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mexpected_status\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;241;43m200\u001B[39;49m\u001B[43m)\u001B[49m\u001B[38;5;241m.\u001B[39mjson()\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\connection.py:190\u001B[0m, in \u001B[0;36mRestApiConnection.post\u001B[1;34m(self, path, json, **kwargs)\u001B[0m\n\u001B[0;32m 182\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m \u001B[38;5;21mpost\u001B[39m(\u001B[38;5;28mself\u001B[39m, path: \u001B[38;5;28mstr\u001B[39m, json: Optional[\u001B[38;5;28mdict\u001B[39m] \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;01mNone\u001B[39;00m, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs) \u001B[38;5;241m-\u001B[39m\u001B[38;5;241m>\u001B[39m Response:\n\u001B[0;32m 183\u001B[0m \u001B[38;5;250m \u001B[39m\u001B[38;5;124;03m\"\"\"\u001B[39;00m\n\u001B[0;32m 184\u001B[0m \u001B[38;5;124;03m Do POST request to REST API.\u001B[39;00m\n\u001B[0;32m 185\u001B[0m \n\u001B[1;32m (...)\u001B[0m\n\u001B[0;32m 188\u001B[0m \u001B[38;5;124;03m :return: response: Response\u001B[39;00m\n\u001B[0;32m 189\u001B[0m \u001B[38;5;124;03m \"\"\"\u001B[39;00m\n\u001B[1;32m--> 190\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mrequest(\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mpost\u001B[39m\u001B[38;5;124m\"\u001B[39m, path\u001B[38;5;241m=\u001B[39mpath, json\u001B[38;5;241m=\u001B[39mjson, allow_redirects\u001B[38;5;241m=\u001B[39m\u001B[38;5;28;01mFalse\u001B[39;00m, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs)\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\connection.py:727\u001B[0m, in \u001B[0;36mConnection.request\u001B[1;34m(self, method, path, headers, auth, check_error, expected_status, **kwargs)\u001B[0m\n\u001B[0;32m 720\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28msuper\u001B[39m(Connection, \u001B[38;5;28mself\u001B[39m)\u001B[38;5;241m.\u001B[39mrequest(\n\u001B[0;32m 721\u001B[0m method\u001B[38;5;241m=\u001B[39mmethod, path\u001B[38;5;241m=\u001B[39mpath, headers\u001B[38;5;241m=\u001B[39mheaders, auth\u001B[38;5;241m=\u001B[39mauth,\n\u001B[0;32m 722\u001B[0m check_error\u001B[38;5;241m=\u001B[39mcheck_error, expected_status\u001B[38;5;241m=\u001B[39mexpected_status, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs,\n\u001B[0;32m 723\u001B[0m )\n\u001B[0;32m 725\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[0;32m 726\u001B[0m \u001B[38;5;66;03m# Initial request attempt\u001B[39;00m\n\u001B[1;32m--> 727\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[43m_request\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 728\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m OpenEoApiError \u001B[38;5;28;01mas\u001B[39;00m api_exc:\n\u001B[0;32m 729\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m api_exc\u001B[38;5;241m.\u001B[39mhttp_status_code \u001B[38;5;241m==\u001B[39m \u001B[38;5;241m403\u001B[39m \u001B[38;5;129;01mand\u001B[39;00m api_exc\u001B[38;5;241m.\u001B[39mcode \u001B[38;5;241m==\u001B[39m \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mTokenInvalid\u001B[39m\u001B[38;5;124m\"\u001B[39m:\n\u001B[0;32m 730\u001B[0m \u001B[38;5;66;03m# Auth token expired: can we refresh?\u001B[39;00m\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\connection.py:720\u001B[0m, in \u001B[0;36mConnection.request.._request\u001B[1;34m()\u001B[0m\n\u001B[0;32m 719\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m \u001B[38;5;21m_request\u001B[39m():\n\u001B[1;32m--> 720\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28msuper\u001B[39m(Connection, \u001B[38;5;28mself\u001B[39m)\u001B[38;5;241m.\u001B[39mrequest(\n\u001B[0;32m 721\u001B[0m method\u001B[38;5;241m=\u001B[39mmethod, path\u001B[38;5;241m=\u001B[39mpath, headers\u001B[38;5;241m=\u001B[39mheaders, auth\u001B[38;5;241m=\u001B[39mauth,\n\u001B[0;32m 722\u001B[0m check_error\u001B[38;5;241m=\u001B[39mcheck_error, expected_status\u001B[38;5;241m=\u001B[39mexpected_status, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs,\n\u001B[0;32m 723\u001B[0m )\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\connection.py:138\u001B[0m, in \u001B[0;36mRestApiConnection.request\u001B[1;34m(self, method, path, headers, auth, check_error, expected_status, **kwargs)\u001B[0m\n\u001B[0;32m 136\u001B[0m expected_status \u001B[38;5;241m=\u001B[39m ensure_list(expected_status) \u001B[38;5;28;01mif\u001B[39;00m expected_status \u001B[38;5;28;01melse\u001B[39;00m []\n\u001B[0;32m 137\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m check_error \u001B[38;5;129;01mand\u001B[39;00m status \u001B[38;5;241m>\u001B[39m\u001B[38;5;241m=\u001B[39m \u001B[38;5;241m400\u001B[39m \u001B[38;5;129;01mand\u001B[39;00m status \u001B[38;5;129;01mnot\u001B[39;00m \u001B[38;5;129;01min\u001B[39;00m expected_status:\n\u001B[1;32m--> 138\u001B[0m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_raise_api_error\u001B[49m\u001B[43m(\u001B[49m\u001B[43mresp\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 139\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m expected_status \u001B[38;5;129;01mand\u001B[39;00m status \u001B[38;5;129;01mnot\u001B[39;00m \u001B[38;5;129;01min\u001B[39;00m expected_status:\n\u001B[0;32m 140\u001B[0m \u001B[38;5;28;01mraise\u001B[39;00m OpenEoRestError(\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mGot status code \u001B[39m\u001B[38;5;132;01m{s!r}\u001B[39;00m\u001B[38;5;124m for `\u001B[39m\u001B[38;5;132;01m{m}\u001B[39;00m\u001B[38;5;124m \u001B[39m\u001B[38;5;132;01m{p}\u001B[39;00m\u001B[38;5;124m` (expected \u001B[39m\u001B[38;5;132;01m{e!r}\u001B[39;00m\u001B[38;5;124m) with body \u001B[39m\u001B[38;5;132;01m{body}\u001B[39;00m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;241m.\u001B[39mformat(\n\u001B[0;32m 141\u001B[0m m\u001B[38;5;241m=\u001B[39mmethod\u001B[38;5;241m.\u001B[39mupper(), p\u001B[38;5;241m=\u001B[39mpath, s\u001B[38;5;241m=\u001B[39mstatus, e\u001B[38;5;241m=\u001B[39mexpected_status, body\u001B[38;5;241m=\u001B[39mresp\u001B[38;5;241m.\u001B[39mtext)\n\u001B[0;32m 142\u001B[0m )\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\connection.py:169\u001B[0m, in \u001B[0;36mRestApiConnection._raise_api_error\u001B[1;34m(self, response)\u001B[0m\n\u001B[0;32m 167\u001B[0m \u001B[38;5;28;01melse\u001B[39;00m:\n\u001B[0;32m 168\u001B[0m exception \u001B[38;5;241m=\u001B[39m OpenEoApiError(http_status_code\u001B[38;5;241m=\u001B[39mstatus_code, message\u001B[38;5;241m=\u001B[39mtext)\n\u001B[1;32m--> 169\u001B[0m \u001B[38;5;28;01mraise\u001B[39;00m exception\n", + "\u001B[1;31mOpenEoApiError\u001B[0m: [500] unknown: unknown error" + ] + } + ], "source": [ - "## Use Case 1\n", - "Run the function `load_collection`, and store the result in a local variable:" - ] + "result = connection.execute({\"process\": {\n", + " \"id\": \"load_collection\",\n", + " \"parameters\": {\n", + " \"id\": \"geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~populated_places_sub\",\n", + " \"spatial_extent\": {\n", + " \"bbox\": \"(33, -10, 71, 43)\"\n", + " }\n", + " }\n", + "}})\n", + "result" + ], + "metadata": { + "collapsed": false, + "ExecuteTime": { + "end_time": "2023-08-16T13:12:38.464259900Z", + "start_time": "2023-08-16T13:12:37.989932800Z" + } + } }, { "cell_type": "code", diff --git a/tests/core/mock_vc_provider.py b/tests/core/mock_vc_provider.py index 695dea8..7282033 100644 --- a/tests/core/mock_vc_provider.py +++ b/tests/core/mock_vc_provider.py @@ -56,8 +56,9 @@ def __init__(self, config: Mapping[str, Any]): def get_collection_keys(self) -> Sequence: return list(self._MOCK_COLLECTIONS.keys()) - def get_vector_cube(self, collection_id: Tuple[str, str], - bbox: Tuple[float, float, float, float]) \ + def get_vector_cube( + self, collection_id: Tuple[str, str], + bbox: Optional[Tuple[float, float, float, float]] = None) \ -> VectorCube: return VectorCube(collection_id, self) @@ -93,7 +94,8 @@ def get_vertical_dim( return None def load_features(self, limit: int = 2, - offset: int = 0, feature_id: Optional[str] = None) -> \ + offset: int = 0, feature_id: Optional[str] = None, + with_stac_info: bool = False) -> \ List[Feature]: hh_feature = { @@ -132,12 +134,12 @@ def get_vector_cube_bbox(self) -> Tuple[float, float, float, float]: def get_geometry_types(self) -> List[str]: return ['Polygon'] - def get_metadata(self, bbox: Tuple[float, float, float, float]) -> Dict: + def get_metadata(self, full: bool = False) -> Dict: metadata = { 'title': 'something', 'extent': { 'spatial': { - 'bbox': [bbox], + 'bbox': [9.0, 52.0, 11.0, 54.0], }, 'temporal': { 'interval': [[None, None]] diff --git a/tests/core/test_vectorcube.py b/tests/core/test_vectorcube.py new file mode 100644 index 0000000..6c17605 --- /dev/null +++ b/tests/core/test_vectorcube.py @@ -0,0 +1,37 @@ +import unittest + +from tests.core.mock_vc_provider import MockProvider + + +class VectorCubeTest(unittest.TestCase): + + def test_to_geojson(self): + mp = MockProvider({}) + vc = mp.get_vector_cube(('', 'collection_1')) + gj = vc.to_geojson() + self.assertEqual(2, len(gj['features'])) + self.assertEqual('FeatureCollection', gj['type']) + + feature_1 = gj['features'][0] + feature_2 = gj['features'][1] + + self.assertEqual([ + "9.0000", + "52.0000", + "11.0000", + "54.0000" + ], feature_1['bbox']) + self.assertEqual([ + "8.7000", + "51.3000", + "8.8000", + "51.8000" + ], feature_2['bbox']) + self.assertEqual([ + "datacube", + "https://stac-extensions.github.io/version/v1.0.0/schema.json" + ], feature_1['stac_extensions']) + self.assertEqual([ + "datacube", + "https://stac-extensions.github.io/version/v1.0.0/schema.json" + ], feature_2['stac_extensions']) diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index f1f8d3d..6f3218b 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -82,7 +82,7 @@ def test_collection(self): self.assertIsNotNone(collection_data['license']) self.assertEqual(2, len(collection_data['extent'])) expected_spatial_extent = \ - {'bbox': [[9.0, 52.0, 11.0, 54.0]]} + {'bbox': [9.0, 52.0, 11.0, 54.0]} expected_temporal_extent = {'interval': [[None, None]]} self.assertEqual(expected_spatial_extent, collection_data['extent']['spatial']) diff --git a/xcube_geodb_openeo/api/context.py b/xcube_geodb_openeo/api/context.py index 0c74283..3adde9b 100644 --- a/xcube_geodb_openeo/api/context.py +++ b/xcube_geodb_openeo/api/context.py @@ -124,6 +124,7 @@ def get_collections(self, base_url: str, limit: int, offset: int): full=False) if collection: collection_list.append(collection) + LOG.debug(f'Loaded collection {collection_id} from geoDB') else: LOG.warning(f'Skipped empty collection {collection_id}') actual_limit = actual_limit + 1 @@ -186,6 +187,12 @@ def get_collection_item(self, base_url: str, f'feature {feature_id!r} not found in collection {collection_id!r}' ) + def transform_bbox(self, collection_id: Tuple[str, str], + bbox: Tuple[float, float, float, float], + crs: int) -> Tuple[float, float, float, float]: + from xcube_geodb.core.geodb import GeoDBClient + vector_cube = self.get_vector_cube(collection_id, bbox=None) + return GeoDBClient.transform_bbox_crs(bbox, vector_cube.srid, crs) def get_collections_links(limit: int, offset: int, url: str, collection_count: int): @@ -221,10 +228,7 @@ def _get_vector_cube_collection(base_url: str, vector_cube: VectorCube, full: bool = False) -> Optional[Dict]: vector_cube_id = vector_cube.id - bbox = vector_cube.get_bbox() - if not bbox: - return None - metadata = vector_cube.metadata + metadata = vector_cube.get_metadata(full) vector_cube_collection = { 'stac_version': STAC_VERSION, 'stac_extensions': STAC_EXTENSIONS, @@ -250,6 +254,7 @@ def _get_vector_cube_collection(base_url: str, } if full: geometry_types = vector_cube.get_geometry_types() + bbox = vector_cube.get_bbox() z_dim = vector_cube.get_vertical_dim() axes = ['x', 'y', 'z'] if z_dim else ['x', 'y'] srid = vector_cube.srid @@ -308,6 +313,7 @@ def _utc_now(): .utcnow() \ .replace(microsecond=0) \ .isoformat() + 'Z' + class CollectionNotFoundException(Exception): pass diff --git a/xcube_geodb_openeo/api/routes.py b/xcube_geodb_openeo/api/routes.py index a04e1e5..02b0103 100644 --- a/xcube_geodb_openeo/api/routes.py +++ b/xcube_geodb_openeo/api/routes.py @@ -19,14 +19,17 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. import json +import sys +from openeo.internal.graph_building import PGNode +from xcube.server.api import ApiError +from xcube.server.api import ApiHandler + +from .api import api from ..backend import capabilities from ..backend import processes -from .api import api -from xcube.server.api import ApiHandler -from xcube.server.api import ApiError -from ..defaults import STAC_DEFAULT_COLLECTIONS_LIMIT, \ - STAC_DEFAULT_ITEMS_LIMIT, STAC_MAX_ITEMS_LIMIT, STAC_MIN_ITEMS_LIMIT +from ..defaults import STAC_DEFAULT_ITEMS_LIMIT, STAC_MAX_ITEMS_LIMIT, \ + STAC_MIN_ITEMS_LIMIT def get_base_url(request): @@ -118,20 +121,44 @@ def post(self): Processes requested processing task and returns result. """ if not self.request.body: - raise (ApiError(400, 'Request body must contain key \'process\'.')) + raise (ApiError( + 400, + 'Request body must contain key \'process\'.')) processing_request = json.loads(self.request.body)['process'] - process_id = processing_request['id'] - process_parameters = processing_request['parameters'] registry = processes.get_processes_registry() - process = registry.get_process(process_id) + graph = processing_request['process_graph'] + pg_node = PGNode.from_flat_graph(graph) + + error_message = ('Graphs different from `load_collection` -> ' + '`save_result` not yet supported.') + if pg_node.process_id == 'save_result': + source = pg_node.arguments['data']['from_node'] + if source.process_id == 'load_collection': + process = registry.get_process(source.process_id) + expected_parameters = process.metadata['parameters'] + process_parameters = source.arguments + self.ensure_parameters(expected_parameters, process_parameters) + process.parameters = process_parameters + load_collection_result = processes.submit_process_sync( + process, self.ctx) + gj = load_collection_result.to_geojson() + self.response.finish(gj) + else: + raise ValueError(error_message) + else: + raise ValueError(error_message) + # process_id = processing_graph['id'] + # process_parameters = processing_graph['parameters'] + # registry = processes.get_processes_registry() + # process = registry.get_process(process_id) - expected_parameters = process.metadata['parameters'] - self.ensure_parameters(expected_parameters, process_parameters) - process.parameters = process_parameters + # expected_parameters = process.metadata['parameters'] + # self.ensure_parameters(expected_parameters, process_parameters) + # process.parameters = process_parameters - result = processes.submit_process_sync(process, self.ctx) - self.response.finish(result) + # result = processes.submit_process_sync(process, self.ctx) + # self.response.finish(result) @staticmethod def ensure_parameters(expected_parameters, process_parameters): @@ -175,7 +202,7 @@ def get(self): items that are presented in the response document. offset (int): Collections are listed starting at offset. """ - limit = _get_limit(self.request, STAC_DEFAULT_COLLECTIONS_LIMIT) + limit = _get_limit(self.request) offset = _get_offset(self.request) base_url = get_base_url(self.request) self.ctx.get_collections(base_url, limit, offset) @@ -255,7 +282,7 @@ def get(self, collection_id: str, item_id: str): self.response.finish(feature) -def _get_limit(request, default: int) -> int: +def _get_limit(request, default=sys.maxsize) -> int: limit = int(request.get_query_arg('limit')) if \ request.get_query_arg('limit') \ else default diff --git a/xcube_geodb_openeo/backend/processes.py b/xcube_geodb_openeo/backend/processes.py index d433095..8ca5bcd 100644 --- a/xcube_geodb_openeo/backend/processes.py +++ b/xcube_geodb_openeo/backend/processes.py @@ -22,7 +22,7 @@ import importlib.resources as resources import json from abc import abstractmethod -from typing import Dict, List +from typing import Dict, List, Any from xcube.server.api import ServerContextT @@ -107,7 +107,109 @@ def get_links(self) -> List: return self.links.copy() def get_file_formats(self) -> Dict: - return {'input': {}, 'output': {}} + return { + "output": { + "GTiff": { + "title": "GeoTiff", + "description": "Export to GeoTiff. Doesn't support cloud-optimized GeoTiffs (COGs) yet.", + "gis_data_types": [ + "raster" + ], + "parameters": { + "tiled": { + "type": "boolean", + "description": "This option can be used to force creation of tiled TIFF files [true]. By default [false] stripped TIFF files are created.", + "default": "false" + }, + "compress": { + "type": "string", + "description": "Set the compression to use.", + "default": "NONE", + "enum": [ + "JPEG", + "LZW", + "DEFLATE", + "NONE" + ] + }, + "jpeg_quality": { + "type": "integer", + "description": "Set the JPEG quality when using JPEG.", + "minimum": 1, + "maximum": 100, + "default": 75 + } + }, + "links": [ + { + "href": "https://gdal.org/drivers/raster/gtiff.html", + "rel": "about", + "title": "GDAL on the GeoTiff file format and storage options" + } + ] + }, + "GPKG": { + "title": "OGC GeoPackage", + "gis_data_types": [ + "raster", + "vector" + ], + "parameters": { + "version": { + "type": "string", + "description": "Set GeoPackage version. In AUTO mode, this will be equivalent to 1.2 starting with GDAL 2.3.", + "enum": [ + "auto", + "1", + "1.1", + "1.2" + ], + "default": "auto" + } + }, + "links": [ + { + "href": "https://gdal.org/drivers/raster/gpkg.html", + "rel": "about", + "title": "GDAL on GeoPackage for raster data" + }, + { + "href": "https://gdal.org/drivers/vector/gpkg.html", + "rel": "about", + "title": "GDAL on GeoPackage for vector data" + } + ] + } + }, + "input": { + "GPKG": { + "title": "OGC GeoPackage", + "gis_data_types": [ + "raster", + "vector" + ], + "parameters": { + "table": { + "type": "string", + "description": "**RASTER ONLY.** Name of the table containing the tiles. If the GeoPackage dataset only contains one table, this option is not necessary. Otherwise, it is required." + } + }, + "links": [ + { + "href": "https://gdal.org/drivers/raster/gpkg.html", + "rel": "about", + "title": "GDAL on GeoPackage for raster data" + }, + { + "href": "https://gdal.org/drivers/vector/gpkg.html", + "rel": "about", + "title": "GDAL on GeoPackage for vector data" + } + ] + } + } + } + # return {'input': [], 'output': ['GeoJSON']} def get_process(self, process_id: str) -> Process: for process in self.processes: @@ -134,12 +236,12 @@ def get_processes_registry() -> ProcessRegistry: return _PROCESS_REGISTRY_SINGLETON -def submit_process_sync(p: Process, ctx: ServerContextT) -> str: +def submit_process_sync(p: Process, ctx: ServerContextT) -> Any: """ Submits a process synchronously, and returns the result. :param p: The process to execute. :param ctx: The Server context. - :return: processing result as geopandas object + :return: processing result """ return p.execute(p.parameters, ctx) @@ -148,45 +250,37 @@ class LoadCollection(Process): DEFAULT_CRS = 4326 def execute(self, query_params: dict, ctx: ServerContextT) -> str: - backend_params = self.translate_parameters(query_params) - collection_id = backend_params['collection_id'] + params = self.translate_parameters(query_params) + collection_id = tuple(params['collection_id'].split('~')) bbox_transformed = None - if backend_params['bbox']: - bbox = tuple(backend_params['bbox'].replace('(', '') - .replace(')', '').replace(' ', '').split(',')) - crs = backend_params['crs'] - bbox_transformed = ctx.transform_bbox(collection_id, bbox, crs) - - vector_cube = ctx.data_source.get_vector_cube( - collection_id=collection_id, - with_items=True, - bbox=bbox_transformed - ) - result = [] - features = vector_cube['features'] - for feature in features: - result.append({ - 'id': feature['id'], - 'bbox': feature['bbox'], - 'geometry': feature['geometry'], - 'properties': feature['properties'] - }) - - return json.dumps(result) + if params['bbox']: + bbox = [float(v) for v in + params['bbox'] + .replace('(', '') + .replace(')', '') + .replace(' ', '') + .split(',')] + crs = int(params['crs']) + bbox_transformed = ctx.transform_bbox(collection_id, + bbox, crs) + + return ctx.get_vector_cube(collection_id, bbox=bbox_transformed) def translate_parameters(self, query_params: dict) -> dict: bbox_qp = query_params['spatial_extent']['bbox'] \ - if query_params['spatial_extent'] else None + if ('spatial_extent' in query_params + and query_params['spatial_extent'] + and 'bbox' in query_params['spatial_extent']) else None if not bbox_qp: crs_qp = None else: crs_qp = query_params['spatial_extent']['crs'] \ - if query_params['spatial_extent'] and \ - 'crs' in query_params['spatial_extent'] \ + if ('spatial_extent' in query_params + and query_params['spatial_extent'] + and 'crs' in query_params['spatial_extent']) \ else self.DEFAULT_CRS - backend_params = { + return { 'collection_id': query_params['id'], 'bbox': bbox_qp, 'crs': crs_qp } - return backend_params diff --git a/xcube_geodb_openeo/core/geodb_datasource.py b/xcube_geodb_openeo/core/geodb_datasource.py index 9dfcc5f..2c71bb3 100644 --- a/xcube_geodb_openeo/core/geodb_datasource.py +++ b/xcube_geodb_openeo/core/geodb_datasource.py @@ -21,21 +21,19 @@ import abc from datetime import datetime from functools import cached_property -from typing import List, Mapping, Any, Optional, Tuple, Dict +from typing import List, Any, Optional, Tuple, Dict import dateutil.parser import shapely import shapely.wkt +from geojson.feature import Feature from geojson.geometry import Geometry from pandas import Series from xcube.constants import LOG -from xcube_geodb.core.geodb import GeoDBClient, GeoDBError +from xcube_geodb.core.geodb import GeoDBClient -from .tools import create_geodb_client from ..defaults import STAC_VERSION, STAC_EXTENSIONS, STAC_DEFAULT_ITEMS_LIMIT -Feature = Dict[str, Any] - class DataSource(abc.ABC): @@ -70,7 +68,8 @@ def get_vertical_dim( @abc.abstractmethod def load_features(self, limit: int = STAC_DEFAULT_ITEMS_LIMIT, offset: int = 0, - feature_id: Optional[str] = None) -> List[Feature]: + feature_id: Optional[str] = None, + with_stac_info: bool = True) -> List[Feature]: pass @abc.abstractmethod @@ -82,85 +81,77 @@ def get_geometry_types(self) -> List[str]: pass @abc.abstractmethod - def get_metadata(self, bbox: Tuple[float, float, float, float]) -> Dict: + def get_metadata(self, full: bool = False) -> Dict: pass class GeoDBVectorSource(DataSource): - def __init__(self, config: Mapping[str, Any], - collection_id: Tuple[str, str]): - self.config = config + def __init__(self, collection_id: Tuple[str, str], + geodb: GeoDBClient): self.collection_id = collection_id - - @cached_property - def geodb(self) -> GeoDBClient: - assert self.config - api_config = self.config['geodb_openeo'] - return create_geodb_client(api_config) + self._geodb = geodb @cached_property def collection_info(self): (db, name) = self.collection_id - return self.geodb.get_collection_info(name, db) + info = self._geodb.get_collection_info(name, db) + return info def get_feature_count(self) -> int: (db, name) = self.collection_id LOG.debug(f'Retrieving count from geoDB...') - count = self.geodb.count_collection_rows(name, database=db, + count = self._geodb.count_collection_rows(name, database=db, exact_count=True) LOG.debug(f'...done.') return count def get_srid(self) -> int: (db, name) = self.collection_id - return int(self.geodb.get_collection_srid(name, db)) + return int(self._geodb.get_collection_srid(name, db)) def get_geometry_types(self) -> List[str]: LOG.debug(f'Loading geometry types for vector cube ' f'{self.collection_id} from geoDB...') (db, name) = self.collection_id - return self.geodb.get_geometry_types(collection=name, aggregate=True, + return self._geodb.get_geometry_types(collection=name, aggregate=True, database=db) def load_features(self, limit: int = STAC_DEFAULT_ITEMS_LIMIT, offset: int = 0, - feature_id: Optional[str] = None) -> List[Feature]: + feature_id: Optional[str] = None, + with_stac_info: bool = True) -> List[Feature]: LOG.debug(f'Loading features of collection {self.collection_id} from ' f'geoDB...') (db, name) = self.collection_id - select = 'id,geometry' - time = self._get_col_name(['date', 'time', 'timestamp', 'datetime']) - if time: - select = f'{select},{time}' if feature_id: - gdf = self.geodb.get_collection_pg( - name, select=select, where=f'id = {feature_id}', database=db) + gdf = self._geodb.get_collection_pg( + name, where=f'id = {feature_id}', database=db) else: - gdf = self.geodb.get_collection_pg( - name, select=select, limit=limit, offset=offset, database=db) + gdf = self._geodb.get_collection_pg( + name, limit=limit, offset=offset, database=db) features = [] - properties = list(self.collection_info['properties'].keys()) for i, row in enumerate(gdf.iterrows()): bbox = gdf.bounds.iloc[i] - coords = self._get_coords(row[1]) - - feature = { - 'stac_version': STAC_VERSION, - 'stac_extensions': STAC_EXTENSIONS, - 'type': 'Feature', - 'id': str(row[1]['id']), - 'bbox': [f'{bbox["minx"]:.4f}', - f'{bbox["miny"]:.4f}', - f'{bbox["maxx"]:.4f}', - f'{bbox["maxy"]:.4f}'], - 'geometry': coords, - 'properties': properties - } - if time: - feature['datetime'] = row[1][time] + props = dict(row[1]) + geometry = props['geometry'] + id = props['id'] + del props['geometry'] + del props['id'] + if with_stac_info: + props['bbox']: [f'{bbox["minx"]:.4f}', + f'{bbox["miny"]:.4f}', + f'{bbox["maxx"]:.4f}', + f'{bbox["maxy"]:.4f}'] + props['stac_version']: STAC_VERSION + props['stac_extensions']: STAC_EXTENSIONS + props['type']: 'Feature' + feature = Feature( + id=str(id), + geometry=geometry, + properties=props) features.append(feature) LOG.debug('...done.') return features @@ -176,7 +167,7 @@ def get_vector_dim(self, LOG.debug(f'Loading global geometry for {self.collection_id} ' f'from geoDB...') (db, name) = self.collection_id - gdf = self.geodb.get_collection_pg( + gdf = self._geodb.get_collection_pg( name, select=select, group=select, database=db) LOG.debug('...done.') @@ -192,7 +183,7 @@ def get_time_dim( gdf = self._fetch_from_geodb(select, bbox) else: (db, name) = self.collection_id - gdf = self.geodb.get_collection_pg( + gdf = self._geodb.get_collection_pg( name, select=select, database=db) return [dateutil.parser.parse(d) for d in gdf[select]] @@ -207,7 +198,7 @@ def get_vertical_dim( gdf = self._fetch_from_geodb(select, bbox) else: (db, name) = self.collection_id - gdf = self.geodb.get_collection_pg( + gdf = self._geodb.get_collection_pg( name, select=select, database=db) return gdf[select] @@ -215,17 +206,14 @@ def get_vertical_dim( def get_vector_cube_bbox(self) -> Tuple[float, float, float, float]: (db, name) = self.collection_id path = f'/geodb_bbox_lut?bbox&table_name=eq.{db}_{name}' - LOG.debug(f'Loading collection bbox for {self.collection_id} from ' - f'geoDB...') - response = self.geodb._get(path) - LOG.debug(f'...done.') + response = self._geodb._get(path) geometry = None if response.json(): geometry = response.json()[0]['bbox'] if geometry: vector_cube_bbox = shapely.wkt.loads(geometry).bounds else: - vector_cube_bbox = self.geodb.get_collection_bbox(name, + vector_cube_bbox = self._geodb.get_collection_bbox(name, database=db) if vector_cube_bbox: vector_cube_bbox = self._transform_bbox_crs(vector_cube_bbox, @@ -233,20 +221,22 @@ def get_vector_cube_bbox(self) -> Tuple[float, float, float, float]: return vector_cube_bbox - def get_metadata(self, bbox: Tuple[float, float, float, float]) -> Dict: + def get_metadata(self, full: bool = False) -> Dict: (db, name) = self.collection_id col_names = list(self.collection_info['properties'].keys()) - time_column = self._get_col_name( - ['date', 'time', 'timestamp', 'datetime']) + time_column = None + if full: + time_column = self._get_col_name( + ['date', 'time', 'timestamp', 'datetime']) if time_column: LOG.debug(f'Loading time interval for {self.collection_id} from ' f'geoDB...') - earliest = self.geodb.get_collection_pg( + earliest = self._geodb.get_collection_pg( name, select=time_column, order=time_column, limit=1, database=db)[time_column][0] earliest = dateutil.parser.parse(earliest).isoformat() - latest = self.geodb.get_collection_pg( + latest = self._geodb.get_collection_pg( name, select=time_column, order=f'{time_column} DESC', limit=1, database=db)[time_column][0] @@ -259,7 +249,8 @@ def get_metadata(self, bbox: Tuple[float, float, float, float]) -> Dict: 'title': f'{name}', 'extent': { 'spatial': { - 'bbox': [bbox], + 'bbox': [None] if not full else + self.get_vector_cube_bbox(), }, 'temporal': { 'interval': [[earliest, latest]] @@ -275,15 +266,15 @@ def _transform_bbox(self, collection_id: Tuple[str, str], bbox: Tuple[float, float, float, float], crs: int) -> Tuple[float, float, float, float]: (db, name) = collection_id - srid = self.geodb.get_collection_srid(name, database=db) + srid = self._geodb.get_collection_srid(name, database=db) if srid == crs: return bbox - return self.geodb.transform_bbox_crs(bbox, crs, srid) + return self._geodb.transform_bbox_crs(bbox, crs, srid) def _transform_bbox_crs(self, collection_bbox, name: str, db: str): - srid = self.geodb.get_collection_srid(name, database=db) + srid = self._geodb.get_collection_srid(name, database=db) if srid is not None and srid != '4326': - collection_bbox = self.geodb.transform_bbox_crs( + collection_bbox = self._geodb.transform_bbox_crs( collection_bbox, srid, '4326' ) @@ -298,7 +289,7 @@ def _get_col_name(self, possible_names: List[str]) -> Optional[str]: def _fetch_from_geodb(self, select: str, bbox: Tuple[float, float, float, float]): (db, name) = self.collection_id - srid = self.geodb.get_collection_srid(name, database=db) + srid = self._geodb.get_collection_srid(name, database=db) where = f'ST_Intersects(geometry, ST_GeomFromText(\'POLYGON((' \ f'{bbox[0]},{bbox[1]},' \ f'{bbox[0]},{bbox[3]},' \ @@ -307,7 +298,7 @@ def _fetch_from_geodb(self, select: str, f'{bbox[0]},{bbox[1]},' \ f'))\',' \ f'{srid}))' - return self.geodb.get_collection_pg(name, + return self._geodb.get_collection_pg(name, select=select, where=where, group=select, diff --git a/xcube_geodb_openeo/core/vectorcube.py b/xcube_geodb_openeo/core/vectorcube.py index 80f1af0..b12136d 100644 --- a/xcube_geodb_openeo/core/vectorcube.py +++ b/xcube_geodb_openeo/core/vectorcube.py @@ -20,12 +20,15 @@ # DEALINGS IN THE SOFTWARE. from datetime import datetime from functools import cached_property -from typing import Any, Optional, Tuple +from typing import Any, Optional, Tuple, Dict from typing import List + +from geojson import FeatureCollection from geojson.geometry import Geometry from xcube_geodb_openeo.core.geodb_datasource import DataSource, Feature from xcube_geodb_openeo.core.tools import Cache +from xcube_geodb_openeo.defaults import STAC_DEFAULT_ITEMS_LIMIT class VectorCube: @@ -156,11 +159,14 @@ def get_feature(self, feature_id: str) -> Feature: self._feature_cache.insert(feature_id, [feature]) return feature - def load_features(self, limit: int, offset: int) -> List[Feature]: + def load_features(self, limit: int = STAC_DEFAULT_ITEMS_LIMIT, + offset: int = 0, + with_stac_info: bool = True) -> List[Feature]: key = (limit, offset) if key in self._feature_cache.get_keys(): return self._feature_cache.get(key) - features = self._datasource.load_features(limit, offset) + features = self._datasource.load_features(limit, offset, + None, with_stac_info) self._feature_cache.insert(key, features) return features @@ -176,7 +182,9 @@ def get_geometry_types(self) -> List[str]: self._geometry_types = self._datasource.get_geometry_types() return self._geometry_types - @cached_property - def metadata(self) -> {}: - bbox = self.get_bbox() - return self._datasource.get_metadata(bbox) + def get_metadata(self, full: bool = False) -> Dict: + return self._datasource.get_metadata(full) + + def to_geojson(self) -> FeatureCollection: + return FeatureCollection(self.load_features( + self.feature_count, 0, False)) diff --git a/xcube_geodb_openeo/core/vectorcube_provider.py b/xcube_geodb_openeo/core/vectorcube_provider.py index 8eaa264..494a58e 100644 --- a/xcube_geodb_openeo/core/vectorcube_provider.py +++ b/xcube_geodb_openeo/core/vectorcube_provider.py @@ -37,8 +37,9 @@ def get_collection_keys(self) -> List[Tuple[str, str]]: pass @abc.abstractmethod - def get_vector_cube(self, collection_id: Tuple[str, str], - bbox: Tuple[float, float, float, float]) \ + def get_vector_cube( + self, collection_id: Tuple[str, str], + bbox: Optional[Tuple[float, float, float, float]] = None) \ -> VectorCube: pass @@ -65,8 +66,9 @@ def get_collection_keys(self) -> List[Tuple[str, str]]: return result - def get_vector_cube(self, collection_id: Tuple[str, str], - bbox: Tuple[float, float, float, float] = None) \ + def get_vector_cube( + self, collection_id: Tuple[str, str], + bbox: Optional[Tuple[float, float, float, float]] = None) \ -> VectorCube: return VectorCube(collection_id, - GeoDBVectorSource(self.config, collection_id)) + GeoDBVectorSource(collection_id, self.geodb)) diff --git a/xcube_geodb_openeo/defaults.py b/xcube_geodb_openeo/defaults.py index c33c457..7f33112 100644 --- a/xcube_geodb_openeo/defaults.py +++ b/xcube_geodb_openeo/defaults.py @@ -32,7 +32,6 @@ STAC_EXTENSIONS = \ ['datacube', 'https://stac-extensions.github.io/version/v1.0.0/schema.json'] -STAC_DEFAULT_COLLECTIONS_LIMIT = 10 STAC_DEFAULT_ITEMS_LIMIT = 10 STAC_MIN_ITEMS_LIMIT = 1 From 09c70bf3a065a4404d2b2297932b7c920e9ffaef Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 24 Aug 2023 22:07:58 +0200 Subject: [PATCH 116/163] started to add auth via Keycloak. Client (=geodb-openeo-server) can successfully request an access token from Keycloak. Now it must be validated and used. --- environment.yml | 2 + xcube_geodb_openeo/api/routes.py | 72 +++++++++++++++++++++++---- xcube_geodb_openeo/config.yml.example | 14 +++++- xcube_geodb_openeo/server/config.py | 7 ++- 4 files changed, 81 insertions(+), 14 deletions(-) diff --git a/environment.yml b/environment.yml index e609534..1db15d6 100644 --- a/environment.yml +++ b/environment.yml @@ -15,6 +15,8 @@ dependencies: - yaml - ipython - urllib3 + - openeo + - requests # Testing - pytest >=4.4 - pytest-cov >=2.6 diff --git a/xcube_geodb_openeo/api/routes.py b/xcube_geodb_openeo/api/routes.py index 02b0103..379d01e 100644 --- a/xcube_geodb_openeo/api/routes.py +++ b/xcube_geodb_openeo/api/routes.py @@ -18,8 +18,10 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. +import base64 import json import sys +import requests from openeo.internal.graph_building import PGNode from xcube.server.api import ApiError @@ -55,6 +57,65 @@ def get(self): self.response.finish(capabilities.get_root(self.ctx.config, base_url)) +@api.route('/credentials/oidc') +class RootHandler(ApiHandler): + """ + Initiates the authentication process. + """ + + def get(self): + auth_endpoint = ('https://kc.brockmann-consult.de/auth/realms/' + 'xcube-geodb-openeo/protocol/openid-connect/auth') + # the values for client_id and redirect_uri must match the values + # set in Keycloak + payload = {'response_type': 'code', + 'client_id': 'openeo-server', + 'scope': 'openid', + 'redirect_uri': + f'{get_base_url(self.request)}/create_access_token'} + + # construct a redirect + self.response.set_status(302) + + # as the method cannot be changed using the xcube server framework, we + # have to use GET as well, and thus construct a URL with the payload as + # query params + auth_endpoint = f'{auth_endpoint}?' + for k in payload.keys(): + auth_endpoint = f'{auth_endpoint}{k}={payload[k]}&' + auth_endpoint = auth_endpoint[:-1] + self.response.set_header('Location', auth_endpoint) + + self.response.finish() + + +@api.route('/create_access_token') +class RootHandler(ApiHandler): + """ + Creates and validates an access token. + """ + + def get(self): + code = self.request.query['code'][0] + clientId = self.ctx.config['geodb_openeo']['kc_clientId'] + secret = self.ctx.config['geodb_openeo']['kc_secret'] + credentials = (base64.b64encode( + f'{clientId}:{secret}'.encode("ascii")).decode('ascii')) + auth_token_url = ('https://kc.brockmann-consult.de/auth/realms/' + 'xcube-geodb-openeo/protocol/openid-connect/token') + headers = { + 'Content-Type': 'application/x-www-form-urlencoded', + 'Authorization': f'Basic {credentials}' + } + + payload = { + 'grant_type': 'authorization_code', + 'code': code, + 'redirect_uri': 'http://localhost:8080/create_access_token' + } + resp = requests.post(auth_token_url, data=payload, headers=headers) + print(f'got access token! See: {resp.text}') + @api.route('/.well-known/openeo') class WellKnownHandler(ApiHandler): """ @@ -148,17 +209,6 @@ def post(self): raise ValueError(error_message) else: raise ValueError(error_message) - # process_id = processing_graph['id'] - # process_parameters = processing_graph['parameters'] - # registry = processes.get_processes_registry() - # process = registry.get_process(process_id) - - # expected_parameters = process.metadata['parameters'] - # self.ensure_parameters(expected_parameters, process_parameters) - # process.parameters = process_parameters - - # result = processes.submit_process_sync(process, self.ctx) - # self.response.finish(result) @staticmethod def ensure_parameters(expected_parameters, process_parameters): diff --git a/xcube_geodb_openeo/config.yml.example b/xcube_geodb_openeo/config.yml.example index 017362a..c13b159 100644 --- a/xcube_geodb_openeo/config.yml.example +++ b/xcube_geodb_openeo/config.yml.example @@ -6,4 +6,16 @@ geodb_openeo: postgrest_port: client_id: client_secret: - auth_domain: \ No newline at end of file + auth_domain: + kc_clientId: + kc_secret: + + +api_spec: + includes: + - geodb-openeo + - meta + - auth + +tornado: + xheaders: true diff --git a/xcube_geodb_openeo/server/config.py b/xcube_geodb_openeo/server/config.py index 7e3a472..d8e13d6 100644 --- a/xcube_geodb_openeo/server/config.py +++ b/xcube_geodb_openeo/server/config.py @@ -19,6 +19,7 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. +from xcube.util.jsonschema import JsonNumberSchema from xcube.util.jsonschema import JsonObjectSchema from xcube.util.jsonschema import JsonStringSchema @@ -26,10 +27,12 @@ properties=dict( geodb_openeo=JsonObjectSchema(properties=dict( postgrest_url=JsonStringSchema(), - postgrest_port=JsonStringSchema(), + postgrest_port=JsonNumberSchema(), client_id=JsonStringSchema(), client_secret=JsonStringSchema(), - auth_domain=JsonStringSchema()) + auth_domain=JsonStringSchema(), + kc_clientId=JsonStringSchema(), + kc_secret=JsonStringSchema()) )), additional_properties=True ) From dac989e7e77492ceeafa4a1fcba06ed697c1b022 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 24 Aug 2023 22:12:19 +0200 Subject: [PATCH 117/163] small fix --- xcube_geodb_openeo/api/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcube_geodb_openeo/api/routes.py b/xcube_geodb_openeo/api/routes.py index 379d01e..b9a34d5 100644 --- a/xcube_geodb_openeo/api/routes.py +++ b/xcube_geodb_openeo/api/routes.py @@ -111,7 +111,7 @@ def get(self): payload = { 'grant_type': 'authorization_code', 'code': code, - 'redirect_uri': 'http://localhost:8080/create_access_token' + 'redirect_uri': f'{get_base_url(self.request)}/create_access_token' } resp = requests.post(auth_token_url, data=payload, headers=headers) print(f'got access token! See: {resp.text}') From 125f2276650fc80247af4f0d1b2b995fef5862a9 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 16:21:03 +0200 Subject: [PATCH 118/163] temporarily commenting out dependency on unittests, in order to build a new docker image --- .github/workflows/workflow.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 03e42c5..462178f 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -71,7 +71,7 @@ jobs: build-docker-image: runs-on: ubuntu-latest - needs: [unittest] +# needs: [unittest] name: build-docker-image steps: # Checkout xcube-geodb-openeo (this project) From e91bd931b28c1eeecfd0ce1c9302012329dfe84b Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 16:29:13 +0200 Subject: [PATCH 119/163] trying to make env solvable --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 1db15d6..e5527df 100644 --- a/environment.yml +++ b/environment.yml @@ -4,7 +4,7 @@ channels: - defaults dependencies: # Python - - python >=3.8,<3.10 + - python >=3.8 # Required - geopandas - pandas From 5d2ffab55871c2ff21fa681d1bf3dd667b53f695 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 20:34:49 +0200 Subject: [PATCH 120/163] update _very_ old Dockerfile dependencies --- docker/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 8a7d327..1fb6db5 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,9 +1,9 @@ -FROM continuumio/miniconda3:4.12.0 +FROM continuumio/miniconda3:23.5.2-0 LABEL maintainer="xcube-team@brockmann-consult.de" LABEL name=xcube_geodb_openeo -RUN conda install -n base -c conda-forge 'mamba>=0.27' pip +RUN conda install -n base -c conda-forge 'mamba>=1.5.2' pip #ADD environment.yml /tmp/environment.yml ADD . /tmp/ From f1174bd6ed9e3d2219ff8bd61888774cb2cb83c9 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 20:42:55 +0200 Subject: [PATCH 121/163] trying to use micromamba in Dockerfile --- docker/Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 1fb6db5..182ce98 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,19 +1,21 @@ -FROM continuumio/miniconda3:23.5.2-0 +#FROM continuumio/miniconda3:23.5.2-0 +ARG MICROMAMBA_VERSION=1.3.1 +FROM mambaorg/micromamba:${MICROMAMBA_VERSION} LABEL maintainer="xcube-team@brockmann-consult.de" LABEL name=xcube_geodb_openeo -RUN conda install -n base -c conda-forge 'mamba>=1.5.2' pip +RUN micromamba install -n base -c conda-forge pip #ADD environment.yml /tmp/environment.yml ADD . /tmp/ WORKDIR /tmp -RUN mamba env update -n base +RUN micromamba env update -n base RUN . activate base RUN git clone https://github.com/dcs4cop/xcube.git WORKDIR /tmp/xcube -RUN mamba env update -n base +RUN micromamba env update -n base RUN pip install -e . WORKDIR /tmp/ From aafb2ba42687a01e806fb402ca3d65d1136423b9 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 20:51:44 +0200 Subject: [PATCH 122/163] trying to use micromamba in Dockerfile ctd --- docker/Dockerfile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 182ce98..722cd56 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -5,17 +5,23 @@ FROM mambaorg/micromamba:${MICROMAMBA_VERSION} LABEL maintainer="xcube-team@brockmann-consult.de" LABEL name=xcube_geodb_openeo +FROM mambaorg/micromamba:1.5.1 +COPY --chown=$MAMBA_USER:$MAMBA_USER env.yaml /tmp/env.yaml +RUN micromamba install --yes --file /tmp/env.yaml && \ + micromamba clean --all --yes +ARG MAMBA_DOCKERFILE_ACTIVATE=1 + RUN micromamba install -n base -c conda-forge pip -#ADD environment.yml /tmp/environment.yml +ADD environment.yml /tmp/environment.yml ADD . /tmp/ WORKDIR /tmp RUN micromamba env update -n base -RUN . activate base +#RUN . activate base RUN git clone https://github.com/dcs4cop/xcube.git WORKDIR /tmp/xcube -RUN micromamba env update -n base +#RUN micromamba env update -n base RUN pip install -e . WORKDIR /tmp/ @@ -26,4 +32,6 @@ RUN pip install -e . WORKDIR /tmp/ RUN pip install -e . -CMD ["python", "-m", "xcube.cli.main", "--loglevel=DETAIL", "--traceback", "serve", "-vvv", "-c", "/etc/config/config.yml"] \ No newline at end of file +RUN python -m xcube.cli.main --loglevel=DETAIL --traceback serve -vvv -c /etc/config/config.yml + +#CMD ["python", "-m", "xcube.cli.main", "--loglevel=DETAIL", "--traceback", "serve", "-vvv", "-c", "/etc/config/config.yml"] \ No newline at end of file From 54b468d42f269683d24165f34538768bca101d5b Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 20:54:52 +0200 Subject: [PATCH 123/163] trying to use micromamba in Dockerfile ctd --- docker/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 722cd56..ec3cab6 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -6,17 +6,17 @@ LABEL maintainer="xcube-team@brockmann-consult.de" LABEL name=xcube_geodb_openeo FROM mambaorg/micromamba:1.5.1 -COPY --chown=$MAMBA_USER:$MAMBA_USER env.yaml /tmp/env.yaml -RUN micromamba install --yes --file /tmp/env.yaml && \ +COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yaml /tmp/environment.yaml +RUN micromamba install --yes --file /tmp/environment.yaml && \ micromamba clean --all --yes ARG MAMBA_DOCKERFILE_ACTIVATE=1 RUN micromamba install -n base -c conda-forge pip -ADD environment.yml /tmp/environment.yml +#ADD environment.yml /tmp/environment.yml ADD . /tmp/ WORKDIR /tmp -RUN micromamba env update -n base +RUN #micromamba env update -n base #RUN . activate base RUN git clone https://github.com/dcs4cop/xcube.git From 5ad7258a45bdd38c17578481808fb5e8b3a12924 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 21:01:25 +0200 Subject: [PATCH 124/163] trying to use micromamba in Dockerfile ctd --- docker/Dockerfile | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index ec3cab6..634a6f1 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -5,7 +5,31 @@ FROM mambaorg/micromamba:${MICROMAMBA_VERSION} LABEL maintainer="xcube-team@brockmann-consult.de" LABEL name=xcube_geodb_openeo -FROM mambaorg/micromamba:1.5.1 +# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +USER root + +# Update system and ensure that basic commands are available. +RUN apt-get -y update && \ + apt-get -y upgrade vim jq curl wget && \ + apt-get clean && rm -rf /var/lib/apt/lists/* + +# Magic taken from https://hub.docker.com/r/mambaorg/micromamba, +# section "Changing the user id or name" +RUN usermod "--login=${NEW_MAMBA_USER}" "--home=/home/${NEW_MAMBA_USER}" \ + --move-home "-u ${NEW_MAMBA_USER_ID}" "${MAMBA_USER}" && \ + groupmod "--new-name=${NEW_MAMBA_USER}" \ + "-g ${NEW_MAMBA_USER_GID}" "${MAMBA_USER}" && \ + # Update the expected value of MAMBA_USER for the + # _entrypoint.sh consistency check. + echo "${NEW_MAMBA_USER}" > "/etc/arg_mamba_user" && \ + : + +ENV MAMBA_USER=$NEW_MAMBA_USER +# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + +USER $MAMBA_USER + + COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yaml /tmp/environment.yaml RUN micromamba install --yes --file /tmp/environment.yaml && \ micromamba clean --all --yes From a322f3f200fd47e92fa80f3f0f51ee7d5732acaa Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 21:03:53 +0200 Subject: [PATCH 125/163] trying to use micromamba in Dockerfile ctd --- docker/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index 634a6f1..10ed1f7 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -5,6 +5,10 @@ FROM mambaorg/micromamba:${MICROMAMBA_VERSION} LABEL maintainer="xcube-team@brockmann-consult.de" LABEL name=xcube_geodb_openeo +ARG NEW_MAMBA_USER=xcube_geodb_openeo +ARG NEW_MAMBA_USER_ID=1000 +ARG NEW_MAMBA_USER_GID=1000 + # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< USER root From 8005f0201c9ce1614094fc75cdeabda8d2249080 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 21:05:54 +0200 Subject: [PATCH 126/163] trying to use micromamba in Dockerfile ctd --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 10ed1f7..30254ca 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -5,7 +5,7 @@ FROM mambaorg/micromamba:${MICROMAMBA_VERSION} LABEL maintainer="xcube-team@brockmann-consult.de" LABEL name=xcube_geodb_openeo -ARG NEW_MAMBA_USER=xcube_geodb_openeo +ARG NEW_MAMBA_USER=xcube-geodb-openeo ARG NEW_MAMBA_USER_ID=1000 ARG NEW_MAMBA_USER_GID=1000 From e650a55489c9283c08c8796b1c59f796ce476ee6 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 21:07:15 +0200 Subject: [PATCH 127/163] trying to use micromamba in Dockerfile ctd --- docker/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 30254ca..19acae9 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -34,8 +34,8 @@ ENV MAMBA_USER=$NEW_MAMBA_USER USER $MAMBA_USER -COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yaml /tmp/environment.yaml -RUN micromamba install --yes --file /tmp/environment.yaml && \ +COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yml /tmp/environment.yml +RUN micromamba install --yes --file /tmp/environment.yml && \ micromamba clean --all --yes ARG MAMBA_DOCKERFILE_ACTIVATE=1 From cf0df5eb6540d5afcc4835ad5da52d20121ca904 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 21:10:37 +0200 Subject: [PATCH 128/163] trying to use micromamba in Dockerfile ctd --- docker/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 19acae9..96c9abc 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -35,14 +35,14 @@ USER $MAMBA_USER COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yml /tmp/environment.yml -RUN micromamba install --yes --file /tmp/environment.yml && \ +RUN micromamba install --yes -n base --file /tmp/environment.yml && \ micromamba clean --all --yes ARG MAMBA_DOCKERFILE_ACTIVATE=1 RUN micromamba install -n base -c conda-forge pip #ADD environment.yml /tmp/environment.yml -ADD . /tmp/ +#ADD . /tmp/ WORKDIR /tmp RUN #micromamba env update -n base #RUN . activate base From f3079475f89d6cce6a860924eefcb3bf1a627b6d Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 21:18:43 +0200 Subject: [PATCH 129/163] trying to use micromamba in Dockerfile ctd --- docker/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index 96c9abc..3e8f711 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -15,6 +15,7 @@ USER root # Update system and ensure that basic commands are available. RUN apt-get -y update && \ apt-get -y upgrade vim jq curl wget && \ + apt-get -y install git && \ apt-get clean && rm -rf /var/lib/apt/lists/* # Magic taken from https://hub.docker.com/r/mambaorg/micromamba, From a3064da76c78af311344ef563d82cb64cc9cf09c Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 21:26:12 +0200 Subject: [PATCH 130/163] trying to use micromamba in Dockerfile ctd --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 3e8f711..6e01d07 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -58,7 +58,7 @@ RUN git clone https://github.com/dcs4cop/xcube-geodb.git WORKDIR /tmp/xcube-geodb RUN pip install -e . -WORKDIR /tmp/ +WORKDIR /home/${NEW_MAMBA_USER} RUN pip install -e . RUN python -m xcube.cli.main --loglevel=DETAIL --traceback serve -vvv -c /etc/config/config.yml From 7e276e68acd02e170483104567de2a3e4e959544 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 21:36:02 +0200 Subject: [PATCH 131/163] trying to use micromamba in Dockerfile ctd --- docker/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index 6e01d07..a43dd90 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -59,6 +59,9 @@ WORKDIR /tmp/xcube-geodb RUN pip install -e . WORKDIR /home/${NEW_MAMBA_USER} +RUN ls + +WORKDIR /home/${NEW_MAMBA_USER}/xcube-geodb-openeo RUN pip install -e . RUN python -m xcube.cli.main --loglevel=DETAIL --traceback serve -vvv -c /etc/config/config.yml From a69fd31c8943f1de0fb1b2ece22535567770af85 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 21:47:20 +0200 Subject: [PATCH 132/163] trying to use micromamba in Dockerfile ctd --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index a43dd90..c52a9db 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -59,7 +59,7 @@ WORKDIR /tmp/xcube-geodb RUN pip install -e . WORKDIR /home/${NEW_MAMBA_USER} -RUN ls +RUN find / -name "*xcube*openeo*" WORKDIR /home/${NEW_MAMBA_USER}/xcube-geodb-openeo RUN pip install -e . From 8557e555bbcb145e812cce096723428aad27d61c Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 21:54:24 +0200 Subject: [PATCH 133/163] trying to use micromamba in Dockerfile ctd --- docker/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index c52a9db..9ee9863 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -12,6 +12,8 @@ ARG NEW_MAMBA_USER_GID=1000 # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< USER root +RUN find / -name "*xcube*openeo*" + # Update system and ensure that basic commands are available. RUN apt-get -y update && \ apt-get -y upgrade vim jq curl wget && \ @@ -59,7 +61,6 @@ WORKDIR /tmp/xcube-geodb RUN pip install -e . WORKDIR /home/${NEW_MAMBA_USER} -RUN find / -name "*xcube*openeo*" WORKDIR /home/${NEW_MAMBA_USER}/xcube-geodb-openeo RUN pip install -e . From 1355742f579b6ba36e776dd4c8fbdfe451165a68 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 21:58:56 +0200 Subject: [PATCH 134/163] trying to use micromamba in Dockerfile ctd --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 9ee9863..17cd39a 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -12,7 +12,7 @@ ARG NEW_MAMBA_USER_GID=1000 # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< USER root -RUN find / -name "*xcube*openeo*" +RUN find / -name "environment.yml" # Update system and ensure that basic commands are available. RUN apt-get -y update && \ From 307eb08f6a6fcfcf78049f3f02879be9f7c1aa40 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 22:03:32 +0200 Subject: [PATCH 135/163] trying to use micromamba in Dockerfile ctd --- docker/Dockerfile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 17cd39a..65be6c0 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -12,8 +12,6 @@ ARG NEW_MAMBA_USER_GID=1000 # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< USER root -RUN find / -name "environment.yml" - # Update system and ensure that basic commands are available. RUN apt-get -y update && \ apt-get -y upgrade vim jq curl wget && \ @@ -36,8 +34,8 @@ ENV MAMBA_USER=$NEW_MAMBA_USER USER $MAMBA_USER - -COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yml /tmp/environment.yml +#COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yml /tmp/environment.yml +COPY --chown=$MAMBA_USER:$MAMBA_USER ./* /tmp RUN micromamba install --yes -n base --file /tmp/environment.yml && \ micromamba clean --all --yes ARG MAMBA_DOCKERFILE_ACTIVATE=1 @@ -45,9 +43,9 @@ ARG MAMBA_DOCKERFILE_ACTIVATE=1 RUN micromamba install -n base -c conda-forge pip #ADD environment.yml /tmp/environment.yml -#ADD . /tmp/ +ADD . /tmp/ WORKDIR /tmp -RUN #micromamba env update -n base +#RUN micromamba env update -n base #RUN . activate base RUN git clone https://github.com/dcs4cop/xcube.git From a859776f106bd40dcb024f66fdfe6159f5af7a76 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 22:14:33 +0200 Subject: [PATCH 136/163] trying to use micromamba in Dockerfile ctd --- .github/workflows/workflow.yaml | 3 ++- docker/Dockerfile => Dockerfile | 7 ++----- 2 files changed, 4 insertions(+), 6 deletions(-) rename docker/Dockerfile => Dockerfile (92%) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 462178f..b61e6d4 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -112,7 +112,8 @@ jobs: with: image: ${{ env.ORG_NAME }}/${{ env.APP_NAME }}-server directory: . - dockerfile: docker/Dockerfile +# dockerfile: docker/Dockerfile + dockerfile: Dockerfile addLatest: true registry: quay.io username: ${{ secrets.QUAY_REG_USERNAME }} diff --git a/docker/Dockerfile b/Dockerfile similarity index 92% rename from docker/Dockerfile rename to Dockerfile index 65be6c0..185f26d 100644 --- a/docker/Dockerfile +++ b/Dockerfile @@ -34,8 +34,7 @@ ENV MAMBA_USER=$NEW_MAMBA_USER USER $MAMBA_USER -#COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yml /tmp/environment.yml -COPY --chown=$MAMBA_USER:$MAMBA_USER ./* /tmp +COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yml /tmp/environment.yml RUN micromamba install --yes -n base --file /tmp/environment.yml && \ micromamba clean --all --yes ARG MAMBA_DOCKERFILE_ACTIVATE=1 @@ -43,7 +42,7 @@ ARG MAMBA_DOCKERFILE_ACTIVATE=1 RUN micromamba install -n base -c conda-forge pip #ADD environment.yml /tmp/environment.yml -ADD . /tmp/ +ADD docker /tmp/ WORKDIR /tmp #RUN micromamba env update -n base #RUN . activate base @@ -58,8 +57,6 @@ RUN git clone https://github.com/dcs4cop/xcube-geodb.git WORKDIR /tmp/xcube-geodb RUN pip install -e . -WORKDIR /home/${NEW_MAMBA_USER} - WORKDIR /home/${NEW_MAMBA_USER}/xcube-geodb-openeo RUN pip install -e . From a2d277586f0bcf8bc591c034045851bd59f8fcdf Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 22:30:06 +0200 Subject: [PATCH 137/163] trying to use micromamba in Dockerfile ctd --- Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 185f26d..81cc5d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -57,7 +57,12 @@ RUN git clone https://github.com/dcs4cop/xcube-geodb.git WORKDIR /tmp/xcube-geodb RUN pip install -e . -WORKDIR /home/${NEW_MAMBA_USER}/xcube-geodb-openeo +# Copy files for xcube source install +COPY --chown=$MAMBA_USER:$MAMBA_USER ./xcube-geodb-openeo /tmp/xcube-geodb-openeo +COPY --chown=$MAMBA_USER:$MAMBA_USER ./setup.py /tmp/setup.py + +# Switch into /tmp to install xcube-geodb-openeo . +WORKDIR /tmp RUN pip install -e . RUN python -m xcube.cli.main --loglevel=DETAIL --traceback serve -vvv -c /etc/config/config.yml From 8ad9c2c40639e2d9d7adc5713128c8458e135d6c Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 22:39:13 +0200 Subject: [PATCH 138/163] trying to use micromamba in Dockerfile ctd --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 81cc5d9..5e646ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -58,8 +58,8 @@ WORKDIR /tmp/xcube-geodb RUN pip install -e . # Copy files for xcube source install -COPY --chown=$MAMBA_USER:$MAMBA_USER ./xcube-geodb-openeo /tmp/xcube-geodb-openeo COPY --chown=$MAMBA_USER:$MAMBA_USER ./setup.py /tmp/setup.py +COPY --chown=$MAMBA_USER:$MAMBA_USER ./xcube_geodb_openeo /tmp/xcube_geodb_openeo # Switch into /tmp to install xcube-geodb-openeo . WORKDIR /tmp From 880ad0fa0710ff86568d0282cb797b924229dcaf Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 22:48:14 +0200 Subject: [PATCH 139/163] trying to use micromamba in Dockerfile ctd --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5e646ae..9949b90 100644 --- a/Dockerfile +++ b/Dockerfile @@ -63,7 +63,7 @@ COPY --chown=$MAMBA_USER:$MAMBA_USER ./xcube_geodb_openeo /tmp/xcube_geodb_opene # Switch into /tmp to install xcube-geodb-openeo . WORKDIR /tmp -RUN pip install -e . +#RUN pip install -e . RUN python -m xcube.cli.main --loglevel=DETAIL --traceback serve -vvv -c /etc/config/config.yml From e59d770158a068da881f5f6f6efc8358e521a8b5 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 23:07:58 +0200 Subject: [PATCH 140/163] trying to use micromamba in Dockerfile ctd --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 9949b90..2e80667 100644 --- a/Dockerfile +++ b/Dockerfile @@ -65,6 +65,8 @@ COPY --chown=$MAMBA_USER:$MAMBA_USER ./xcube_geodb_openeo /tmp/xcube_geodb_opene WORKDIR /tmp #RUN pip install -e . +RUN mkdir -p /etc/config +COPY --chown=$MAMBA_USER:$MAMBA_USER /tmp/xcube_geodb_openeo/config/config.yml /etc/config/config.yml RUN python -m xcube.cli.main --loglevel=DETAIL --traceback serve -vvv -c /etc/config/config.yml #CMD ["python", "-m", "xcube.cli.main", "--loglevel=DETAIL", "--traceback", "serve", "-vvv", "-c", "/etc/config/config.yml"] \ No newline at end of file From ed44bcbb11da308946acd543e920415fae6f4fe6 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 23:32:55 +0200 Subject: [PATCH 141/163] trying to use micromamba in Dockerfile ctd --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2e80667..f92c907 100644 --- a/Dockerfile +++ b/Dockerfile @@ -66,7 +66,7 @@ WORKDIR /tmp #RUN pip install -e . RUN mkdir -p /etc/config -COPY --chown=$MAMBA_USER:$MAMBA_USER /tmp/xcube_geodb_openeo/config/config.yml /etc/config/config.yml -RUN python -m xcube.cli.main --loglevel=DETAIL --traceback serve -vvv -c /etc/config/config.yml +#COPY --chown=$MAMBA_USER:$MAMBA_USER xcube_geodb_openeo/config/config.yml /etc/config/config.yml +RUN python -m xcube.cli.main --loglevel=DETAIL --traceback serve -vvv -c /tmp/xcube_geodb_openeo/config/config.yml #CMD ["python", "-m", "xcube.cli.main", "--loglevel=DETAIL", "--traceback", "serve", "-vvv", "-c", "/etc/config/config.yml"] \ No newline at end of file From 8a4c516f70f0a8ebe1b9f7843044efbdb01459b3 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 19 Oct 2023 23:44:19 +0200 Subject: [PATCH 142/163] trying to use micromamba in Dockerfile ctd --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f92c907..93dcc01 100644 --- a/Dockerfile +++ b/Dockerfile @@ -65,7 +65,7 @@ COPY --chown=$MAMBA_USER:$MAMBA_USER ./xcube_geodb_openeo /tmp/xcube_geodb_opene WORKDIR /tmp #RUN pip install -e . -RUN mkdir -p /etc/config +#RUN mkdir -p /etc/config #COPY --chown=$MAMBA_USER:$MAMBA_USER xcube_geodb_openeo/config/config.yml /etc/config/config.yml RUN python -m xcube.cli.main --loglevel=DETAIL --traceback serve -vvv -c /tmp/xcube_geodb_openeo/config/config.yml From 668b2ed230a9bb61fd63f3eb69fb51c9af40adeb Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Fri, 20 Oct 2023 09:44:24 +0200 Subject: [PATCH 143/163] trying to use micromamba in Dockerfile ctd --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 93dcc01..3059fcc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -63,6 +63,7 @@ COPY --chown=$MAMBA_USER:$MAMBA_USER ./xcube_geodb_openeo /tmp/xcube_geodb_opene # Switch into /tmp to install xcube-geodb-openeo . WORKDIR /tmp +RUN python setup.py install #RUN pip install -e . #RUN mkdir -p /etc/config From a414aa68be62d67294818b1c6cff79004a4690c6 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Fri, 20 Oct 2023 10:36:29 +0200 Subject: [PATCH 144/163] trying to use micromamba in Dockerfile ctd --- setup.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 552ba58..2651932 100644 --- a/setup.py +++ b/setup.py @@ -23,5 +23,10 @@ from setuptools import setup -setup() +setup(name='xcube_geodb_openeo', + version='0.1', + author='Thomas Storm', + author_email='thomas.storm@brockmann-consult.de', + packages=['xcube_geodb_openeo'] + ) From 33682e1ba40c65c4a45fc82ae5add0541a4ffc91 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Fri, 20 Oct 2023 12:05:23 +0200 Subject: [PATCH 145/163] trying to use micromamba in Dockerfile ctd --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3059fcc..b8d0754 100644 --- a/Dockerfile +++ b/Dockerfile @@ -68,6 +68,6 @@ RUN python setup.py install #RUN mkdir -p /etc/config #COPY --chown=$MAMBA_USER:$MAMBA_USER xcube_geodb_openeo/config/config.yml /etc/config/config.yml -RUN python -m xcube.cli.main --loglevel=DETAIL --traceback serve -vvv -c /tmp/xcube_geodb_openeo/config/config.yml +RUN python -m xcube.cli.main --loglevel=DETAIL --traceback serve -vvv -c /tmp/xcube_geodb_openeo/config.yml #CMD ["python", "-m", "xcube.cli.main", "--loglevel=DETAIL", "--traceback", "serve", "-vvv", "-c", "/etc/config/config.yml"] \ No newline at end of file From 85acbfe6d55e9862fe0519cbe8ba4a87adb493e4 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Fri, 20 Oct 2023 12:21:25 +0200 Subject: [PATCH 146/163] trying to use micromamba in Dockerfile ctd --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b8d0754..13c2f7d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -68,6 +68,6 @@ RUN python setup.py install #RUN mkdir -p /etc/config #COPY --chown=$MAMBA_USER:$MAMBA_USER xcube_geodb_openeo/config/config.yml /etc/config/config.yml -RUN python -m xcube.cli.main --loglevel=DETAIL --traceback serve -vvv -c /tmp/xcube_geodb_openeo/config.yml +#RUN python -m xcube.cli.main --loglevel=DETAIL --traceback serve -vvv -c /tmp/xcube_geodb_openeo/config.yml -#CMD ["python", "-m", "xcube.cli.main", "--loglevel=DETAIL", "--traceback", "serve", "-vvv", "-c", "/etc/config/config.yml"] \ No newline at end of file +CMD ["python", "-m", "xcube.cli.main", "--loglevel=DETAIL", "--traceback", "serve", "-vvv", "-c", "/etc/config/config.yml"] \ No newline at end of file From c671c1140f8317e35d9516d02ad08d063a3ee5eb Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Fri, 20 Oct 2023 12:50:45 +0200 Subject: [PATCH 147/163] finishing switch to micromamba --- Dockerfile => docker/Dockerfile | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) rename Dockerfile => docker/Dockerfile (70%) diff --git a/Dockerfile b/docker/Dockerfile similarity index 70% rename from Dockerfile rename to docker/Dockerfile index 13c2f7d..86fc488 100644 --- a/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,3 @@ -#FROM continuumio/miniconda3:23.5.2-0 ARG MICROMAMBA_VERSION=1.3.1 FROM mambaorg/micromamba:${MICROMAMBA_VERSION} @@ -34,22 +33,18 @@ ENV MAMBA_USER=$NEW_MAMBA_USER USER $MAMBA_USER -COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yml /tmp/environment.yml +COPY --chown=$MAMBA_USER:$MAMBA_USER ../environment.yml /tmp/environment.yml RUN micromamba install --yes -n base --file /tmp/environment.yml && \ micromamba clean --all --yes ARG MAMBA_DOCKERFILE_ACTIVATE=1 RUN micromamba install -n base -c conda-forge pip -#ADD environment.yml /tmp/environment.yml ADD docker /tmp/ WORKDIR /tmp -#RUN micromamba env update -n base -#RUN . activate base RUN git clone https://github.com/dcs4cop/xcube.git WORKDIR /tmp/xcube -#RUN micromamba env update -n base RUN pip install -e . WORKDIR /tmp/ @@ -57,17 +52,12 @@ RUN git clone https://github.com/dcs4cop/xcube-geodb.git WORKDIR /tmp/xcube-geodb RUN pip install -e . -# Copy files for xcube source install -COPY --chown=$MAMBA_USER:$MAMBA_USER ./setup.py /tmp/setup.py -COPY --chown=$MAMBA_USER:$MAMBA_USER ./xcube_geodb_openeo /tmp/xcube_geodb_openeo +# Copy files for xcube_geodb_openeo source install +COPY --chown=$MAMBA_USER:$MAMBA_USER ../setup.py /tmp/setup.py +COPY --chown=$MAMBA_USER:$MAMBA_USER ../xcube_geodb_openeo /tmp/xcube_geodb_openeo -# Switch into /tmp to install xcube-geodb-openeo . +# Switch into /tmp to install xcube-geodb-openeo WORKDIR /tmp RUN python setup.py install -#RUN pip install -e . - -#RUN mkdir -p /etc/config -#COPY --chown=$MAMBA_USER:$MAMBA_USER xcube_geodb_openeo/config/config.yml /etc/config/config.yml -#RUN python -m xcube.cli.main --loglevel=DETAIL --traceback serve -vvv -c /tmp/xcube_geodb_openeo/config.yml CMD ["python", "-m", "xcube.cli.main", "--loglevel=DETAIL", "--traceback", "serve", "-vvv", "-c", "/etc/config/config.yml"] \ No newline at end of file From 4abb3c70713b17259af02445b0b94da814584d41 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Fri, 20 Oct 2023 12:52:26 +0200 Subject: [PATCH 148/163] finishing switch to micromamba --- .github/workflows/workflow.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index b61e6d4..462178f 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -112,8 +112,7 @@ jobs: with: image: ${{ env.ORG_NAME }}/${{ env.APP_NAME }}-server directory: . -# dockerfile: docker/Dockerfile - dockerfile: Dockerfile + dockerfile: docker/Dockerfile addLatest: true registry: quay.io username: ${{ secrets.QUAY_REG_USERNAME }} From 07d31e44b78f9fdedfedb0f5ec28c70e127bca7d Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Fri, 20 Oct 2023 14:06:51 +0200 Subject: [PATCH 149/163] attempting to fix workflow and move to micromamba --- .github/workflows/workflow.yaml | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 462178f..e23da16 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -33,26 +33,35 @@ jobs: with: repository: dcs4cop/xcube path: "xcube" - - uses: conda-incubator/setup-miniconda@v2 + - uses: mamba-org/setup-micromamba@v1 if: ${{ env.SKIP_UNITTESTS == '0' }} with: - mamba-version: "*" - channels: conda-forge - auto-update-conda: false - activate-environment: xcube-geodb-openeo + micromamba-version: '1.4.8-0' environment-file: environment.yml + init-shell: >- + bash + cache-environment: true + post-cleanup: 'all' +# - uses: conda-incubator/setup-miniconda@v2 +# if: ${{ env.SKIP_UNITTESTS == '0' }} +# with: +# mamba-version: "*" +# channels: conda-forge +# auto-update-conda: false +# activate-environment: xcube-geodb-openeo +# environment-file: environment.yml - run: | conda info conda list - conda config --show-sources - conda config --show - printenv | sort - conda install 'mamba>=0.27' +# conda config --show-sources +# conda config --show +# printenv | sort +# conda install 'mamba>=0.27' - name: setup-xcube if: ${{ env.SKIP_UNITTESTS == '0' }} run: | cd xcube - mamba env update -n xcube-geodb-openeo -f environment.yml + micromamba env update -n xcube-geodb-openeo -f environment.yml pip install -e . cd .. - name: setup-xcube-geodb-openeo From 46fe79ebbfec56f4579cfe9089f6a310ec468d4f Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Fri, 20 Oct 2023 14:18:38 +0200 Subject: [PATCH 150/163] running docker only if unittests succeed --- .github/workflows/workflow.yaml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index e23da16..95b8bfd 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -14,7 +14,7 @@ env: WAIT_FOR_STARTUP: "1" # If set to 1, docker build is performed - FORCE_DOCKER_BUILD: "1" + FORCE_DOCKER_BUILD: "0" jobs: @@ -42,21 +42,9 @@ jobs: bash cache-environment: true post-cleanup: 'all' -# - uses: conda-incubator/setup-miniconda@v2 -# if: ${{ env.SKIP_UNITTESTS == '0' }} -# with: -# mamba-version: "*" -# channels: conda-forge -# auto-update-conda: false -# activate-environment: xcube-geodb-openeo -# environment-file: environment.yml - run: | conda info conda list -# conda config --show-sources -# conda config --show -# printenv | sort -# conda install 'mamba>=0.27' - name: setup-xcube if: ${{ env.SKIP_UNITTESTS == '0' }} run: | @@ -80,7 +68,7 @@ jobs: build-docker-image: runs-on: ubuntu-latest -# needs: [unittest] + needs: [unittest] name: build-docker-image steps: # Checkout xcube-geodb-openeo (this project) From 8e9939615b580bb75dab79fb3de1c6cd4b81572b Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Thu, 26 Oct 2023 15:16:37 +0200 Subject: [PATCH 151/163] need a docker image update --- .github/workflows/workflow.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 95b8bfd..2569ac4 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -14,7 +14,7 @@ env: WAIT_FOR_STARTUP: "1" # If set to 1, docker build is performed - FORCE_DOCKER_BUILD: "0" + FORCE_DOCKER_BUILD: "1" jobs: From ab10091b7c18d1b228a7ba7f6842964363179ee1 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Fri, 10 Nov 2023 18:37:53 +0100 Subject: [PATCH 152/163] made compliancy checks succeed --- xcube_geodb_openeo/api/context.py | 133 ++++++++++++++++---- xcube_geodb_openeo/api/routes.py | 45 +++++-- xcube_geodb_openeo/backend/capabilities.py | 14 ++- xcube_geodb_openeo/core/geodb_datasource.py | 33 ++--- xcube_geodb_openeo/defaults.py | 2 +- 5 files changed, 175 insertions(+), 52 deletions(-) diff --git a/xcube_geodb_openeo/api/context.py b/xcube_geodb_openeo/api/context.py index 3adde9b..0f5e612 100644 --- a/xcube_geodb_openeo/api/context.py +++ b/xcube_geodb_openeo/api/context.py @@ -20,6 +20,7 @@ # DEALINGS IN THE SOFTWARE. import datetime import importlib +import re from functools import cached_property from typing import Any, List from typing import Dict @@ -36,8 +37,7 @@ from ..core.vectorcube import VectorCube from ..core.vectorcube_provider import VectorCubeProvider from ..defaults import default_config, STAC_VERSION, STAC_EXTENSIONS, \ - STAC_MAX_ITEMS_LIMIT, DEFAULT_VC_CACHE_SIZE, \ - MAX_NUMBER_OF_GEOMETRIES_DISPLAYED + DEFAULT_VC_CACHE_SIZE class GeoDbContext(ApiContext): @@ -151,28 +151,45 @@ def get_collection_items( offset: int, bbox: Optional[Tuple[float, float, float, float]] = None) -> Dict: vector_cube = self.get_vector_cube(collection_id, bbox=bbox) - stac_features = [ - _get_vector_cube_item(base_url, vector_cube, feature) - for feature in vector_cube.load_features(limit, offset) - ] - - result = { - 'type': 'FeatureCollection', - 'features': stac_features, - 'timeStamp': _utc_now(), - 'numberMatched': vector_cube.feature_count, - 'numberReturned': len(stac_features) - } + stac_features = [] + for feature in vector_cube.load_features(limit, offset): + _fix_time(feature) + stac_features.append( + _get_vector_cube_item(base_url, vector_cube, feature) + ) + + result = {'type': 'FeatureCollection', 'features': stac_features, + 'timeStamp': _utc_now(), + 'numberMatched': vector_cube.feature_count, + 'numberReturned': len(stac_features), + 'links': [ + { + 'rel': 'self', + 'href': f'{base_url}/collections/' + f'{vector_cube.id}/items', + 'type': 'application/json' + }, + { + 'rel': 'root', + 'href': f'{base_url}', + 'type': 'application/json' + }, + { + 'rel': 'items', + 'href': f'{base_url}collections/' + f'{vector_cube.id}/items', + 'type': 'application/json' + }] + } if offset + limit < vector_cube.feature_count: new_offset = offset + limit - result['links'] = [ + result['links'].append( { 'rel': 'next', 'href': f'{base_url}/collections/{vector_cube.id}' f'/items?limit={limit}&offset={new_offset}' - }, - ] + }) return result @@ -197,6 +214,13 @@ def transform_bbox(self, collection_id: Tuple[str, str], def get_collections_links(limit: int, offset: int, url: str, collection_count: int): links = [] + root_url = url.replace('/collections', '') + root_link = {'rel': 'root', + 'href': f'{root_url}', + 'title': 'root'} + self_link = {'rel': 'self', + 'href': f'{url}', + 'title': 'self'} next_offset = offset + limit next_link = {'rel': 'next', 'href': f'{url}?limit={limit}&offset='f'{next_offset}', @@ -213,6 +237,8 @@ def get_collections_links(limit: int, offset: int, url: str, 'href': f'{url}?limit={limit}&offset='f'{last_offset}', 'title': 'last'} + links.append(root_link) + links.append(self_link) if next_offset < collection_count: links.append(next_link) if offset > 0: @@ -244,11 +270,23 @@ def _get_vector_cube_collection(base_url: str, 'links': [ { 'rel': 'self', - 'href': f'{base_url}/collections/{vector_cube_id}' + 'href': f'{base_url}/collections/{vector_cube_id}', + "type": "application/json" }, { 'rel': 'root', - 'href': f'{base_url}/collections/' + 'href': f'{base_url}', + "type": "application/json" + }, + { + 'rel': 'parent', + 'href': f'{base_url}/collections/', + "type": "application/json" + }, + { + 'rel': 'items', + 'href': f'{base_url}/collections/{vector_cube_id}/items', + "type": "application/json" } ] } @@ -267,8 +305,9 @@ def _get_vector_cube_collection(base_url: str, 'reference_system': srid } } - vector_cube_collection['summaries'] = metadata.get('summaries', {}), - + vector_cube_collection['summaries'] = (metadata['summaries'] + if 'summaries' in metadata + else {}) if 'version' in metadata: vector_cube_collection['version'] = metadata['version'] return vector_cube_collection @@ -281,12 +320,11 @@ def _get_vector_cube_item(base_url: str, vector_cube: VectorCube, feature_bbox = feature.get('bbox') feature_geometry = feature.get('geometry') feature_properties = feature.get('properties', {}) - feature_datetime = feature.get('datetime') \ - if 'datetime' in feature else None item = { 'stac_version': STAC_VERSION, - 'stac_extensions': STAC_EXTENSIONS, + 'stac_extensions': ['https://schemas.stacspec.org/v1.0.0/item-spec/' + 'json-schema/item.json'], 'type': 'Feature', 'id': feature_id, 'bbox': feature_bbox, @@ -298,12 +336,25 @@ def _get_vector_cube_item(base_url: str, vector_cube: VectorCube, 'rel': 'self', 'href': f'{base_url}/collections/' f'{collection_id}/items/{feature_id}' - } + }, + { + 'rel': 'root', + 'href': f'{base_url}', + 'type': 'application/json' + }, + { + 'rel': 'parent', + 'href': f'{base_url}/collections', + 'type': 'application/json' + }, + { + 'rel': 'collection', + 'href': f'{base_url}/collections/{collection_id}', + 'type': 'application/json' + } ], 'assets': {} } - if feature_datetime: - item['datetime'] = feature_datetime return item @@ -314,6 +365,34 @@ def _utc_now(): .replace(microsecond=0) \ .isoformat() + 'Z' + +def _fix_time(feature): + time_column = _get_col_name(feature, ['date', 'time', 'timestamp', + 'datetime']) + props = feature['properties'] + if time_column and time_column != 'datetime': + props['datetime'] = props[time_column] + del props[time_column] + if 'datetime' not in props: + props['datetime'] = (datetime.datetime + .strptime('19700101', '%Y%M%d') + .isoformat() + 'Z') + if re.match('^\d\d\d\d.\d\d.\d\d$', props['datetime']): + props['datetime'] = props['datetime'] + 'T00:00:00Z' + is_tz_aware = (props['datetime'].endswith('Z') + or props['datetime'].endswith('+00:00')) + if props['datetime'] and not is_tz_aware: + props['datetime'] = props['datetime'] + 'Z' + + +def _get_col_name(feature: Feature, possible_names: List[str]) \ + -> Optional[str]: + for key in feature['properties'].keys(): + if key in possible_names: + return key + return None + + class CollectionNotFoundException(Exception): pass diff --git a/xcube_geodb_openeo/api/routes.py b/xcube_geodb_openeo/api/routes.py index b9a34d5..54d8c82 100644 --- a/xcube_geodb_openeo/api/routes.py +++ b/xcube_geodb_openeo/api/routes.py @@ -24,10 +24,13 @@ import requests from openeo.internal.graph_building import PGNode +from xcube.constants import LOG from xcube.server.api import ApiError from xcube.server.api import ApiHandler +from xcube_geodb.core.geodb import GeoDBError from .api import api +from .context import _fix_time from ..backend import capabilities from ..backend import processes from ..defaults import STAC_DEFAULT_ITEMS_LIMIT, STAC_MAX_ITEMS_LIMIT, \ @@ -260,6 +263,7 @@ def get(self): @api.route('/collections/{collection_id}') +@api.route('/collections/{collection_id}/') class CollectionHandler(ApiHandler): """ Lists all information about a specific collection specified by the @@ -271,14 +275,20 @@ def get(self, collection_id: str): Lists the collection information. """ base_url = get_base_url(self.request) + if '~' not in collection_id: + self.response.set_status(404, + f'Collection {collection_id} does ' + f'not exist') + return db = collection_id.split('~')[0] name = collection_id.split('~')[1] collection = self.ctx.get_collection(base_url, (db, name), True) if collection: self.response.finish(collection) else: - self.response.set_status(404, f'Collection {collection_id} does ' - f'not exist') + self.response.set_status(404, + f'Collection {collection_id} does ' + f'not exist') @api.route('/collections/{collection_id}/items') @@ -310,7 +320,7 @@ def get(self, collection_id: str): name = collection_id.split('~')[1] items = self.ctx.get_collection_items(base_url, (db, name), limit, offset, bbox) - self.response.finish(items) + self.response.finish(items, content_type='application/geo+json') @api.route('/collections/{collection_id}/items/{item_id}') @@ -327,9 +337,30 @@ def get(self, collection_id: str, item_id: str): db = collection_id.split('~')[0] name = collection_id.split('~')[1] base_url = get_base_url(self.request) - feature = self.ctx.get_collection_item(base_url, (db, name), - feature_id) - self.response.finish(feature) + try: + feature = self.ctx.get_collection_item(base_url, (db, name), + feature_id) + except GeoDBError as e: + if 'does not exist' in e.args[0]: + LOG.warning(f'Not existing feature with id {feature_id} ' + f'requested.') + self.response.set_status(404, + f'Feature {feature_id} does ' + f'not exist') + return + + _fix_time(feature) + self.response.finish(feature, content_type='application/geo+json') + + +@api.route('/api.html') +class FeatureHandler(ApiHandler): + """ + Simply forwards to openapi.html + """ + + def get(self): + self.response._handler.redirect('/openapi.html', status=301) def _get_limit(request, default=sys.maxsize) -> int: @@ -350,4 +381,4 @@ def _get_bbox(request): bbox = str(request.get_query_arg('bbox')) return tuple(bbox.split(',')) else: - return None \ No newline at end of file + return None diff --git a/xcube_geodb_openeo/backend/capabilities.py b/xcube_geodb_openeo/backend/capabilities.py index beb590c..2a8f6dd 100644 --- a/xcube_geodb_openeo/backend/capabilities.py +++ b/xcube_geodb_openeo/backend/capabilities.py @@ -36,10 +36,14 @@ def get_root(config: Mapping[str, Any], base_url: str): 'api_version': API_VERSION, 'backend_version': __version__, 'stac_version': STAC_VERSION, - 'type': 'catalog', + 'type': 'Catalog', "id": config['geodb_openeo']['SERVER_ID'], "title": config['geodb_openeo']['SERVER_TITLE'], "description": config['geodb_openeo']['SERVER_DESCRIPTION'], + "conformsTo": [ + f'https://api.stacspec.org/v1.0.0/{part}' + for part in ['core', 'collections', 'ogcapi-features'] + ], 'endpoints': [ {'path': '/.well-known/openeo', 'methods': ['GET']}, {'path': '/file_formats', 'methods': ['GET']}, @@ -52,6 +56,12 @@ def get_root(config: Mapping[str, Any], base_url: str): 'methods': ['GET']}, ], "links": [ + { + "rel": "root", + "href": f"{base_url}/", + "type": "application/json", + "title": "this document" + }, { "rel": "self", "href": f"{base_url}/", @@ -60,7 +70,7 @@ def get_root(config: Mapping[str, Any], base_url: str): }, { "rel": "service-desc", - "href": f"{base_url}/api", + "href": f'{base_url}/openapi.json', "type": "application/vnd.oai.openapi+json;version=3.0", "title": "the API definition" }, diff --git a/xcube_geodb_openeo/core/geodb_datasource.py b/xcube_geodb_openeo/core/geodb_datasource.py index 2c71bb3..ed7c820 100644 --- a/xcube_geodb_openeo/core/geodb_datasource.py +++ b/xcube_geodb_openeo/core/geodb_datasource.py @@ -137,21 +137,24 @@ def load_features(self, limit: int = STAC_DEFAULT_ITEMS_LIMIT, bbox = gdf.bounds.iloc[i] props = dict(row[1]) geometry = props['geometry'] - id = props['id'] + feature_id = str(props['id']) del props['geometry'] del props['id'] - if with_stac_info: - props['bbox']: [f'{bbox["minx"]:.4f}', - f'{bbox["miny"]:.4f}', - f'{bbox["maxx"]:.4f}', - f'{bbox["maxy"]:.4f}'] - props['stac_version']: STAC_VERSION - props['stac_extensions']: STAC_EXTENSIONS - props['type']: 'Feature' + feature = Feature( - id=str(id), + id=feature_id, geometry=geometry, properties=props) + + if with_stac_info: + feature['bbox'] = [bbox['minx'], + bbox['miny'], + bbox['maxx'], + bbox['maxy']] + feature['stac_version'] = STAC_VERSION + feature['stac_extensions'] = STAC_EXTENSIONS + feature['type'] = 'Feature' + features.append(feature) LOG.debug('...done.') return features @@ -235,12 +238,12 @@ def get_metadata(self, full: bool = False) -> Dict: name, select=time_column, order=time_column, limit=1, database=db)[time_column][0] - earliest = dateutil.parser.parse(earliest).isoformat() + earliest = dateutil.parser.parse(earliest).isoformat() + 'Z' latest = self._geodb.get_collection_pg( name, select=time_column, order=f'{time_column} DESC', limit=1, database=db)[time_column][0] - latest = dateutil.parser.parse(latest).isoformat() + latest = dateutil.parser.parse(latest).isoformat() + 'Z' LOG.debug(f'...done.') else: earliest, latest = None, None @@ -249,15 +252,15 @@ def get_metadata(self, full: bool = False) -> Dict: 'title': f'{name}', 'extent': { 'spatial': { - 'bbox': [None] if not full else - self.get_vector_cube_bbox(), + 'bbox': [[-180, -90, 180, 90]] if not full else + [self.get_vector_cube_bbox()], }, 'temporal': { 'interval': [[earliest, latest]] } }, 'summaries': { - 'column_names': col_names + 'properties': col_names }, } return metadata diff --git a/xcube_geodb_openeo/defaults.py b/xcube_geodb_openeo/defaults.py index 7f33112..ed319a6 100644 --- a/xcube_geodb_openeo/defaults.py +++ b/xcube_geodb_openeo/defaults.py @@ -30,7 +30,7 @@ API_VERSION = '1.1.0' STAC_VERSION = '1.0.0' STAC_EXTENSIONS = \ - ['datacube', + ['https://stac-extensions.github.io/datacube/v2.2.0/schema.json', 'https://stac-extensions.github.io/version/v1.0.0/schema.json'] STAC_DEFAULT_ITEMS_LIMIT = 10 From ff49731734df0b02e3a817f5e5e1c8efafee35bf Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Fri, 10 Nov 2023 20:59:40 +0100 Subject: [PATCH 153/163] fixed tests --- tests/api/test_context.py | 25 +++++++++++++++++++------ tests/core/mock_vc_provider.py | 16 ++++++++++++---- tests/core/test_vectorcube.py | 8 ++++---- tests/server/app/test_capabilities.py | 2 +- tests/server/app/test_data_discovery.py | 4 ++-- tests/server/app/test_utils.py | 21 ++++++++++++++------- 6 files changed, 52 insertions(+), 24 deletions(-) diff --git a/tests/api/test_context.py b/tests/api/test_context.py index 7486cbc..d09542f 100644 --- a/tests/api/test_context.py +++ b/tests/api/test_context.py @@ -29,6 +29,9 @@ def test_get_collections_links(self): links = context.get_collections_links( 2, 6, 'http://server.hh/collections', 10) self.assertEqual([ + {'href': 'http://server.hh', 'rel': 'root', 'title': 'root'}, + {'href': 'http://server.hh/collections', + 'rel': 'self', 'title': 'self'}, {'href': 'http://server.hh/collections?limit=2&offset=8', 'rel': 'next', 'title': 'next'}, @@ -44,17 +47,24 @@ def test_get_collections_links(self): links = context.get_collections_links( 3, 0, 'http://server.hh/collections', 5) - self.assertEqual([ - {'href': 'http://server.hh/collections?limit=3&offset=3', - 'rel': 'next', - 'title': 'next'}, - {'href': 'http://server.hh/collections?limit=3&offset=2', + self.assertEqual( + [{'href': 'http://server.hh', 'rel': 'root', 'title': 'root'}, + {'href': 'http://server.hh/collections', 'rel': 'self', + 'title': 'self'}, + + {'href': 'http://server.hh/collections?limit=3&offset=3', + 'rel': 'next', + 'title': 'next'}, + {'href': 'http://server.hh/collections?limit=3&offset=2', 'rel': 'last', 'title': 'last'}], links) links = context.get_collections_links( 2, 8, 'http://server.hh/collections', 10) self.assertEqual([ + {'href': 'http://server.hh', 'rel': 'root', 'title': 'root'}, + {'href': 'http://server.hh/collections', 'rel': 'self', + 'title': 'self'}, {'href': 'http://server.hh/collections?limit=2&offset=6', 'rel': 'prev', 'title': 'prev'}, @@ -64,4 +74,7 @@ def test_get_collections_links(self): links = context.get_collections_links( 10, 0, 'http://server.hh/collections', 7) - self.assertEqual([], links) + self.assertEqual( + [{'href': 'http://server.hh', 'rel': 'root', 'title': 'root'}, + {'href': 'http://server.hh/collections', 'rel': 'self', + 'title': 'self'}], links) diff --git a/tests/core/mock_vc_provider.py b/tests/core/mock_vc_provider.py index 7282033..555a49e 100644 --- a/tests/core/mock_vc_provider.py +++ b/tests/core/mock_vc_provider.py @@ -100,26 +100,34 @@ def load_features(self, limit: int = 2, hh_feature = { 'stac_version': 15.1, - 'stac_extensions': STAC_EXTENSIONS, + 'stac_extensions': ['https://schemas.stacspec.org/v1.0.0/' + 'item-spec/json-schema/item.json'], 'type': 'Feature', 'id': '0', 'bbox': [f'{self.bbox_hh[0]:.4f}', f'{self.bbox_hh[1]:.4f}', f'{self.bbox_hh[2]:.4f}', f'{self.bbox_hh[3]:.4f}'], - 'properties': ['id', 'name', 'geometry', 'population'] + 'properties': {'id': 1234, + 'name': 'hamburg', + 'geometry': 'mygeometry', + 'population': 1000} } pb_feature = { 'stac_version': 15.1, - 'stac_extensions': STAC_EXTENSIONS, + 'stac_extensions': ['https://schemas.stacspec.org/v1.0.0/' + 'item-spec/json-schema/item.json'], 'type': 'Feature', 'id': '1', 'bbox': [f'{self.bbox_pb[0]:.4f}', f'{self.bbox_pb[1]:.4f}', f'{self.bbox_pb[2]:.4f}', f'{self.bbox_pb[3]:.4f}'], - 'properties': ['id', 'name', 'geometry', 'population'] + 'properties': {'id': 4321, + 'name': 'paderborn', + 'geometry': 'mygeometry', + 'population': 100} } if limit == 1: diff --git a/tests/core/test_vectorcube.py b/tests/core/test_vectorcube.py index 6c17605..721d728 100644 --- a/tests/core/test_vectorcube.py +++ b/tests/core/test_vectorcube.py @@ -28,10 +28,10 @@ def test_to_geojson(self): "51.8000" ], feature_2['bbox']) self.assertEqual([ - "datacube", - "https://stac-extensions.github.io/version/v1.0.0/schema.json" + 'https://schemas.stacspec.org/v1.0.0/item-spec/' + 'json-schema/item.json' ], feature_1['stac_extensions']) self.assertEqual([ - "datacube", - "https://stac-extensions.github.io/version/v1.0.0/schema.json" + 'https://schemas.stacspec.org/v1.0.0/item-spec/' + 'json-schema/item.json' ], feature_2['stac_extensions']) diff --git a/tests/server/app/test_capabilities.py b/tests/server/app/test_capabilities.py index fbb15d5..c1a0c00 100644 --- a/tests/server/app/test_capabilities.py +++ b/tests/server/app/test_capabilities.py @@ -51,7 +51,7 @@ def test_root(self): self.assertEqual('1.1.0', metainfo['api_version']) self.assertEqual('0.0.2.dev0', metainfo['backend_version']) self.assertEqual('1.0.0', metainfo['stac_version']) - self.assertEqual('catalog', metainfo['type']) + self.assertEqual('Catalog', metainfo['type']) self.assertEqual('xcube-geodb-openeo', metainfo['id']) self.assertEqual( 'xcube geoDB Server, openEO API', metainfo['title'] diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index 6f3218b..9a03f84 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -56,7 +56,7 @@ def test_collections(self): first_collection = collections_data['collections'][0] self.assertEqual("1.0.0", first_collection['stac_version']) self.assertEqual( - ['datacube', + ['https://stac-extensions.github.io/datacube/v2.2.0/schema.json', 'https://stac-extensions.github.io/version/v1.0.0/schema.json'], first_collection['stac_extensions']) self.assertEqual(first_collection['type'], 'Collection') @@ -65,7 +65,7 @@ def test_collections(self): self.assertIsNotNone(first_collection['license']) self.assertIsNotNone(first_collection['extent']) self.assertIsNotNone(first_collection['links']) - self.assertEqual(2, len(first_collection['links'])) + self.assertEqual(4, len(first_collection['links'])) def test_collection(self): url = f'http://localhost:{self.port}/collections/~collection_1' diff --git a/tests/server/app/test_utils.py b/tests/server/app/test_utils.py index a816865..b5d860c 100644 --- a/tests/server/app/test_utils.py +++ b/tests/server/app/test_utils.py @@ -19,13 +19,11 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. -from xcube_geodb_openeo.defaults import STAC_EXTENSIONS - - def assert_paderborn(cls, vector_cube): cls.assertIsNotNone(vector_cube) cls.assertEqual('1.0.0', vector_cube['stac_version']) - cls.assertEqual(STAC_EXTENSIONS, vector_cube['stac_extensions']) + cls.assertEqual(['https://schemas.stacspec.org/v1.0.0/item-spec/' + 'json-schema/item.json'], vector_cube['stac_extensions']) cls.assertEqual('Feature', vector_cube['type']) cls.assertEqual('1', vector_cube['id']) cls.assertDictEqual({}, vector_cube['assets']) @@ -35,13 +33,18 @@ def assert_paderborn(cls, vector_cube): def assert_paderborn_data(cls, vector_cube): cls.assertEqual(['8.7000', '51.3000', '8.8000', '51.8000'], vector_cube['bbox']) - cls.assertEqual(['id', 'name', 'geometry', 'population'], + cls.assertEqual({'datetime': '1970-01-01T00:01:00Z', + 'geometry': 'mygeometry', + 'id': 4321, + 'name': 'paderborn', + 'population': 100}, vector_cube['properties']) def assert_hamburg(cls, vector_cube): cls.assertEqual('1.0.0', vector_cube['stac_version']) - cls.assertEqual(STAC_EXTENSIONS, vector_cube['stac_extensions']) + cls.assertEqual(['https://schemas.stacspec.org/v1.0.0/item-spec/' + 'json-schema/item.json'], vector_cube['stac_extensions']) cls.assertEqual('Feature', vector_cube['type']) cls.assertEqual('0', vector_cube['id']) cls.assertDictEqual({}, vector_cube['assets']) @@ -51,5 +54,9 @@ def assert_hamburg(cls, vector_cube): def assert_hamburg_data(cls, vector_cube): cls.assertEqual(['9.0000', '52.0000', '11.0000', '54.0000'], vector_cube['bbox']) - cls.assertEqual(['id', 'name', 'geometry', 'population'], + cls.assertEqual({'datetime': '1970-01-01T00:01:00Z', + 'geometry': 'mygeometry', + 'id': 1234, + 'name': 'hamburg', + 'population': 1000}, vector_cube['properties']) From f6b1405ec1f455abe1e1fce0529806c1bf132d36 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Fri, 10 Nov 2023 23:20:12 +0100 Subject: [PATCH 154/163] typo --- xcube_geodb_openeo/api/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcube_geodb_openeo/api/context.py b/xcube_geodb_openeo/api/context.py index 0f5e612..e92c2ec 100644 --- a/xcube_geodb_openeo/api/context.py +++ b/xcube_geodb_openeo/api/context.py @@ -176,7 +176,7 @@ def get_collection_items( }, { 'rel': 'items', - 'href': f'{base_url}collections/' + 'href': f'{base_url}/collections/' f'{vector_cube.id}/items', 'type': 'application/json' }] From b42727b54244cc856211a5f3b8f4e29544c67d9b Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Sat, 18 Nov 2023 03:14:12 +0100 Subject: [PATCH 155/163] large update; support for use case #2 added --- notebooks/geoDB-openEO_use_case_1.ipynb | 228 ++++----- notebooks/geoDB-openEO_use_case_2.ipynb | 467 ++++++++++++++++++ tests/core/mock_vc_provider.py | 3 + tests/res/geojson-pop_hamburg.json | 461 +++++++++++++++++ xcube_geodb_openeo/api/routes.py | 46 +- xcube_geodb_openeo/backend/processes.py | 116 ++++- .../aggregate_temporal_2.0.0-rc.1.json | 254 ++++++++++ .../res/processes/load_collection.json | 85 ---- .../processes/load_collection_2.0.0-rc.1.json | 324 ++++++++++++ .../res/processes/mean_2.0.0-rc.1.json | 168 +++++++ .../res/processes/median_2.0.0-rc.1.json | 149 ++++++ .../res/processes/save_result_2.0.0-rc.1.json | 66 +++ xcube_geodb_openeo/core/geodb_datasource.py | 7 + xcube_geodb_openeo/core/vectorcube.py | 89 ++++ 14 files changed, 2222 insertions(+), 241 deletions(-) create mode 100644 notebooks/geoDB-openEO_use_case_2.ipynb create mode 100644 tests/res/geojson-pop_hamburg.json create mode 100644 xcube_geodb_openeo/backend/res/processes/aggregate_temporal_2.0.0-rc.1.json delete mode 100644 xcube_geodb_openeo/backend/res/processes/load_collection.json create mode 100644 xcube_geodb_openeo/backend/res/processes/load_collection_2.0.0-rc.1.json create mode 100644 xcube_geodb_openeo/backend/res/processes/mean_2.0.0-rc.1.json create mode 100644 xcube_geodb_openeo/backend/res/processes/median_2.0.0-rc.1.json create mode 100644 xcube_geodb_openeo/backend/res/processes/save_result_2.0.0-rc.1.json diff --git a/notebooks/geoDB-openEO_use_case_1.ipynb b/notebooks/geoDB-openEO_use_case_1.ipynb index ac7e2a5..22bb96a 100644 --- a/notebooks/geoDB-openEO_use_case_1.ipynb +++ b/notebooks/geoDB-openEO_use_case_1.ipynb @@ -13,11 +13,11 @@ }, { "cell_type": "code", - "execution_count": 120, + "execution_count": 26, "metadata": { "ExecuteTime": { - "end_time": "2023-08-17T12:45:01.011814100Z", - "start_time": "2023-08-17T12:45:00.984704800Z" + "end_time": "2023-11-16T14:45:40.870573200Z", + "start_time": "2023-11-16T14:45:40.849715200Z" } }, "outputs": [], @@ -32,7 +32,7 @@ }, { "cell_type": "code", - "execution_count": 121, + "execution_count": 27, "outputs": [ { "name": "stdout", @@ -50,14 +50,14 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2023-08-17T12:45:01.502222500Z", - "start_time": "2023-08-17T12:45:01.450535500Z" + "end_time": "2023-11-16T14:45:43.176416800Z", + "start_time": "2023-11-16T14:45:42.783487500Z" } } }, { "cell_type": "code", - "execution_count": 122, + "execution_count": 13, "outputs": [], "source": [ "connection = openeo.connect(base_url)" @@ -65,8 +65,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2023-08-17T12:45:04.576098100Z", - "start_time": "2023-08-17T12:45:02.470783100Z" + "end_time": "2023-11-16T14:34:31.763007300Z", + "start_time": "2023-11-16T14:34:29.677273800Z" } } }, @@ -81,24 +81,9 @@ }, { "cell_type": "code", - "execution_count": 78, - "metadata": { - "ExecuteTime": { - "end_time": "2023-08-17T10:50:04.429746400Z", - "start_time": "2023-08-17T10:50:04.319986900Z" - } - }, - "outputs": [ - { - "data": { - "text/plain": "", - "text/html": "\n \n \n \n \n " - }, - "execution_count": 78, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "connection.capabilities()" ] @@ -112,24 +97,9 @@ }, { "cell_type": "code", - "execution_count": 79, - "metadata": { - "ExecuteTime": { - "end_time": "2023-08-17T10:50:13.715617Z", - "start_time": "2023-08-17T10:50:13.587798Z" - } - }, - "outputs": [ - { - "data": { - "text/plain": "{'output': {'GTiff': {'title': 'GeoTiff',\n 'description': \"Export to GeoTiff. Doesn't support cloud-optimized GeoTiffs (COGs) yet.\",\n 'gis_data_types': ['raster'],\n 'parameters': {'tiled': {'type': 'boolean',\n 'description': 'This option can be used to force creation of tiled TIFF files [true]. By default [false] stripped TIFF files are created.',\n 'default': 'false'},\n 'compress': {'type': 'string',\n 'description': 'Set the compression to use.',\n 'default': 'NONE',\n 'enum': ['JPEG', 'LZW', 'DEFLATE', 'NONE']},\n 'jpeg_quality': {'type': 'integer',\n 'description': 'Set the JPEG quality when using JPEG.',\n 'minimum': 1,\n 'maximum': 100,\n 'default': 75}},\n 'links': [{'href': 'https://gdal.org/drivers/raster/gtiff.html',\n 'rel': 'about',\n 'title': 'GDAL on the GeoTiff file format and storage options'}]},\n 'GPKG': {'title': 'OGC GeoPackage',\n 'gis_data_types': ['raster', 'vector'],\n 'parameters': {'version': {'type': 'string',\n 'description': 'Set GeoPackage version. In AUTO mode, this will be equivalent to 1.2 starting with GDAL 2.3.',\n 'enum': ['auto', '1', '1.1', '1.2'],\n 'default': 'auto'}},\n 'links': [{'href': 'https://gdal.org/drivers/raster/gpkg.html',\n 'rel': 'about',\n 'title': 'GDAL on GeoPackage for raster data'},\n {'href': 'https://gdal.org/drivers/vector/gpkg.html',\n 'rel': 'about',\n 'title': 'GDAL on GeoPackage for vector data'}]}},\n 'input': {'GPKG': {'title': 'OGC GeoPackage',\n 'gis_data_types': ['raster', 'vector'],\n 'parameters': {'table': {'type': 'string',\n 'description': '**RASTER ONLY.** Name of the table containing the tiles. If the GeoPackage dataset only contains one table, this option is not necessary. Otherwise, it is required.'}},\n 'links': [{'href': 'https://gdal.org/drivers/raster/gpkg.html',\n 'rel': 'about',\n 'title': 'GDAL on GeoPackage for raster data'},\n {'href': 'https://gdal.org/drivers/vector/gpkg.html',\n 'rel': 'about',\n 'title': 'GDAL on GeoPackage for vector data'}]}}}", - "text/html": "\n \n \n \n \n " - }, - "execution_count": 79, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "connection.list_file_formats()" ] @@ -144,23 +114,9 @@ }, { "cell_type": "code", - "execution_count": 123, - "metadata": { - "ExecuteTime": { - "end_time": "2023-08-17T12:46:50.257258200Z", - "start_time": "2023-08-17T12:45:12.997044600Z" - } - }, - "outputs": [ - { - "data": { - "text/plain": "['anja~E1',\n 'anja~E10a1',\n 'anja~E10a2',\n 'anja~E11',\n 'anja~E1a',\n 'anja~E1_RACE_INDICATORS',\n 'anja~E2',\n 'anja~E4',\n 'anja~E4_RACE_INDICATORS',\n 'anja~E5',\n 'anja~E7',\n 'anja~E8',\n 'anja~Gran_Chaco',\n 'anja~N3',\n 'anja~N4a',\n 'anja~race_indicators',\n 'demo~land_use',\n 'eea-urban-atlas~AL001L1_TIRANA_UA2018',\n 'eea-urban-atlas~AL003L1_ELBASAN_UA2018',\n 'eea-urban-atlas~AL004L1_SHKODER_UA2018',\n 'eea-urban-atlas~AL005L0_VLORE_UA2018',\n 'eea-urban-atlas~AT001L3_WIEN_UA2018',\n 'eea-urban-atlas~AT002L3_GRAZ_UA2018',\n 'eea-urban-atlas~AT003L3_LINZ_UA2018',\n 'eea-urban-atlas~AT004L3_SALZBURG_UA2018',\n 'eea-urban-atlas~AT005L3_INNSBRUCK_UA2018',\n 'eea-urban-atlas~AT006L2_KLAGENFURT_UA2018',\n 'eea-urban-atlas~BA001L1_SARAJEVO_UA2018',\n 'eea-urban-atlas~BA002L1_BANJA_LUKA_UA2018',\n 'eea-urban-atlas~BA003L1_MOSTAR_UA2018',\n 'eea-urban-atlas~BA004L1_TUZLA_UA2018',\n 'eea-urban-atlas~BA005L1_ZENICA_UA2018',\n 'eea-urban-atlas~BE001L2_BRUXELLES_BRUSSEL_UA2018',\n 'eea-urban-atlas~BE002L2_ANTWERPEN_UA2018',\n 'eea-urban-atlas~BE003L2_GENT_UA2018',\n 'eea-urban-atlas~BE004L2_CHARLEROI_UA2018',\n 'eea-urban-atlas~BE005L2_LIEGE_UA2018',\n 'eea-urban-atlas~BE006L2_BRUGGE_UA2018',\n 'eea-urban-atlas~BE007L2_NAMUR_UA2018',\n 'eea-urban-atlas~BE008L1_LEUVEN_UA2018',\n 'eea-urban-atlas~BE009L1_MONS_UA2018',\n 'eea-urban-atlas~BE010L1_KORTRIJK_UA2018',\n 'eea-urban-atlas~BE011L1_OOSTENDE_UA2018',\n 'eea-urban-atlas~BG001L2_SOFIA_UA2018',\n 'eea-urban-atlas~BG002L2_PLOVDIV_UA2018',\n 'eea-urban-atlas~BG003L2_VARNA_UA2018',\n 'eea-urban-atlas~BG004L2_BURGAS_UA2018',\n 'eea-urban-atlas~BG005L1_PLEVEN_UA2018',\n 'eea-urban-atlas~BG006L2_RUSE_UA2018',\n 'eea-urban-atlas~BG007L2_VIDIN_UA2018',\n 'eea-urban-atlas~BG008L2_STARA_ZAGORA_UA2018',\n 'eea-urban-atlas~BG009L1_SLIVEN_UA2018',\n 'eea-urban-atlas~BG010L1_DOBRICH_UA2018',\n 'eea-urban-atlas~BG011L1_SHUMEN_UA2018',\n 'eea-urban-atlas~BG013L1_YAMBOL_UA2018',\n 'eea-urban-atlas~BG014L1_HASKOVO_UA2018',\n 'eea-urban-atlas~BG015L1_PAZARDZHIK_UA2018',\n 'eea-urban-atlas~BG016L1_BLAGOEVGRAD_UA2018',\n 'eea-urban-atlas~BG017L1_VELIKO_TARNOVO_UA2018',\n 'eea-urban-atlas~BG018L1_VRATSA_UA2018',\n 'eea-urban-atlas~CH001L2_ZURICH_UA2018',\n 'eea-urban-atlas~CH002L2_GENEVE_UA2018',\n 'eea-urban-atlas~CH003L2_BASEL_UA2018',\n 'eea-urban-atlas~CH004L2_BERN_UA2018',\n 'eea-urban-atlas~CH005L2_LAUSANNE_UA2018',\n 'eea-urban-atlas~CH006L1_WINTERTHUR_UA2018',\n 'eea-urban-atlas~CH007L2_ST_GALLEN_UA2018',\n 'eea-urban-atlas~CH008L2_LUZERN_UA2018',\n 'eea-urban-atlas~CH009L2_LUGANO_UA2018',\n 'eea-urban-atlas~CH010L1_BIEL_BIENNE_UA2018',\n 'eea-urban-atlas~CY001L2_LEFKOSIA_UA2018',\n 'eea-urban-atlas~CY501L2_LEMESOS_UA2018',\n 'eea-urban-atlas~CZ001L2_PRAHA_UA2018',\n 'eea-urban-atlas~CZ002L2_BRNO_UA2018',\n 'eea-urban-atlas~CZ003L2_OSTRAVA_UA2018',\n 'eea-urban-atlas~CZ004L2_PLZEN_UA2018',\n 'eea-urban-atlas~CZ005L2_USTI_NAD_LABEM_UA2018',\n 'eea-urban-atlas~CZ006L2_OLOMOUC_UA2018',\n 'eea-urban-atlas~CZ007L2_LIBEREC_UA2018',\n 'eea-urban-atlas~CZ008L2_CESKE_BUDEJOVICE_UA2018',\n 'eea-urban-atlas~CZ009L2_HRADEC_KRALOVE_UA2018',\n 'eea-urban-atlas~CZ010L2_PARDUBICE_UA2018',\n 'eea-urban-atlas~CZ011L2_ZLIN_UA2018',\n 'eea-urban-atlas~CZ013L2_KARLOVY_VARY_UA2018',\n 'eea-urban-atlas~CZ014L2_JIHLAVA_UA2018',\n 'eea-urban-atlas~CZ016L2_MOST_UA2018',\n 'eea-urban-atlas~CZ018L2_CHOMUTOV_JIRKOV_UA2018',\n 'eea-urban-atlas~DE001L1_BERLIN_UA2018',\n 'eea-urban-atlas~DE002L1_HAMBURG_UA2018',\n 'eea-urban-atlas~DE003L1_MUNCHEN_UA2018',\n 'eea-urban-atlas~DE004L1_KOLN_UA2018',\n 'eea-urban-atlas~DE005L1_FRANKFURT_AM_MAIN_UA2018',\n 'eea-urban-atlas~DE007L1_STUTTGART_UA2018',\n 'eea-urban-atlas~DE008L2_LEIPZIG_UA2018',\n 'eea-urban-atlas~DE009L2_DRESDEN_UA2018',\n 'eea-urban-atlas~DE011L1_DUSSELDORF_UA2018',\n 'eea-urban-atlas~DE012L1_BREMEN_UA2018',\n 'eea-urban-atlas~DE013L1_HANNOVER_UA2018',\n 'eea-urban-atlas~DE014L1_NURNBERG_UA2018',\n 'eea-urban-atlas~DE017L0_BIELEFELD_UA2018',\n 'eea-urban-atlas~DE018L1_HALLE_AN_DER_SAALE_UA2018',\n 'eea-urban-atlas~DE019L2_MAGDEBURG_UA2018',\n 'eea-urban-atlas~DE020L1_WIESBADEN_UA2018',\n 'eea-urban-atlas~DE021L1_GOTTINGEN_UA2018',\n 'eea-urban-atlas~DE025L1_DARMSTADT_UA2018',\n 'eea-urban-atlas~DE026L1_TRIER_UA2018',\n 'eea-urban-atlas~DE027L1_FREIBURG_IM_BREISGAU_UA2018',\n 'eea-urban-atlas~DE028L1_REGENSBURG_UA2018',\n 'eea-urban-atlas~DE029L0_FRANKFURT_ODER_UA2018',\n 'eea-urban-atlas~DE030L1_WEIMAR_UA2018',\n 'eea-urban-atlas~DE031L1_SCHWERIN_UA2018',\n 'eea-urban-atlas~DE032L1_ERFURT_UA2018',\n 'eea-urban-atlas~DE033L1_AUGSBURG_UA2018',\n 'eea-urban-atlas~DE034L1_BONN_UA2018',\n 'eea-urban-atlas~DE035L1_KARLSRUHE_UA2018',\n 'eea-urban-atlas~DE036L0_MONCHENGLADBACH_UA2018',\n 'eea-urban-atlas~DE037L1_MAINZ_UA2018',\n 'eea-urban-atlas~DE038L1_RUHRGEBIET_UA2018',\n 'eea-urban-atlas~DE039L1_KIEL_UA2018',\n 'eea-urban-atlas~DE040L1_SAARBRUCKEN_UA2018',\n 'eea-urban-atlas~DE042L1_KOBLENZ_UA2018',\n 'eea-urban-atlas~DE043L2_ROSTOCK_UA2018',\n 'eea-urban-atlas~DE044L1_KAISERSLAUTERN_UA2018',\n 'eea-urban-atlas~DE045L1_ISERLOHN_UA2018',\n 'eea-urban-atlas~DE048L1_WILHELMSHAVEN_UA2018',\n 'eea-urban-atlas~DE050L1_TUBINGEN_UA2018',\n 'eea-urban-atlas~DE051L1_VILLINGEN_SCHWENNINGEN_UA2018',\n 'eea-urban-atlas~DE052L1_FLENSBURG_UA2018',\n 'eea-urban-atlas~DE053L1_MARBURG_UA2018',\n 'eea-urban-atlas~DE054L1_KONSTANZ_UA2018',\n 'eea-urban-atlas~DE055L0_NEUMUNSTER_UA2018',\n 'eea-urban-atlas~DE056L0_BRANDENBURG_AN_DER_HAVEL_UA2018',\n 'eea-urban-atlas~DE057L1_GIESSEN_UA2018',\n 'eea-urban-atlas~DE058L1_LUNEBURG_UA2018',\n 'eea-urban-atlas~DE059L1_BAYREUTH_UA2018',\n 'eea-urban-atlas~DE060L1_CELLE_UA2018',\n 'eea-urban-atlas~DE061L1_ASCHAFFENBURG_UA2018',\n 'eea-urban-atlas~DE062L1_BAMBERG_UA2018',\n 'eea-urban-atlas~DE063L1_PLAUEN_UA2018',\n 'eea-urban-atlas~DE064L1_NEUBRANDENBURG_UA2018',\n 'eea-urban-atlas~DE065L1_FULDA_UA2018',\n 'eea-urban-atlas~DE066L1_KEMPTEN_ALLGAU_UA2018',\n 'eea-urban-atlas~DE067L1_LANDSHUT_UA2018',\n 'eea-urban-atlas~DE069L1_ROSENHEIM_UA2018',\n 'eea-urban-atlas~DE071L1_STRALSUND_UA2018',\n 'eea-urban-atlas~DE072L1_FRIEDRICHSHAFEN_UA2018',\n 'eea-urban-atlas~DE073L1_OFFENBURG_UA2018',\n 'eea-urban-atlas~DE074L1_GORLITZ_UA2018',\n 'eea-urban-atlas~DE077L1_SCHWEINFURT_UA2018',\n 'eea-urban-atlas~DE078L1_GREIFSWALD_UA2018',\n 'eea-urban-atlas~DE079L1_WETZLAR_UA2018',\n 'eea-urban-atlas~DE081L1_PASSAU_UA2018',\n 'eea-urban-atlas~DE082L0_DESSAU_ROSSLAU_UA2018',\n 'eea-urban-atlas~DE083L1_BRAUNSCHWEIG_SALZGITTER_WOLFSBURG_UA201',\n 'eea-urban-atlas~DE084L1_MANNHEIM_LUDWIGSHAFEN_UA2018',\n 'eea-urban-atlas~DE504L1_MUNSTER_UA2018',\n 'eea-urban-atlas~DE505L0_CHEMNITZ_UA2018',\n 'eea-urban-atlas~DE507L1_AACHEN_UA2018',\n 'eea-urban-atlas~DE508L0_KREFELD_UA2018',\n 'eea-urban-atlas~DE510L1_LUBECK_UA2018',\n 'eea-urban-atlas~DE513L1_KASSEL_UA2018',\n 'eea-urban-atlas~DE516L0_SOLINGEN_UA2018',\n 'eea-urban-atlas~DE517L1_OSNABRUCK_UA2018',\n 'eea-urban-atlas~DE520L1_OLDENBURG_OLDENBURG_UA2018',\n 'eea-urban-atlas~DE522L1_HEIDELBERG_UA2018',\n 'eea-urban-atlas~DE523L1_PADERBORN_UA2018',\n 'eea-urban-atlas~DE524L2_WURZBURG_UA2018',\n 'eea-urban-atlas~DE527L1_BREMERHAVEN_UA2018',\n 'eea-urban-atlas~DE529L1_HEILBRONN_UA2018',\n 'eea-urban-atlas~DE530L0_REMSCHEID_UA2018',\n 'eea-urban-atlas~DE532L1_ULM_UA2018',\n 'eea-urban-atlas~DE533L1_PFORZHEIM_UA2018',\n 'eea-urban-atlas~DE534L1_INGOLSTADT_UA2018',\n 'eea-urban-atlas~DE535L1_GERA_UA2018',\n 'eea-urban-atlas~DE537L1_REUTLINGEN_UA2018',\n 'eea-urban-atlas~DE539L1_COTTBUS_UA2018',\n 'eea-urban-atlas~DE540L2_SIEGEN_UA2018',\n 'eea-urban-atlas~DE542L1_HILDESHEIM_UA2018',\n 'eea-urban-atlas~DE544L1_ZWICKAU_UA2018',\n 'eea-urban-atlas~DE546L0_WUPPERTAL_UA2018',\n 'eea-urban-atlas~DE547L2_JENA_UA2018',\n 'eea-urban-atlas~DE548L1_DUREN_UA2018',\n 'eea-urban-atlas~DE549L1_BOCHOLT_UA2018',\n 'eea-urban-atlas~DK001L2_KOBENHAVN_UA2018',\n 'eea-urban-atlas~DK002L3_ARHUS_UA2018',\n 'eea-urban-atlas~DK003L2_ODENSE_UA2018',\n 'eea-urban-atlas~DK004L3_AALBORG_UA2018',\n 'eea-urban-atlas~EE001L1_TALLINN_UA2018',\n 'eea-urban-atlas~EE002L1_TARTU_UA2018',\n 'eea-urban-atlas~EE003L0_NARVA_UA2018',\n 'eea-urban-atlas~EL001L1_ATHINA_UA2018',\n 'eea-urban-atlas~EL002L1_THESSALONIKI_UA2018',\n 'eea-urban-atlas~EL003L1_PATRA_UA2018',\n 'eea-urban-atlas~EL004L1_IRAKLEIO_UA2018',\n 'eea-urban-atlas~EL005L1_LARISA_UA2018',\n 'eea-urban-atlas~EL006L1_VOLOS_UA2018',\n 'eea-urban-atlas~EL007L1_IOANNINA_UA2018',\n 'eea-urban-atlas~EL008L1_KAVALA_UA2018',\n 'eea-urban-atlas~EL009L1_KALAMATA_UA2018',\n 'eea-urban-atlas~ES001L3_MADRID_UA2018',\n 'eea-urban-atlas~ES002L2_BARCELONA_UA2018',\n 'eea-urban-atlas~ES003L3_VALENCIA_UA2018',\n 'eea-urban-atlas~ES004L3_SEVILLA_UA2018',\n 'eea-urban-atlas~ES005L2_ZARAGOZA_UA2018',\n 'eea-urban-atlas~ES006L2_MALAGA_UA2018',\n 'eea-urban-atlas~ES007L2_MURCIA_UA2018',\n 'eea-urban-atlas~ES008L2_LAS_PALMAS_UA2018',\n 'eea-urban-atlas~ES009L2_VALLADOLID_UA2018',\n 'eea-urban-atlas~ES010L2_PALMA_DE_MALLORCA_UA2018',\n 'eea-urban-atlas~ES011L2_SANTIAGO_DE_COMPOSTELA_UA2018',\n 'eea-urban-atlas~ES012L2_VITORIA_GASTEIZ_UA2018',\n 'eea-urban-atlas~ES013L2_OVIEDO_UA2018',\n 'eea-urban-atlas~ES014L3_PAMPLONA_IRUNA_UA2018',\n 'eea-urban-atlas~ES015L2_SANTANDER_UA2018',\n 'eea-urban-atlas~ES016L2_TOLEDO_UA2018',\n 'eea-urban-atlas~ES017L2_BADAJOZ_UA2018',\n 'eea-urban-atlas~ES018L2_LOGRONO_UA2018',\n 'eea-urban-atlas~ES019L3_BILBAO_UA2018',\n 'eea-urban-atlas~ES020L2_CORDOBA_UA2018',\n 'eea-urban-atlas~ES021L2_ALICANTE_ALACANT_UA2018',\n 'eea-urban-atlas~ES022L2_VIGO_UA2018',\n 'eea-urban-atlas~ES023L2_GIJON_UA2018',\n 'eea-urban-atlas~ES025L3_SANTA_CRUZ_DE_TENERIFE_UA2018',\n 'eea-urban-atlas~ES026L2_CORUNA_A_UA2018',\n 'eea-urban-atlas~ES028L1_REUS_UA2018',\n 'eea-urban-atlas~ES031L1_LUGO_UA2018',\n 'eea-urban-atlas~ES033L1_GIRONA_UA2018',\n 'eea-urban-atlas~ES034L1_CACERES_UA2018',\n 'eea-urban-atlas~ES035L1_TORREVIEJA_UA2018',\n 'eea-urban-atlas~ES039L1_AVILES_UA2018',\n 'eea-urban-atlas~ES040L1_TALAVERA_DE_LA_REINA_UA2018',\n 'eea-urban-atlas~ES041L1_PALENCIA_UA2018',\n 'eea-urban-atlas~ES043L1_FERROL_UA2018',\n 'eea-urban-atlas~ES044L1_PONTEVEDRA_UA2018',\n 'eea-urban-atlas~ES046L1_GANDIA_UA2018',\n 'eea-urban-atlas~ES048L1_GUADALAJARA_UA2018',\n 'eea-urban-atlas~ES050L1_MANRESA_UA2018',\n 'eea-urban-atlas~ES053L1_CIUDAD_REAL_UA2018',\n 'eea-urban-atlas~ES054L1_BENIDORM_UA2018',\n 'eea-urban-atlas~ES057L1_PONFERRADA_UA2018',\n 'eea-urban-atlas~ES059L1_ZAMORA_UA2018',\n 'eea-urban-atlas~ES070L1_IRUN_UA2018',\n 'eea-urban-atlas~ES072L1_ARRECIFE_UA2018',\n 'eea-urban-atlas~ES501L3_GRANADA_UA2018',\n 'eea-urban-atlas~ES505L1_ELCHE_ELX_UA2018',\n 'eea-urban-atlas~ES506L1_CARTAGENA_UA2018',\n 'eea-urban-atlas~ES508L1_JEREZ_DE_LA_FRONTERA_UA2018',\n 'eea-urban-atlas~ES510L1_DONOSTIA_SAN_SEBASTIAN_UA2018',\n 'eea-urban-atlas~ES514L1_ALMERIA_UA2018',\n 'eea-urban-atlas~ES515L1_BURGOS_UA2018',\n 'eea-urban-atlas~ES516L1_SALAMANCA_UA2018',\n 'eea-urban-atlas~ES519L1_ALBACETE_UA2018',\n 'eea-urban-atlas~ES520L1_CASTELLON_CASTELLO_UA2018',\n 'eea-urban-atlas~ES521L1_HUELVA_UA2018',\n 'eea-urban-atlas~ES522L1_CADIZ_UA2018',\n 'eea-urban-atlas~ES523L1_LEON_UA2018',\n 'eea-urban-atlas~ES525L1_TARRAGONA_UA2018',\n 'eea-urban-atlas~ES527L1_JAEN_UA2018',\n 'eea-urban-atlas~ES528L1_LLEIDA_UA2018',\n 'eea-urban-atlas~ES529L1_OURENSE_UA2018',\n 'eea-urban-atlas~ES532L1_ALGECIRAS_UA2018',\n 'eea-urban-atlas~ES533L1_MARBELLA_UA2018',\n 'eea-urban-atlas~ES537L1_ALCOY_UA2018',\n 'eea-urban-atlas~ES538L1_AVILA_UA2018',\n 'eea-urban-atlas~ES542L1_CUENCA_UA2018',\n 'eea-urban-atlas~ES543L1_EIVISSA_UA2018',\n 'eea-urban-atlas~ES544L1_LINARES_UA2018',\n 'eea-urban-atlas~ES545L1_LORCA_UA2018',\n 'eea-urban-atlas~ES546L1_MERIDA_UA2018',\n 'eea-urban-atlas~ES547L1_SAGUNTO_UA2018',\n 'eea-urban-atlas~ES550L1_PUERTO_DE_LA_CRUZ_UA2018',\n 'eea-urban-atlas~ES552L1_IGUALADA_UA2018',\n 'eea-urban-atlas~FI001L3_HELSINKI_UA2018',\n 'eea-urban-atlas~FI002L3_TAMPERE_UA2018',\n 'eea-urban-atlas~FI003L4_TURKU_UA2018',\n 'eea-urban-atlas~FI004L4_OULU_UA2018',\n 'eea-urban-atlas~FI007L2_LAHTI_UA2018',\n 'eea-urban-atlas~FI008L2_KUOPIO_UA2018',\n 'eea-urban-atlas~FI009L2_JYVASKYLA_UA2018',\n 'eea-urban-atlas~FR001L1_PARIS_UA2018',\n 'eea-urban-atlas~FR003L2_LYON_UA2018',\n 'eea-urban-atlas~FR004L2_TOULOUSE_UA2018',\n 'eea-urban-atlas~FR006L2_STRASBOURG_UA2018',\n 'eea-urban-atlas~FR007L2_BORDEAUX_UA2018',\n 'eea-urban-atlas~FR008L2_NANTES_UA2018',\n 'eea-urban-atlas~FR009L2_LILLE_UA2018',\n 'eea-urban-atlas~FR010L2_MONTPELLIER_UA2018',\n 'eea-urban-atlas~FR011L2_SAINT_ETIENNE_UA2018',\n 'eea-urban-atlas~FR012L2_LE_HAVRE_UA2018',\n 'eea-urban-atlas~FR013L2_RENNES_UA2018',\n 'eea-urban-atlas~FR014L2_AMIENS_UA2018',\n 'eea-urban-atlas~FR016L2_NANCY_UA2018',\n 'eea-urban-atlas~FR017L2_METZ_UA2018',\n 'eea-urban-atlas~FR018L2_REIMS_UA2018',\n 'eea-urban-atlas~FR019L2_ORLEANS_UA2018',\n 'eea-urban-atlas~FR020L2_DIJON_UA2018',\n 'eea-urban-atlas~FR021L2_POITIERS_UA2018',\n 'eea-urban-atlas~FR022L2_CLERMONT_FERRAND_UA2018',\n 'eea-urban-atlas~FR023L2_CAEN_UA2018',\n 'eea-urban-atlas~FR024L2_LIMOGES_UA2018',\n 'eea-urban-atlas~FR025L2_BESANCON_UA2018',\n 'eea-urban-atlas~FR026L2_GRENOBLE_UA2018',\n 'eea-urban-atlas~FR027L2_AJACCIO_UA2018',\n 'eea-urban-atlas~FR028L1_SAINT_DENIS_UA2018',\n 'eea-urban-atlas~FR030L1_FORT_DE_FRANCE_UA2018',\n 'eea-urban-atlas~FR032L2_TOULON_UA2018',\n 'eea-urban-atlas~FR034L2_VALENCIENNES_UA2018',\n 'eea-urban-atlas~FR035L2_TOURS_UA2018',\n 'eea-urban-atlas~FR036L2_ANGERS_UA2018',\n 'eea-urban-atlas~FR037L2_BREST_UA2018',\n 'eea-urban-atlas~FR038L2_LE_MANS_UA2018',\n 'eea-urban-atlas~FR039L1_AVIGNON_UA2018',\n 'eea-urban-atlas~FR040L2_MULHOUSE_UA2018',\n 'eea-urban-atlas~FR042L2_DUNKERQUE_UA2018',\n 'eea-urban-atlas~FR043L2_PERPIGNAN_UA2018',\n 'eea-urban-atlas~FR044L2_NIMES_UA2018',\n 'eea-urban-atlas~FR045L2_PAU_UA2018',\n 'eea-urban-atlas~FR046L2_BAYONNE_UA2018',\n 'eea-urban-atlas~FR047L0_ANNEMASSE_UA2018',\n 'eea-urban-atlas~FR048L2_ANNECY_UA2018',\n 'eea-urban-atlas~FR049L2_LORIENT_UA2018',\n 'eea-urban-atlas~FR050L2_MONTBELIARD_UA2018',\n 'eea-urban-atlas~FR051L2_TROYES_UA2018',\n 'eea-urban-atlas~FR052L2_SAINT_NAZAIRE_UA2018',\n 'eea-urban-atlas~FR053L2_LA_ROCHELLE_UA2018',\n 'eea-urban-atlas~FR056L2_ANGOULEME_UA2018',\n 'eea-urban-atlas~FR057L2_BOULOGNE_SUR_MER_UA2018',\n 'eea-urban-atlas~FR058L2_CHAMBERY_UA2018',\n 'eea-urban-atlas~FR059L2_CHALON_SUR_SAONE_UA2018',\n 'eea-urban-atlas~FR060L2_CHARTRES_UA2018',\n 'eea-urban-atlas~FR061L2_NIORT_UA2018',\n 'eea-urban-atlas~FR062L2_CALAIS_UA2018',\n 'eea-urban-atlas~FR063L2_BEZIERS_UA2018',\n 'eea-urban-atlas~FR064L2_ARRAS_UA2018',\n 'eea-urban-atlas~FR065L2_BOURGES_UA2018',\n 'eea-urban-atlas~FR066L2_SAINT_BRIEUC_UA2018',\n 'eea-urban-atlas~FR067L2_QUIMPER_UA2018',\n 'eea-urban-atlas~FR068L2_VANNES_UA2018',\n 'eea-urban-atlas~FR069L2_CHERBOURG_UA2018',\n 'eea-urban-atlas~FR073L2_TARBES_UA2018',\n 'eea-urban-atlas~FR074L2_COMPIEGNE_UA2018',\n 'eea-urban-atlas~FR076L2_BELFORT_UA2018',\n 'eea-urban-atlas~FR077L2_ROANNE_UA2018',\n 'eea-urban-atlas~FR079L2_SAINT_QUENTIN_UA2018',\n 'eea-urban-atlas~FR082L2_BEAUVAIS_UA2018',\n 'eea-urban-atlas~FR084L2_CREIL_UA2018',\n 'eea-urban-atlas~FR086L2_EVREUX_UA2018',\n 'eea-urban-atlas~FR090L2_CHATEAUROUX_UA2018',\n 'eea-urban-atlas~FR093L2_BRIVE_LA_GAILLARDE_UA2018',\n 'eea-urban-atlas~FR096L2_ALBI_UA2018',\n 'eea-urban-atlas~FR099L2_FREJUS_UA2018',\n 'eea-urban-atlas~FR104L2_CHALONS_EN_CHAMPAGNE_UA2018',\n 'eea-urban-atlas~FR203L2_MARSEILLE_UA2018',\n 'eea-urban-atlas~FR205L2_NICE_UA2018',\n 'eea-urban-atlas~FR207L2_LENS_LIEVIN_UA2018',\n 'eea-urban-atlas~FR208L1_HENIN_CARVIN_UA2018',\n 'eea-urban-atlas~FR209L2_DOUAI_UA2018',\n 'eea-urban-atlas~FR214L1_VALENCE_UA2018',\n 'eea-urban-atlas~FR215L2_ROUEN_UA2018',\n 'eea-urban-atlas~FR304L1_MELUN_UA2018',\n 'eea-urban-atlas~FR324L1_MARTIGUES_UA2018',\n 'eea-urban-atlas~FR505L1_CHARLEVILLE_MEZIERES_UA2018',\n 'eea-urban-atlas~FR506L1_COLMAR_UA2018',\n 'eea-urban-atlas~FR519L1_CANNES_UA2018',\n 'eea-urban-atlas~HR001L2_GRAD_ZAGREB_UA2018',\n 'eea-urban-atlas~HR002L2_RIJEKA_UA2018',\n 'eea-urban-atlas~HR003L2_SLAVONSKI_BROD_UA2018',\n 'eea-urban-atlas~HR004L2_OSIJEK_UA2018',\n 'eea-urban-atlas~HR005L2_SPLIT_UA2018',\n 'eea-urban-atlas~HR006L1_PULA_POLA_UA2018',\n 'eea-urban-atlas~HR007L1_ZADAR_UA2018',\n 'eea-urban-atlas~HU001L2_BUDAPEST_UA2018',\n 'eea-urban-atlas~HU002L2_MISKOLC_UA2018',\n 'eea-urban-atlas~HU003L2_NYIREGYHAZA_UA2018',\n 'eea-urban-atlas~HU004L2_PECS_UA2018',\n 'eea-urban-atlas~HU005L2_DEBRECEN_UA2018',\n 'eea-urban-atlas~HU006L2_SZEGED_UA2018',\n 'eea-urban-atlas~HU007L2_GYOR_UA2018',\n 'eea-urban-atlas~HU008L2_KECSKEMET_UA2018',\n 'eea-urban-atlas~HU009L2_SZEKESFEHERVAR_UA2018',\n 'eea-urban-atlas~HU010L1_SZOMBATHELY_UA2018',\n 'eea-urban-atlas~HU011L1_SZOLNOK_UA2018',\n 'eea-urban-atlas~HU012L1_TATABANYA_UA2018',\n 'eea-urban-atlas~HU013L1_VESZPREM_UA2018',\n 'eea-urban-atlas~HU014L1_BEKESCSABA_UA2018',\n 'eea-urban-atlas~HU015L1_KAPOSVAR_UA2018',\n 'eea-urban-atlas~HU016L1_EGER_UA2018',\n 'eea-urban-atlas~HU017L1_DUNAUJVAROS_UA2018',\n 'eea-urban-atlas~HU018L1_ZALAEGERSZEG_UA2018',\n 'eea-urban-atlas~HU019L1_SOPRON_UA2018',\n 'eea-urban-atlas~IE001L1_DUBLIN_UA2018',\n 'eea-urban-atlas~IE002L1_CORK_UA2018',\n 'eea-urban-atlas~IE003L1_LIMERICK_UA2018',\n 'eea-urban-atlas~IE004L1_GALWAY_UA2018',\n 'eea-urban-atlas~IE005L1_WATERFORD_UA2018',\n 'eea-urban-atlas~IS001L1_REYKJAVIK_UA2018',\n 'eea-urban-atlas~IT001L3_ROMA_UA2018',\n 'eea-urban-atlas~IT002L3_MILANO_UA2018',\n 'eea-urban-atlas~IT003L3_NAPOLI_UA2018',\n 'eea-urban-atlas~IT004L2_TORINO_UA2018',\n 'eea-urban-atlas~IT005L3_PALERMO_UA2018',\n 'eea-urban-atlas~IT006L3_GENOVA_UA2018',\n 'eea-urban-atlas~IT007L3_FIRENZE_UA2018',\n 'eea-urban-atlas~IT008L3_BARI_UA2018',\n 'eea-urban-atlas~IT009L1_BOLOGNA_UA2018',\n 'eea-urban-atlas~IT010L2_CATANIA_UA2018',\n 'eea-urban-atlas~IT011L2_VENEZIA_UA2018',\n 'eea-urban-atlas~IT012L3_VERONA_UA2018',\n 'eea-urban-atlas~IT013L3_CREMONA_UA2018',\n 'eea-urban-atlas~IT014L3_TRENTO_UA2018',\n 'eea-urban-atlas~IT015L1_TRIESTE_UA2018',\n 'eea-urban-atlas~IT016L3_PERUGIA_UA2018',\n 'eea-urban-atlas~IT017L3_ANCONA_UA2018',\n 'eea-urban-atlas~IT019L2_PESCARA_UA2018',\n 'eea-urban-atlas~IT020L3_CAMPOBASSO_UA2018',\n 'eea-urban-atlas~IT021L2_CASERTA_UA2018',\n 'eea-urban-atlas~IT022L2_TARANTO_UA2018',\n 'eea-urban-atlas~IT023L2_POTENZA_UA2018',\n 'eea-urban-atlas~IT024L3_CATANZARO_UA2018',\n 'eea-urban-atlas~IT025L3_REGGIO_DI_CALABRIA_UA2018',\n 'eea-urban-atlas~IT026L3_SASSARI_UA2018',\n 'eea-urban-atlas~IT027L2_CAGLIARI_UA2018',\n 'eea-urban-atlas~IT028L3_PADOVA_UA2018',\n 'eea-urban-atlas~IT029L3_BRESCIA_UA2018',\n 'eea-urban-atlas~IT030L3_MODENA_UA2018',\n 'eea-urban-atlas~IT031L3_FOGGIA_UA2018',\n 'eea-urban-atlas~IT032L3_SALERNO_UA2018',\n 'eea-urban-atlas~IT033L2_PIACENZA_UA2018',\n 'eea-urban-atlas~IT034L1_BOLZANO_UA2018',\n 'eea-urban-atlas~IT035L2_UDINE_UA2018',\n 'eea-urban-atlas~IT036L2_LA_SPEZIA_UA2018',\n 'eea-urban-atlas~IT037L1_LECCE_UA2018',\n 'eea-urban-atlas~IT038L1_BARLETTA_UA2018',\n 'eea-urban-atlas~IT039L2_PESARO_UA2018',\n 'eea-urban-atlas~IT040L2_COMO_UA2018',\n 'eea-urban-atlas~IT041L2_PISA_UA2018',\n 'eea-urban-atlas~IT042L1_TREVISO_UA2018',\n 'eea-urban-atlas~IT043L2_VARESE_UA2018',\n 'eea-urban-atlas~IT045L2_ASTI_UA2018',\n 'eea-urban-atlas~IT046L2_PAVIA_UA2018',\n 'eea-urban-atlas~IT047L1_MASSA_UA2018',\n 'eea-urban-atlas~IT048L2_COSENZA_UA2018',\n 'eea-urban-atlas~IT052L1_SAVONA_UA2018',\n 'eea-urban-atlas~IT054L1_MATERA_UA2018',\n 'eea-urban-atlas~IT056L1_ACIREALE_UA2018',\n 'eea-urban-atlas~IT057L2_AVELLINO_UA2018',\n 'eea-urban-atlas~IT058L2_PORDENONE_UA2018',\n 'eea-urban-atlas~IT060L1_LECCO_UA2018',\n 'eea-urban-atlas~IT061L0_ALTAMURA_UA2018',\n 'eea-urban-atlas~IT064L1_BATTIPAGLIA_UA2018',\n 'eea-urban-atlas~IT065L0_BISCEGLIE_UA2018',\n 'eea-urban-atlas~IT066L1_CARPI_UA2018',\n 'eea-urban-atlas~IT067L0_CERIGNOLA_UA2018',\n 'eea-urban-atlas~IT068L1_GALLARATE_UA2018',\n 'eea-urban-atlas~IT069L1_GELA_UA2018',\n 'eea-urban-atlas~IT073L1_SASSUOLO_UA2018',\n 'eea-urban-atlas~IT501L2_MESSINA_UA2018',\n 'eea-urban-atlas~IT502L2_PRATO_UA2018',\n 'eea-urban-atlas~IT503L3_PARMA_UA2018',\n 'eea-urban-atlas~IT504L3_LIVORNO_UA2018',\n 'eea-urban-atlas~IT505L3_REGGIO_NELL_EMILIA_UA2018',\n 'eea-urban-atlas~IT506L2_RAVENNA_UA2018',\n 'eea-urban-atlas~IT507L2_FERRARA_UA2018',\n 'eea-urban-atlas~IT508L3_RIMINI_UA2018',\n 'eea-urban-atlas~IT509L3_SIRACUSA_UA2018',\n 'eea-urban-atlas~IT511L2_BERGAMO_UA2018',\n 'eea-urban-atlas~IT512L3_FORLI_UA2018',\n 'eea-urban-atlas~IT513L3_LATINA_UA2018',\n 'eea-urban-atlas~IT514L2_VICENZA_UA2018',\n 'eea-urban-atlas~IT515L2_TERNI_UA2018',\n 'eea-urban-atlas~IT516L2_NOVARA_UA2018',\n 'eea-urban-atlas~IT518L1_ALESSANDRIA_UA2018',\n 'eea-urban-atlas~IT519L1_AREZZO_UA2018',\n 'eea-urban-atlas~IT520L1_GROSSETO_UA2018',\n 'eea-urban-atlas~IT521L1_BRINDISI_UA2018',\n 'eea-urban-atlas~IT522L1_TRAPANI_UA2018',\n 'eea-urban-atlas~IT523L1_RAGUSA_UA2018',\n 'eea-urban-atlas~IT524L0_ANDRIA_UA2018',\n 'eea-urban-atlas~IT525L0_TRANI_UA2018',\n 'eea-urban-atlas~IT526L1_L_AQUILA_UA2018',\n 'eea-urban-atlas~LT001L1_VILNIUS_UA2018',\n 'eea-urban-atlas~LT002L1_KAUNAS_UA2018',\n 'eea-urban-atlas~LT003L1_PANEVEZYS_UA2018',\n 'eea-urban-atlas~LT004L0_ALYTUS_UA2018',\n 'eea-urban-atlas~LT501L0_KLAIPEDA_UA2018',\n 'eea-urban-atlas~LT502L0_SIAULIAI_UA2018',\n 'eea-urban-atlas~LU001L1_LUXEMBOURG_UA2018',\n 'eea-urban-atlas~LV001L1_RIGA_UA2018',\n 'eea-urban-atlas~LV002L2_LIEPAJA_UA2018',\n 'eea-urban-atlas~LV003L1_JELGAVA_UA2018',\n 'eea-urban-atlas~LV501L1_DAUGAVPILS_UA2018',\n 'eea-urban-atlas~ME001L1_PODGORICA_UA2018',\n 'eea-urban-atlas~METADATA',\n 'eea-urban-atlas~MK001L1_SKOPJE_UA2018',\n 'eea-urban-atlas~MK003L1_BITOLA_UA2018',\n 'eea-urban-atlas~MK004L1_TETOVO_UA2018',\n 'eea-urban-atlas~MK005L1_PRILEP_UA2018',\n 'eea-urban-atlas~MT001L1_VALLETTA_UA2018',\n 'eea-urban-atlas~NL001L3_S_GRAVENHAGE_UA2018',\n 'eea-urban-atlas~NL002L3_AMSTERDAM_UA2018',\n 'eea-urban-atlas~NL003L3_ROTTERDAM_UA2018',\n 'eea-urban-atlas~NL004L3_UTRECHT_UA2018',\n 'eea-urban-atlas~NL005L3_EINDHOVEN_UA2018',\n 'eea-urban-atlas~NL006L3_TILBURG_UA2018',\n 'eea-urban-atlas~NL007L3_GRONINGEN_UA2018',\n 'eea-urban-atlas~NL008L3_ENSCHEDE_UA2018',\n 'eea-urban-atlas~NL009L3_ARNHEM_UA2018',\n 'eea-urban-atlas~NL010L3_HEERLEN_UA2018',\n 'eea-urban-atlas~NL012L3_BREDA_UA2018',\n 'eea-urban-atlas~NL013L3_NIJMEGEN_UA2018',\n 'eea-urban-atlas~NL014L3_APELDOORN_UA2018',\n 'eea-urban-atlas~NL015L3_LEEUWARDEN_UA2018',\n 'eea-urban-atlas~NL016L3_SITTARD_GELEEN_UA2018',\n 'eea-urban-atlas~NL020L3_ROOSENDAAL_UA2018',\n 'eea-urban-atlas~NL026L0_ALPHEN_AAN_DEN_RIJN_UA2018',\n 'eea-urban-atlas~NL028L3_BERGEN_OP_ZOOM_UA2018',\n 'eea-urban-atlas~NL030L0_GOUDA_UA2018',\n 'eea-urban-atlas~NL032L3_MIDDELBURG_UA2018',\n 'eea-urban-atlas~NL503L3_S_HERTOGENBOSCH_UA2018',\n 'eea-urban-atlas~NL504L3_AMERSFOORT_UA2018',\n 'eea-urban-atlas~NL505L3_MAASTRICHT_UA2018',\n 'eea-urban-atlas~NL507L3_LEIDEN_UA2018',\n 'eea-urban-atlas~NL511L3_ZWOLLE_UA2018',\n 'eea-urban-atlas~NL512L3_EDE_UA2018',\n 'eea-urban-atlas~NL513L3_DEVENTER_UA2018',\n 'eea-urban-atlas~NL514L3_ALKMAAR_UA2018',\n 'eea-urban-atlas~NL515L3_VENLO_UA2018',\n 'eea-urban-atlas~NL519L3_ALMELO_UA2018',\n 'eea-urban-atlas~NL520L3_LELYSTAD_UA2018',\n 'eea-urban-atlas~NL521L3_OSS_UA2018',\n 'eea-urban-atlas~NL522L3_ASSEN_UA2018',\n 'eea-urban-atlas~NL524L3_VEENENDAAL_UA2018',\n 'eea-urban-atlas~NL529L3_SOEST_UA2018',\n 'eea-urban-atlas~NO001L1_OSLO_UA2018',\n 'eea-urban-atlas~NO002L1_BERGEN_UA2018',\n 'eea-urban-atlas~NO003L1_TRONDHEIM_UA2018',\n 'eea-urban-atlas~NO004L1_STAVANGER_UA2018',\n 'eea-urban-atlas~NO005L1_KRISTIANSAND_UA2018',\n 'eea-urban-atlas~NO006L1_TROMSO_UA2018',\n 'eea-urban-atlas~PL001L2_WARSZAWA_UA2018',\n 'eea-urban-atlas~PL002L2_LODZ_UA2018',\n 'eea-urban-atlas~PL003L2_KRAKOW_UA2018',\n 'eea-urban-atlas~PL004L2_WROCLAW_UA2018',\n 'eea-urban-atlas~PL005L2_POZNAN_UA2018',\n 'eea-urban-atlas~PL006L2_GDANSK_UA2018',\n 'eea-urban-atlas~PL007L2_SZCZECIN_UA2018',\n 'eea-urban-atlas~PL008L2_BYDGOSZCZ_UA2018',\n 'eea-urban-atlas~PL009L2_LUBLIN_UA2018',\n 'eea-urban-atlas~PL010L2_KATOWICE_UA2018',\n 'eea-urban-atlas~PL011L2_BIALYSTOK_UA2018',\n 'eea-urban-atlas~PL012L2_KIELCE_UA2018',\n 'eea-urban-atlas~PL013L2_TORUN_UA2018',\n 'eea-urban-atlas~PL014L2_OLSZTYN_UA2018',\n 'eea-urban-atlas~PL015L2_RZESZOW_UA2018',\n 'eea-urban-atlas~PL016L2_OPOLE_UA2018',\n 'eea-urban-atlas~PL017L2_GORZOW_WIELKOPOLSKI_UA2018',\n 'eea-urban-atlas~PL018L2_ZIELONA_GORA_UA2018',\n 'eea-urban-atlas~PL019L2_JELENIA_GORA_UA2018',\n 'eea-urban-atlas~PL020L2_NOWY_SACZ_UA2018',\n 'eea-urban-atlas~PL021L2_SUWALKI_UA2018',\n 'eea-urban-atlas~PL022L2_KONIN_UA2018',\n 'eea-urban-atlas~PL024L2_CZESTOCHOWA_UA2018',\n 'eea-urban-atlas~PL025L2_RADOM_UA2018',\n 'eea-urban-atlas~PL026L2_PLOCK_UA2018',\n 'eea-urban-atlas~PL027L2_KALISZ_UA2018',\n 'eea-urban-atlas~PL028L2_KOSZALIN_UA2018',\n 'eea-urban-atlas~PL029L1_SLUPSK_UA2018',\n 'eea-urban-atlas~PL030L1_JASTRZEBIE_ZDROJ_UA2018',\n 'eea-urban-atlas~PL031L1_SIEDLCE_UA2018',\n 'eea-urban-atlas~PL032L1_PIOTRKOW_TRYBUNALSKI_UA2018',\n 'eea-urban-atlas~PL033L1_LUBIN_UA2018',\n 'eea-urban-atlas~PL034L1_PILA_UA2018',\n 'eea-urban-atlas~PL035L1_INOWROCLAW_UA2018',\n 'eea-urban-atlas~PL036L1_OSTROWIEC_SWIETOKRZYSKI_UA2018',\n 'eea-urban-atlas~PL037L1_GNIEZNO_UA2018',\n 'eea-urban-atlas~PL038L1_STARGARD_SZCZECINSKI_UA2018',\n 'eea-urban-atlas~PL039L1_OSTROW_WIELKOPOLSKI_UA2018',\n 'eea-urban-atlas~PL040L1_PRZEMYSL_UA2018',\n 'eea-urban-atlas~PL041L1_ZAMOSC_UA2018',\n 'eea-urban-atlas~PL042L1_CHELM_UA2018',\n 'eea-urban-atlas~PL043L1_PABIANICE_UA2018',\n 'eea-urban-atlas~PL044L1_GLOGOW_UA2018',\n 'eea-urban-atlas~PL045L1_STALOWA_WOLA_UA2018',\n 'eea-urban-atlas~PL046L1_TOMASZOW_MAZOWIECKI_UA2018',\n 'eea-urban-atlas~PL047L1_LOMZA_UA2018',\n 'eea-urban-atlas~PL048L1_LESZNO_UA2018',\n 'eea-urban-atlas~PL049L1_SWIDNICA_UA2018',\n 'eea-urban-atlas~PL051L1_TCZEW_UA2018',\n 'eea-urban-atlas~PL052L1_ELK_UA2018',\n 'eea-urban-atlas~PL506L2_BIELSKO_BIALA_UA2018',\n 'eea-urban-atlas~PL508L1_RYBNIK_UA2018',\n 'eea-urban-atlas~PL511L2_WALBRZYCH_UA2018',\n 'eea-urban-atlas~PL512L2_ELBLAG_UA2018',\n 'eea-urban-atlas~PL513L2_WLOCLAWEK_UA2018',\n 'eea-urban-atlas~PL514L2_TARNOW_UA2018',\n 'eea-urban-atlas~PL516L2_LEGNICA_UA2018',\n 'eea-urban-atlas~PL517L2_GRUDZIADZ_UA2018',\n 'eea-urban-atlas~PT001L3_LISBOA_UA2018',\n 'eea-urban-atlas~PT002L2_PORTO_UA2018',\n 'eea-urban-atlas~PT003L1_BRAGA_UA2018',\n 'eea-urban-atlas~PT004L2_FUNCHAL_UA2018',\n 'eea-urban-atlas~PT005L2_COIMBRA_UA2018',\n 'eea-urban-atlas~PT007L1_PONTA_DELGADA_UA2018',\n 'eea-urban-atlas~PT008L2_AVEIRO_UA2018',\n 'eea-urban-atlas~PT009L1_FARO_UA2018',\n 'eea-urban-atlas~PT014L1_VISEU_UA2018',\n 'eea-urban-atlas~PT016L0_VIANA_DO_CASTELO_UA2018',\n 'eea-urban-atlas~PT019L0_POVOA_DE_VARZIM_UA2018',\n 'eea-urban-atlas~PT505L1_GUIMARAES_UA2018',\n 'eea-urban-atlas~RO001L1_BUCURESTI_UA2018',\n 'eea-urban-atlas~RO002L1_CLUJ_NAPOCA_UA2018',\n 'eea-urban-atlas~RO003L1_TIMISOARA_UA2018',\n 'eea-urban-atlas~RO004L1_CRAIOVA_UA2018',\n 'eea-urban-atlas~RO005L1_BRAILA_UA2018',\n 'eea-urban-atlas~RO006L1_ORADEA_UA2018',\n 'eea-urban-atlas~RO007L1_BACAU_UA2018',\n 'eea-urban-atlas~RO008L1_ARAD_UA2018',\n 'eea-urban-atlas~RO009L1_SIBIU_UA2018',\n 'eea-urban-atlas~RO010L1_TARGU_MURES_UA2018',\n 'eea-urban-atlas~RO011L1_PIATRA_NEAMT_UA2018',\n 'eea-urban-atlas~RO012L1_CALARASI_UA2018',\n 'eea-urban-atlas~RO013L1_GIURGIU_UA2018',\n 'eea-urban-atlas~RO014L1_ALBA_IULIA_UA2018',\n 'eea-urban-atlas~RO015L1_FOCSANI_UA2018',\n 'eea-urban-atlas~RO016L1_TARGU_JIU_UA2018',\n 'eea-urban-atlas~RO017L1_TULCEA_UA2018',\n 'eea-urban-atlas~RO018L1_TARGOVISTE_UA2018',\n 'eea-urban-atlas~RO019L1_SLATINA_UA2018',\n 'eea-urban-atlas~RO020L1_BARLAD_UA2018',\n 'eea-urban-atlas~RO021L1_ROMAN_UA2018',\n 'eea-urban-atlas~RO022L1_BISTRITA_UA2018',\n 'eea-urban-atlas~RO501L1_CONSTANTA_UA2018',\n 'eea-urban-atlas~RO502L1_IASI_UA2018',\n 'eea-urban-atlas~RO503L1_GALATI_UA2018',\n 'eea-urban-atlas~RO504L1_BRASOV_UA2018',\n 'eea-urban-atlas~RO505L1_PLOIESTI_UA2018',\n 'eea-urban-atlas~RO506L1_PITESTI_UA2018',\n 'eea-urban-atlas~RO507L1_BAIA_MARE_UA2018',\n 'eea-urban-atlas~RO508L1_BUZAU_UA2018',\n 'eea-urban-atlas~RO509L1_SATU_MARE_UA2018',\n 'eea-urban-atlas~RO510L1_BOTOSANI_UA2018',\n 'eea-urban-atlas~RO511L1_RAMNICU_VALCEA_UA2018',\n 'eea-urban-atlas~RO512L1_SUCEAVA_UA2018',\n 'eea-urban-atlas~RO513L1_DROBETA_TURNU_SEVERIN_UA2018',\n 'eea-urban-atlas~RS001L1_BEOGRAD_UA2018',\n 'eea-urban-atlas~RS002L1_NOVI_SAD_UA2018',\n 'eea-urban-atlas~RS003L1_NIS_UA2018',\n 'eea-urban-atlas~RS004L1_KRAGUJEVAC_UA2018',\n 'eea-urban-atlas~RS005L1_SUBOTICA_UA2018',\n 'eea-urban-atlas~RS006L1_NOVI_PAZAR_UA2018',\n 'eea-urban-atlas~RS008L1_ZRENJANIN_UA2018',\n 'eea-urban-atlas~RS009L1_KRALJEVO_UA2018',\n 'eea-urban-atlas~RS011L0_CACAK_UA2018',\n 'eea-urban-atlas~RS012L1_KRUSEVAC_UA2018',\n 'eea-urban-atlas~RS013L1_LESKOVAC_UA2018',\n 'eea-urban-atlas~RS014L1_VALJEVO_UA2018',\n 'eea-urban-atlas~RS015L1_VRANJE_UA2018',\n 'eea-urban-atlas~RS016L1_SMEDEREVO_UA2018',\n 'eea-urban-atlas~SE001L1_STOCKHOLM_UA2018',\n 'eea-urban-atlas~SE002L1_GOTEBORG_UA2018',\n 'eea-urban-atlas~SE003L1_MALMO_UA2018',\n 'eea-urban-atlas~SE004L1_JONKOPING_UA2018',\n 'eea-urban-atlas~SE005L1_UMEA_UA2018',\n 'eea-urban-atlas~SE006L1_UPPSALA_UA2018',\n 'eea-urban-atlas~SE007L1_LINKOPING_UA2018',\n 'eea-urban-atlas~SE008L1_OREBRO_UA2018',\n 'eea-urban-atlas~SE501L1_VASTERAS_UA2018',\n 'eea-urban-atlas~SE502L1_NORRKOPING_UA2018',\n 'eea-urban-atlas~SE503L1_HELSINGBORG_UA2018',\n 'eea-urban-atlas~SE505L1_BORAS_UA2018',\n 'eea-urban-atlas~SI001L2_LJUBLJANA_UA2018',\n 'eea-urban-atlas~SI002L1_MARIBOR_UA2018',\n 'eea-urban-atlas~SK001L1_BRATISLAVA_UA2018',\n 'eea-urban-atlas~SK002L1_KOSICE_UA2018',\n 'eea-urban-atlas~SK003L1_BANSKA_BYSTRICA_UA2018',\n 'eea-urban-atlas~SK004L1_NITRA_UA2018',\n 'eea-urban-atlas~SK005L1_PRESOV_UA2018',\n 'eea-urban-atlas~SK006L1_ZILINA_UA2018',\n 'eea-urban-atlas~SK007L1_TRNAVA_UA2018',\n 'eea-urban-atlas~SK008L1_TRENCIN_UA2018',\n 'eea-urban-atlas~TR001L1_ANKARA_UA2018',\n 'eea-urban-atlas~TR002L1_ADANA_MERSIN_UA2018',\n 'eea-urban-atlas~TR003L1_ANTALYA_UA2018',\n 'eea-urban-atlas~TR004L1_BALIKESIR_UA2018',\n 'eea-urban-atlas~TR006L1_DENIZLI_UA2018',\n 'eea-urban-atlas~TR007L1_DIYARBAKIR_UA2018',\n 'eea-urban-atlas~TR008L1_EDIRNE_UA2018',\n 'eea-urban-atlas~TR009L1_ERZURUM_UA2018',\n 'eea-urban-atlas~TR010L1_GAZIANTEP_UA2018',\n 'eea-urban-atlas~TR011L1_ANTAKYA_UA2018',\n 'eea-urban-atlas~TR012L1_ISTANBUL_UA2018',\n 'eea-urban-atlas~TR013L1_IZMIR_UA2018',\n 'eea-urban-atlas~TR014L1_KARS_UA2018',\n 'eea-urban-atlas~TR015L1_KASTAMONU_UA2018',\n 'eea-urban-atlas~TR016L1_KAYSERI_UA2018',\n 'eea-urban-atlas~TR018L1_KONYA_UA2018',\n 'eea-urban-atlas~TR019L1_MALATYA_UA2018',\n 'eea-urban-atlas~TR021L1_NEVSEHIR_UA2018',\n 'eea-urban-atlas~TR022L1_SAMSUN_UA2018',\n 'eea-urban-atlas~TR023L1_SIIRT_UA2018',\n 'eea-urban-atlas~TR024L1_TRABZON_UA2018',\n 'eea-urban-atlas~TR025L1_VAN_UA2018',\n 'eea-urban-atlas~TR026L1_ZONGULDAK_UA2018',\n 'eea-urban-atlas~TR027L1_ESKISEHIR_UA2018',\n 'eea-urban-atlas~TR028L1_SANLIURFA_UA2018',\n 'eea-urban-atlas~TR029L1_KAHRAMANMARAS_UA2018',\n 'eea-urban-atlas~TR030L1_BATMAN_UA2018',\n 'eea-urban-atlas~TR031L1_SIVAS_UA2018',\n 'eea-urban-atlas~TR032L1_ELAZIG_UA2018',\n 'eea-urban-atlas~TR033L1_ISPARTA_UA2018',\n 'eea-urban-atlas~TR034L1_CORUM_UA2018',\n 'eea-urban-atlas~TR035L1_OSMANIYE_UA2018',\n 'eea-urban-atlas~TR036L1_AKSARAY_UA2018',\n 'eea-urban-atlas~TR037L1_AYDIN_UA2018',\n 'eea-urban-atlas~TR038L1_SIVEREK_UA2018',\n 'eea-urban-atlas~TR039L1_AFYONKARAHISAR_UA2018',\n 'eea-urban-atlas~TR040L1_ORDU_UA2018',\n 'eea-urban-atlas~TR041L1_NIGDE_UA2018',\n 'eea-urban-atlas~TR042L1_USAK_UA2018',\n 'eea-urban-atlas~TR043L1_AGRI_UA2018',\n 'eea-urban-atlas~TR044L1_KARAMAN_UA2018',\n 'eea-urban-atlas~TR045L1_YUMURTALIK_UA2018',\n 'eea-urban-atlas~TR046L1_RIZE_UA2018',\n 'eea-urban-atlas~TR047L1_ERGANI_UA2018',\n 'eea-urban-atlas~TR048L1_KUTAHYA_UA2018',\n 'eea-urban-atlas~TR049L1_KADIRLI_UA2018',\n 'eea-urban-atlas~TR050L1_KARABUK_UA2018',\n 'eea-urban-atlas~TR051L1_CANAKKALE_UA2018',\n 'eea-urban-atlas~TR052L1_AKCAKALE_UA2018',\n 'eea-urban-atlas~TR053L1_ERCIS_UA2018',\n 'eea-urban-atlas~TR054L1_EREGLI_UA2018',\n 'eea-urban-atlas~TR055L1_ADIYAMAN_UA2018',\n 'eea-urban-atlas~TR056L1_VIRANSEHIR_UA2018',\n 'eea-urban-atlas~TR057L1_FETHIYE_UA2018',\n 'eea-urban-atlas~TR058L1_CEYLANPINAR_UA2018',\n 'eea-urban-atlas~TR059L1_TOKAT_UA2018',\n 'eea-urban-atlas~TR060L1_PATNOS_UA2018',\n 'eea-urban-atlas~TR061L1_ODEMIS_UA2018',\n 'eea-urban-atlas~TR062L1_BOLU_UA2018',\n 'eea-urban-atlas~TR063L1_BANDIRMA_UA2018',\n 'eea-urban-atlas~TR064L1_MUS_UA2018',\n 'eea-urban-atlas~TR065L1_ELBISTAN_UA2018',\n 'eea-urban-atlas~TR066L1_NIZIP_UA2018',\n 'eea-urban-atlas~TR067L1_SURUC_UA2018',\n 'eea-urban-atlas~TR068L1_SALIHLI_UA2018',\n 'eea-urban-atlas~TR069L1_KILIS_UA2018',\n 'eea-urban-atlas~TR070L1_KIZILTEPE_UA2018',\n 'eea-urban-atlas~TR071L1_MIDYAT_UA2018',\n 'eea-urban-atlas~TR072L1_CIZRE_UA2018',\n 'eea-urban-atlas~TR073L1_CANKIRI_UA2018',\n 'eea-urban-atlas~TR074L1_BINGOL_UA2018',\n 'eea-urban-atlas~TR075L1_AKSEHIR_UA2018',\n 'eea-urban-atlas~TR076L1_POLATLI_UA2018',\n 'eea-urban-atlas~TR077L1_MANAVGAT_UA2018',\n 'eea-urban-atlas~TR078L1_YOZGAT_UA2018',\n 'eea-urban-atlas~TR079L1_ALASEHIR_UA2018',\n 'eea-urban-atlas~UK001L3_LONDON_UA2018',\n 'eea-urban-atlas~UK002L3_WEST_MIDLANDS_URBAN_AREA_UA2018',\n 'eea-urban-atlas~UK003L2_LEEDS_UA2018',\n 'eea-urban-atlas~UK004L1_GLASGOW_UA2018',\n 'eea-urban-atlas~UK006L3_LIVERPOOL_UA2018',\n 'eea-urban-atlas~UK007L1_EDINBURGH_UA2018',\n 'eea-urban-atlas~UK008L3_GREATER_MANCHESTER_UA2018',\n 'eea-urban-atlas~UK009L1_CARDIFF_UA2018',\n 'eea-urban-atlas~UK010L3_SHEFFIELD_UA2018',\n 'eea-urban-atlas~UK011L2_BRISTOL_UA2018',\n 'eea-urban-atlas~UK012L2_BELFAST_UA2018',\n 'eea-urban-atlas~UK013L2_NEWCASTLE_UPON_TYNE_UA2018',\n 'eea-urban-atlas~UK014L1_LEICESTER_UA2018',\n 'eea-urban-atlas~UK016L1_ABERDEEN_UA2018',\n 'eea-urban-atlas~UK017L2_CAMBRIDGE_UA2018',\n 'eea-urban-atlas~UK018L3_EXETER_UA2018',\n 'eea-urban-atlas~UK019L3_LINCOLN_UA2018',\n 'eea-urban-atlas~UK023L1_PORTSMOUTH_UA2018',\n 'eea-urban-atlas~UK024L1_WORCESTER_UA2018',\n 'eea-urban-atlas~UK025L3_COVENTRY_UA2018',\n 'eea-urban-atlas~UK026L1_KINGSTON_UPON_HULL_UA2018',\n 'eea-urban-atlas~UK027L1_STOKE_ON_TRENT_UA2018',\n 'eea-urban-atlas~UK029L1_NOTTINGHAM_UA2018',\n 'eea-urban-atlas~UK033L1_GUILDFORD_UA2018',\n 'eea-urban-atlas~UK050L1_BURNLEY_UA2018',\n 'eea-urban-atlas~UK056L1_HASTINGS_UA2018',\n 'eea-urban-atlas~UK515L1_BRIGHTON_AND_HOVE_UA2018',\n 'eea-urban-atlas~UK516L1_PLYMOUTH_UA2018',\n 'eea-urban-atlas~UK517L1_SWANSEA_UA2018',\n 'eea-urban-atlas~UK518L1_DERBY_UA2018',\n 'eea-urban-atlas~UK520L2_SOUTHAMPTON_UA2018',\n 'eea-urban-atlas~UK528L1_NORTHAMPTON_UA2018',\n 'eea-urban-atlas~UK539L1_BOURNEMOUTH_UA2018',\n 'eea-urban-atlas~UK546L1_COLCHESTER_UA2018',\n 'eea-urban-atlas~UK550L0_DUNDEE_CITY_UA2018',\n 'eea-urban-atlas~UK551L1_FALKIRK_UA2018',\n 'eea-urban-atlas~UK552L0_READING_UA2018',\n 'eea-urban-atlas~UK553L1_BLACKPOOL_UA2018',\n 'eea-urban-atlas~UK557L1_BLACKBURN_WITH_DARWEN_UA2018',\n 'eea-urban-atlas~UK558L1_NEWPORT_UA2018',\n 'eea-urban-atlas~UK559L2_MIDDLESBROUGH_UA2018',\n 'eea-urban-atlas~UK560L1_OXFORD_UA2018',\n 'eea-urban-atlas~UK562L2_PRESTON_UA2018',\n 'eea-urban-atlas~UK566L1_NORWICH_UA2018',\n 'eea-urban-atlas~UK568L1_CHESHIRE_WEST_AND_CHESTER_UA2018',\n 'eea-urban-atlas~UK569L2_IPSWICH_UA2018',\n 'eea-urban-atlas~UK571L1_CHELTENHAM_UA2018',\n 'eea-urban-atlas~XK001L1_PRISTINA_UA2018',\n 'eea-urban-atlas~XK002L1_PRIZREN_UA2018',\n 'eea-urban-atlas~XK003L1_MITROVICE_UA2018',\n 'eodash~E1',\n 'eodash~E10a10',\n 'eodash~E10a1_tri',\n 'eodash~E10a2_tri',\n 'eodash~E10a3_tri',\n 'eodash~E10a5',\n 'eodash~E10a6',\n 'eodash~E10a8',\n 'eodash~E10c_tri',\n 'eodash~E11',\n 'eodash~E12b',\n 'eodash~E13b',\n 'eodash~E13b_tri',\n 'eodash~E13c_tri',\n 'eodash~E13d',\n 'eodash~E13e',\n 'eodash~E13f',\n 'eodash~E13g',\n 'eodash~E13h',\n 'eodash~E13i',\n 'eodash~E13l',\n 'eodash~E13m',\n 'eodash~E13n',\n 'eodash~E1a_S2',\n 'eodash~E1_S2',\n 'eodash~E200',\n 'eodash~E2_S2',\n 'eodash~E4',\n 'eodash~E5',\n 'eodash~E8',\n 'eodash~E9_tri',\n 'eodash~Google_Mobility_Subregion1_Footprint',\n 'eodash~N1',\n 'eodash~N1a',\n 'eodash~N1b',\n 'eodash~N1c',\n 'eodash~N1d',\n 'eodash~N1_tri',\n 'eodash~N2_tri',\n 'eodash~N3',\n 'eodash~N3b_tri',\n 'eodash_stage~E1',\n 'eodash_stage~E1a',\n 'eodash_stage~E2',\n 'eodash_stage~E5',\n 'eodash_stage~test_accessi',\n 'geodb_06907e6f-803b-40c1-aa8c-8282f7e87d4d~reported',\n 'geodb_0b01bfcd-2d09-46f8-84e8-cb5720fba14c~delineated_parcels_s',\n 'geodb_0b01bfcd-2d09-46f8-84e8-cb5720fba14c~test_batic',\n 'geodb_0d6df427-8c09-41b9-abc9-64ce13a68125~land_use',\n 'geodb_0d6df427-8c09-41b9-abc9-64ce13a68125~lpis_aut',\n 'geodb_0e5d743f-2134-4561-8946-a073b039176f~ai4eo_bboxes',\n 'geodb_0e5d743f-2134-4561-8946-a073b039176f~ai4eo_reference',\n 'geodb_2cb121fa-cb11-49c5-99d8-7f0d8113656b~reported',\n 'geodb_5d712007-3a9e-47b3-bf93-16a6ee2e1cb8~land_use',\n 'geodb_a2b85af8-6b99-4fa2-acf6-e87d74e40431~gotland_blocks',\n 'geodb_a2b85af8-6b99-4fa2-acf6-e87d74e40431~osm_europe_roads',\n 'geodb_a2b85af8-6b99-4fa2-acf6-e87d74e40431~osm_europe_roads2',\n 'geodb_a659367d-04c2-44ff-8563-cb488da309e4~classification_at',\n 'geodb_a659367d-04c2-44ff-8563-cb488da309e4~lpis_at',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~AT_2021_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~BE_VLG_2021_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~BG_Coastal',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~deleteme',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~DE_LS_2021_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~DE_NRW_2021_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~DK_2019_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~EE_2021_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~ES_NA_2020_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~finnish_cities',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~FR_2018_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~HR_2020_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~land_use',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~land_use-scn-deletem',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~LT_2021_EC',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~LV_2021_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~NL_2021_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~PT_2021_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~RO_ny_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~SE_2021_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~SI_2021_EC21',\n 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~SK_2021_EC21',\n 'geodb_c8ce99d8-d1ac-426a-9de1-d37b2dcae792~reported',\n 'geodb_ciuser~land_use',\n 'geodb_d2c4722a-cc19-4ec1-b575-0cdb6876d4a7~demo_1',\n 'geodb_fd3df931-a78a-4ba9-b4d4-4da1606125fd~land_use',\n 'geodb_geodb_ci~land_use',\n 'hh_ger_stationdata_hu~hu_dauermessstation_hh',\n 'lpis_iacs~land_use_slo',\n 'lpis_iacs~lpis_aut',\n 'lpis_iacs~lpis_slo',\n 'lpis_iacs~metadata',\n 'madagascar_adm_boundaries~adm0',\n 'madagascar_adm_boundaries~adm1',\n 'madagascar_adm_boundaries~adm2',\n 'madagascar_adm_boundaries~adm3',\n 'madagascar_adm_boundaries~adm4',\n 'my-urban-eea-subset-db15~SI001L2_LJUBLJANA_UA2018',\n 'my-urban-eea-subset-db16~SI001L2_LJUBLJANA_UA2018',\n 'my-urban-eea-subset-db17~SI001L2_LJUBLJANA_UA2018',\n 'my-urban-eea-subset-db18~SI001L2_LJUBLJANA_UA2018',\n 'my-urban-eea-subset-db19~SI001L2_LJUBLJANA_UA2018',\n 'my-urban-eea-subset-db20~SI001L2_LJUBLJANA_UA2018',\n 'my-urban-eea-subset-db21~SI001L2_LJUBLJANA_UA2018',\n 'my-urban-eea-subset-db22~SI001L2_LJUBLJANA_UA2018',\n 'phi_week~alster',\n 'phi_week~gran_chaco',\n 'polar~polar_icebergs',\n 'polar~polar_icebergs_3413',\n 'polar~polar_sea',\n 'polar~polar_sea_3413',\n 'polar~polar_sea_ice',\n 'polar~polar_sea_ice_3413',\n 'public~land_use',\n 'stac_test~ge_train_tier_1_labels',\n 'stac_test~ge_train_tier_1_source',\n 'stac_test~ge_train_tier_2_labels',\n 'stac_test~ge_train_tier_2_source',\n 'stac_test~ties_ai_challenge_test',\n 'test_duplicate~test']" - }, - "execution_count": 123, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "connection.list_collection_ids()" ] @@ -174,26 +130,11 @@ }, { "cell_type": "code", - "execution_count": 124, - "metadata": { - "ExecuteTime": { - "end_time": "2023-08-17T12:48:52.488946500Z", - "start_time": "2023-08-17T12:48:20.281421800Z" - } - }, - "outputs": [ - { - "data": { - "text/plain": "{'stac_version': '1.0.0',\n 'stac_extensions': ['datacube',\n 'https://stac-extensions.github.io/version/v1.0.0/schema.json'],\n 'type': 'Collection',\n 'id': 'geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~AT_2021_EC21',\n 'title': 'AT_2021_EC21',\n 'description': 'No description available.',\n 'license': 'proprietary',\n 'keywords': [],\n 'providers': [],\n 'extent': {'spatial': {'bbox': [11.798036837663492,\n 44.90274572400593,\n 15.70642984808191,\n 50.04285399640161]},\n 'temporal': {'interval': [[None, None]]}},\n 'links': [{'rel': 'self',\n 'href': 'http://localhost:8080/collections/geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~AT_2021_EC21'},\n {'rel': 'root', 'href': 'http://localhost:8080/collections/'}],\n 'cube:dimensions': {'vector': {'type': 'geometry',\n 'axes': ['x', 'y'],\n 'bbox': '(11.798036837663492, 44.90274572400593, 15.70642984808191, 50.04285399640161)',\n 'geometry_types': ['POLYGON'],\n 'reference_system': '31287'}},\n 'summaries': [{'column_names': ['id',\n 'created_at',\n 'modified_at',\n 'geometry',\n 'fid',\n 'fs_kennung',\n 'snar_bezei',\n 'sl_flaeche',\n 'geo_id',\n 'inspire_id',\n 'gml_id',\n 'gml_identi',\n 'snar_code',\n 'geo_part_k',\n 'log_pkey',\n 'geom_date_',\n 'fart_id',\n 'geo_type',\n 'gml_length',\n 'ec_trans_n',\n 'ec_hcat_n',\n 'ec_hcat_c']}]}", - "text/html": "\n \n \n \n \n " - }, - "execution_count": 124, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ - "connection.describe_collection('geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~AT_2021_EC21')" + "connection.describe_collection('stac_test~_train_tier_1_source')" ] }, { @@ -209,9 +150,26 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 19, + "metadata": { + "ExecuteTime": { + "end_time": "2023-11-16T14:38:47.322883200Z", + "start_time": "2023-11-16T14:38:47.248577100Z" + } + }, + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'print_endpoint' is not defined", + "output_type": "error", + "traceback": [ + "\u001B[1;31m---------------------------------------------------------------------------\u001B[0m", + "\u001B[1;31mNameError\u001B[0m Traceback (most recent call last)", + "Cell \u001B[1;32mIn[19], line 1\u001B[0m\n\u001B[1;32m----> 1\u001B[0m \u001B[43mprint_endpoint\u001B[49m(\u001B[38;5;124mf\u001B[39m\u001B[38;5;124m'\u001B[39m\u001B[38;5;132;01m{\u001B[39;00mbase_url\u001B[38;5;132;01m}\u001B[39;00m\u001B[38;5;124m/processes\u001B[39m\u001B[38;5;124m'\u001B[39m)\n", + "\u001B[1;31mNameError\u001B[0m: name 'print_endpoint' is not defined" + ] + } + ], "source": [ "print_endpoint(f'{base_url}/processes')" ] @@ -226,30 +184,69 @@ }, { "cell_type": "code", - "execution_count": 71, + "execution_count": 28, "outputs": [], "source": [ - "a = connection.load_collection('anja~E4_RACE_INDICATORS')" + "collection = connection.load_collection('openeo~hamburg')\n", + "collection_agg = collection.aggregate_temporal()" ], "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2023-08-16T13:26:04.785211Z", - "start_time": "2023-08-16T13:25:57.138856200Z" + "end_time": "2023-11-16T14:45:55.733058500Z", + "start_time": "2023-11-16T14:45:47.905301900Z" } } }, { "cell_type": "code", - "execution_count": 72, + "execution_count": 29, "outputs": [ { - "data": { - "text/plain": "b'{\"type\": \"FeatureCollection\", \"features\": [{\"type\": \"Feature\", \"id\": \"1\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [8.885851, 44.408142]}, \"properties\": {\"created_at\": \"2020-05-13T08:26:13.740673+00:00\", \"modified_at\": null, \"aoi\": \"44.408142, 8.885851\", \"country\": \"IT\", \"region (optional)\": \"/\", \"city\": \"Genoa\", \"site name\": \"Port of Genova and surrounding industrial areas\", \"description\": \"industrial activity\", \"method\": \"object detection on VHR data\", \"eo sensor\": \"Pleiades\", \"input data\": \"[NEW] Pleiades COVID-19\", \"indicator code\": \"E4\", \"time [yyyy/mm/ddthh:mm:ss]\": \"2019-04-30T10:33:52\", \"measurement value [float]\": 108, \"reference description\": \"Full occupancy of the parking area\", \"reference time [yyyy/mm/ddthh:mm:ss]\": \"/\", \"reference value [float]\": 160, \"rule\": \"X is the measuremetn value. If X<20% of the absolute of reference OFF, X>20% on\", \"indicator value\": \"on\", \"sub-aoi\": \"[ [ 8.769501070372375, 44.426831629252561 ], [ 8.771405470894988, 44.426603976776292 ], [ 8.771160306689779, 44.425448202666018 ], [ 8.769864438747954, 44.425618942023213 ], [ 8.76965429800063, 44.425780925515944 ], [ 8.769522960033553, 44.425929775211962 ], [ 8.769540471762497, 44.426026089721155 ], [ 8.769317197218466, 44.426275631858601 ], [ 8.769413511727656, 44.42675282647231 ], [ 8.769501070372375, 44.426831629252561 ] ]\", \"STAC\": {\"bbox\": [\"8.8859\", \"44.4081\", \"8.8859\", \"44.4081\"], \"stac_version\": \"1.0.0\", \"stac_extensions\": [\"datacube\", \"https://stac-extensions.github.io/version/v1.0.0/schema.json\"], \"type\": \"Feature\"}}}, {\"type\": \"Feature\", \"id\": \"2\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [8.885851, 44.408142]}, \"properties\": {\"created_at\": \"2020-05-13T08:26:13.740673+00:00\", \"modified_at\": null, \"aoi\": \"44.408142, 8.885851\", \"country\": \"IT\", \"region (optional)\": \"/\", \"city\": \"Genoa\", \"site name\": \"Port of Genova and surrounding industrial areas\", \"description\": \"industrial activity\", \"method\": \"object detection on VHR data\", \"eo sensor\": \"Pleiades\", \"input data\": \"[NEW] Pleiades COVID-19\", \"indicator code\": \"E4\", \"time [yyyy/mm/ddthh:mm:ss]\": \"2020-02-22T10:41:31\", \"measurement value [float]\": 23, \"reference description\": \"Full occupancy of the parking area\", \"reference time [yyyy/mm/ddthh:mm:ss]\": \"/\", \"reference value [float]\": 160, \"rule\": \"X is the measuremetn value. If X<20% of the absolute of reference OFF, X>20% on\", \"indicator value\": \"off\", \"sub-aoi\": \"[ [ 8.769501070372375, 44.426831629252561 ], [ 8.771405470894988, 44.426603976776292 ], [ 8.771160306689779, 44.425448202666018 ], [ 8.769864438747954, 44.425618942023213 ], [ 8.76965429800063, 44.425780925515944 ], [ 8.769522960033553, 44.425929775211962 ], [ 8.769540471762497, 44.426026089721155 ], [ 8.769317197218466, 44.426275631858601 ], [ 8.769413511727656, 44.42675282647231 ], [ 8.769501070372375, 44.426831629252561 ] ]\", \"STAC\": {\"bbox\": [\"8.8859\", \"44.4081\", \"8.8859\", \"44.4081\"], \"stac_version\": \"1.0.0\", \"stac_extensions\": [\"datacube\", \"https://stac-extensions.github.io/version/v1.0.0/schema.json\"], \"type\": \"Feature\"}}}, {\"type\": \"Feature\", \"id\": \"3\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [8.885851, 44.408142]}, \"properties\": {\"created_at\": \"2020-05-13T08:26:13.740673+00:00\", \"modified_at\": null, \"aoi\": \"44.408142, 8.885851\", \"country\": \"IT\", \"region (optional)\": \"/\", \"city\": \"Genoa\", \"site name\": \"Port of Genova and surrounding industrial areas\", \"description\": \"industrial activity\", \"method\": \"object detection on VHR data\", \"eo sensor\": \"Pleiades\", \"input data\": \"[NEW] Pleiades COVID-19\", \"indicator code\": \"E4\", \"time [yyyy/mm/ddthh:mm:ss]\": \"2020-03-21T10:26:47\", \"measurement value [float]\": 18, \"reference description\": \"Full occupancy of the parking area\", \"reference time [yyyy/mm/ddthh:mm:ss]\": \"/\", \"reference value [float]\": 160, \"rule\": \"X is the measuremetn value. If X<20% of the absolute of reference OFF, X>20% on\", \"indicator value\": \"off\", \"sub-aoi\": \"[ [ 8.769501070372375, 44.426831629252561 ], [ 8.771405470894988, 44.426603976776292 ], [ 8.771160306689779, 44.425448202666018 ], [ 8.769864438747954, 44.425618942023213 ], [ 8.76965429800063, 44.425780925515944 ], [ 8.769522960033553, 44.425929775211962 ], [ 8.769540471762497, 44.426026089721155 ], [ 8.769317197218466, 44.426275631858601 ], [ 8.769413511727656, 44.42675282647231 ], [ 8.769501070372375, 44.426831629252561 ] ]\", \"STAC\": {\"bbox\": [\"8.8859\", \"44.4081\", \"8.8859\", \"44.4081\"], \"stac_version\": \"1.0.0\", \"stac_extensions\": [\"datacube\", \"https://stac-extensions.github.io/version/v1.0.0/schema.json\"], \"type\": \"Feature\"}}}, {\"type\": \"Feature\", \"id\": \"4\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [9.944467, 53.532123]}, \"properties\": {\"created_at\": \"2020-05-13T08:26:13.740673+00:00\", \"modified_at\": null, \"aoi\": \"53.532123, 9.944467\", \"country\": \"DE\", \"region (optional)\": \"/\", \"city\": \"Hamburg\", \"site name\": \"Port of Hamburg\", \"description\": \"Port and industrial area\", \"method\": \"object detection on VHR data\", \"eo sensor\": \"Pleiades\", \"input data\": \"[NEW] Pleiades COVID-20\", \"indicator code\": \"E4\", \"time [yyyy/mm/ddthh:mm:ss]\": \"2020-03-24T10:49:25\", \"measurement value [float]\": 331, \"reference description\": \"Full occupancy of the parking area\", \"reference time [yyyy/mm/ddthh:mm:ss]\": \"/\", \"reference value [float]\": 800, \"rule\": \"X is the measuremetn value. If X<20% of the absolute of reference OFF, X>20% on\", \"indicator value\": \"on\", \"sub-aoi\": \"[ [ 9.919157310812254, 53.498024928776665 ], [ 9.91951518410332, 53.508067748007193 ], [ 9.921080879751731, 53.510505759802577 ], [ 9.926202941230107, 53.509342671606611 ], [ 9.928864623832407, 53.507776975958201 ], [ 9.929714572898687, 53.497376283436608 ], [ 9.919582285345394, 53.497689422566289 ], [ 9.919157310812254, 53.498024928776665 ] ]\", \"STAC\": {\"bbox\": [\"9.9445\", \"53.5321\", \"9.9445\", \"53.5321\"], \"stac_version\": \"1.0.0\", \"stac_extensions\": [\"datacube\", \"https://stac-extensions.github.io/version/v1.0.0/schema.json\"], \"type\": \"Feature\"}}}, {\"type\": \"Feature\", \"id\": \"5\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [9.944467, 53.532123]}, \"properties\": {\"created_at\": \"2020-05-13T08:26:13.740673+00:00\", \"modified_at\": null, \"aoi\": \"53.532123, 9.944467\", \"country\": \"DE\", \"region (optional)\": \"/\", \"city\": \"Hamburg\", \"site name\": \"Port of Hamburg\", \"description\": \"Port and industrial area\", \"method\": \"object detection on VHR data\", \"eo sensor\": \"Pleiades\", \"input data\": \"[NEW] Pleiades - 2.8m COVID-20\", \"indicator code\": \"E4\", \"time [yyyy/mm/ddthh:mm:ss]\": \"2020-02-05T10:20:06 \", \"measurement value [float]\": 353, \"reference description\": \"Full occupancy of the parking area\", \"reference time [yyyy/mm/ddthh:mm:ss]\": \"/\", \"reference value [float]\": 800, \"rule\": \"X is the measuremetn value. If X<20% of the absolute of reference OFF, X>20% on\", \"indicator value\": \"on\", \"sub-aoi\": \"[ [ 9.919157310812254, 53.498024928776665 ], [ 9.91951518410332, 53.508067748007193 ], [ 9.921080879751731, 53.510505759802577 ], [ 9.926202941230107, 53.509342671606611 ], [ 9.928864623832407, 53.507776975958201 ], [ 9.929714572898687, 53.497376283436608 ], [ 9.919582285345394, 53.497689422566289 ], [ 9.919157310812254, 53.498024928776665 ] ]\", \"STAC\": {\"bbox\": [\"9.9445\", \"53.5321\", \"9.9445\", \"53.5321\"], \"stac_version\": \"1.0.0\", \"stac_extensions\": [\"datacube\", \"https://stac-extensions.github.io/version/v1.0.0/schema.json\"], \"type\": \"Feature\"}}}, {\"type\": \"Feature\", \"id\": \"6\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [8.885851, 44.408142]}, \"properties\": {\"created_at\": \"2020-05-15T10:12:46.648096+00:00\", \"modified_at\": null, \"aoi\": \"44.408142, 8.885851\", \"country\": \"IT\", \"region (optional)\": \"/\", \"city\": \"Genoa\", \"site name\": \"Port of Genova and surrounding industrial areas\", \"description\": \"industrial activity\", \"method\": \"object detection on VHR data\", \"eo sensor\": \"Pleiades\", \"input data\": \"[NEW] Pleiades COVID-19\", \"indicator code\": \"E4\", \"time [yyyy/mm/ddthh:mm:ss]\": \"2019-04-30T10:33:52\", \"measurement value [float]\": 108, \"reference description\": \"Full occupancy of the parking area\", \"reference time [yyyy/mm/ddthh:mm:ss]\": \"/\", \"reference value [float]\": 160, \"rule\": \"X is the measuremetn value. If X<20% of the absolute of reference OFF, X>20% on\", \"indicator value\": \"on\", \"sub-aoi\": \"[ [ 8.769501070372375, 44.426831629252561 ], [ 8.771405470894988, 44.426603976776292 ], [ 8.771160306689779, 44.425448202666018 ], [ 8.769864438747954, 44.425618942023213 ], [ 8.76965429800063, 44.425780925515944 ], [ 8.769522960033553, 44.425929775211962 ], [ 8.769540471762497, 44.426026089721155 ], [ 8.769317197218466, 44.426275631858601 ], [ 8.769413511727656, 44.42675282647231 ], [ 8.769501070372375, 44.426831629252561 ] ]\", \"STAC\": {\"bbox\": [\"8.8859\", \"44.4081\", \"8.8859\", \"44.4081\"], \"stac_version\": \"1.0.0\", \"stac_extensions\": [\"datacube\", \"https://stac-extensions.github.io/version/v1.0.0/schema.json\"], \"type\": \"Feature\"}}}, {\"type\": \"Feature\", \"id\": \"7\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [8.885851, 44.408142]}, \"properties\": {\"created_at\": \"2020-05-15T10:12:46.648096+00:00\", \"modified_at\": null, \"aoi\": \"44.408142, 8.885851\", \"country\": \"IT\", \"region (optional)\": \"/\", \"city\": \"Genoa\", \"site name\": \"Port of Genova and surrounding industrial areas\", \"description\": \"industrial activity\", \"method\": \"object detection on VHR data\", \"eo sensor\": \"Pleiades\", \"input data\": \"[NEW] Pleiades COVID-19\", \"indicator code\": \"E4\", \"time [yyyy/mm/ddthh:mm:ss]\": \"2020-02-22T10:41:31\", \"measurement value [float]\": 23, \"reference description\": \"Full occupancy of the parking area\", \"reference time [yyyy/mm/ddthh:mm:ss]\": \"/\", \"reference value [float]\": 160, \"rule\": \"X is the measuremetn value. If X<20% of the absolute of reference OFF, X>20% on\", \"indicator value\": \"off\", \"sub-aoi\": \"[ [ 8.769501070372375, 44.426831629252561 ], [ 8.771405470894988, 44.426603976776292 ], [ 8.771160306689779, 44.425448202666018 ], [ 8.769864438747954, 44.425618942023213 ], [ 8.76965429800063, 44.425780925515944 ], [ 8.769522960033553, 44.425929775211962 ], [ 8.769540471762497, 44.426026089721155 ], [ 8.769317197218466, 44.426275631858601 ], [ 8.769413511727656, 44.42675282647231 ], [ 8.769501070372375, 44.426831629252561 ] ]\", \"STAC\": {\"bbox\": [\"8.8859\", \"44.4081\", \"8.8859\", \"44.4081\"], \"stac_version\": \"1.0.0\", \"stac_extensions\": [\"datacube\", \"https://stac-extensions.github.io/version/v1.0.0/schema.json\"], \"type\": \"Feature\"}}}, {\"type\": \"Feature\", \"id\": \"8\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [8.885851, 44.408142]}, \"properties\": {\"created_at\": \"2020-05-15T10:12:46.648096+00:00\", \"modified_at\": null, \"aoi\": \"44.408142, 8.885851\", \"country\": \"IT\", \"region (optional)\": \"/\", \"city\": \"Genoa\", \"site name\": \"Port of Genova and surrounding industrial areas\", \"description\": \"industrial activity\", \"method\": \"object detection on VHR data\", \"eo sensor\": \"Pleiades\", \"input data\": \"[NEW] Pleiades COVID-19\", \"indicator code\": \"E4\", \"time [yyyy/mm/ddthh:mm:ss]\": \"2020-03-21T10:26:47\", \"measurement value [float]\": 18, \"reference description\": \"Full occupancy of the parking area\", \"reference time [yyyy/mm/ddthh:mm:ss]\": \"/\", \"reference value [float]\": 160, \"rule\": \"X is the measuremetn value. If X<20% of the absolute of reference OFF, X>20% on\", \"indicator value\": \"off\", \"sub-aoi\": \"[ [ 8.769501070372375, 44.426831629252561 ], [ 8.771405470894988, 44.426603976776292 ], [ 8.771160306689779, 44.425448202666018 ], [ 8.769864438747954, 44.425618942023213 ], [ 8.76965429800063, 44.425780925515944 ], [ 8.769522960033553, 44.425929775211962 ], [ 8.769540471762497, 44.426026089721155 ], [ 8.769317197218466, 44.426275631858601 ], [ 8.769413511727656, 44.42675282647231 ], [ 8.769501070372375, 44.426831629252561 ] ]\", \"STAC\": {\"bbox\": [\"8.8859\", \"44.4081\", \"8.8859\", \"44.4081\"], \"stac_version\": \"1.0.0\", \"stac_extensions\": [\"datacube\", \"https://stac-extensions.github.io/version/v1.0.0/schema.json\"], \"type\": \"Feature\"}}}, {\"type\": \"Feature\", \"id\": \"9\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [9.944467, 53.532123]}, \"properties\": {\"created_at\": \"2020-05-15T10:12:46.648096+00:00\", \"modified_at\": null, \"aoi\": \"53.532123, 9.944467\", \"country\": \"DE\", \"region (optional)\": \"/\", \"city\": \"Hamburg\", \"site name\": \"Port of Hamburg\", \"description\": \"Port and industrial area\", \"method\": \"object detection on VHR data\", \"eo sensor\": \"Pleiades\", \"input data\": \"[NEW] Pleiades COVID-20\", \"indicator code\": \"E4\", \"time [yyyy/mm/ddthh:mm:ss]\": \"2020-03-24T10:49:25\", \"measurement value [float]\": 331, \"reference description\": \"Full occupancy of the parking area\", \"reference time [yyyy/mm/ddthh:mm:ss]\": \"/\", \"reference value [float]\": 800, \"rule\": \"X is the measuremetn value. If X<20% of the absolute of reference OFF, X>20% on\", \"indicator value\": \"on\", \"sub-aoi\": \"[ [ 9.919157310812254, 53.498024928776665 ], [ 9.91951518410332, 53.508067748007193 ], [ 9.921080879751731, 53.510505759802577 ], [ 9.926202941230107, 53.509342671606611 ], [ 9.928864623832407, 53.507776975958201 ], [ 9.929714572898687, 53.497376283436608 ], [ 9.919582285345394, 53.497689422566289 ], [ 9.919157310812254, 53.498024928776665 ] ]\", \"STAC\": {\"bbox\": [\"9.9445\", \"53.5321\", \"9.9445\", \"53.5321\"], \"stac_version\": \"1.0.0\", \"stac_extensions\": [\"datacube\", \"https://stac-extensions.github.io/version/v1.0.0/schema.json\"], \"type\": \"Feature\"}}}, {\"type\": \"Feature\", \"id\": \"10\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [9.944467, 53.532123]}, \"properties\": {\"created_at\": \"2020-05-15T10:12:46.648096+00:00\", \"modified_at\": null, \"aoi\": \"53.532123, 9.944467\", \"country\": \"DE\", \"region (optional)\": \"/\", \"city\": \"Hamburg\", \"site name\": \"Port of Hamburg\", \"description\": \"Port and industrial area\", \"method\": \"object detection on VHR data\", \"eo sensor\": \"Pleiades\", \"input data\": \"[NEW] Pleiades - 2.8m COVID-20\", \"indicator code\": \"E4\", \"time [yyyy/mm/ddthh:mm:ss]\": \"2020-02-05T10:20:06 \", \"measurement value [float]\": 353, \"reference description\": \"Full occupancy of the parking area\", \"reference time [yyyy/mm/ddthh:mm:ss]\": \"/\", \"reference value [float]\": 800, \"rule\": \"X is the measuremetn value. If X<20% of the absolute of reference OFF, X>20% on\", \"indicator value\": \"on\", \"sub-aoi\": \"[ [ 9.919157310812254, 53.498024928776665 ], [ 9.91951518410332, 53.508067748007193 ], [ 9.921080879751731, 53.510505759802577 ], [ 9.926202941230107, 53.509342671606611 ], [ 9.928864623832407, 53.507776975958201 ], [ 9.929714572898687, 53.497376283436608 ], [ 9.919582285345394, 53.497689422566289 ], [ 9.919157310812254, 53.498024928776665 ] ]\", \"STAC\": {\"bbox\": [\"9.9445\", \"53.5321\", \"9.9445\", \"53.5321\"], \"stac_version\": \"1.0.0\", \"stac_extensions\": [\"datacube\", \"https://stac-extensions.github.io/version/v1.0.0/schema.json\"], \"type\": \"Feature\"}}}]}'" - }, - "execution_count": 72, - "metadata": {}, - "output_type": "execute_result" + "ename": "ConnectionError", + "evalue": "('Connection aborted.', ConnectionResetError(10054, 'Eine vorhandene Verbindung wurde vom Remotehost geschlossen', None, 10054, None))", + "output_type": "error", + "traceback": [ + "\u001B[1;31m---------------------------------------------------------------------------\u001B[0m", + "\u001B[1;31mConnectionResetError\u001B[0m Traceback (most recent call last)", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:703\u001B[0m, in \u001B[0;36mHTTPConnectionPool.urlopen\u001B[1;34m(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)\u001B[0m\n\u001B[0;32m 702\u001B[0m \u001B[38;5;66;03m# Make the request on the httplib connection object.\u001B[39;00m\n\u001B[1;32m--> 703\u001B[0m httplib_response \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_make_request\u001B[49m\u001B[43m(\u001B[49m\n\u001B[0;32m 704\u001B[0m \u001B[43m \u001B[49m\u001B[43mconn\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 705\u001B[0m \u001B[43m \u001B[49m\u001B[43mmethod\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 706\u001B[0m \u001B[43m \u001B[49m\u001B[43murl\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 707\u001B[0m \u001B[43m \u001B[49m\u001B[43mtimeout\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mtimeout_obj\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 708\u001B[0m \u001B[43m \u001B[49m\u001B[43mbody\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mbody\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 709\u001B[0m \u001B[43m \u001B[49m\u001B[43mheaders\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mheaders\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 710\u001B[0m \u001B[43m \u001B[49m\u001B[43mchunked\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mchunked\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 711\u001B[0m \u001B[43m\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 713\u001B[0m \u001B[38;5;66;03m# If we're going to release the connection in ``finally:``, then\u001B[39;00m\n\u001B[0;32m 714\u001B[0m \u001B[38;5;66;03m# the response doesn't need to know about the connection. Otherwise\u001B[39;00m\n\u001B[0;32m 715\u001B[0m \u001B[38;5;66;03m# it will also try to release it and we'll have a double-release\u001B[39;00m\n\u001B[0;32m 716\u001B[0m \u001B[38;5;66;03m# mess.\u001B[39;00m\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:449\u001B[0m, in \u001B[0;36mHTTPConnectionPool._make_request\u001B[1;34m(self, conn, method, url, timeout, chunked, **httplib_request_kw)\u001B[0m\n\u001B[0;32m 445\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mBaseException\u001B[39;00m \u001B[38;5;28;01mas\u001B[39;00m e:\n\u001B[0;32m 446\u001B[0m \u001B[38;5;66;03m# Remove the TypeError from the exception chain in\u001B[39;00m\n\u001B[0;32m 447\u001B[0m \u001B[38;5;66;03m# Python 3 (including for exceptions like SystemExit).\u001B[39;00m\n\u001B[0;32m 448\u001B[0m \u001B[38;5;66;03m# Otherwise it looks like a bug in the code.\u001B[39;00m\n\u001B[1;32m--> 449\u001B[0m \u001B[43msix\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mraise_from\u001B[49m\u001B[43m(\u001B[49m\u001B[43me\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;28;43;01mNone\u001B[39;49;00m\u001B[43m)\u001B[49m\n\u001B[0;32m 450\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m (SocketTimeout, BaseSSLError, SocketError) \u001B[38;5;28;01mas\u001B[39;00m e:\n", + "File \u001B[1;32m:3\u001B[0m, in \u001B[0;36mraise_from\u001B[1;34m(value, from_value)\u001B[0m\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:444\u001B[0m, in \u001B[0;36mHTTPConnectionPool._make_request\u001B[1;34m(self, conn, method, url, timeout, chunked, **httplib_request_kw)\u001B[0m\n\u001B[0;32m 443\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[1;32m--> 444\u001B[0m httplib_response \u001B[38;5;241m=\u001B[39m \u001B[43mconn\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mgetresponse\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 445\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mBaseException\u001B[39;00m \u001B[38;5;28;01mas\u001B[39;00m e:\n\u001B[0;32m 446\u001B[0m \u001B[38;5;66;03m# Remove the TypeError from the exception chain in\u001B[39;00m\n\u001B[0;32m 447\u001B[0m \u001B[38;5;66;03m# Python 3 (including for exceptions like SystemExit).\u001B[39;00m\n\u001B[0;32m 448\u001B[0m \u001B[38;5;66;03m# Otherwise it looks like a bug in the code.\u001B[39;00m\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\http\\client.py:1377\u001B[0m, in \u001B[0;36mHTTPConnection.getresponse\u001B[1;34m(self)\u001B[0m\n\u001B[0;32m 1376\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[1;32m-> 1377\u001B[0m \u001B[43mresponse\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mbegin\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 1378\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mConnectionError\u001B[39;00m:\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\http\\client.py:320\u001B[0m, in \u001B[0;36mHTTPResponse.begin\u001B[1;34m(self)\u001B[0m\n\u001B[0;32m 319\u001B[0m \u001B[38;5;28;01mwhile\u001B[39;00m \u001B[38;5;28;01mTrue\u001B[39;00m:\n\u001B[1;32m--> 320\u001B[0m version, status, reason \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_read_status\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 321\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m status \u001B[38;5;241m!=\u001B[39m CONTINUE:\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\http\\client.py:281\u001B[0m, in \u001B[0;36mHTTPResponse._read_status\u001B[1;34m(self)\u001B[0m\n\u001B[0;32m 280\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m \u001B[38;5;21m_read_status\u001B[39m(\u001B[38;5;28mself\u001B[39m):\n\u001B[1;32m--> 281\u001B[0m line \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mstr\u001B[39m(\u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mfp\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mreadline\u001B[49m\u001B[43m(\u001B[49m\u001B[43m_MAXLINE\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;241;43m+\u001B[39;49m\u001B[43m \u001B[49m\u001B[38;5;241;43m1\u001B[39;49m\u001B[43m)\u001B[49m, \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124miso-8859-1\u001B[39m\u001B[38;5;124m\"\u001B[39m)\n\u001B[0;32m 282\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m \u001B[38;5;28mlen\u001B[39m(line) \u001B[38;5;241m>\u001B[39m _MAXLINE:\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\socket.py:704\u001B[0m, in \u001B[0;36mSocketIO.readinto\u001B[1;34m(self, b)\u001B[0m\n\u001B[0;32m 703\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[1;32m--> 704\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_sock\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mrecv_into\u001B[49m\u001B[43m(\u001B[49m\u001B[43mb\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 705\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m timeout:\n", + "\u001B[1;31mConnectionResetError\u001B[0m: [WinError 10054] Eine vorhandene Verbindung wurde vom Remotehost geschlossen", + "\nDuring handling of the above exception, another exception occurred:\n", + "\u001B[1;31mProtocolError\u001B[0m Traceback (most recent call last)", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\requests\\adapters.py:486\u001B[0m, in \u001B[0;36mHTTPAdapter.send\u001B[1;34m(self, request, stream, timeout, verify, cert, proxies)\u001B[0m\n\u001B[0;32m 485\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[1;32m--> 486\u001B[0m resp \u001B[38;5;241m=\u001B[39m \u001B[43mconn\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43murlopen\u001B[49m\u001B[43m(\u001B[49m\n\u001B[0;32m 487\u001B[0m \u001B[43m \u001B[49m\u001B[43mmethod\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mrequest\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mmethod\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 488\u001B[0m \u001B[43m \u001B[49m\u001B[43murl\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43murl\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 489\u001B[0m \u001B[43m \u001B[49m\u001B[43mbody\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mrequest\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mbody\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 490\u001B[0m \u001B[43m \u001B[49m\u001B[43mheaders\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mrequest\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mheaders\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 491\u001B[0m \u001B[43m \u001B[49m\u001B[43mredirect\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;28;43;01mFalse\u001B[39;49;00m\u001B[43m,\u001B[49m\n\u001B[0;32m 492\u001B[0m \u001B[43m \u001B[49m\u001B[43massert_same_host\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;28;43;01mFalse\u001B[39;49;00m\u001B[43m,\u001B[49m\n\u001B[0;32m 493\u001B[0m \u001B[43m \u001B[49m\u001B[43mpreload_content\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;28;43;01mFalse\u001B[39;49;00m\u001B[43m,\u001B[49m\n\u001B[0;32m 494\u001B[0m \u001B[43m \u001B[49m\u001B[43mdecode_content\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;28;43;01mFalse\u001B[39;49;00m\u001B[43m,\u001B[49m\n\u001B[0;32m 495\u001B[0m \u001B[43m \u001B[49m\u001B[43mretries\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mmax_retries\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 496\u001B[0m \u001B[43m \u001B[49m\u001B[43mtimeout\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mtimeout\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 497\u001B[0m \u001B[43m \u001B[49m\u001B[43mchunked\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mchunked\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 498\u001B[0m \u001B[43m \u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 500\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m (ProtocolError, \u001B[38;5;167;01mOSError\u001B[39;00m) \u001B[38;5;28;01mas\u001B[39;00m err:\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:787\u001B[0m, in \u001B[0;36mHTTPConnectionPool.urlopen\u001B[1;34m(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)\u001B[0m\n\u001B[0;32m 785\u001B[0m e \u001B[38;5;241m=\u001B[39m ProtocolError(\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mConnection aborted.\u001B[39m\u001B[38;5;124m\"\u001B[39m, e)\n\u001B[1;32m--> 787\u001B[0m retries \u001B[38;5;241m=\u001B[39m \u001B[43mretries\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mincrement\u001B[49m\u001B[43m(\u001B[49m\n\u001B[0;32m 788\u001B[0m \u001B[43m \u001B[49m\u001B[43mmethod\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43murl\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43merror\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43me\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43m_pool\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;28;43mself\u001B[39;49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43m_stacktrace\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43msys\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mexc_info\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\u001B[43m[\u001B[49m\u001B[38;5;241;43m2\u001B[39;49m\u001B[43m]\u001B[49m\n\u001B[0;32m 789\u001B[0m \u001B[43m\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 790\u001B[0m retries\u001B[38;5;241m.\u001B[39msleep()\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\util\\retry.py:550\u001B[0m, in \u001B[0;36mRetry.increment\u001B[1;34m(self, method, url, response, error, _pool, _stacktrace)\u001B[0m\n\u001B[0;32m 549\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m read \u001B[38;5;129;01mis\u001B[39;00m \u001B[38;5;28;01mFalse\u001B[39;00m \u001B[38;5;129;01mor\u001B[39;00m \u001B[38;5;129;01mnot\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_is_method_retryable(method):\n\u001B[1;32m--> 550\u001B[0m \u001B[38;5;28;01mraise\u001B[39;00m \u001B[43msix\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mreraise\u001B[49m\u001B[43m(\u001B[49m\u001B[38;5;28;43mtype\u001B[39;49m\u001B[43m(\u001B[49m\u001B[43merror\u001B[49m\u001B[43m)\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43merror\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43m_stacktrace\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 551\u001B[0m \u001B[38;5;28;01melif\u001B[39;00m read \u001B[38;5;129;01mis\u001B[39;00m \u001B[38;5;129;01mnot\u001B[39;00m \u001B[38;5;28;01mNone\u001B[39;00m:\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\packages\\six.py:769\u001B[0m, in \u001B[0;36mreraise\u001B[1;34m(tp, value, tb)\u001B[0m\n\u001B[0;32m 768\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m value\u001B[38;5;241m.\u001B[39m__traceback__ \u001B[38;5;129;01mis\u001B[39;00m \u001B[38;5;129;01mnot\u001B[39;00m tb:\n\u001B[1;32m--> 769\u001B[0m \u001B[38;5;28;01mraise\u001B[39;00m value\u001B[38;5;241m.\u001B[39mwith_traceback(tb)\n\u001B[0;32m 770\u001B[0m \u001B[38;5;28;01mraise\u001B[39;00m value\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:703\u001B[0m, in \u001B[0;36mHTTPConnectionPool.urlopen\u001B[1;34m(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)\u001B[0m\n\u001B[0;32m 702\u001B[0m \u001B[38;5;66;03m# Make the request on the httplib connection object.\u001B[39;00m\n\u001B[1;32m--> 703\u001B[0m httplib_response \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_make_request\u001B[49m\u001B[43m(\u001B[49m\n\u001B[0;32m 704\u001B[0m \u001B[43m \u001B[49m\u001B[43mconn\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 705\u001B[0m \u001B[43m \u001B[49m\u001B[43mmethod\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 706\u001B[0m \u001B[43m \u001B[49m\u001B[43murl\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 707\u001B[0m \u001B[43m \u001B[49m\u001B[43mtimeout\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mtimeout_obj\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 708\u001B[0m \u001B[43m \u001B[49m\u001B[43mbody\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mbody\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 709\u001B[0m \u001B[43m \u001B[49m\u001B[43mheaders\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mheaders\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 710\u001B[0m \u001B[43m \u001B[49m\u001B[43mchunked\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mchunked\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 711\u001B[0m \u001B[43m\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 713\u001B[0m \u001B[38;5;66;03m# If we're going to release the connection in ``finally:``, then\u001B[39;00m\n\u001B[0;32m 714\u001B[0m \u001B[38;5;66;03m# the response doesn't need to know about the connection. Otherwise\u001B[39;00m\n\u001B[0;32m 715\u001B[0m \u001B[38;5;66;03m# it will also try to release it and we'll have a double-release\u001B[39;00m\n\u001B[0;32m 716\u001B[0m \u001B[38;5;66;03m# mess.\u001B[39;00m\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:449\u001B[0m, in \u001B[0;36mHTTPConnectionPool._make_request\u001B[1;34m(self, conn, method, url, timeout, chunked, **httplib_request_kw)\u001B[0m\n\u001B[0;32m 445\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mBaseException\u001B[39;00m \u001B[38;5;28;01mas\u001B[39;00m e:\n\u001B[0;32m 446\u001B[0m \u001B[38;5;66;03m# Remove the TypeError from the exception chain in\u001B[39;00m\n\u001B[0;32m 447\u001B[0m \u001B[38;5;66;03m# Python 3 (including for exceptions like SystemExit).\u001B[39;00m\n\u001B[0;32m 448\u001B[0m \u001B[38;5;66;03m# Otherwise it looks like a bug in the code.\u001B[39;00m\n\u001B[1;32m--> 449\u001B[0m \u001B[43msix\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mraise_from\u001B[49m\u001B[43m(\u001B[49m\u001B[43me\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;28;43;01mNone\u001B[39;49;00m\u001B[43m)\u001B[49m\n\u001B[0;32m 450\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m (SocketTimeout, BaseSSLError, SocketError) \u001B[38;5;28;01mas\u001B[39;00m e:\n", + "File \u001B[1;32m:3\u001B[0m, in \u001B[0;36mraise_from\u001B[1;34m(value, from_value)\u001B[0m\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:444\u001B[0m, in \u001B[0;36mHTTPConnectionPool._make_request\u001B[1;34m(self, conn, method, url, timeout, chunked, **httplib_request_kw)\u001B[0m\n\u001B[0;32m 443\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[1;32m--> 444\u001B[0m httplib_response \u001B[38;5;241m=\u001B[39m \u001B[43mconn\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mgetresponse\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 445\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mBaseException\u001B[39;00m \u001B[38;5;28;01mas\u001B[39;00m e:\n\u001B[0;32m 446\u001B[0m \u001B[38;5;66;03m# Remove the TypeError from the exception chain in\u001B[39;00m\n\u001B[0;32m 447\u001B[0m \u001B[38;5;66;03m# Python 3 (including for exceptions like SystemExit).\u001B[39;00m\n\u001B[0;32m 448\u001B[0m \u001B[38;5;66;03m# Otherwise it looks like a bug in the code.\u001B[39;00m\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\http\\client.py:1377\u001B[0m, in \u001B[0;36mHTTPConnection.getresponse\u001B[1;34m(self)\u001B[0m\n\u001B[0;32m 1376\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[1;32m-> 1377\u001B[0m \u001B[43mresponse\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mbegin\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 1378\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mConnectionError\u001B[39;00m:\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\http\\client.py:320\u001B[0m, in \u001B[0;36mHTTPResponse.begin\u001B[1;34m(self)\u001B[0m\n\u001B[0;32m 319\u001B[0m \u001B[38;5;28;01mwhile\u001B[39;00m \u001B[38;5;28;01mTrue\u001B[39;00m:\n\u001B[1;32m--> 320\u001B[0m version, status, reason \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_read_status\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 321\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m status \u001B[38;5;241m!=\u001B[39m CONTINUE:\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\http\\client.py:281\u001B[0m, in \u001B[0;36mHTTPResponse._read_status\u001B[1;34m(self)\u001B[0m\n\u001B[0;32m 280\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m \u001B[38;5;21m_read_status\u001B[39m(\u001B[38;5;28mself\u001B[39m):\n\u001B[1;32m--> 281\u001B[0m line \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mstr\u001B[39m(\u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mfp\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mreadline\u001B[49m\u001B[43m(\u001B[49m\u001B[43m_MAXLINE\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;241;43m+\u001B[39;49m\u001B[43m \u001B[49m\u001B[38;5;241;43m1\u001B[39;49m\u001B[43m)\u001B[49m, \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124miso-8859-1\u001B[39m\u001B[38;5;124m\"\u001B[39m)\n\u001B[0;32m 282\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m \u001B[38;5;28mlen\u001B[39m(line) \u001B[38;5;241m>\u001B[39m _MAXLINE:\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\socket.py:704\u001B[0m, in \u001B[0;36mSocketIO.readinto\u001B[1;34m(self, b)\u001B[0m\n\u001B[0;32m 703\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[1;32m--> 704\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_sock\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mrecv_into\u001B[49m\u001B[43m(\u001B[49m\u001B[43mb\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 705\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m timeout:\n", + "\u001B[1;31mProtocolError\u001B[0m: ('Connection aborted.', ConnectionResetError(10054, 'Eine vorhandene Verbindung wurde vom Remotehost geschlossen', None, 10054, None))", + "\nDuring handling of the above exception, another exception occurred:\n", + "\u001B[1;31mConnectionError\u001B[0m Traceback (most recent call last)", + "Cell \u001B[1;32mIn[29], line 1\u001B[0m\n\u001B[1;32m----> 1\u001B[0m gj \u001B[38;5;241m=\u001B[39m \u001B[43ma\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mdownload\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 2\u001B[0m gj\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\datacube.py:1950\u001B[0m, in \u001B[0;36mDataCube.download\u001B[1;34m(self, outputfile, format, options)\u001B[0m\n\u001B[0;32m 1948\u001B[0m \u001B[38;5;28mformat\u001B[39m \u001B[38;5;241m=\u001B[39m guess_format(outputfile)\n\u001B[0;32m 1949\u001B[0m cube \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_ensure_save_result(\u001B[38;5;28mformat\u001B[39m\u001B[38;5;241m=\u001B[39m\u001B[38;5;28mformat\u001B[39m, options\u001B[38;5;241m=\u001B[39moptions)\n\u001B[1;32m-> 1950\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_connection\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mdownload\u001B[49m\u001B[43m(\u001B[49m\u001B[43mcube\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mflat_graph\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43moutputfile\u001B[49m\u001B[43m)\u001B[49m\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\connection.py:1404\u001B[0m, in \u001B[0;36mConnection.download\u001B[1;34m(self, graph, outputfile, timeout)\u001B[0m\n\u001B[0;32m 1393\u001B[0m \u001B[38;5;250m\u001B[39m\u001B[38;5;124;03m\"\"\"\u001B[39;00m\n\u001B[0;32m 1394\u001B[0m \u001B[38;5;124;03mDownloads the result of a process graph synchronously,\u001B[39;00m\n\u001B[0;32m 1395\u001B[0m \u001B[38;5;124;03mand save the result to the given file or return bytes object if no outputfile is specified.\u001B[39;00m\n\u001B[1;32m (...)\u001B[0m\n\u001B[0;32m 1401\u001B[0m \u001B[38;5;124;03m:param timeout: timeout to wait for response\u001B[39;00m\n\u001B[0;32m 1402\u001B[0m \u001B[38;5;124;03m\"\"\"\u001B[39;00m\n\u001B[0;32m 1403\u001B[0m request \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_build_request_with_process_graph(process_graph\u001B[38;5;241m=\u001B[39mgraph)\n\u001B[1;32m-> 1404\u001B[0m response \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mpost\u001B[49m\u001B[43m(\u001B[49m\u001B[43mpath\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43m/result\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mjson\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mrequest\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mexpected_status\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;241;43m200\u001B[39;49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mstream\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;28;43;01mTrue\u001B[39;49;00m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mtimeout\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mtimeout\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 1406\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m outputfile \u001B[38;5;129;01mis\u001B[39;00m \u001B[38;5;129;01mnot\u001B[39;00m \u001B[38;5;28;01mNone\u001B[39;00m:\n\u001B[0;32m 1407\u001B[0m \u001B[38;5;28;01mwith\u001B[39;00m Path(outputfile)\u001B[38;5;241m.\u001B[39mopen(mode\u001B[38;5;241m=\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mwb\u001B[39m\u001B[38;5;124m\"\u001B[39m) \u001B[38;5;28;01mas\u001B[39;00m f:\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\connection.py:190\u001B[0m, in \u001B[0;36mRestApiConnection.post\u001B[1;34m(self, path, json, **kwargs)\u001B[0m\n\u001B[0;32m 182\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m \u001B[38;5;21mpost\u001B[39m(\u001B[38;5;28mself\u001B[39m, path: \u001B[38;5;28mstr\u001B[39m, json: Optional[\u001B[38;5;28mdict\u001B[39m] \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;01mNone\u001B[39;00m, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs) \u001B[38;5;241m-\u001B[39m\u001B[38;5;241m>\u001B[39m Response:\n\u001B[0;32m 183\u001B[0m \u001B[38;5;250m \u001B[39m\u001B[38;5;124;03m\"\"\"\u001B[39;00m\n\u001B[0;32m 184\u001B[0m \u001B[38;5;124;03m Do POST request to REST API.\u001B[39;00m\n\u001B[0;32m 185\u001B[0m \n\u001B[1;32m (...)\u001B[0m\n\u001B[0;32m 188\u001B[0m \u001B[38;5;124;03m :return: response: Response\u001B[39;00m\n\u001B[0;32m 189\u001B[0m \u001B[38;5;124;03m \"\"\"\u001B[39;00m\n\u001B[1;32m--> 190\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mrequest(\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mpost\u001B[39m\u001B[38;5;124m\"\u001B[39m, path\u001B[38;5;241m=\u001B[39mpath, json\u001B[38;5;241m=\u001B[39mjson, allow_redirects\u001B[38;5;241m=\u001B[39m\u001B[38;5;28;01mFalse\u001B[39;00m, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs)\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\connection.py:727\u001B[0m, in \u001B[0;36mConnection.request\u001B[1;34m(self, method, path, headers, auth, check_error, expected_status, **kwargs)\u001B[0m\n\u001B[0;32m 720\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28msuper\u001B[39m(Connection, \u001B[38;5;28mself\u001B[39m)\u001B[38;5;241m.\u001B[39mrequest(\n\u001B[0;32m 721\u001B[0m method\u001B[38;5;241m=\u001B[39mmethod, path\u001B[38;5;241m=\u001B[39mpath, headers\u001B[38;5;241m=\u001B[39mheaders, auth\u001B[38;5;241m=\u001B[39mauth,\n\u001B[0;32m 722\u001B[0m check_error\u001B[38;5;241m=\u001B[39mcheck_error, expected_status\u001B[38;5;241m=\u001B[39mexpected_status, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs,\n\u001B[0;32m 723\u001B[0m )\n\u001B[0;32m 725\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[0;32m 726\u001B[0m \u001B[38;5;66;03m# Initial request attempt\u001B[39;00m\n\u001B[1;32m--> 727\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[43m_request\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 728\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m OpenEoApiError \u001B[38;5;28;01mas\u001B[39;00m api_exc:\n\u001B[0;32m 729\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m api_exc\u001B[38;5;241m.\u001B[39mhttp_status_code \u001B[38;5;241m==\u001B[39m \u001B[38;5;241m403\u001B[39m \u001B[38;5;129;01mand\u001B[39;00m api_exc\u001B[38;5;241m.\u001B[39mcode \u001B[38;5;241m==\u001B[39m \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mTokenInvalid\u001B[39m\u001B[38;5;124m\"\u001B[39m:\n\u001B[0;32m 730\u001B[0m \u001B[38;5;66;03m# Auth token expired: can we refresh?\u001B[39;00m\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\connection.py:720\u001B[0m, in \u001B[0;36mConnection.request.._request\u001B[1;34m()\u001B[0m\n\u001B[0;32m 719\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m \u001B[38;5;21m_request\u001B[39m():\n\u001B[1;32m--> 720\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28msuper\u001B[39m(Connection, \u001B[38;5;28mself\u001B[39m)\u001B[38;5;241m.\u001B[39mrequest(\n\u001B[0;32m 721\u001B[0m method\u001B[38;5;241m=\u001B[39mmethod, path\u001B[38;5;241m=\u001B[39mpath, headers\u001B[38;5;241m=\u001B[39mheaders, auth\u001B[38;5;241m=\u001B[39mauth,\n\u001B[0;32m 722\u001B[0m check_error\u001B[38;5;241m=\u001B[39mcheck_error, expected_status\u001B[38;5;241m=\u001B[39mexpected_status, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs,\n\u001B[0;32m 723\u001B[0m )\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\connection.py:119\u001B[0m, in \u001B[0;36mRestApiConnection.request\u001B[1;34m(self, method, path, headers, auth, check_error, expected_status, **kwargs)\u001B[0m\n\u001B[0;32m 115\u001B[0m _log\u001B[38;5;241m.\u001B[39mdebug(\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mRequest `\u001B[39m\u001B[38;5;132;01m{m}\u001B[39;00m\u001B[38;5;124m \u001B[39m\u001B[38;5;132;01m{u}\u001B[39;00m\u001B[38;5;124m` with headers \u001B[39m\u001B[38;5;132;01m{h}\u001B[39;00m\u001B[38;5;124m, auth \u001B[39m\u001B[38;5;132;01m{a}\u001B[39;00m\u001B[38;5;124m, kwargs \u001B[39m\u001B[38;5;132;01m{k}\u001B[39;00m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;241m.\u001B[39mformat(\n\u001B[0;32m 116\u001B[0m m\u001B[38;5;241m=\u001B[39mmethod\u001B[38;5;241m.\u001B[39mupper(), u\u001B[38;5;241m=\u001B[39murl, h\u001B[38;5;241m=\u001B[39mheaders \u001B[38;5;129;01mand\u001B[39;00m headers\u001B[38;5;241m.\u001B[39mkeys(), a\u001B[38;5;241m=\u001B[39m\u001B[38;5;28mtype\u001B[39m(auth)\u001B[38;5;241m.\u001B[39m\u001B[38;5;18m__name__\u001B[39m, k\u001B[38;5;241m=\u001B[39m\u001B[38;5;28mlist\u001B[39m(kwargs\u001B[38;5;241m.\u001B[39mkeys()))\n\u001B[0;32m 117\u001B[0m )\n\u001B[0;32m 118\u001B[0m \u001B[38;5;28;01mwith\u001B[39;00m ContextTimer() \u001B[38;5;28;01mas\u001B[39;00m timer:\n\u001B[1;32m--> 119\u001B[0m resp \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39msession\u001B[38;5;241m.\u001B[39mrequest(\n\u001B[0;32m 120\u001B[0m method\u001B[38;5;241m=\u001B[39mmethod,\n\u001B[0;32m 121\u001B[0m url\u001B[38;5;241m=\u001B[39murl,\n\u001B[0;32m 122\u001B[0m headers\u001B[38;5;241m=\u001B[39m\u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_merged_headers(headers),\n\u001B[0;32m 123\u001B[0m auth\u001B[38;5;241m=\u001B[39mauth,\n\u001B[0;32m 124\u001B[0m timeout\u001B[38;5;241m=\u001B[39mkwargs\u001B[38;5;241m.\u001B[39mpop(\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mtimeout\u001B[39m\u001B[38;5;124m\"\u001B[39m, \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mdefault_timeout),\n\u001B[0;32m 125\u001B[0m \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs\n\u001B[0;32m 126\u001B[0m )\n\u001B[0;32m 127\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m slow_response_threshold \u001B[38;5;129;01mand\u001B[39;00m timer\u001B[38;5;241m.\u001B[39melapsed() \u001B[38;5;241m>\u001B[39m slow_response_threshold:\n\u001B[0;32m 128\u001B[0m _log\u001B[38;5;241m.\u001B[39mwarning(\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mSlow response: `\u001B[39m\u001B[38;5;132;01m{m}\u001B[39;00m\u001B[38;5;124m \u001B[39m\u001B[38;5;132;01m{u}\u001B[39;00m\u001B[38;5;124m` took \u001B[39m\u001B[38;5;132;01m{e:.2f}\u001B[39;00m\u001B[38;5;124ms (>\u001B[39m\u001B[38;5;132;01m{t:.2f}\u001B[39;00m\u001B[38;5;124ms)\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;241m.\u001B[39mformat(\n\u001B[0;32m 129\u001B[0m m\u001B[38;5;241m=\u001B[39mmethod\u001B[38;5;241m.\u001B[39mupper(), u\u001B[38;5;241m=\u001B[39mstr_truncate(url, width\u001B[38;5;241m=\u001B[39m\u001B[38;5;241m64\u001B[39m),\n\u001B[0;32m 130\u001B[0m e\u001B[38;5;241m=\u001B[39mtimer\u001B[38;5;241m.\u001B[39melapsed(), t\u001B[38;5;241m=\u001B[39mslow_response_threshold\n\u001B[0;32m 131\u001B[0m ))\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\requests\\sessions.py:589\u001B[0m, in \u001B[0;36mSession.request\u001B[1;34m(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)\u001B[0m\n\u001B[0;32m 584\u001B[0m send_kwargs \u001B[38;5;241m=\u001B[39m {\n\u001B[0;32m 585\u001B[0m \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mtimeout\u001B[39m\u001B[38;5;124m\"\u001B[39m: timeout,\n\u001B[0;32m 586\u001B[0m \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mallow_redirects\u001B[39m\u001B[38;5;124m\"\u001B[39m: allow_redirects,\n\u001B[0;32m 587\u001B[0m }\n\u001B[0;32m 588\u001B[0m send_kwargs\u001B[38;5;241m.\u001B[39mupdate(settings)\n\u001B[1;32m--> 589\u001B[0m resp \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39msend(prep, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39msend_kwargs)\n\u001B[0;32m 591\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m resp\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\requests\\sessions.py:703\u001B[0m, in \u001B[0;36mSession.send\u001B[1;34m(self, request, **kwargs)\u001B[0m\n\u001B[0;32m 700\u001B[0m start \u001B[38;5;241m=\u001B[39m preferred_clock()\n\u001B[0;32m 702\u001B[0m \u001B[38;5;66;03m# Send the request\u001B[39;00m\n\u001B[1;32m--> 703\u001B[0m r \u001B[38;5;241m=\u001B[39m adapter\u001B[38;5;241m.\u001B[39msend(request, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs)\n\u001B[0;32m 705\u001B[0m \u001B[38;5;66;03m# Total elapsed time of the request (approximately)\u001B[39;00m\n\u001B[0;32m 706\u001B[0m elapsed \u001B[38;5;241m=\u001B[39m preferred_clock() \u001B[38;5;241m-\u001B[39m start\n", + "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\requests\\adapters.py:501\u001B[0m, in \u001B[0;36mHTTPAdapter.send\u001B[1;34m(self, request, stream, timeout, verify, cert, proxies)\u001B[0m\n\u001B[0;32m 486\u001B[0m resp \u001B[38;5;241m=\u001B[39m conn\u001B[38;5;241m.\u001B[39murlopen(\n\u001B[0;32m 487\u001B[0m method\u001B[38;5;241m=\u001B[39mrequest\u001B[38;5;241m.\u001B[39mmethod,\n\u001B[0;32m 488\u001B[0m url\u001B[38;5;241m=\u001B[39murl,\n\u001B[1;32m (...)\u001B[0m\n\u001B[0;32m 497\u001B[0m chunked\u001B[38;5;241m=\u001B[39mchunked,\n\u001B[0;32m 498\u001B[0m )\n\u001B[0;32m 500\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m (ProtocolError, \u001B[38;5;167;01mOSError\u001B[39;00m) \u001B[38;5;28;01mas\u001B[39;00m err:\n\u001B[1;32m--> 501\u001B[0m \u001B[38;5;28;01mraise\u001B[39;00m \u001B[38;5;167;01mConnectionError\u001B[39;00m(err, request\u001B[38;5;241m=\u001B[39mrequest)\n\u001B[0;32m 503\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m MaxRetryError \u001B[38;5;28;01mas\u001B[39;00m e:\n\u001B[0;32m 504\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m \u001B[38;5;28misinstance\u001B[39m(e\u001B[38;5;241m.\u001B[39mreason, ConnectTimeoutError):\n\u001B[0;32m 505\u001B[0m \u001B[38;5;66;03m# TODO: Remove this in 3.0.0: see #2811\u001B[39;00m\n", + "\u001B[1;31mConnectionError\u001B[0m: ('Connection aborted.', ConnectionResetError(10054, 'Eine vorhandene Verbindung wurde vom Remotehost geschlossen', None, 10054, None))" + ] } ], "source": [ @@ -259,33 +256,15 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2023-08-16T13:26:24.970512500Z", - "start_time": "2023-08-16T13:26:18.883611200Z" + "end_time": "2023-11-16T14:57:00.525189300Z", + "start_time": "2023-11-16T14:45:57.505572900Z" } } }, { "cell_type": "code", - "execution_count": 57, - "outputs": [ - { - "ename": "OpenEoApiError", - "evalue": "[500] unknown: unknown error", - "output_type": "error", - "traceback": [ - "\u001B[1;31m---------------------------------------------------------------------------\u001B[0m", - "\u001B[1;31mOpenEoApiError\u001B[0m Traceback (most recent call last)", - "Cell \u001B[1;32mIn[57], line 1\u001B[0m\n\u001B[1;32m----> 1\u001B[0m result \u001B[38;5;241m=\u001B[39m \u001B[43mconnection\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mexecute\u001B[49m\u001B[43m(\u001B[49m\u001B[43m{\u001B[49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43mprocess\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m:\u001B[49m\u001B[43m \u001B[49m\u001B[43m{\u001B[49m\n\u001B[0;32m 2\u001B[0m \u001B[43m \u001B[49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43mid\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m:\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43mload_collection\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m,\u001B[49m\n\u001B[0;32m 3\u001B[0m \u001B[43m \u001B[49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43mparameters\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m:\u001B[49m\u001B[43m \u001B[49m\u001B[43m{\u001B[49m\n\u001B[0;32m 4\u001B[0m \u001B[43m \u001B[49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43mid\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m:\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43mgeodb_b34bfae7-9265-4a3e-b921-06549d3c6035~populated_places_sub\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m,\u001B[49m\n\u001B[0;32m 5\u001B[0m \u001B[43m \u001B[49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43mspatial_extent\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m:\u001B[49m\u001B[43m \u001B[49m\u001B[43m{\u001B[49m\n\u001B[0;32m 6\u001B[0m \u001B[43m \u001B[49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43mbbox\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m:\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43m(33, -10, 71, 43)\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\n\u001B[0;32m 7\u001B[0m \u001B[43m \u001B[49m\u001B[43m}\u001B[49m\n\u001B[0;32m 8\u001B[0m \u001B[43m \u001B[49m\u001B[43m}\u001B[49m\n\u001B[0;32m 9\u001B[0m \u001B[43m}\u001B[49m\u001B[43m}\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 10\u001B[0m result\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\connection.py:1422\u001B[0m, in \u001B[0;36mConnection.execute\u001B[1;34m(self, process_graph)\u001B[0m\n\u001B[0;32m 1414\u001B[0m \u001B[38;5;250m\u001B[39m\u001B[38;5;124;03m\"\"\"\u001B[39;00m\n\u001B[0;32m 1415\u001B[0m \u001B[38;5;124;03mExecute a process graph synchronously and return the result (assumed to be JSON).\u001B[39;00m\n\u001B[0;32m 1416\u001B[0m \n\u001B[1;32m (...)\u001B[0m\n\u001B[0;32m 1419\u001B[0m \u001B[38;5;124;03m:return: parsed JSON response\u001B[39;00m\n\u001B[0;32m 1420\u001B[0m \u001B[38;5;124;03m\"\"\"\u001B[39;00m\n\u001B[0;32m 1421\u001B[0m req \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_build_request_with_process_graph(process_graph\u001B[38;5;241m=\u001B[39mprocess_graph)\n\u001B[1;32m-> 1422\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mpost\u001B[49m\u001B[43m(\u001B[49m\u001B[43mpath\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43m/result\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mjson\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mreq\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mexpected_status\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;241;43m200\u001B[39;49m\u001B[43m)\u001B[49m\u001B[38;5;241m.\u001B[39mjson()\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\connection.py:190\u001B[0m, in \u001B[0;36mRestApiConnection.post\u001B[1;34m(self, path, json, **kwargs)\u001B[0m\n\u001B[0;32m 182\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m \u001B[38;5;21mpost\u001B[39m(\u001B[38;5;28mself\u001B[39m, path: \u001B[38;5;28mstr\u001B[39m, json: Optional[\u001B[38;5;28mdict\u001B[39m] \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;01mNone\u001B[39;00m, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs) \u001B[38;5;241m-\u001B[39m\u001B[38;5;241m>\u001B[39m Response:\n\u001B[0;32m 183\u001B[0m \u001B[38;5;250m \u001B[39m\u001B[38;5;124;03m\"\"\"\u001B[39;00m\n\u001B[0;32m 184\u001B[0m \u001B[38;5;124;03m Do POST request to REST API.\u001B[39;00m\n\u001B[0;32m 185\u001B[0m \n\u001B[1;32m (...)\u001B[0m\n\u001B[0;32m 188\u001B[0m \u001B[38;5;124;03m :return: response: Response\u001B[39;00m\n\u001B[0;32m 189\u001B[0m \u001B[38;5;124;03m \"\"\"\u001B[39;00m\n\u001B[1;32m--> 190\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mrequest(\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mpost\u001B[39m\u001B[38;5;124m\"\u001B[39m, path\u001B[38;5;241m=\u001B[39mpath, json\u001B[38;5;241m=\u001B[39mjson, allow_redirects\u001B[38;5;241m=\u001B[39m\u001B[38;5;28;01mFalse\u001B[39;00m, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs)\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\connection.py:727\u001B[0m, in \u001B[0;36mConnection.request\u001B[1;34m(self, method, path, headers, auth, check_error, expected_status, **kwargs)\u001B[0m\n\u001B[0;32m 720\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28msuper\u001B[39m(Connection, \u001B[38;5;28mself\u001B[39m)\u001B[38;5;241m.\u001B[39mrequest(\n\u001B[0;32m 721\u001B[0m method\u001B[38;5;241m=\u001B[39mmethod, path\u001B[38;5;241m=\u001B[39mpath, headers\u001B[38;5;241m=\u001B[39mheaders, auth\u001B[38;5;241m=\u001B[39mauth,\n\u001B[0;32m 722\u001B[0m check_error\u001B[38;5;241m=\u001B[39mcheck_error, expected_status\u001B[38;5;241m=\u001B[39mexpected_status, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs,\n\u001B[0;32m 723\u001B[0m )\n\u001B[0;32m 725\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[0;32m 726\u001B[0m \u001B[38;5;66;03m# Initial request attempt\u001B[39;00m\n\u001B[1;32m--> 727\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[43m_request\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 728\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m OpenEoApiError \u001B[38;5;28;01mas\u001B[39;00m api_exc:\n\u001B[0;32m 729\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m api_exc\u001B[38;5;241m.\u001B[39mhttp_status_code \u001B[38;5;241m==\u001B[39m \u001B[38;5;241m403\u001B[39m \u001B[38;5;129;01mand\u001B[39;00m api_exc\u001B[38;5;241m.\u001B[39mcode \u001B[38;5;241m==\u001B[39m \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mTokenInvalid\u001B[39m\u001B[38;5;124m\"\u001B[39m:\n\u001B[0;32m 730\u001B[0m \u001B[38;5;66;03m# Auth token expired: can we refresh?\u001B[39;00m\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\connection.py:720\u001B[0m, in \u001B[0;36mConnection.request.._request\u001B[1;34m()\u001B[0m\n\u001B[0;32m 719\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m \u001B[38;5;21m_request\u001B[39m():\n\u001B[1;32m--> 720\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28msuper\u001B[39m(Connection, \u001B[38;5;28mself\u001B[39m)\u001B[38;5;241m.\u001B[39mrequest(\n\u001B[0;32m 721\u001B[0m method\u001B[38;5;241m=\u001B[39mmethod, path\u001B[38;5;241m=\u001B[39mpath, headers\u001B[38;5;241m=\u001B[39mheaders, auth\u001B[38;5;241m=\u001B[39mauth,\n\u001B[0;32m 722\u001B[0m check_error\u001B[38;5;241m=\u001B[39mcheck_error, expected_status\u001B[38;5;241m=\u001B[39mexpected_status, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs,\n\u001B[0;32m 723\u001B[0m )\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\connection.py:138\u001B[0m, in \u001B[0;36mRestApiConnection.request\u001B[1;34m(self, method, path, headers, auth, check_error, expected_status, **kwargs)\u001B[0m\n\u001B[0;32m 136\u001B[0m expected_status \u001B[38;5;241m=\u001B[39m ensure_list(expected_status) \u001B[38;5;28;01mif\u001B[39;00m expected_status \u001B[38;5;28;01melse\u001B[39;00m []\n\u001B[0;32m 137\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m check_error \u001B[38;5;129;01mand\u001B[39;00m status \u001B[38;5;241m>\u001B[39m\u001B[38;5;241m=\u001B[39m \u001B[38;5;241m400\u001B[39m \u001B[38;5;129;01mand\u001B[39;00m status \u001B[38;5;129;01mnot\u001B[39;00m \u001B[38;5;129;01min\u001B[39;00m expected_status:\n\u001B[1;32m--> 138\u001B[0m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_raise_api_error\u001B[49m\u001B[43m(\u001B[49m\u001B[43mresp\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 139\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m expected_status \u001B[38;5;129;01mand\u001B[39;00m status \u001B[38;5;129;01mnot\u001B[39;00m \u001B[38;5;129;01min\u001B[39;00m expected_status:\n\u001B[0;32m 140\u001B[0m \u001B[38;5;28;01mraise\u001B[39;00m OpenEoRestError(\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mGot status code \u001B[39m\u001B[38;5;132;01m{s!r}\u001B[39;00m\u001B[38;5;124m for `\u001B[39m\u001B[38;5;132;01m{m}\u001B[39;00m\u001B[38;5;124m \u001B[39m\u001B[38;5;132;01m{p}\u001B[39;00m\u001B[38;5;124m` (expected \u001B[39m\u001B[38;5;132;01m{e!r}\u001B[39;00m\u001B[38;5;124m) with body \u001B[39m\u001B[38;5;132;01m{body}\u001B[39;00m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;241m.\u001B[39mformat(\n\u001B[0;32m 141\u001B[0m m\u001B[38;5;241m=\u001B[39mmethod\u001B[38;5;241m.\u001B[39mupper(), p\u001B[38;5;241m=\u001B[39mpath, s\u001B[38;5;241m=\u001B[39mstatus, e\u001B[38;5;241m=\u001B[39mexpected_status, body\u001B[38;5;241m=\u001B[39mresp\u001B[38;5;241m.\u001B[39mtext)\n\u001B[0;32m 142\u001B[0m )\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\connection.py:169\u001B[0m, in \u001B[0;36mRestApiConnection._raise_api_error\u001B[1;34m(self, response)\u001B[0m\n\u001B[0;32m 167\u001B[0m \u001B[38;5;28;01melse\u001B[39;00m:\n\u001B[0;32m 168\u001B[0m exception \u001B[38;5;241m=\u001B[39m OpenEoApiError(http_status_code\u001B[38;5;241m=\u001B[39mstatus_code, message\u001B[38;5;241m=\u001B[39mtext)\n\u001B[1;32m--> 169\u001B[0m \u001B[38;5;28;01mraise\u001B[39;00m exception\n", - "\u001B[1;31mOpenEoApiError\u001B[0m: [500] unknown: unknown error" - ] - } - ], + "execution_count": null, + "outputs": [], "source": [ "result = connection.execute({\"process\": {\n", " \"id\": \"load_collection\",\n", @@ -299,11 +278,7 @@ "result" ], "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2023-08-16T13:12:38.464259900Z", - "start_time": "2023-08-16T13:12:37.989932800Z" - } + "collapsed": false } }, { @@ -337,15 +312,6 @@ "vector_cube[20]" ] }, - { - "cell_type": "markdown", - "source": [ - "Note: as there is no final specification of the VectorCube datatype, a vector_cube in the geoDB-openEO backend is simply a Python dictionary. This is sufficient to support this use case, but in order to ensure interoperability with raster data, a more sophisticated concept will be needed." - ], - "metadata": { - "collapsed": false - } - }, { "cell_type": "markdown", "source": [ diff --git a/notebooks/geoDB-openEO_use_case_2.ipynb b/notebooks/geoDB-openEO_use_case_2.ipynb new file mode 100644 index 0000000..ae2b1a9 --- /dev/null +++ b/notebooks/geoDB-openEO_use_case_2.ipynb @@ -0,0 +1,467 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "ced119793a5f0f59", + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + } + }, + "source": [ + "# Demonstration of basic geoDB capabilities + Use Case #2\n", + "\n", + "## Preparations\n", + "First, some imports are done, and the base URL is set.\n", + "The base URL is where the backend is running, and it will be used in all later examples." + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "edcce2fdfc4a403a", + "metadata": { + "ExecuteTime": { + "end_time": "2023-11-17T22:49:06.144387900Z", + "start_time": "2023-11-17T22:49:03.556900900Z" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Authenticated using refresh token.\n" + ] + }, + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import datetime\n", + "import json\n", + "\n", + "import openeo\n", + "\n", + "# geoDB = 'https://geodb.openeo.dev.brockmann-consult.de'\n", + "geoDB = 'http://localhost:8080'\n", + "cdse = openeo.connect(\"https://openeo.dataspace.copernicus.eu/\")\n", + "cdse.authenticate_oidc()" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "7903b501d68f258c", + "metadata": { + "ExecuteTime": { + "end_time": "2023-11-17T22:46:22.915782300Z", + "start_time": "2023-11-17T22:46:10.264252800Z" + }, + "collapsed": false, + "jupyter": { + "outputs_hidden": false + } + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\Thomas\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\metadata.py:272: UserWarning: Unknown dimension type 'geometry'\n", + " complain(\"Unknown dimension type {t!r}\".format(t=dim_type))\n" + ] + } + ], + "source": [ + "geoDB = 'http://localhost:8080'\n", + "connection = openeo.connect(geoDB)\n", + "hamburg = connection.load_collection('openeo~pop_hamburg')\n", + "hamburg = hamburg.aggregate_temporal(['2000-01-01', '2030-01-05'], 'mean', context={'pattern': '%Y-%M-%d'})\n", + "hamburg.download('./hamburg_agg.json', 'GeoJSON')" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "ab0edbcf-c37d-4ccf-b533-70d8877c9419", + "metadata": { + "ExecuteTime": { + "end_time": "2023-11-17T22:49:11.017124800Z", + "start_time": "2023-11-17T22:49:10.951646100Z" + } + }, + "outputs": [], + "source": [ + "olci = cdse.load_collection(\"SENTINEL3_OLCI_L1B\",\n", + " spatial_extent={\"west\": 9.7, \"south\": 53.3, \"east\": 10.3, \"north\": 53.8},\n", + " temporal_extent=[\"2020-01-01\", \"2020-01-05\"],\n", + " bands=[\"B08\", \"B17\"])" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "6c9e7733-34a5-47fa-8d72-db31beef8170", + "metadata": { + "ExecuteTime": { + "end_time": "2023-11-17T22:49:13.429216Z", + "start_time": "2023-11-17T22:49:13.370525Z" + } + }, + "outputs": [], + "source": [ + "olci_ndvi = olci.ndvi(nir=\"B17\", red=\"B08\")\n", + "ndvi_temp_agg = olci_ndvi.aggregate_temporal([[\"2020-01-01T00:00:00.000Z\", \"2020-01-05T00:00:00.000Z\"]], 'median')" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "f056401a-65de-48bd-9f73-1915ea47b14f", + "metadata": {}, + "outputs": [], + "source": [ + "with open('./hamburg_agg.json') as f:\n", + " geometries = json.load(f)\n", + "ndvi_final = ndvi_temp_agg.aggregate_spatial(geometries, openeo.processes.ProcessBuilder.mean)" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "9a59c9e505b36371", + "metadata": { + "ExecuteTime": { + "end_time": "2023-11-17T22:51:26.669981800Z", + "start_time": "2023-11-17T22:49:29.997650800Z" + }, + "collapsed": false, + "jupyter": { + "outputs_hidden": false + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0:00:00 Job 'j-231117c90b73447cb7c4319c434ba1cf': send 'start'\n", + "0:00:12 Job 'j-231117c90b73447cb7c4319c434ba1cf': created (progress N/A)\n", + "0:00:17 Job 'j-231117c90b73447cb7c4319c434ba1cf': created (progress N/A)\n", + "0:00:25 Job 'j-231117c90b73447cb7c4319c434ba1cf': created (progress N/A)\n", + "0:00:33 Job 'j-231117c90b73447cb7c4319c434ba1cf': created (progress N/A)\n", + "0:00:45 Job 'j-231117c90b73447cb7c4319c434ba1cf': running (progress N/A)\n", + "0:00:58 Job 'j-231117c90b73447cb7c4319c434ba1cf': running (progress N/A)\n", + "0:01:13 Job 'j-231117c90b73447cb7c4319c434ba1cf': running (progress N/A)\n", + "0:01:33 Job 'j-231117c90b73447cb7c4319c434ba1cf': running (progress N/A)\n", + "0:01:57 Job 'j-231117c90b73447cb7c4319c434ba1cf': finished (progress N/A)\n" + ] + }, + { + "data": { + "text/html": [ + "\n", + " \n", + " \n", + " \n", + " \n", + " " + ], + "text/plain": [ + "" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "result = ndvi_final.save_result(format = \"GTiff\")\n", + "job = result.create_job()\n", + "job.start_and_wait()" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "33c5921a1dc38bdc", + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + } + }, + "outputs": [ + { + "data": { + "text/plain": [ + "[WindowsPath('output/timeseries.json'), WindowsPath('output/job-results.json')]" + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "job.get_results().download_files(\"output\")" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "id": "1868c72e-cfb0-458b-82bf-a6e0b57e15d9", + "metadata": {}, + "outputs": [], + "source": [ + "result_file = job.get_results().download_files(\"output\")[0]\n", + "with open(str(result_file)) as f:\n", + " aggregated_ndvi = json.load(f)\n", + "ndvi = list([v[0] for v in aggregated_ndvi[list(aggregated_ndvi.keys())[0]]])" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "id": "f17b7277-2b4a-40d4-b982-f51a0b57915c", + "metadata": {}, + "outputs": [], + "source": [ + "import geopandas\n", + "gdf = geopandas.read_file('./hamburg_agg.json')\n", + "gdf['ndvi'] = ndvi" + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "id": "2316d61c-261c-41af-8de6-a5aa30367d0b", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaoAAAGdCAYAAABD8DfjAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAABgkElEQVR4nO3de1xT9f8H8NfZxjYYMFHugggioahoeAFMyyTUb3kp7xfE0sq+/koz6qv1rdRK7fst7dvXtDT8eqm8pF3MVMS84Q1NJe+KogIKIigMuWxsO78/JoPJbYNt52x7Px+PPXLb53zOe6fD3vt8zud8PgzLsiwIIYQQnhJwHQAhhBDSGEpUhBBCeI0SFSGEEF6jREUIIYTXKFERQgjhNUpUhBBCeI0SFSGEEF6jREUIIYTXRFwHYE1arRa3b9+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D9+vV663z0b4lPLHEcgoKC6q3zww8/tN4HMxIt80EIIYTXbL/DnhBCiF2jREUIIYTXKFERQgjhNUpUhBBCeI0SFSGEEF6jREUIIYTXKFERQgjhNUpUhBBCeI0SFSGEEF6jREUIIYTXKFERQgjhNUpUhBBCeO3/ARhLPs5MHuTgAAAAAElFTkSuQmCC", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import matplotlib.pyplot as plt\n", + "gdf['color'] = ['#006400', '#90EE90']\n", + "gdf.plot(legend=True, color=gdf['color'])\n", + "va = ['bottom', 'top']\n", + "for idx, row in gdf.iterrows():\n", + " plt.annotate('population: ' + str(row['population']), xy=row['geometry'].centroid.coords[0],\n", + " horizontalalignment='center', verticalalignment=va[idx])" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9e8ce5af-678f-4708-8611-2792c313ba93", + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + } + }, + "outputs": [], + "source": [ + "gc = openeo.connect('http://localhost:8080')\n", + "vc = gc.load_collection('openeo~hamburg')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2d78c90d60d5d056", + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + } + }, + "outputs": [], + "source": [ + "job.get_results().download_files(\"output\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7b7d5ced-4933-4162-9082-280afbccf210", + "metadata": {}, + "outputs": [], + "source": [ + "import inspect\n", + "inspect.getfullargspec(oc.upload_file)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0af8b6fe-dcec-496b-aab9-d020862ebb7f", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "722c2791-3d48-4213-83a4-bdc38bc2df81", + "metadata": {}, + "outputs": [], + "source": [ + "import inspect\n", + "inspect.getfullargspec(vc.aggregate_spatial)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "33265395-3b55-4753-b542-3b8f15ea5c13", + "metadata": {}, + "outputs": [], + "source": [ + "agg = olci_ndvi.aggregate_spatial(vc, 'mean')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2cbb380a-3098-4ab1-8b9d-0cee24161f31", + "metadata": {}, + "outputs": [], + "source": [ + "result = agg.save_result(\"GTiff\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2bbe8021-d0ce-4be8-b296-3a7d16c077b5", + "metadata": {}, + "outputs": [], + "source": [ + "job = result.create_job()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "949aa582-fa89-4fa9-9ef8-575c6ea0d20c", + "metadata": {}, + "outputs": [], + "source": [ + "job.start_and_wait()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "598ffb69-4fe2-473a-92dc-b3a01a77a3ed", + "metadata": {}, + "outputs": [], + "source": [ + "job.get_results().download_files(\"output\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "83b7f7f3-04dd-4440-9c09-5b131eda8c26", + "metadata": {}, + "outputs": [], + "source": [ + "result = olci_ndvi.save_result(\"GTiff\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a353b83f-6e46-4688-8aac-d18b919b28be", + "metadata": {}, + "outputs": [], + "source": [ + "job = result.create_job()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "bf5a5cdc-d377-44e0-ba35-fc6b9c2dd05c", + "metadata": {}, + "outputs": [], + "source": [ + "job.start_and_wait()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "986c2580-65ea-44b8-b173-d4c77bb71d5d", + "metadata": {}, + "outputs": [], + "source": [ + "job.get_results().download_files(\"output\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "118477d6-32aa-46a1-8e4f-b863b94642b6", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/tests/core/mock_vc_provider.py b/tests/core/mock_vc_provider.py index 555a49e..cb0459a 100644 --- a/tests/core/mock_vc_provider.py +++ b/tests/core/mock_vc_provider.py @@ -87,6 +87,9 @@ def get_time_dim( -> Optional[List[datetime]]: return None + def get_time_dim_name(self) -> Optional[str]: + return 'time' + def get_vertical_dim( self, bbox: Optional[Tuple[float, float, float, float]] = None) \ diff --git a/tests/res/geojson-pop_hamburg.json b/tests/res/geojson-pop_hamburg.json new file mode 100644 index 0000000..535f675 --- /dev/null +++ b/tests/res/geojson-pop_hamburg.json @@ -0,0 +1,461 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "name": "western_1", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 9.786525089668388, + 53.602532855112315 + ], + [ + 9.989772159980888, + 53.68638294628541 + ], + [ + 9.998011906074638, + 53.400775609860645 + ], + [ + 9.892268497871513, + 53.46132185624643 + ], + [ + 9.873042423652763, + 53.511166766679835 + ], + [ + 9.743953068184013, + 53.532394338183906 + ], + [ + 9.786525089668388, + 53.602532855112315 + ] + ] + ] + }, + "properties": { + "date": "1990-01-01T00:00:00Z", + "population": "200000" + } + }, + { + "type": "Feature", + "name": "western_2", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 9.786525089668388, + 53.602532855112315 + ], + [ + 9.989772159980888, + 53.68638294628541 + ], + [ + 9.998011906074638, + 53.400775609860645 + ], + [ + 9.892268497871513, + 53.46132185624643 + ], + [ + 9.873042423652763, + 53.511166766679835 + ], + [ + 9.743953068184013, + 53.532394338183906 + ], + [ + 9.786525089668388, + 53.602532855112315 + ] + ] + ] + }, + "properties": { + "date": "2000-01-01T00:00:00Z", + "population": "400000" + } + }, + { + "type": "Feature", + "name": "western_3", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 9.786525089668388, + 53.602532855112315 + ], + [ + 9.989772159980888, + 53.68638294628541 + ], + [ + 9.998011906074638, + 53.400775609860645 + ], + [ + 9.892268497871513, + 53.46132185624643 + ], + [ + 9.873042423652763, + 53.511166766679835 + ], + [ + 9.743953068184013, + 53.532394338183906 + ], + [ + 9.786525089668388, + 53.602532855112315 + ] + ] + ] + }, + "properties": { + "date": "2010-01-01T00:00:00Z", + "population": "500000" + } + }, + { + "type": "Feature", + "name": "western_4", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 9.786525089668388, + 53.602532855112315 + ], + [ + 9.989772159980888, + 53.68638294628541 + ], + [ + 9.998011906074638, + 53.400775609860645 + ], + [ + 9.892268497871513, + 53.46132185624643 + ], + [ + 9.873042423652763, + 53.511166766679835 + ], + [ + 9.743953068184013, + 53.532394338183906 + ], + [ + 9.786525089668388, + 53.602532855112315 + ] + ] + ] + }, + "properties": { + "date": "2020-01-01T00:00:00Z", + "population": "900000" + } + }, + { + "type": "Feature", + "name": "eastern_1", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 9.993892033027763, + 53.690449096926166 + ], + [ + 10.002131779121513, + 53.3999568266435 + ], + [ + 10.033717472480888, + 53.46540970854644 + ], + [ + 10.033717472480888, + 53.48666019585998 + ], + [ + 10.039210636543388, + 53.51524981807774 + ], + [ + 10.236964542793388, + 53.4506915980374 + ], + [ + 10.188899357246513, + 53.49646452400197 + ], + [ + 10.212245304512138, + 53.51198340843251 + ], + [ + 10.139460880684013, + 53.53810763629806 + ], + [ + 10.169673283027763, + 53.57237123811582 + ], + [ + 10.188899357246513, + 53.660350282861664 + ], + [ + 10.136714298652763, + 53.70345814039346 + ], + [ + 10.006251652168388, + 53.68638294628541 + ], + [ + 9.993892033027763, + 53.690449096926166 + ] + ] + ] + }, + "properties": { + "date": "1990-01-01T00:00:00Z", + "population": "400000" + } + }, + { + "type": "Feature", + "name": "eastern_2", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 9.993892033027763, + 53.690449096926166 + ], + [ + 10.002131779121513, + 53.3999568266435 + ], + [ + 10.033717472480888, + 53.46540970854644 + ], + [ + 10.033717472480888, + 53.48666019585998 + ], + [ + 10.039210636543388, + 53.51524981807774 + ], + [ + 10.236964542793388, + 53.4506915980374 + ], + [ + 10.188899357246513, + 53.49646452400197 + ], + [ + 10.212245304512138, + 53.51198340843251 + ], + [ + 10.139460880684013, + 53.53810763629806 + ], + [ + 10.169673283027763, + 53.57237123811582 + ], + [ + 10.188899357246513, + 53.660350282861664 + ], + [ + 10.136714298652763, + 53.70345814039346 + ], + [ + 10.006251652168388, + 53.68638294628541 + ], + [ + 9.993892033027763, + 53.690449096926166 + ] + ] + ] + }, + "properties": { + "date": "2000-01-01T00:00:00Z", + "population": "900000" + } + }, + { + "type": "Feature", + "name": "eastern_3", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 9.993892033027763, + 53.690449096926166 + ], + [ + 10.002131779121513, + 53.3999568266435 + ], + [ + 10.033717472480888, + 53.46540970854644 + ], + [ + 10.033717472480888, + 53.48666019585998 + ], + [ + 10.039210636543388, + 53.51524981807774 + ], + [ + 10.236964542793388, + 53.4506915980374 + ], + [ + 10.188899357246513, + 53.49646452400197 + ], + [ + 10.212245304512138, + 53.51198340843251 + ], + [ + 10.139460880684013, + 53.53810763629806 + ], + [ + 10.169673283027763, + 53.57237123811582 + ], + [ + 10.188899357246513, + 53.660350282861664 + ], + [ + 10.136714298652763, + 53.70345814039346 + ], + [ + 10.006251652168388, + 53.68638294628541 + ], + [ + 9.993892033027763, + 53.690449096926166 + ] + ] + ] + }, + "properties": { + "date": "2010-01-01T00:00:00Z", + "population": "500000" + } + }, + { + "type": "Feature", + "name": "eastern_4", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 9.993892033027763, + 53.690449096926166 + ], + [ + 10.002131779121513, + 53.3999568266435 + ], + [ + 10.033717472480888, + 53.46540970854644 + ], + [ + 10.033717472480888, + 53.48666019585998 + ], + [ + 10.039210636543388, + 53.51524981807774 + ], + [ + 10.236964542793388, + 53.4506915980374 + ], + [ + 10.188899357246513, + 53.49646452400197 + ], + [ + 10.212245304512138, + 53.51198340843251 + ], + [ + 10.139460880684013, + 53.53810763629806 + ], + [ + 10.169673283027763, + 53.57237123811582 + ], + [ + 10.188899357246513, + 53.660350282861664 + ], + [ + 10.136714298652763, + 53.70345814039346 + ], + [ + 10.006251652168388, + 53.68638294628541 + ], + [ + 9.993892033027763, + 53.690449096926166 + ] + ] + ] + }, + "properties": { + "date": "2020-01-01T00:00:00Z", + "population": "800000" + } + } + ] +} diff --git a/xcube_geodb_openeo/api/routes.py b/xcube_geodb_openeo/api/routes.py index 54d8c82..8e08984 100644 --- a/xcube_geodb_openeo/api/routes.py +++ b/xcube_geodb_openeo/api/routes.py @@ -193,25 +193,28 @@ def post(self): registry = processes.get_processes_registry() graph = processing_request['process_graph'] pg_node = PGNode.from_flat_graph(graph) - - error_message = ('Graphs different from `load_collection` -> ' - '`save_result` not yet supported.') - if pg_node.process_id == 'save_result': - source = pg_node.arguments['data']['from_node'] - if source.process_id == 'load_collection': - process = registry.get_process(source.process_id) - expected_parameters = process.metadata['parameters'] - process_parameters = source.arguments - self.ensure_parameters(expected_parameters, process_parameters) - process.parameters = process_parameters - load_collection_result = processes.submit_process_sync( - process, self.ctx) - gj = load_collection_result.to_geojson() - self.response.finish(gj) - else: - raise ValueError(error_message) - else: - raise ValueError(error_message) + registry.get_process(pg_node.process_id) + + nodes = [] + current_node = pg_node + while 'data' in current_node.arguments and 'from_node' in current_node.arguments['data']: + nodes.append(current_node) + current_node = current_node.arguments['data']['from_node'] + nodes.append(current_node) + nodes.reverse() + + current_result = None + for node in nodes: + process = registry.get_process(node.process_id) + expected_parameters = process.metadata['parameters'] + process_parameters = node.arguments + process_parameters['input'] = current_result + self.ensure_parameters(expected_parameters, process_parameters) + process.parameters = process_parameters + current_result = processes.submit_process_sync(process, self.ctx) + + current_result = json.dumps(current_result, default=str) + self.response.finish(current_result) @staticmethod def ensure_parameters(expected_parameters, process_parameters): @@ -219,8 +222,9 @@ def ensure_parameters(expected_parameters, process_parameters): is_optional_param = 'optional' in ep and ep['optional'] if not is_optional_param: if ep['name'] not in process_parameters: - raise (ApiError(400, f'Request body must contain parameter' - f' \'{ep["name"]}\'.')) + raise (ApiError(400, + f'Request body must contain parameter' + f' \'{ep["name"]}\'.')) @api.route('/conformance') diff --git a/xcube_geodb_openeo/backend/processes.py b/xcube_geodb_openeo/backend/processes.py index 8ca5bcd..15e1dbc 100644 --- a/xcube_geodb_openeo/backend/processes.py +++ b/xcube_geodb_openeo/backend/processes.py @@ -18,13 +18,21 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. +import datetime +import dateutil.parser import importlib import importlib.resources as resources import json +import pytz + from abc import abstractmethod from typing import Dict, List, Any +import shapely +from geojson import Feature, FeatureCollection from xcube.server.api import ServerContextT +from openeo.internal.graph_building import PGNode +from ..core.vectorcube import StaticVectorCubeFactory class Process: @@ -56,17 +64,16 @@ def parameters(self, p: dict) -> None: self._parameters = p @abstractmethod - def execute(self, parameters: dict, ctx: ServerContextT) -> str: + def execute(self, parameters: dict, ctx: ServerContextT) -> Any: pass - @abstractmethod def translate_parameters(self, parameters: dict) -> dict: """ Translate params from query params to backend params :param parameters: query params :return: backend params """ - pass + return parameters def read_default_processes() -> List[Process]: @@ -148,6 +155,20 @@ def get_file_formats(self) -> Dict: } ] }, + "GeoJSON": { + "title": "GeoJSON", + "description": "Export to GeoJSON.", + "gis_data_types": [ + "vector" + ], + "links": [ + { + "href": "https://geojson.org/", + "rel": "about", + "title": "GeoJSON is a format for encoding a variety of geographic data structures." + } + ] + }, "GPKG": { "title": "OGC GeoPackage", "gis_data_types": [ @@ -249,7 +270,7 @@ def submit_process_sync(p: Process, ctx: ServerContextT) -> Any: class LoadCollection(Process): DEFAULT_CRS = 4326 - def execute(self, query_params: dict, ctx: ServerContextT) -> str: + def execute(self, query_params: dict, ctx: ServerContextT): params = self.translate_parameters(query_params) collection_id = tuple(params['collection_id'].split('~')) bbox_transformed = None @@ -284,3 +305,90 @@ def translate_parameters(self, query_params: dict) -> dict: 'bbox': bbox_qp, 'crs': crs_qp } + + +class AggregateTemporal(Process): + + def execute(self, query_params: dict, ctx: ServerContextT): + # todo allow for more complex reducer functions + # todo allow for more than one interval + reducer_node = PGNode.from_flat_graph(query_params['reducer'] + ['process_graph']) + reducer_id = reducer_node.process_id + registry = get_processes_registry() + reducer = registry.get_process(reducer_id) + vector_cube = query_params['input'] + interval = query_params['intervals'][0] + pattern = query_params['context']['pattern'] + utc = pytz.UTC + start_date = (datetime.datetime.strptime(interval[0], pattern) + .replace(tzinfo=utc)) + end_date = (datetime.datetime.strptime(interval[1], pattern) + .replace(tzinfo=utc)) + time_dim_name = vector_cube.get_time_dim_name() + features_by_geometry = vector_cube.get_features_by_geometry(limit=None) + + result = StaticVectorCubeFactory() + result.collection_id = vector_cube.id + '_agg_temp' + result.vector_dim = vector_cube.get_vector_dim() + result.srid = vector_cube.srid + result.time_dim = vector_cube.get_time_dim() + result.bbox = vector_cube.get_bbox() + result.geometry_types = vector_cube.get_geometry_types() + result.metadata = vector_cube.get_metadata() + result.features = [] + + for geometry in features_by_geometry: + features = features_by_geometry[geometry] + extractions = {} + for feature in features: + for prop in [p for p in feature['properties'] if + not p == 'created_at' + and not p == 'modified_at' + and not p == time_dim_name + and (type(feature['properties'][p]) == float + or type(feature['properties'][p]) == int)]: + if prop not in extractions: + extractions[prop] = [] + date = (dateutil.parser.parse( + feature['properties'][time_dim_name]).replace(tzinfo=utc)) + if start_date <= date < end_date: + extractions[prop].append(feature['properties'][prop]) + + new_properties = {'created_at': datetime.datetime.now(utc), + time_dim_name: end_date} + for prop in extractions.keys(): + new_properties[prop] = reducer.execute( + {'input': extractions[prop]}, ctx=ctx) + for prop in feature['properties']: + if prop not in new_properties: + new_properties[prop] = feature['properties'][prop] + result.features.append( + Feature(None, shapely.wkt.loads(geometry), new_properties)) + + return result.create() + + +class SaveResult(Process): + + def execute(self, query_params: dict, ctx: ServerContextT): + vector_cube = query_params['input'] + if query_params['format'].lower() == 'geojson': + collection = FeatureCollection( + vector_cube.load_features(limit=None)) + return collection + + +class Mean(Process): + + def execute(self, query_params: dict, ctx: ServerContextT): + import numpy as np + return np.mean(query_params['input']) + + +class Median(Process): + + def execute(self, query_params: dict, ctx: ServerContextT): + import numpy as np + return np.median(query_params['input']) + diff --git a/xcube_geodb_openeo/backend/res/processes/aggregate_temporal_2.0.0-rc.1.json b/xcube_geodb_openeo/backend/res/processes/aggregate_temporal_2.0.0-rc.1.json new file mode 100644 index 0000000..d3a55e6 --- /dev/null +++ b/xcube_geodb_openeo/backend/res/processes/aggregate_temporal_2.0.0-rc.1.json @@ -0,0 +1,254 @@ +{ + "id": "aggregate_temporal", + "summary": "Temporal aggregations", + "description": "Computes a temporal aggregation based on an array of temporal intervals.\n\nFor common regular calendar hierarchies such as year, month, week or seasons ``aggregate_temporal_period()`` can be used. Other calendar hierarchies must be transformed into specific intervals by the clients.\n\nFor each interval, all data along the dimension will be passed through the reducer.\n\nThe computed values will be projected to the labels. If no labels are specified, the start of the temporal interval will be used as label for the corresponding values. In case of a conflict (i.e. the user-specified values for the start times of the temporal intervals are not distinct), the user-defined labels must be specified in the parameter `labels` as otherwise a `DistinctDimensionLabelsRequired` exception would be thrown. The number of user-defined labels and the number of intervals need to be equal.\n\nIf the dimension is not set or is set to `null`, the data cube is expected to only have one temporal dimension.", + "categories": [ + "cubes", + "aggregate" + ], + "parameters": [ + { + "name": "data", + "description": "A data cube.", + "schema": { + "type": "object", + "subtype": "datacube", + "dimensions": [ + { + "type": "temporal" + } + ] + } + }, + { + "name": "intervals", + "description": "Left-closed temporal intervals, which are allowed to overlap. Each temporal interval in the array has exactly two elements:\n\n1. The first element is the start of the temporal interval. The specified time instant is **included** in the interval.\n2. The second element is the end of the temporal interval. The specified time instant is **excluded** from the interval.\n\nThe second element must always be greater/later than the first element, except when using time without date. Otherwise, a `TemporalExtentEmpty` exception is thrown.", + "schema": { + "type": "array", + "subtype": "temporal-intervals", + "minItems": 1, + "items": { + "type": "array", + "subtype": "temporal-interval", + "uniqueItems": true, + "minItems": 2, + "maxItems": 2, + "items": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "subtype": "date-time", + "description": "Date and time with a time zone." + }, + { + "type": "string", + "format": "date", + "subtype": "date", + "description": "Date only, formatted as `YYYY-MM-DD`. The time zone is UTC. Missing time components are all 0." + }, + { + "type": "string", + "subtype": "time", + "pattern": "^\\d{2}:\\d{2}:\\d{2}$", + "description": "Time only, formatted as `HH:MM:SS`. The time zone is UTC." + }, + { + "type": "null" + } + ] + } + }, + "examples": [ + [ + [ + "2015-01-01", + "2016-01-01" + ], + [ + "2016-01-01", + "2017-01-01" + ], + [ + "2017-01-01", + "2018-01-01" + ] + ], + [ + [ + "06:00:00", + "18:00:00" + ], + [ + "18:00:00", + "06:00:00" + ] + ] + ] + } + }, + { + "name": "reducer", + "description": "A reducer to be applied for the values contained in each interval. A reducer is a single process such as ``mean()`` or a set of processes, which computes a single value for a list of values, see the category 'reducer' for such processes. Intervals may not contain any values, which for most reducers leads to no-data (`null`) values by default.", + "schema": { + "type": "object", + "subtype": "process-graph", + "parameters": [ + { + "name": "data", + "description": "A labeled array with elements of any type. If there's no data for the interval, the array is empty.", + "schema": { + "type": "array", + "subtype": "labeled-array", + "items": { + "description": "Any data type." + } + } + }, + { + "name": "context", + "description": "Additional data passed by the user.", + "schema": { + "description": "Any data type." + }, + "optional": true, + "default": null + } + ], + "returns": { + "description": "The value to be set in the new data cube.", + "schema": { + "description": "Any data type." + } + } + } + }, + { + "name": "labels", + "description": "Distinct labels for the intervals, which can contain dates and/or times. Is only required to be specified if the values for the start of the temporal intervals are not distinct and thus the default labels would not be unique. The number of labels and the number of groups need to be equal.", + "schema": { + "type": "array", + "items": { + "type": [ + "number", + "string" + ] + } + }, + "default": [], + "optional": true + }, + { + "name": "dimension", + "description": "The name of the temporal dimension for aggregation. All data along the dimension is passed through the specified reducer. If the dimension is not set or set to `null`, the data cube is expected to only have one temporal dimension. Fails with a `TooManyDimensions` exception if it has more dimensions. Fails with a `DimensionNotAvailable` exception if the specified dimension does not exist.", + "schema": { + "type": [ + "string", + "null" + ] + }, + "default": null, + "optional": true + }, + { + "name": "context", + "description": "Additional data to be passed to the reducer.", + "schema": { + "description": "Any data type." + }, + "optional": true, + "default": null + } + ], + "returns": { + "description": "A new data cube with the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged, except for the resolution and dimension labels of the given temporal dimension.", + "schema": { + "type": "object", + "subtype": "datacube", + "dimensions": [ + { + "type": "temporal" + } + ] + } + }, + "examples": [ + { + "arguments": { + "data": { + "from_parameter": "data" + }, + "intervals": [ + [ + "2015-01-01", + "2016-01-01" + ], + [ + "2016-01-01", + "2017-01-01" + ], + [ + "2017-01-01", + "2018-01-01" + ], + [ + "2018-01-01", + "2019-01-01" + ], + [ + "2019-01-01", + "2020-01-01" + ] + ], + "labels": [ + "2015", + "2016", + "2017", + "2018", + "2019" + ], + "reducer": { + "process_graph": { + "mean1": { + "process_id": "mean", + "arguments": { + "data": { + "from_parameter": "data" + } + }, + "result": true + } + } + } + } + } + ], + "exceptions": { + "TooManyDimensions": { + "message": "The data cube contains multiple temporal dimensions. The parameter `dimension` must be specified." + }, + "DimensionNotAvailable": { + "message": "A dimension with the specified name does not exist." + }, + "DistinctDimensionLabelsRequired": { + "message": "The dimension labels have duplicate values. Distinct labels must be specified." + }, + "TemporalExtentEmpty": { + "message": "At least one of the intervals is empty. The second instant in time must always be greater/later than the first instant." + } + }, + "links": [ + { + "href": "https://openeo.org/documentation/1.0/datacubes.html#aggregate", + "rel": "about", + "title": "Aggregation explained in the openEO documentation" + }, + { + "href": "https://www.rfc-editor.org/rfc/rfc3339.html", + "rel": "about", + "title": "RFC3339: Details about formatting temporal strings" + } + ], + "module": "xcube_geodb_openeo.backend.processes", + "class_name": "AggregateTemporal" +} \ No newline at end of file diff --git a/xcube_geodb_openeo/backend/res/processes/load_collection.json b/xcube_geodb_openeo/backend/res/processes/load_collection.json deleted file mode 100644 index 1cac9ca..0000000 --- a/xcube_geodb_openeo/backend/res/processes/load_collection.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "id": "load_collection", - "summary": "Load a collection", - "categories": [ - "import" - ], - "description": "Loads a collection from the current back-end by its id and returns it as a vector cube. The data that is added to the data cube can be restricted with the parameters \"spatial_extent\" and \"properties\".", - "parameters": [ - { - "name": "id", - "description": "The collection's name", - "schema": { - "type": "string" - } - }, - { - "name": "database", - "description": "The database of the collection", - "schema": { - "type": "string" - }, - "optional": true - }, - { - "name": "spatial_extent", - "description": "Limits the data to load from the collection to the specified bounding box or polygons.\n\nThe process puts a pixel into the data cube if the point at the pixel center intersects with the bounding box.\n\nSet this parameter to `null` to set no limit for the spatial extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using ``filter_bbox()`` or ``filter_spatial()`` directly after loading unbounded data.", - "schema": [ - { - "title": "Bounding Box", - "type": "object", - "subtype": "bounding-box", - "required": [ - "west", - "south", - "east", - "north" - ], - "properties": { - "west": { - "description": "West (lower left corner, coordinate axis 1).", - "type": "number" - }, - "south": { - "description": "South (lower left corner, coordinate axis 2).", - "type": "number" - }, - "east": { - "description": "East (upper right corner, coordinate axis 1).", - "type": "number" - }, - "north": { - "description": "North (upper right corner, coordinate axis 2).", - "type": "number" - }, - "crs": { - "description": "Coordinate reference system of the extent, specified as as [EPSG code](http://www.epsg-registry.org/), [WKT2 (ISO 19162) string] (http://docs.opengeospatial.org/is/18-010r7/18-010r7.html) or [PROJ definition (deprecated)](https://proj.org/usage/quickstart.html). Defaults to `4326` (EPSG code 4326) unless the client explicitly requests a different coordinate reference system.", - "title": "EPSG Code", - "type": "integer", - "subtype": "epsg-code", - "minimum": 1000, - "examples": [ - 3857 - ], - "default": 4326 - } - } - }, - { - "title": "No filter", - "description": "Don't filter spatially. All data is included in the data cube.", - "type": "null" - } - ] - } - ], - "returns": { - "description": "A vector cube for further processing.", - "schema": { - "type": "object", - "subtype": "vector-cube" - } - }, - "module": "xcube_geodb_openeo.backend.processes", - "class_name": "LoadCollection" -} \ No newline at end of file diff --git a/xcube_geodb_openeo/backend/res/processes/load_collection_2.0.0-rc.1.json b/xcube_geodb_openeo/backend/res/processes/load_collection_2.0.0-rc.1.json new file mode 100644 index 0000000..0d220c4 --- /dev/null +++ b/xcube_geodb_openeo/backend/res/processes/load_collection_2.0.0-rc.1.json @@ -0,0 +1,324 @@ +{ + "id": "load_collection", + "summary": "Load a collection", + "description": "Loads a collection from the current back-end by its id and returns it as a processable data cube. The data that is added to the data cube can be restricted with the parameters `spatial_extent`, `temporal_extent`, `bands` and `properties`. If no data is available for the given extents, a `NoDataAvailable` exception is thrown.\n\n**Remarks:**\n\n* The bands (and all dimensions that specify nominal dimension labels) are expected to be ordered as specified in the metadata if the `bands` parameter is set to `null`.\n* If no additional parameter is specified this would imply that the whole data set is expected to be loaded. Due to the large size of many data sets, this is not recommended and may be optimized by back-ends to only load the data that is actually required after evaluating subsequent processes such as filters. This means that the values in the data cube should be processed only after the data has been limited to the required extent and as a consequence also to a manageable size.", + "categories": [ + "cubes", + "import" + ], + "parameters": [ + { + "name": "id", + "description": "The collection id.", + "schema": { + "type": "string", + "subtype": "collection-id", + "pattern": "^[\\w\\-\\.~/]+$" + } + }, + { + "name": "spatial_extent", + "description": "Limits the data to load from the collection to the specified bounding box or polygons.\n\n* For raster data, the process loads the pixel into the data cube if the point at the pixel center intersects with the bounding box or any of the polygons (as defined in the Simple Features standard by the OGC).\n* For vector data, the process loads the geometry into the data cube if the geometry is fully *within* the bounding box or any of the polygons (as defined in the Simple Features standard by the OGC). Empty geometries may only be in the data cube if no spatial extent has been provided.\n\nThe GeoJSON can be one of the following feature types:\n\n* A `Polygon` or `MultiPolygon` geometry,\n* a `Feature` with a `Polygon` or `MultiPolygon` geometry, or\n* a `FeatureCollection` containing at least one `Feature` with `Polygon` or `MultiPolygon` geometries.\n* Empty geometries are ignored.\n\nSet this parameter to `null` to set no limit for the spatial extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using ``filter_bbox()`` or ``filter_spatial()`` directly after loading unbounded data.", + "schema": [ + { + "title": "Bounding Box", + "type": "object", + "subtype": "bounding-box", + "required": [ + "west", + "south", + "east", + "north" + ], + "properties": { + "west": { + "description": "West (lower left corner, coordinate axis 1).", + "type": "number" + }, + "south": { + "description": "South (lower left corner, coordinate axis 2).", + "type": "number" + }, + "east": { + "description": "East (upper right corner, coordinate axis 1).", + "type": "number" + }, + "north": { + "description": "North (upper right corner, coordinate axis 2).", + "type": "number" + }, + "base": { + "description": "Base (optional, lower left corner, coordinate axis 3).", + "type": [ + "number", + "null" + ], + "default": null + }, + "height": { + "description": "Height (optional, upper right corner, coordinate axis 3).", + "type": [ + "number", + "null" + ], + "default": null + }, + "crs": { + "description": "Coordinate reference system of the extent, specified as as [EPSG code](http://www.epsg-registry.org/) or [WKT2 CRS string](http://docs.opengeospatial.org/is/18-010r7/18-010r7.html). Defaults to `4326` (EPSG code 4326) unless the client explicitly requests a different coordinate reference system.", + "anyOf": [ + { + "title": "EPSG Code", + "type": "integer", + "subtype": "epsg-code", + "minimum": 1000, + "examples": [ + 3857 + ] + }, + { + "title": "WKT2", + "type": "string", + "subtype": "wkt2-definition" + } + ], + "default": 4326 + } + } + }, + { + "title": "GeoJSON", + "description": "Deprecated in favor of ``load_geojson()``. Limits the data cube to the bounding box of the given geometries. For raster data, all pixels inside the bounding box that do not intersect with any of the polygons will be set to no data (`null`).\n\nThe GeoJSON type `GeometryCollection` is not supported. Empty geometries are ignored.", + "type": "object", + "subtype": "geojson", + "deprecated": true + }, + { + "title": "Vector data cube", + "description": "Limits the data cube to the bounding box of the given geometries in the vector data cube. For raster data, all pixels inside the bounding box that do not intersect with any of the polygons will be set to no data (`null`). Empty geometries are ignored.", + "type": "object", + "subtype": "datacube", + "dimensions": [ + { + "type": "geometry" + } + ] + }, + { + "title": "No filter", + "description": "Don't filter spatially. All data is included in the data cube.", + "type": "null" + } + ] + }, + { + "name": "temporal_extent", + "description": "Limits the data to load from the collection to the specified left-closed temporal interval. Applies to all temporal dimensions. The interval has to be specified as an array with exactly two elements:\n\n1. The first element is the start of the temporal interval. The specified time instant is **included** in the interval.\n2. The second element is the end of the temporal interval. The specified time instant is **excluded** from the interval.\n\nThe second element must always be greater/later than the first element. Otherwise, a `TemporalExtentEmpty` exception is thrown.\n\nAlso supports unbounded intervals by setting one of the boundaries to `null`, but never both.\n\nSet this parameter to `null` to set no limit for the temporal extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using ``filter_temporal()`` directly after loading unbounded data.", + "schema": [ + { + "type": "array", + "subtype": "temporal-interval", + "uniqueItems": true, + "minItems": 2, + "maxItems": 2, + "items": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "subtype": "date-time", + "description": "Date and time with a time zone." + }, + { + "type": "string", + "format": "date", + "subtype": "date", + "description": "Date only, formatted as `YYYY-MM-DD`. The time zone is UTC. Missing time components are all 0." + }, + { + "type": "null" + } + ] + }, + "examples": [ + [ + "2015-01-01T00:00:00Z", + "2016-01-01T00:00:00Z" + ], + [ + "2015-01-01", + "2016-01-01" + ] + ] + }, + { + "title": "No filter", + "description": "Don't filter temporally. All data is included in the data cube.", + "type": "null" + } + ] + }, + { + "name": "bands", + "description": "Only adds the specified bands into the data cube so that bands that don't match the list of band names are not available. Applies to all dimensions of type `bands`.\n\nEither the unique band name (metadata field `name` in bands) or one of the common band names (metadata field `common_name` in bands) can be specified. If the unique band name and the common name conflict, the unique band name has a higher priority.\n\nThe order of the specified array defines the order of the bands in the data cube. If multiple bands match a common name, all matched bands are included in the original order.\n\nIt is recommended to use this parameter instead of using ``filter_bands()`` directly after loading unbounded data.", + "schema": [ + { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "subtype": "band-name" + } + }, + { + "title": "No filter", + "description": "Don't filter bands. All bands are included in the data cube.", + "type": "null" + } + ], + "default": null, + "optional": true + }, + { + "name": "properties", + "description": "Limits the data by metadata properties to include only data in the data cube which all given conditions return `true` for (AND operation).\n\nSpecify key-value-pairs with the key being the name of the metadata property, which can be retrieved with the openEO Data Discovery for Collections. The value must be a condition (user-defined process) to be evaluated against the collection metadata, see the example.", + "schema": [ + { + "type": "object", + "subtype": "metadata-filter", + "title": "Filters", + "description": "A list of filters to check against. Specify key-value-pairs with the key being the name of the metadata property name and the value being a process evaluated against the metadata values.", + "additionalProperties": { + "type": "object", + "subtype": "process-graph", + "parameters": [ + { + "name": "value", + "description": "The property value to be checked against.", + "schema": { + "description": "Any data type." + } + } + ], + "returns": { + "description": "`true` if the data should be loaded into the data cube, otherwise `false`.", + "schema": { + "type": "boolean" + } + } + } + }, + { + "title": "No filter", + "description": "Don't filter by metadata properties.", + "type": "null" + } + ], + "default": null, + "optional": true + } + ], + "returns": { + "description": "A data cube for further processing. The dimensions and dimension properties (name, type, labels, reference system and resolution) correspond to the collection's metadata, but the dimension labels are restricted as specified in the parameters.", + "schema": { + "type": "object", + "subtype": "datacube" + } + }, + "exceptions": { + "NoDataAvailable": { + "message": "There is no data available for the given extents." + }, + "TemporalExtentEmpty": { + "message": "The temporal extent is empty. The second instant in time must always be greater/later than the first instant in time." + } + }, + "examples": [ + { + "description": "Loading `Sentinel-2B` data from a `Sentinel-2` collection for 2018, but only with cloud cover between 0 and 50%.", + "arguments": { + "id": "Sentinel-2", + "spatial_extent": { + "west": 16.1, + "east": 16.6, + "north": 48.6, + "south": 47.2 + }, + "temporal_extent": [ + "2018-01-01", + "2019-01-01" + ], + "properties": { + "eo:cloud_cover": { + "process_graph": { + "cc": { + "process_id": "between", + "arguments": { + "x": { + "from_parameter": "value" + }, + "min": 0, + "max": 50 + }, + "result": true + } + } + }, + "platform": { + "process_graph": { + "pf": { + "process_id": "eq", + "arguments": { + "x": { + "from_parameter": "value" + }, + "y": "Sentinel-2B", + "case_sensitive": false + }, + "result": true + } + } + } + } + } + } + ], + "links": [ + { + "href": "https://openeo.org/documentation/1.0/datacubes.html", + "rel": "about", + "title": "Data Cubes explained in the openEO documentation" + }, + { + "rel": "about", + "href": "https://proj.org/usage/projections.html", + "title": "PROJ parameters for cartographic projections" + }, + { + "rel": "about", + "href": "http://www.epsg-registry.org", + "title": "Official EPSG code registry" + }, + { + "rel": "about", + "href": "http://www.epsg.io", + "title": "Unofficial EPSG code database" + }, + { + "href": "http://www.opengeospatial.org/standards/sfa", + "rel": "about", + "title": "Simple Features standard by the OGC" + }, + { + "rel": "about", + "href": "https://github.com/radiantearth/stac-spec/tree/master/extensions/eo#common-band-names", + "title": "List of common band names as specified by the STAC specification" + }, + { + "href": "https://www.rfc-editor.org/rfc/rfc3339.html", + "rel": "about", + "title": "RFC3339: Details about formatting temporal strings" + } + ], + "module": "xcube_geodb_openeo.backend.processes", + "class_name": "LoadCollection" +} \ No newline at end of file diff --git a/xcube_geodb_openeo/backend/res/processes/mean_2.0.0-rc.1.json b/xcube_geodb_openeo/backend/res/processes/mean_2.0.0-rc.1.json new file mode 100644 index 0000000..10ad824 --- /dev/null +++ b/xcube_geodb_openeo/backend/res/processes/mean_2.0.0-rc.1.json @@ -0,0 +1,168 @@ +{ + "id": "mean", + "summary": "Arithmetic mean (average)", + "description": "The arithmetic mean of an array of numbers is the quantity commonly called the average. It is defined as the sum of all elements divided by the number of elements.\n\nAn array without non-`null` elements resolves always with `null`.", + "categories": [ + "math > statistics", + "reducer" + ], + "parameters": [ + { + "name": "data", + "description": "An array of numbers.", + "schema": { + "type": "array", + "items": { + "type": [ + "number", + "null" + ] + } + } + }, + { + "name": "ignore_nodata", + "description": "Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to `false` considers no-data values so that `null` is returned if any value is such a value.", + "schema": { + "type": "boolean" + }, + "default": true, + "optional": true + } + ], + "returns": { + "description": "The computed arithmetic mean.", + "schema": { + "type": [ + "number", + "null" + ] + } + }, + "examples": [ + { + "arguments": { + "data": [ + 1, + 0, + 3, + 2 + ] + }, + "returns": 1.5 + }, + { + "arguments": { + "data": [ + 9, + 2.5, + null, + -2.5 + ] + }, + "returns": 3 + }, + { + "arguments": { + "data": [ + 1, + null + ], + "ignore_nodata": false + }, + "returns": null + }, + { + "description": "The input array is empty: return `null`.", + "arguments": { + "data": [] + }, + "returns": null + }, + { + "description": "The input array has only `null` elements: return `null`.", + "arguments": { + "data": [ + null, + null + ] + }, + "returns": null + } + ], + "links": [ + { + "rel": "about", + "href": "http://mathworld.wolfram.com/ArithmeticMean.html", + "title": "Arithmetic mean explained by Wolfram MathWorld" + } + ], + "process_graph": { + "count_condition": { + "process_id": "if", + "arguments": { + "value": { + "from_parameter": "ignore_nodata" + }, + "accept": null, + "reject": true + } + }, + "count": { + "process_id": "count", + "arguments": { + "data": { + "from_parameter": "data" + }, + "condition": { + "from_node": "count_condition" + } + } + }, + "sum": { + "process_id": "sum", + "arguments": { + "data": { + "from_parameter": "data" + }, + "ignore_nodata": { + "from_parameter": "ignore_nodata" + } + } + }, + "divide": { + "process_id": "divide", + "arguments": { + "x": { + "from_node": "sum" + }, + "y": { + "from_node": "count" + } + } + }, + "neq": { + "process_id": "neq", + "arguments": { + "x": { + "from_node": "count" + }, + "y": 0 + } + }, + "if": { + "process_id": "if", + "arguments": { + "value": { + "from_node": "neq" + }, + "accept": { + "from_node": "divide" + } + }, + "result": true + } + }, + "module": "xcube_geodb_openeo.backend.processes", + "class_name": "Mean" +} \ No newline at end of file diff --git a/xcube_geodb_openeo/backend/res/processes/median_2.0.0-rc.1.json b/xcube_geodb_openeo/backend/res/processes/median_2.0.0-rc.1.json new file mode 100644 index 0000000..2b19ae4 --- /dev/null +++ b/xcube_geodb_openeo/backend/res/processes/median_2.0.0-rc.1.json @@ -0,0 +1,149 @@ +{ + "id": "median", + "summary": "Statistical median", + "description": "The statistical median of an array of numbers is the value separating the higher half from the lower half of the data.\n\nAn array without non-`null` elements resolves always with `null`.\n\n**Remarks:**\n\n* For symmetric arrays, the result is equal to the ``mean()``.\n* The median can also be calculated by computing the ``quantiles()`` with a probability of *0.5*.", + "categories": [ + "math > statistics", + "reducer" + ], + "parameters": [ + { + "name": "data", + "description": "An array of numbers.", + "schema": { + "type": "array", + "items": { + "type": [ + "number", + "null" + ] + } + } + }, + { + "name": "ignore_nodata", + "description": "Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to `false` considers no-data values so that `null` is returned if any value is such a value.", + "schema": { + "type": "boolean" + }, + "default": true, + "optional": true + } + ], + "returns": { + "description": "The computed statistical median.", + "schema": { + "type": [ + "number", + "null" + ] + } + }, + "examples": [ + { + "arguments": { + "data": [ + 1, + 3, + 3, + 6, + 7, + 8, + 9 + ] + }, + "returns": 6 + }, + { + "arguments": { + "data": [ + 1, + 2, + 3, + 4, + 5, + 6, + 8, + 9 + ] + }, + "returns": 4.5 + }, + { + "arguments": { + "data": [ + -1, + -0.5, + null, + 1 + ] + }, + "returns": -0.5 + }, + { + "arguments": { + "data": [ + -1, + 0, + null, + 1 + ], + "ignore_nodata": false + }, + "returns": null + }, + { + "description": "The input array is empty: return `null`.", + "arguments": { + "data": [] + }, + "returns": null + }, + { + "description": "The input array has only `null` elements: return `null`.", + "arguments": { + "data": [ + null, + null + ] + }, + "returns": null + } + ], + "links": [ + { + "rel": "about", + "href": "http://mathworld.wolfram.com/StatisticalMedian.html", + "title": "Statistical Median explained by Wolfram MathWorld" + } + ], + "process_graph": { + "quantiles": { + "process_id": "quantiles", + "arguments": { + "data": { + "from_parameter": "data" + }, + "probabilities": [ + 0.5 + ], + "ignore_nodata": { + "from_parameter": "ignore_nodata" + } + } + }, + "array_element": { + "process_id": "array_element", + "arguments": { + "data": { + "from_node": "quantiles" + }, + "return_nodata": true, + "index": 0 + }, + "result": true + } + }, + "module": "xcube_geodb_openeo.backend.processes", + "class_name": "Median" +} \ No newline at end of file diff --git a/xcube_geodb_openeo/backend/res/processes/save_result_2.0.0-rc.1.json b/xcube_geodb_openeo/backend/res/processes/save_result_2.0.0-rc.1.json new file mode 100644 index 0000000..415c0b0 --- /dev/null +++ b/xcube_geodb_openeo/backend/res/processes/save_result_2.0.0-rc.1.json @@ -0,0 +1,66 @@ +{ + "id": "save_result", + "summary": "Save processed data", + "description": "Makes the processed data available in the given file format to the corresponding medium that is relevant for the context this processes is applied in:\n\n* For **batch jobs** the data is stored on the back-end. STAC-compatible metadata is usually made available with the processed data.\n* For **synchronous processing** the data is sent to the client as a direct response to the request.\n* **Secondary web services** are provided with the processed data so that it can make use of it (e.g., visualize it). Web service may require the data in a certain format. Please refer to the documentation of the individual service types for details.", + "categories": [ + "cubes", + "export" + ], + "parameters": [ + { + "name": "data", + "description": "The data to deliver in the given file format.", + "schema": { + "type": "object", + "subtype": "datacube" + } + }, + { + "name": "format", + "description": "The file format to use. It must be one of the values that the server reports as supported output file formats, which usually correspond to the short GDAL/OGR codes. This parameter is *case insensitive*.\n\n* If the data cube is empty and the file format can't store empty data cubes, a `DataCubeEmpty` exception is thrown.\n* If the file format is otherwise not suitable for storing the underlying data structure, a `FormatUnsuitable` exception is thrown.", + "schema": { + "type": "string", + "subtype": "output-format" + } + }, + { + "name": "options", + "description": "The file format parameters to be used to create the file(s). Must correspond to the parameters that the server reports as supported parameters for the chosen `format`. The parameter names and valid values usually correspond to the GDAL/OGR format options.", + "schema": { + "type": "object", + "subtype": "output-format-options" + }, + "default": {}, + "optional": true + } + ], + "returns": { + "description": "Always returns `true` as in case of an error an exception is thrown which aborts the execution of the process.", + "schema": { + "type": "boolean", + "const": true + } + }, + "exceptions": { + "FormatUnsuitable": { + "message": "Data can't be transformed into the requested output format." + }, + "DataCubeEmpty": { + "message": "The file format doesn't support storing empty data cubes." + } + }, + "links": [ + { + "rel": "about", + "href": "https://gdal.org/drivers/raster/index.html", + "title": "GDAL Raster Formats" + }, + { + "rel": "about", + "href": "https://gdal.org/drivers/vector/index.html", + "title": "OGR Vector Formats" + } + ], + "module": "xcube_geodb_openeo.backend.processes", + "class_name": "SaveResult" +} \ No newline at end of file diff --git a/xcube_geodb_openeo/core/geodb_datasource.py b/xcube_geodb_openeo/core/geodb_datasource.py index ed7c820..eea579d 100644 --- a/xcube_geodb_openeo/core/geodb_datasource.py +++ b/xcube_geodb_openeo/core/geodb_datasource.py @@ -58,6 +58,10 @@ def get_time_dim( -> Optional[List[datetime]]: pass + @abc.abstractmethod + def get_time_dim_name(self) -> Optional[str]: + pass + @abc.abstractmethod def get_vertical_dim( self, @@ -191,6 +195,9 @@ def get_time_dim( return [dateutil.parser.parse(d) for d in gdf[select]] + def get_time_dim_name(self) -> Optional[str]: + return self._get_col_name(['date', 'time', 'timestamp', 'datetime']) + def get_vertical_dim( self, bbox: Optional[Tuple[float, float, float, float]] = None) \ -> Optional[List[Any]]: diff --git a/xcube_geodb_openeo/core/vectorcube.py b/xcube_geodb_openeo/core/vectorcube.py index b12136d..b9d9962 100644 --- a/xcube_geodb_openeo/core/vectorcube.py +++ b/xcube_geodb_openeo/core/vectorcube.py @@ -25,6 +25,8 @@ from geojson import FeatureCollection from geojson.geometry import Geometry +from shapely.geometry import Polygon +from shapely.geometry import shape from xcube_geodb_openeo.core.geodb_datasource import DataSource, Feature from xcube_geodb_openeo.core.tools import Cache @@ -70,6 +72,7 @@ def __init__(self, collection_id: Tuple[str, str], self._vector_dim = [] self._vertical_dim = [] self._time_dim = [] + self._time_dim_name = None @cached_property def id(self) -> str: @@ -150,6 +153,23 @@ def get_time_dim( self._time_dim_cache.insert(bbox if bbox else global_key, time_dim) return time_dim + def get_time_dim_name(self): + if not self._time_dim_name: + self._time_dim = self._datasource.get_time_dim_name() + return self._time_dim + + def get_features_by_geometry(self, limit: int = STAC_DEFAULT_ITEMS_LIMIT, + offset: int = 0) \ + -> dict[str, list[Feature]]: + features = self.load_features(limit, offset) + features_by_geometry = {} + for f in features: + current_geometry = shape(f["geometry"]).wkt + if current_geometry not in features_by_geometry: + features_by_geometry[current_geometry] = [] + features_by_geometry[current_geometry].append(f) + return features_by_geometry + def get_feature(self, feature_id: str) -> Feature: for key in self._feature_cache.get_keys(): for feature in self._feature_cache.get(key): @@ -188,3 +208,72 @@ def get_metadata(self, full: bool = False) -> Dict: def to_geojson(self) -> FeatureCollection: return FeatureCollection(self.load_features( self.feature_count, 0, False)) + + +class StaticVectorCubeFactory(DataSource): + + def __init__(self): + self.time_dim = None + self.vector_dim = None + self.collection_id = None + self.srid = None + self.vertical_dim = None + self.features = None + self.bbox = None + self.geometry_types = None + self.metadata = None + + def get_vector_dim( + self, + bbox: Optional[Tuple[float, float, float, float]] = None) \ + -> List[Geometry]: + result = [] + coords = [(bbox[0], bbox[1]), + (bbox[0], bbox[3]), + (bbox[2], bbox[3]), + (bbox[2], bbox[1]), + (bbox[0], bbox[1])] + box = Polygon(coords) + for geometry in self.vector_dim: + if box.intersects(geometry): + result.append(geometry) + return result + + def get_srid(self) -> int: + return self.srid + + def get_feature_count(self) -> int: + return len(self.features) + + def get_time_dim( + self, + bbox: Optional[Tuple[float, float, float, float]] = None) \ + -> Optional[List[datetime]]: + return self.time_dim + + def get_time_dim_name(self) -> Optional[str]: + return self.time_dim_name + + def get_vertical_dim( + self, + bbox: Optional[Tuple[float, float, float, float]] = None) \ + -> Optional[List[Any]]: + return self.vertical_dim + + def load_features(self, limit: int = STAC_DEFAULT_ITEMS_LIMIT, + offset: int = 0, feature_id: Optional[str] = None, + with_stac_info: bool = True) -> List[Feature]: + return self.features + + def get_vector_cube_bbox(self) -> Tuple[float, float, float, float]: + return self.bbox + + def get_geometry_types(self) -> List[str]: + return self.geometry_types + + def get_metadata(self, full: bool = False) -> Dict: + return self.metadata + + def create(self) -> VectorCube: + return VectorCube(tuple(self.collection_id.split('~')), self) + From 5dde5780f8d063c56ee0f0a21157882cc91a9082 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Mon, 20 Nov 2023 17:11:21 +0100 Subject: [PATCH 156/163] implemented some more processes --- notebooks/geoDB-openEO_use_case_2.ipynb | 89 ++++++------ xcube_geodb_openeo/backend/processes.py | 134 ++++++++++++++++-- .../res/processes/add_2.0.0.-rc.1.json | 93 ++++++++++++ .../res/processes/apply_2.0.0-rc.1.json | 75 ++++++++++ .../processes/array_apply_2.0.0.-rc.1.json | 97 +++++++++++++ .../res/processes/multiply_2.0.0-rc.1.json | 98 +++++++++++++ .../backend/res/processes/sd_2.0.0-rc.1.json | 106 ++++++++++++++ xcube_geodb_openeo/core/vectorcube.py | 47 ++++-- 8 files changed, 670 insertions(+), 69 deletions(-) create mode 100644 xcube_geodb_openeo/backend/res/processes/add_2.0.0.-rc.1.json create mode 100644 xcube_geodb_openeo/backend/res/processes/apply_2.0.0-rc.1.json create mode 100644 xcube_geodb_openeo/backend/res/processes/array_apply_2.0.0.-rc.1.json create mode 100644 xcube_geodb_openeo/backend/res/processes/multiply_2.0.0-rc.1.json create mode 100644 xcube_geodb_openeo/backend/res/processes/sd_2.0.0-rc.1.json diff --git a/notebooks/geoDB-openEO_use_case_2.ipynb b/notebooks/geoDB-openEO_use_case_2.ipynb index ae2b1a9..ac5082f 100644 --- a/notebooks/geoDB-openEO_use_case_2.ipynb +++ b/notebooks/geoDB-openEO_use_case_2.ipynb @@ -4,10 +4,7 @@ "cell_type": "markdown", "id": "ced119793a5f0f59", "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - } + "collapsed": false }, "source": [ "# Demonstration of basic geoDB capabilities + Use Case #2\n", @@ -47,7 +44,6 @@ } ], "source": [ - "import datetime\n", "import json\n", "\n", "import openeo\n", @@ -60,34 +56,36 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 176, "id": "7903b501d68f258c", "metadata": { - "ExecuteTime": { - "end_time": "2023-11-17T22:46:22.915782300Z", - "start_time": "2023-11-17T22:46:10.264252800Z" - }, "collapsed": false, - "jupyter": { - "outputs_hidden": false + "ExecuteTime": { + "end_time": "2023-11-20T16:03:15.048818500Z", + "start_time": "2023-11-20T16:03:00.377082600Z" } }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "C:\\Users\\Thomas\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\metadata.py:272: UserWarning: Unknown dimension type 'geometry'\n", - " complain(\"Unknown dimension type {t!r}\".format(t=dim_type))\n" - ] - } - ], + "outputs": [], "source": [ + "def apply_scaling(x: float) -> float:\n", + " return x * 0.000001\n", + "\n", + "def add_offset(x):\n", + " return x + 1.2345\n", + "\n", "geoDB = 'http://localhost:8080'\n", "connection = openeo.connect(geoDB)\n", "hamburg = connection.load_collection('openeo~pop_hamburg')\n", - "hamburg = hamburg.aggregate_temporal(['2000-01-01', '2030-01-05'], 'mean', context={'pattern': '%Y-%M-%d'})\n", - "hamburg.download('./hamburg_agg.json', 'GeoJSON')" + "hamburg = hamburg.apply(lambda x: apply_scaling(x))\n", + "hamburg = hamburg.aggregate_temporal([['2000-01-01', '2030-01-05']], 'mean', context={'pattern': '%Y-%M-%d'})\n", + "hamburg.download('./hamburg_mean.json', 'GeoJSON')\n", + "\n", + "\n", + "# hamburg = hamburg.apply(lambda x: add_offset(apply_scaling(x)))\n", + "# hamburg.download('./hamburg_mult.json', 'GeoJSON')\n", + "# hamburg_mean.download('./hamburg_mean.json', 'GeoJSON')\n", + "# hamburg_std = hamburg.aggregate_temporal([['2000-01-01', '2030-01-05']], 'sd', context={'pattern': '%Y-%M-%d'})\n", + "# hamburg_std.download('./hamburg_std.json', 'GeoJSON')" ] }, { @@ -131,7 +129,7 @@ "metadata": {}, "outputs": [], "source": [ - "with open('./hamburg_agg.json') as f:\n", + "with open('./hamburg_mean.json') as f:\n", " geometries = json.load(f)\n", "ndvi_final = ndvi_temp_agg.aggregate_spatial(geometries, openeo.processes.ProcessBuilder.mean)" ] @@ -145,10 +143,7 @@ "end_time": "2023-11-17T22:51:26.669981800Z", "start_time": "2023-11-17T22:49:29.997650800Z" }, - "collapsed": false, - "jupyter": { - "outputs_hidden": false - } + "collapsed": false }, "outputs": [ { @@ -210,10 +205,7 @@ "execution_count": 25, "id": "33c5921a1dc38bdc", "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - } + "collapsed": false }, "outputs": [ { @@ -252,19 +244,21 @@ "outputs": [], "source": [ "import geopandas\n", - "gdf = geopandas.read_file('./hamburg_agg.json')\n", + "gdf = geopandas.read_file('./hamburg_mean.json')\n", "gdf['ndvi'] = ndvi" ] }, { "cell_type": "code", - "execution_count": 67, + "execution_count": 103, "id": "2316d61c-261c-41af-8de6-a5aa30367d0b", - "metadata": {}, + "metadata": { + "scrolled": true + }, "outputs": [ { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaoAAAGdCAYAAABD8DfjAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAABgkElEQVR4nO3de1xT9f8H8NfZxjYYMFHugggioahoeAFMyyTUb3kp7xfE0sq+/koz6qv1rdRK7fst7dvXtDT8eqm8pF3MVMS84Q1NJe+KogIKIigMuWxsO78/JoPJbYNt52x7Px+PPXLb53zOe6fD3vt8zud8PgzLsiwIIYQQnhJwHQAhhBDSGEpUhBBCeI0SFSGEEF6jREUIIYTXKFERQgjhNUpUhBBCeI0SFSGEEF6jREUIIYTXRFwHYE1arRa3b9+Gm5sbGIbhOhxCCHFYLMuitLQU/v7+EAgabzM5VKK6ffs2AgMDuQ6DEELIQzk5OQgICGi0jEMlKjc3NwC6A+Pu7s5xNIQQ4rgUCgUCAwP138uNcahEVd3d5+7uTomKEEJ4wJjLMDSYghBCCK9RoiKEEMJrlKgIIYTwGiUqQgghvEaJihBCCK9RoiKEEMJrlKgIIYTwGiUqQgghvEaJihBCCK9RoiKEEMJrlKgIIYTwGiUqQgghvEaJihBCCK+ZlKjmzZsHhmEMHr6+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CBCZOnMiGDRsIDQ3l8OHDfPrpp2zevLnIOJo1a8aqVas4c+YMwcHBTJgwAWvrnK0s+/fvT9OmTZk0aRLHjx9n//79+sFp2V/eJkyYQP369Rk+fDh79+4lNDSU3bt3M336dMLDw8t8jqZPn86yZctYtmwZ58+f57333jOYn5xtwoQJHD16lI8//pjHHnssX1IqSkliL+4clUadOnUYOXIk//d//4efnx9tPNowrNYwRtUapV9C9XLaZS6mXgRg6tSp/Pjjj6xZswY7OzsiIyOJjIzk3r17gPo7mDFjBnPmzGHjxo2cPHmSyZMnY2Njo7/OHx8fr59CtnTpUuLi4vT1ZGRkAOqXpIEDB/LMM88QFBREUFAQzzzzDEOGDKFFixb6+Pv27cvChQvL9NpNSak/2by9vYmIiNDfTpw4oX/My8uLhQsXcuLECfbt20fjxo3x8/Pj1q1bxdZ79epVZs2apR/cUprjCpGXv68/655dh5mu+l8Nyt1VXprFNYqS3U2u1WpZt24dR44cwcfHh5dffpnPP/+8wOdMmDCBf//9l169etGoUSODx5YvX87EiRN55ZVXaNGiBcOGDSM4OBh396KXr122bBl37tyhQ4cO+Pv7M23aNIMuVp1Ox2+//UZCQgJdunRhypQpvP322wD6BGljY8OePXto1KgRI0eOpFWrVjz11FPcu3cPe3v7sp4ixowZw7vvvstrr71Gp06duHr1Ks8//3y+cs2bN6dLly4cP368xKPJs5Uk9uLOUWk9/fTTpKamGgxka2jekLF2YxloOxB7rT27k3aTqqTy7bffEhsbS58+fXB1ddXf1q9fr3/uq6++yowZM3jhhRfo3Lkz169fZ+vWrdjZqd3tISEhBAcHc+LECZo1a2ZQz7Vr1/T1rF69mjZt2uDn54efnx9t27Zl1apVBrFfunSpzL0NpkSj5J7DUYzZs2fz22+/ERISUqLycXFxODg4sH37dvr27VtouYyMDHr37s2TTz7J3r17uXv3rsEczNIet7h4sqcaiOrvj5A/ePy7x0lNL3rajymrZVmL+IXq1J9zqecISAy4r/osNZY86/CsyfZY7N+/nwceeICLFy/StGlTY4djclavXs306dO5ceM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dXVVYmLi9PX4e/vr7z++uv6n/fv36/odDrlk08+Uc6cOaN88sknipmZmRIUFFTpr6+kKuI8pKSk6Ot0dXVVZs2apRw7dky5cOFCpb++kqqI8/Dpp58qFhYWyi+//KJERETob/Hx8ZX++kTpSOKuwtavX680adJEsbCwUFxcXJSpU6cqd+/e1T8+adIkpXfv3gbP+eqrr5TWrVsr1tbWiqurqzJhwgQlPDy8kiMvX6U9D6dPn1bat2+vWFtbK/b29srw4cOVs2fPGiHystu1a5cC5LtNmjRJURR1CtB7772nuLi4KJaWlsqDDz6onDhxwqCO3r1768tn+/nnn5UWLVoo5ubmSsuWLZVff/21kl5R2VTEeQgNDS2wzrzvpaqkIs6Dh4dHgXW+9957lffCRJnItp5CCCGECTH9C35CCCFEDSKJWwghhDAhkriFEEIIEyKJWwghhDAhkriFEEIIEyKJWwghhDAhkriFEEIIEyKJWwghhDAhkriFEEIIEyKJWwghhDAhkriFEEIIEyKJWwghhDAh/w80QGKNEHuJbgAAAABJRU5ErkJggg==", "text/plain": [ "
" ] @@ -279,8 +273,15 @@ "gdf.plot(legend=True, color=gdf['color'])\n", "va = ['bottom', 'top']\n", "for idx, row in gdf.iterrows():\n", - " plt.annotate('population: ' + str(row['population']), xy=row['geometry'].centroid.coords[0],\n", - " horizontalalignment='center', verticalalignment=va[idx])" + " coords = {0: (9.75, 53.6),\n", + " 1: (10.03, 53.5)}\n", + " plt.annotate('average population 2000-2020:\\n' + str(int((row['population']))), xy=coords[idx],\n", + " horizontalalignment='left', verticalalignment='top')\n", + "for idx, row in gdf.iterrows():\n", + " coords = {0: (9.75, 53.535),\n", + " 1: (10.03, 53.435)}\n", + " plt.annotate('average ndvi early 2020:\\n' + f'{row[\"ndvi\"]:.4f}', xy=coords[idx],\n", + " horizontalalignment='left', verticalalignment='bottom') " ] }, { @@ -288,10 +289,7 @@ "execution_count": null, "id": "9e8ce5af-678f-4708-8611-2792c313ba93", "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - } + "collapsed": false }, "outputs": [], "source": [ @@ -304,10 +302,7 @@ "execution_count": null, "id": "2d78c90d60d5d056", "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - } + "collapsed": false }, "outputs": [], "source": [ diff --git a/xcube_geodb_openeo/backend/processes.py b/xcube_geodb_openeo/backend/processes.py index 15e1dbc..e0cf188 100644 --- a/xcube_geodb_openeo/backend/processes.py +++ b/xcube_geodb_openeo/backend/processes.py @@ -19,6 +19,8 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. import datetime +import operator + import dateutil.parser import importlib import importlib.resources as resources @@ -26,13 +28,13 @@ import pytz from abc import abstractmethod -from typing import Dict, List, Any +from typing import Dict, List, Any, Callable import shapely from geojson import Feature, FeatureCollection from xcube.server.api import ServerContextT from openeo.internal.graph_building import PGNode -from ..core.vectorcube import StaticVectorCubeFactory +from ..core.vectorcube import StaticVectorCubeFactory, VectorCube class Process: @@ -328,15 +330,8 @@ def execute(self, query_params: dict, ctx: ServerContextT): time_dim_name = vector_cube.get_time_dim_name() features_by_geometry = vector_cube.get_features_by_geometry(limit=None) - result = StaticVectorCubeFactory() - result.collection_id = vector_cube.id + '_agg_temp' - result.vector_dim = vector_cube.get_vector_dim() - result.srid = vector_cube.srid - result.time_dim = vector_cube.get_time_dim() - result.bbox = vector_cube.get_bbox() - result.geometry_types = vector_cube.get_geometry_types() - result.metadata = vector_cube.get_metadata() - result.features = [] + result = StaticVectorCubeFactory().copy(vector_cube, False, + '_agg_temp') for geometry in features_by_geometry: features = features_by_geometry[geometry] @@ -375,7 +370,7 @@ def execute(self, query_params: dict, ctx: ServerContextT): vector_cube = query_params['input'] if query_params['format'].lower() == 'geojson': collection = FeatureCollection( - vector_cube.load_features(limit=None)) + vector_cube.load_features(limit=None, with_stac_info=False)) return collection @@ -386,9 +381,124 @@ def execute(self, query_params: dict, ctx: ServerContextT): return np.mean(query_params['input']) +class Std(Process): + + def execute(self, query_params: dict, ctx: ServerContextT): + import numpy as np + return np.std(query_params['input']) + + class Median(Process): def execute(self, query_params: dict, ctx: ServerContextT): import numpy as np return np.median(query_params['input']) + +class ArrayApply(Process): + + def execute(self, query_params: dict, ctx: ServerContextT) -> Any: + graph = query_params['process']['process_graph'] + node = PGNode.from_flat_graph(graph) + + current_result = query_params['input'] + registry = get_processes_registry() + process = registry.get_process(node.process_id) + process_parameters = node.arguments + process_parameters['input'] = current_result + process.parameters = process_parameters + current_result = submit_process_sync(process, ctx) + + return current_result + + +class Add(Process): + + def execute(self, query_params: dict, ctx: ServerContextT) -> Any: + return execute_math_function(query_params, ctx, operator.add) + + +class Multiply(Process): + + def execute(self, query_params: dict, ctx: ServerContextT) -> VectorCube: + return execute_math_function(query_params, ctx, operator.mul) + + +def execute_math_function(query_params: dict, ctx: ServerContextT, + op: Callable) -> VectorCube: + current_result = query_params['input'] + y = query_params['y'] + if isinstance(y, dict) and 'process_graph' in y: + process = get_next_process(current_result, y) + result = basic_math_vc(current_result, + submit_process_sync(process, ctx), + op) + elif isinstance(y, dict) and 'from_node' in y: + process = get_prev_process(current_result, y) + result = basic_math_vc(current_result, + submit_process_sync(process, ctx), + op) + else: + result = basic_math(current_result, y, op) + return result + +def basic_math(vc: VectorCube, v: [int, float], operation: Callable): + result = (StaticVectorCubeFactory() + .copy(vc, True) + .create()) + features = result.load_features(limit=None, + with_stac_info=False) + time_dim_name = result.get_time_dim_name() + for feature in features: + for prop in [p for p in feature['properties'] if + not p == 'created_at' + and not p == 'modified_at' + and not p == time_dim_name + and (isinstance(feature['properties'][p], float) + or + isinstance(feature['properties'][p], int))]: + feature['properties'][prop] = ( + operation(v, feature['properties'][prop])) + return result + + +def basic_math_vc(a: VectorCube, b: VectorCube, operation: Callable) \ + -> VectorCube: + result = (StaticVectorCubeFactory() + .copy(a, True) + .create()) + features = result.load_features(limit=None, with_stac_info=False) + time_dim_name = result.get_time_dim_name() + for feature in features: + for prop in [p for p in feature['properties'] if + not p == 'created_at' + and not p == 'modified_at' + and not p == time_dim_name + and (isinstance(feature['properties'][p], float) + or isinstance(feature['properties'][p], int))]: + feature_b = b.get_feature(feature['id']) + feature['properties'][prop] = ( + operation(feature['properties'][prop], + feature_b['properties'][prop])) + return result + + +def get_next_process(current_result, y) -> Process: + sub_graph = y['process_graph'] + node = PGNode.from_flat_graph(sub_graph) + registry = get_processes_registry() + process = registry.get_process(node.process_id) + process_parameters = node.arguments + process_parameters['input'] = current_result + process.parameters = process_parameters + return process + + +def get_prev_process(current_result, y) -> Process: + node = y['from_node'] + registry = get_processes_registry() + process = registry.get_process(node.process_id) + process_parameters = node.arguments + process_parameters['input'] = current_result + process.parameters = process_parameters + return process diff --git a/xcube_geodb_openeo/backend/res/processes/add_2.0.0.-rc.1.json b/xcube_geodb_openeo/backend/res/processes/add_2.0.0.-rc.1.json new file mode 100644 index 0000000..a8bd500 --- /dev/null +++ b/xcube_geodb_openeo/backend/res/processes/add_2.0.0.-rc.1.json @@ -0,0 +1,93 @@ +{ + "id": "add", + "summary": "Addition of two numbers", + "description": "Sums up the two numbers `x` and `y` (*`x + y`*) and returns the computed sum.\n\nNo-data values are taken into account so that `null` is returned if any element is such a value.\n\nThe computations follow [IEEE Standard 754](https://ieeexplore.ieee.org/document/8766229) whenever the processing environment supports it.", + "categories": [ + "math" + ], + "parameters": [ + { + "name": "x", + "description": "The first summand.", + "schema": { + "type": [ + "number", + "null" + ] + } + }, + { + "name": "y", + "description": "The second summand.", + "schema": { + "type": [ + "number", + "null" + ] + } + } + ], + "returns": { + "description": "The computed sum of the two numbers.", + "schema": { + "type": [ + "number", + "null" + ] + } + }, + "examples": [ + { + "arguments": { + "x": 5, + "y": 2.5 + }, + "returns": 7.5 + }, + { + "arguments": { + "x": -2, + "y": -4 + }, + "returns": -6 + }, + { + "arguments": { + "x": 1, + "y": null + }, + "returns": null + } + ], + "links": [ + { + "rel": "about", + "href": "http://mathworld.wolfram.com/Sum.html", + "title": "Sum explained by Wolfram MathWorld" + }, + { + "rel": "about", + "href": "https://ieeexplore.ieee.org/document/8766229", + "title": "IEEE Standard 754-2019 for Floating-Point Arithmetic" + } + ], + "process_graph": { + "sum": { + "process_id": "sum", + "arguments": { + "data": [ + { + "from_parameter": "x" + }, + { + "from_parameter": "y" + } + ], + "ignore_nodata": false + }, + "result": true + } + }, + "module": "xcube_geodb_openeo.backend.processes", + "class_name": "Add" +} \ No newline at end of file diff --git a/xcube_geodb_openeo/backend/res/processes/apply_2.0.0-rc.1.json b/xcube_geodb_openeo/backend/res/processes/apply_2.0.0-rc.1.json new file mode 100644 index 0000000..9d40411 --- /dev/null +++ b/xcube_geodb_openeo/backend/res/processes/apply_2.0.0-rc.1.json @@ -0,0 +1,75 @@ +{ + "id": "apply", + "summary": "Apply a process to each value", + "description": "Applies a process to each value in the data cube (i.e. a local operation). In contrast, the process ``apply_dimension()`` applies a process to all values along a particular dimension.", + "categories": [ + "cubes" + ], + "parameters": [ + { + "name": "data", + "description": "A data cube.", + "schema": { + "type": "object", + "subtype": "datacube" + } + }, + { + "name": "process", + "description": "A process that accepts and returns a single value and is applied on each individual value in the data cube. The process may consist of multiple sub-processes and could, for example, consist of processes such as ``absolute()`` or ``linear_scale_range()``.", + "schema": { + "type": "object", + "subtype": "process-graph", + "parameters": [ + { + "name": "x", + "description": "The value to process.", + "schema": { + "description": "Any data type." + } + }, + { + "name": "context", + "description": "Additional data passed by the user.", + "schema": { + "description": "Any data type." + }, + "optional": true, + "default": null + } + ], + "returns": { + "description": "The value to be set in the new data cube.", + "schema": { + "description": "Any data type." + } + } + } + }, + { + "name": "context", + "description": "Additional data to be passed to the process.", + "schema": { + "description": "Any data type." + }, + "optional": true, + "default": null + } + ], + "returns": { + "description": "A data cube with the newly computed values and the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged.", + "schema": { + "type": "object", + "subtype": "datacube" + } + }, + "links": [ + { + "href": "https://openeo.org/documentation/1.0/datacubes.html#apply", + "rel": "about", + "title": "Apply explained in the openEO documentation" + } + ], + "module": "xcube_geodb_openeo.backend.processes", + "class_name": "ArrayApply" +} \ No newline at end of file diff --git a/xcube_geodb_openeo/backend/res/processes/array_apply_2.0.0.-rc.1.json b/xcube_geodb_openeo/backend/res/processes/array_apply_2.0.0.-rc.1.json new file mode 100644 index 0000000..5947967 --- /dev/null +++ b/xcube_geodb_openeo/backend/res/processes/array_apply_2.0.0.-rc.1.json @@ -0,0 +1,97 @@ +{ + "id": "array_apply", + "summary": "Apply a process to each array element", + "description": "Applies a process to each individual value in the array. This is basically what other languages call either a `for each` loop or a `map` function.", + "categories": [ + "arrays" + ], + "parameters": [ + { + "name": "data", + "description": "An array.", + "schema": { + "type": "array", + "items": { + "description": "Any data type is allowed." + } + } + }, + { + "name": "process", + "description": "A process that accepts and returns a single value and is applied on each individual value in the array. The process may consist of multiple sub-processes and could, for example, consist of processes such as ``absolute()`` or ``linear_scale_range()``.", + "schema": { + "type": "object", + "subtype": "process-graph", + "parameters": [ + { + "name": "x", + "description": "The value of the current element being processed.", + "schema": { + "description": "Any data type." + } + }, + { + "name": "index", + "description": "The zero-based index of the current element being processed.", + "schema": { + "type": "integer", + "minimum": 0 + } + }, + { + "name": "label", + "description": "The label of the current element being processed. Only populated for labeled arrays.", + "schema": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "optional": true + }, + { + "name": "context", + "description": "Additional data passed by the user.", + "schema": { + "description": "Any data type." + }, + "optional": true, + "default": null + } + ], + "returns": { + "description": "The value to be set in the new array.", + "schema": { + "description": "Any data type." + } + } + } + }, + { + "name": "context", + "description": "Additional data to be passed to the process.", + "schema": { + "description": "Any data type." + }, + "optional": true, + "default": null + } + ], + "returns": { + "description": "An array with the newly computed values. The number of elements are the same as for the original array.", + "schema": { + "type": "array", + "items": { + "description": "Any data type is allowed." + } + } + }, + "module": "xcube_geodb_openeo.backend.processes", + "class_name": "ArrayApply" +} \ No newline at end of file diff --git a/xcube_geodb_openeo/backend/res/processes/multiply_2.0.0-rc.1.json b/xcube_geodb_openeo/backend/res/processes/multiply_2.0.0-rc.1.json new file mode 100644 index 0000000..63386b3 --- /dev/null +++ b/xcube_geodb_openeo/backend/res/processes/multiply_2.0.0-rc.1.json @@ -0,0 +1,98 @@ +{ + "id": "multiply", + "summary": "Multiplication of two numbers", + "description": "Multiplies the two numbers `x` and `y` (*`x * y`*) and returns the computed product.\n\nNo-data values are taken into account so that `null` is returned if any element is such a value.\n\nThe computations follow [IEEE Standard 754](https://ieeexplore.ieee.org/document/8766229) whenever the processing environment supports it.", + "categories": [ + "math" + ], + "parameters": [ + { + "name": "x", + "description": "The multiplier.", + "schema": { + "type": [ + "number", + "null" + ] + } + }, + { + "name": "y", + "description": "The multiplicand.", + "schema": { + "type": [ + "number", + "null" + ] + } + } + ], + "returns": { + "description": "The computed product of the two numbers.", + "schema": { + "type": [ + "number", + "null" + ] + } + }, + "exceptions": { + "MultiplicandMissing": { + "message": "Multiplication requires at least two numbers." + } + }, + "examples": [ + { + "arguments": { + "x": 5, + "y": 2.5 + }, + "returns": 12.5 + }, + { + "arguments": { + "x": -2, + "y": -4 + }, + "returns": 8 + }, + { + "arguments": { + "x": 1, + "y": null + }, + "returns": null + } + ], + "links": [ + { + "rel": "about", + "href": "http://mathworld.wolfram.com/Product.html", + "title": "Product explained by Wolfram MathWorld" + }, + { + "rel": "about", + "href": "https://ieeexplore.ieee.org/document/8766229", + "title": "IEEE Standard 754-2019 for Floating-Point Arithmetic" + } + ], + "process_graph": { + "product": { + "process_id": "product", + "arguments": { + "data": [ + { + "from_parameter": "x" + }, + { + "from_parameter": "y" + } + ], + "ignore_nodata": false + }, + "result": true + } + }, + "module": "xcube_geodb_openeo.backend.processes", + "class_name": "Multiply" +} \ No newline at end of file diff --git a/xcube_geodb_openeo/backend/res/processes/sd_2.0.0-rc.1.json b/xcube_geodb_openeo/backend/res/processes/sd_2.0.0-rc.1.json new file mode 100644 index 0000000..11e7a5e --- /dev/null +++ b/xcube_geodb_openeo/backend/res/processes/sd_2.0.0-rc.1.json @@ -0,0 +1,106 @@ +{ + "id": "sd", + "summary": "Standard deviation", + "description": "Computes the sample standard deviation, which quantifies the amount of variation of an array of numbers. It is defined to be the square root of the corresponding variance (see ``variance()``).\n\nA low standard deviation indicates that the values tend to be close to the expected value, while a high standard deviation indicates that the values are spread out over a wider range.\n\nAn array without non-`null` elements resolves always with `null`.", + "categories": [ + "math > statistics", + "reducer" + ], + "parameters": [ + { + "name": "data", + "description": "An array of numbers.", + "schema": { + "type": "array", + "items": { + "type": [ + "number", + "null" + ] + } + } + }, + { + "name": "ignore_nodata", + "description": "Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to `false` considers no-data values so that `null` is returned if any value is such a value.", + "schema": { + "type": "boolean" + }, + "default": true, + "optional": true + } + ], + "returns": { + "description": "The computed sample standard deviation.", + "schema": { + "type": [ + "number", + "null" + ] + } + }, + "examples": [ + { + "arguments": { + "data": [ + -1, + 1, + 3, + null + ] + }, + "returns": 2 + }, + { + "arguments": { + "data": [ + -1, + 1, + 3, + null + ], + "ignore_nodata": false + }, + "returns": null + }, + { + "description": "The input array is empty: return `null`.", + "arguments": { + "data": [] + }, + "returns": null + } + ], + "links": [ + { + "rel": "about", + "href": "http://mathworld.wolfram.com/StandardDeviation.html", + "title": "Standard deviation explained by Wolfram MathWorld" + } + ], + "process_graph": { + "variance": { + "process_id": "variance", + "arguments": { + "data": { + "from_parameter": "data" + }, + "ignore_nodata": { + "from_parameter": "ignore_nodata" + } + } + }, + "power": { + "process_id": "power", + "arguments": { + "base": { + "from_node": "variance" + }, + "p": 0.5 + }, + "result": true + } + }, + "module": "xcube_geodb_openeo.backend.processes", + "class_name": "Std" +} \ No newline at end of file diff --git a/xcube_geodb_openeo/core/vectorcube.py b/xcube_geodb_openeo/core/vectorcube.py index b9d9962..84541d3 100644 --- a/xcube_geodb_openeo/core/vectorcube.py +++ b/xcube_geodb_openeo/core/vectorcube.py @@ -18,6 +18,7 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. +import copy from datetime import datetime from functools import cached_property from typing import Any, Optional, Tuple, Dict @@ -28,6 +29,8 @@ from shapely.geometry import Polygon from shapely.geometry import shape +import uuid + from xcube_geodb_openeo.core.geodb_datasource import DataSource, Feature from xcube_geodb_openeo.core.tools import Cache from xcube_geodb_openeo.defaults import STAC_DEFAULT_ITEMS_LIMIT @@ -179,7 +182,7 @@ def get_feature(self, feature_id: str) -> Feature: self._feature_cache.insert(feature_id, [feature]) return feature - def load_features(self, limit: int = STAC_DEFAULT_ITEMS_LIMIT, + def load_features(self, limit: Optional[int] = STAC_DEFAULT_ITEMS_LIMIT, offset: int = 0, with_stac_info: bool = True) -> List[Feature]: key = (limit, offset) @@ -214,6 +217,7 @@ class StaticVectorCubeFactory(DataSource): def __init__(self): self.time_dim = None + self.time_dim_name = None self.vector_dim = None self.collection_id = None self.srid = None @@ -223,20 +227,44 @@ def __init__(self): self.geometry_types = None self.metadata = None + def copy(self, base: VectorCube, with_features, postfix=None): + if postfix: + self.collection_id = base.id + postfix + else: + self.collection_id = base.id + '_' + str(uuid.uuid4()) + self.vector_dim = base.get_vector_dim() + self.srid = base.srid + self.time_dim = base.get_time_dim() + self.time_dim_name = base.get_time_dim_name() + self.bbox = base.get_bbox() + self.geometry_types = base.get_geometry_types() + self.metadata = base.get_metadata() + if with_features: + self.features = copy.deepcopy( + base.load_features(limit=None, with_stac_info=False)) + else: + self.features = [] + return self + def get_vector_dim( self, bbox: Optional[Tuple[float, float, float, float]] = None) \ -> List[Geometry]: result = [] - coords = [(bbox[0], bbox[1]), - (bbox[0], bbox[3]), - (bbox[2], bbox[3]), - (bbox[2], bbox[1]), - (bbox[0], bbox[1])] - box = Polygon(coords) - for geometry in self.vector_dim: - if box.intersects(geometry): + if bbox: + coords = [(bbox[0], bbox[1]), + (bbox[0], bbox[3]), + (bbox[2], bbox[3]), + (bbox[2], bbox[1]), + (bbox[0], bbox[1])] + box = Polygon(coords) + for geometry in self.vector_dim: + if box.intersects(geometry): + result.append(geometry) + else: + for geometry in self.vector_dim: result.append(geometry) + return result def get_srid(self) -> int: @@ -276,4 +304,3 @@ def get_metadata(self, full: bool = False) -> Dict: def create(self) -> VectorCube: return VectorCube(tuple(self.collection_id.split('~')), self) - From a88ef29a5f28782e503ee483469561b47381c59c Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Tue, 21 Nov 2023 11:25:01 +0100 Subject: [PATCH 157/163] don't cache collection ids - they can change --- xcube_geodb_openeo/api/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcube_geodb_openeo/api/context.py b/xcube_geodb_openeo/api/context.py index e92c2ec..e53d468 100644 --- a/xcube_geodb_openeo/api/context.py +++ b/xcube_geodb_openeo/api/context.py @@ -42,7 +42,7 @@ class GeoDbContext(ApiContext): - @cached_property + @property def collection_ids(self) -> List[Tuple[str, str]]: return self.cube_provider.get_collection_keys() From 688d458cc1c1e3fb88e1786d5b12588a3bdae015 Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Tue, 21 Nov 2023 13:57:55 +0100 Subject: [PATCH 158/163] finalised JNB #2 --- notebooks/geoDB-openEO_use_case_2.ipynb | 484 ++++++++++-------------- 1 file changed, 203 insertions(+), 281 deletions(-) diff --git a/notebooks/geoDB-openEO_use_case_2.ipynb b/notebooks/geoDB-openEO_use_case_2.ipynb index ac5082f..016df31 100644 --- a/notebooks/geoDB-openEO_use_case_2.ipynb +++ b/notebooks/geoDB-openEO_use_case_2.ipynb @@ -7,21 +7,22 @@ "collapsed": false }, "source": [ - "# Demonstration of basic geoDB capabilities + Use Case #2\n", + "# Demonstration of extended geoDB openEO backend capabilities + Use Case #2\n", "\n", - "## Preparations\n", - "First, some imports are done, and the base URL is set.\n", - "The base URL is where the backend is running, and it will be used in all later examples." + "This notebook demonstrates how the extended capabilities of the geoDB openEO backend can be used in a real-world-like use case: data from a vector cube is (temporally) aggregated and used alongside with Sentinel-3 raster data. Apart from this main use case, additional capabilities of the geoDB openEO backend are shown. \n", + "\n", + "### Preparations\n", + "First, the openeo-client software is imported; it is used throughout the notebook to interact with the geoDB openEO backend. Then, the openeo client is used to open connections to the geoDB openEO backend and to the Copernicus Data Space Ecosystem backend, which provides the raster data used in this example." ] }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 195, "id": "edcce2fdfc4a403a", "metadata": { "ExecuteTime": { - "end_time": "2023-11-17T22:49:06.144387900Z", - "start_time": "2023-11-17T22:49:03.556900900Z" + "end_time": "2023-11-21T12:29:14.121770200Z", + "start_time": "2023-11-21T12:29:09.707648900Z" } }, "outputs": [ @@ -34,200 +35,186 @@ }, { "data": { - "text/plain": [ - "" - ] + "text/plain": "" }, - "execution_count": 9, + "execution_count": 195, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "import json\n", - "\n", "import openeo\n", "\n", - "# geoDB = 'https://geodb.openeo.dev.brockmann-consult.de'\n", - "geoDB = 'http://localhost:8080'\n", - "cdse = openeo.connect(\"https://openeo.dataspace.copernicus.eu/\")\n", + "geodb_url = 'https://geodb.openeo.dev.brockmann-consult.de'\n", + "geodb = openeo.connect(geodb_url)\n", + "\n", + "cdse_url = 'https://openeo.dataspace.copernicus.eu/'\n", + "cdse = openeo.connect(cdse_url)\n", "cdse.authenticate_oidc()" ] }, + { + "cell_type": "markdown", + "source": [ + "### Load and aggregate vector data\n", + "\n", + "The following three lines demonstrate the aggregation capabilities of the geoDB openEO backend. Note that the whole process only starts as soon as the processing is triggered by the `download` command. First, the server is notified that the collection shall be loaded. In the second step, the collection is temporally aggregated. The three parameters of the `aggregate_temporal`- function are:\n", + "1) `temporal intervals` (`[['2000-01-01', '2030-01-05']]`): all data that falls in these intervals are aggregated.\n", + "2) `reducer` (`mean`): a 'reducer' function which aggregates the collected temporal data, i.e. computes a single value from a set of input values. Typical functions are `mean`, `median`, `std`, ...\n", + "3) `context` (`{'pattern': '%Y-%M-%d'}`): any context; used here exemplarily to provide the date pattern \n", + "\n", + "The collection is an artificial collection made for demo purposes. It is a cube of 8 features, containing population info for 4 different points in time, for two geometries (more or less Western and Eastern Hamburg):\n", + "\n", + "![openeo_pop_hamburg](images/openeo_pop_hamburg.png)\n" + ], + "metadata": { + "collapsed": false + }, + "id": "28a0857a424ccb9f" + }, { "cell_type": "code", - "execution_count": 176, + "execution_count": 197, "id": "7903b501d68f258c", "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2023-11-20T16:03:15.048818500Z", - "start_time": "2023-11-20T16:03:00.377082600Z" + "end_time": "2023-11-21T12:30:01.039006100Z", + "start_time": "2023-11-21T12:29:57.851719100Z" } }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\Thomas\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\metadata.py:272: UserWarning: Unknown dimension type 'geometry'\n", + " complain(\"Unknown dimension type {t!r}\".format(t=dim_type))\n" + ] + } + ], "source": [ - "def apply_scaling(x: float) -> float:\n", - " return x * 0.000001\n", - "\n", - "def add_offset(x):\n", - " return x + 1.2345\n", - "\n", - "geoDB = 'http://localhost:8080'\n", - "connection = openeo.connect(geoDB)\n", - "hamburg = connection.load_collection('openeo~pop_hamburg')\n", - "hamburg = hamburg.apply(lambda x: apply_scaling(x))\n", + "hamburg = geodb.load_collection('openeo~pop_hamburg')\n", "hamburg = hamburg.aggregate_temporal([['2000-01-01', '2030-01-05']], 'mean', context={'pattern': '%Y-%M-%d'})\n", - "hamburg.download('./hamburg_mean.json', 'GeoJSON')\n", - "\n", - "\n", - "# hamburg = hamburg.apply(lambda x: add_offset(apply_scaling(x)))\n", - "# hamburg.download('./hamburg_mult.json', 'GeoJSON')\n", - "# hamburg_mean.download('./hamburg_mean.json', 'GeoJSON')\n", - "# hamburg_std = hamburg.aggregate_temporal([['2000-01-01', '2030-01-05']], 'sd', context={'pattern': '%Y-%M-%d'})\n", - "# hamburg_std.download('./hamburg_std.json', 'GeoJSON')" + "hamburg.download('./hamburg_mean.json', 'GeoJSON')" ] }, { - "cell_type": "code", - "execution_count": 12, - "id": "ab0edbcf-c37d-4ccf-b533-70d8877c9419", + "cell_type": "markdown", + "source": [ + "### Prepare raster data\n", + "\n", + "Next, the CDSE openEO backend is used to load a small sample of OLCI L1 data. This data is used to compute the NDVI over the Hamburg area, temporally aggregating the first 5 days in 2020. This data will be used in conjunction with the vector data prepared above." + ], "metadata": { - "ExecuteTime": { - "end_time": "2023-11-17T22:49:11.017124800Z", - "start_time": "2023-11-17T22:49:10.951646100Z" - } + "collapsed": false }, - "outputs": [], - "source": [ - "olci = cdse.load_collection(\"SENTINEL3_OLCI_L1B\",\n", - " spatial_extent={\"west\": 9.7, \"south\": 53.3, \"east\": 10.3, \"north\": 53.8},\n", - " temporal_extent=[\"2020-01-01\", \"2020-01-05\"],\n", - " bands=[\"B08\", \"B17\"])" - ] + "id": "792b5b8cdbb6178f" }, { "cell_type": "code", - "execution_count": 22, - "id": "6c9e7733-34a5-47fa-8d72-db31beef8170", + "execution_count": 198, + "id": "ab0edbcf-c37d-4ccf-b533-70d8877c9419", "metadata": { "ExecuteTime": { - "end_time": "2023-11-17T22:49:13.429216Z", - "start_time": "2023-11-17T22:49:13.370525Z" + "end_time": "2023-11-21T12:30:04.400251400Z", + "start_time": "2023-11-21T12:30:04.324929800Z" } }, "outputs": [], "source": [ + "olci = cdse.load_collection(\"SENTINEL3_OLCI_L1B\",\n", + " spatial_extent={\"west\": 9.7, \"south\": 53.3, \"east\": 10.3, \"north\": 53.8},\n", + " temporal_extent=[\"2020-01-01\", \"2020-01-05\"],\n", + " bands=[\"B08\", \"B17\"])\n", + "\n", "olci_ndvi = olci.ndvi(nir=\"B17\", red=\"B08\")\n", "ndvi_temp_agg = olci_ndvi.aggregate_temporal([[\"2020-01-01T00:00:00.000Z\", \"2020-01-05T00:00:00.000Z\"]], 'median')" ] }, { - "cell_type": "code", - "execution_count": 23, - "id": "f056401a-65de-48bd-9f73-1915ea47b14f", - "metadata": {}, - "outputs": [], + "cell_type": "markdown", "source": [ - "with open('./hamburg_mean.json') as f:\n", - " geometries = json.load(f)\n", - "ndvi_final = ndvi_temp_agg.aggregate_spatial(geometries, openeo.processes.ProcessBuilder.mean)" - ] + "### Use the vector data for spatial aggregation of the raster data\n", + "\n", + "Now we use the vector data produced by the geoDB openEO backend to determine the geometries over which the NDVI data shall be extracted.\n", + "As the job is pretty small, it will finish after a short while." + ], + "metadata": { + "collapsed": false + }, + "id": "947db26daf8b43ea" }, { "cell_type": "code", - "execution_count": 24, - "id": "9a59c9e505b36371", + "execution_count": 199, + "id": "f056401a-65de-48bd-9f73-1915ea47b14f", "metadata": { "ExecuteTime": { - "end_time": "2023-11-17T22:51:26.669981800Z", - "start_time": "2023-11-17T22:49:29.997650800Z" - }, - "collapsed": false + "end_time": "2023-11-21T12:35:20.038996Z", + "start_time": "2023-11-21T12:32:44.537780900Z" + } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "0:00:00 Job 'j-231117c90b73447cb7c4319c434ba1cf': send 'start'\n", - "0:00:12 Job 'j-231117c90b73447cb7c4319c434ba1cf': created (progress N/A)\n", - "0:00:17 Job 'j-231117c90b73447cb7c4319c434ba1cf': created (progress N/A)\n", - "0:00:25 Job 'j-231117c90b73447cb7c4319c434ba1cf': created (progress N/A)\n", - "0:00:33 Job 'j-231117c90b73447cb7c4319c434ba1cf': created (progress N/A)\n", - "0:00:45 Job 'j-231117c90b73447cb7c4319c434ba1cf': running (progress N/A)\n", - "0:00:58 Job 'j-231117c90b73447cb7c4319c434ba1cf': running (progress N/A)\n", - "0:01:13 Job 'j-231117c90b73447cb7c4319c434ba1cf': running (progress N/A)\n", - "0:01:33 Job 'j-231117c90b73447cb7c4319c434ba1cf': running (progress N/A)\n", - "0:01:57 Job 'j-231117c90b73447cb7c4319c434ba1cf': finished (progress N/A)\n" + "0:00:00 Job 'j-231121366e30458cba494dc68f586106': send 'start'\n", + "0:00:14 Job 'j-231121366e30458cba494dc68f586106': created (progress N/A)\n", + "0:00:19 Job 'j-231121366e30458cba494dc68f586106': created (progress N/A)\n", + "0:00:26 Job 'j-231121366e30458cba494dc68f586106': running (progress N/A)\n", + "0:00:34 Job 'j-231121366e30458cba494dc68f586106': running (progress N/A)\n", + "0:00:45 Job 'j-231121366e30458cba494dc68f586106': running (progress N/A)\n", + "0:00:57 Job 'j-231121366e30458cba494dc68f586106': running (progress N/A)\n", + "0:01:13 Job 'j-231121366e30458cba494dc68f586106': running (progress N/A)\n", + "0:01:32 Job 'j-231121366e30458cba494dc68f586106': running (progress N/A)\n", + "0:01:56 Job 'j-231121366e30458cba494dc68f586106': running (progress N/A)\n", + "0:02:34 Job 'j-231121366e30458cba494dc68f586106': finished (progress N/A)\n" ] }, { "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " " - ], - "text/plain": [ - "" - ] + "text/plain": "", + "text/html": "\n \n \n \n \n " }, - "execution_count": 24, + "execution_count": 199, "metadata": {}, "output_type": "execute_result" } ], "source": [ + "import json\n", + "with open('./hamburg_mean.json') as f:\n", + " geometries = json.load(f)\n", + "ndvi_final = ndvi_temp_agg.aggregate_spatial(geometries, openeo.processes.ProcessBuilder.mean)\n", "result = ndvi_final.save_result(format = \"GTiff\")\n", "job = result.create_job()\n", "job.start_and_wait()" ] }, { - "cell_type": "code", - "execution_count": 25, - "id": "33c5921a1dc38bdc", + "cell_type": "markdown", + "source": [ + "### Download the NDVI data, and prepare for visualisation\n", + "\n", + "In this step, the NDVI data we just produced are downloaded. It is a very small JSON file that simply contains the aggregated NDVI values for all the geometries of the vector cube `openeo~hamburg`. There are two of those, so the JSON file contains only two values." + ], "metadata": { "collapsed": false }, - "outputs": [ - { - "data": { - "text/plain": [ - "[WindowsPath('output/timeseries.json'), WindowsPath('output/job-results.json')]" - ] - }, - "execution_count": 25, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "job.get_results().download_files(\"output\")" - ] + "id": "388fbe29e48c671" }, { "cell_type": "code", - "execution_count": 45, + "execution_count": 200, "id": "1868c72e-cfb0-458b-82bf-a6e0b57e15d9", - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2023-11-21T12:35:55.233822700Z", + "start_time": "2023-11-21T12:35:53.770154Z" + } + }, "outputs": [], "source": [ "result_file = job.get_results().download_files(\"output\")[0]\n", @@ -236,11 +223,28 @@ "ndvi = list([v[0] for v in aggregated_ndvi[list(aggregated_ndvi.keys())[0]]])" ] }, + { + "cell_type": "markdown", + "source": [ + "### Prepare the vector data for visualisation\n", + "\n", + "The vector data are openend as GeoDataFrame, which allows for visualisation. The NDVI data is added to the DataFrame, so the vector and (aggregated) raster data can be shown together.\n" + ], + "metadata": { + "collapsed": false + }, + "id": "27e94dedba9c05e6" + }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 201, "id": "f17b7277-2b4a-40d4-b982-f51a0b57915c", - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2023-11-21T12:36:14.012885700Z", + "start_time": "2023-11-21T12:36:13.944682300Z" + } + }, "outputs": [], "source": [ "import geopandas\n", @@ -248,20 +252,34 @@ "gdf['ndvi'] = ndvi" ] }, + { + "cell_type": "markdown", + "source": [ + "### Visualise\n", + "\n", + "Finally, we draw the geometries on a map. The aggregated 'population' information that we have extracted from the geoDB openEO backend are displayed in an overlay. The colors represent the NDVI values we received from the CDSE openEO backend. \n" + ], + "metadata": { + "collapsed": false + }, + "id": "80f7404cfcf93fe" + }, { "cell_type": "code", - "execution_count": 103, + "execution_count": 208, "id": "2316d61c-261c-41af-8de6-a5aa30367d0b", "metadata": { - "scrolled": true + "scrolled": true, + "ExecuteTime": { + "end_time": "2023-11-21T12:46:36.319701800Z", + "start_time": "2023-11-21T12:46:35.884355700Z" + } }, "outputs": [ { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAe4AAAGdCAYAAADUoZA5AAAAOX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KoqiKJ988oni4OCgbNiwQTlx4oQybtw4xdXVVYmLi9PX4e/vr7z++uv6n/fv36/odDrlk08+Uc6cOaN88sknipmZmRIUFFTpr6+kKuI8pKSk6Ot0dXVVZs2apRw7dky5cOFCpb++kqqI8/Dpp58qFhYWyi+//KJERETob/Hx8ZX++kTpSOKuwtavX680adJEsbCwUFxcXJSpU6cqd+/e1T8+adIkpXfv3gbP+eqrr5TWrVsr1tbWiqurqzJhwgQlPDy8kiMvX6U9D6dPn1bat2+vWFtbK/b29srw4cOVs2fPGiHystu1a5cC5LtNmjRJURR1CtB7772nuLi4KJaWlsqDDz6onDhxwqCO3r1768tn+/nnn5UWLVoo5ubmSsuWLZVff/21kl5R2VTEeQgNDS2wzrzvpaqkIs6Dh4dHgXW+9957lffCRJnItp5CCCGECTH9C35CCCFEDSKJWwghhDAhkriFEEIIEyKJWwghhDAhkriFEEIIEyKJWwghhDAhkriFEEIIEyKJWwghhDAhkriFEEIIEyKJWwghhDAhkriFEEIIEyKJWwghhDAh/w80QGKNEHuJbgAAAABJRU5ErkJggg==", - "text/plain": [ - "
" - ] + "text/plain": "
", + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAe4AAAGdCAYAAADUoZA5AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAABvuUlEQVR4nO3deXxU1dnA8d9kDwEisiVICCBGMCwia0BUFKPUBesGioBW6mulilJqRduKWsVqBV/Liy0YBFdo3aqIQBBB1kiBKCL7FtBESBQCCUlIct8/npnkzmSSmcl2ZybP9/OZD8nMmXOfGTLz3HPuWWyGYRgopZRSKiCEWB2AUkoppbyniVsppZQKIJq4lVJKqQCiiVsppZQKIJq4lVJKqQCiiVsppZQKIJq4lVJKqQCiiVsppZQKIGFWB9CYysvL+eGHH2jRogU2m83qcJRSqskyDINTp07RoUMHQkK0DemLJ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uMd6Dx8+zNSpUxk2bFiVxxYvXszDDz/ME088wbZt2xg2bBgjR44kKyvL1/CVChqjLh7Fx5M+Jio8yrnFjU2vbysVxHxO3GFhYcTFxVXc2ratHLV65513MmLECLp27UpycjIzZ84kPz+fb775psY6y8rKGDt2LE899RRdu3at8vjMmTO59957mThxIj169ODll18mISGBV1991dfwlQoq1/S8hqUPLSUqvHKv7RBCdP62UkHM58S9d+9eOnToQJcuXRgzZgwHDhxwW66kpIS5c+cSGxtLnz59aqzz6aefpm3bttx7b9X1mUtKStiyZQupqalO96emprJhw4Ya6y0uLiY/P9/pplSwGd59OO/f/37F7y1DW+o0MKWCmE+Je9CgQbzxxhssX76cefPmkZOTw5AhQ8jLy6sos2TJEpo3b05UVBSzZs0iPT2dNm3aVFvn+vXrSUtLY968eW4fz83NpaysjPbt2zvd3759e3JycmqMd8aMGcTGxlbcEhISfHi1SgWO5POSK35OCNO/c6WCmU+Je+TIkdxyyy306tWLESNG8OmnnwKwcOHCijLDhw8nMzOTDRs2cO2113L77bdz7Ngxt/WdOnWKu+66i3nz5tWY3IEqc1cNw/C4VeG0adM4efJkxe3IkSPevEylAlqYLcxzIaVUwKrTJzwmJoZevXqxd+9ep/u6detGt27dGDx4MBdccAFpaWlMmzatyvP379/PoUOHuOGGGyruKy8vl8DCwti9ezcJCQmEhoZWaV0fO3asSivcVWRkJJGROrJWKaVU8KjTPO7i4mJ27txJfHx8tWUMw6C4uNjtY927d2f79u1kZmZW3G688caKVntCQgIRERH069eP9PR0p+emp6czZMiQuoSvlFJKBRyfWtxTp07lhhtuoFOnThw7doy//OUv5OfnM2HCBAoKCnj22We58cYbiY+PJy8vjzlz5nD06FFuu+22ijrGjx/Peeedx4wZM4iKiqJnz55OxzjnnHMAnO6fMmUK48aNo3///qSkpDB37lyysrK4//776/DSlVJKqcDjU+I+evQod9xxB7m5ubRt25bBgwezadMmEhMTKSoqYteuXSxcuJDc3Fxat27NgAEDWLt2LcnJlQNnsrKyCAnxraE/evRo8vLyePrpp8nOzqZnz54sXbqUxESdq6qUUqppsRmGYVgdRGPJz88nNjaWkydP0rJlS6vDUUqpJku/j2tP1ypXSimlAogmbqWUUiqAaOJWSimlAogmbqWUUiqAaOJWSimlAogmbqWUUiqAaOJWSimlAogmbqWUUiqAaOJWSimlAkiT2v/PsUhcfn6+xZEopVTT5vgebkKLd9abJpW4T506BUBCQoLFkSillAL5Xo6NjbU6jIDSpNYqLy8v54cffqBFixbYbDarw6kX+fn5JCQkcOTIkSa73q++B0LfB6Hvg/D398EwDE6dOkWHDh183niqqWtSLe6QkBA6duxodRgNomXLln754WxM+h4IfR+Evg/Cn98HbWnXjp7mKKWUUgFEE7dSSikVQDRxB7jIyEiefPJJIiMjrQ7FMvoeCH0fhL4PQt+H4NWkBqcppZRSgU5b3EoppVQA0cStlFJKBRBN3EoppVQA0cStlFJKBRBN3H7s1KlTPPzwwyQmJhIdHc2QIUPYvHlzjc95++236dOnD82aNSM+Pp577rmHvLy8Roq4YdTmffi///s/evToQXR0NBdeeCFvvPFGI0VbP7788ktuuOEGOnTogM1m46OPPnJ63DAMpk+fTocOHYiOjuaKK65gx44dHut9//33ueiii4iMjOSiiy7iww8/bKBXUD8a4n3YsWMHt9xyC507d8Zms/Hyyy833AuoJw3xPsybN49hw4bRqlUrWrVqxYgRI/jqq68a8FWo+qKJ249NnDiR9PR03nzzTbZv305qaiojRozg+++/d1t+3bp1jB8/nnvvvZcdO3bw73//m82bNzNx4sRGjrx++fo+vPrqq0ybNo3p06ezY8cOnnrqKSZNmsQnn3zSyJHXXkFBAX369GH27NluH3/hhReYOXMms2fPZvPmzcTFxXH11VdXrMfvzsaNGxk9ejTjxo3j66+/Zty4cdx+++1kZGQ01Muos4Z4HwoLC+natSvPP/88cXFxDRV6vWqI92H16tXccccdfPHFF2zcuJFOnTqRmppa7edK+RFD+aXCwkIjNDTUWLJkidP9ffr0MZ544gm3z3nxxReNrl27Ot33yiuvGB07dmywOBtabd6HlJQUY+rUqU73TZ482Rg6d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s3rqL866+/boSFhRlz5swx9u/fb6xbt87o37+/MXDgQKteQr3w9X3YvXu38eabbxp79uwxMjIyjNGjRxvnnnuucfDgQYtege9OnTplbNu2zdi2bZsBGDNnzjS2bdtmHD582DAMw3j++eeN2NhY44MPPjC2b99u3HHHHUZ8fLyRn59fUce4ceOMxx57rOL39evXG6Ghocbzzz9v7Ny503j++eeNsLAwY9OmTY3++rzVEO9DcXFxRZ3x8fHG1KlTjW3bthl79+5t9NfnrYZ4H/76178aERERxnvvvWdkZ2dX3E6dOtXor0/5RhO3H1u8eLHRtWtXIyIiwoiLizMmTZpknDhxouLxCRMmGJdffrnTc1555RXjoosuMqKjo434+Hhj7NixxtGjRxs58vrl6/vw3XffGRdffLERHR1ttGzZ0hg1apSxa9cuCyKvvS+++MIAqtwmTJhgGIZMAXryySeNuLg4IzIy0rjsssuM7du3O9Vx+eWXV5R3+Pe//21ceOGFRnh4uNG9e3fj/fffb6RXVDsN8T4cPHjQbZ2unyV/0hDvQ2Jiots6n3zyycZ7YapWdFtPpZRSKoAE/gU/pZRSqgnRxK2UUkoFEE3cSimlVADRxK2UUkoFEE3cSimlVADRxK2UUkoFEE3cSimlVADRxK2UUkoFEE3cSimlVADRxK2UUkoFEE3cSimlVADRxK2UUkoFkP8HZAcwZUKcxQYAAAAASUVORK5CYII=" }, "metadata": {}, "output_type": "display_data" @@ -273,169 +291,73 @@ "gdf.plot(legend=True, color=gdf['color'])\n", "va = ['bottom', 'top']\n", "for idx, row in gdf.iterrows():\n", - " coords = {0: (9.75, 53.6),\n", + " coords = {0: (9.75, 53.65),\n", " 1: (10.03, 53.5)}\n", " plt.annotate('average population 2000-2020:\\n' + str(int((row['population']))), xy=coords[idx],\n", - " horizontalalignment='left', verticalalignment='top')\n", + " horizontalalignment='left', verticalalignment='top', backgroundcolor='b')\n", "for idx, row in gdf.iterrows():\n", - " coords = {0: (9.75, 53.535),\n", + " coords = {0: (9.75, 53.585),\n", " 1: (10.03, 53.435)}\n", " plt.annotate('average ndvi early 2020:\\n' + f'{row[\"ndvi\"]:.4f}', xy=coords[idx],\n", - " horizontalalignment='left', verticalalignment='bottom') " + " horizontalalignment='left', verticalalignment='bottom', backgroundcolor='b') " ] }, { - "cell_type": "code", - "execution_count": null, - "id": "9e8ce5af-678f-4708-8611-2792c313ba93", - "metadata": { - "collapsed": false - }, - "outputs": [], + "cell_type": "markdown", "source": [ - "gc = openeo.connect('http://localhost:8080')\n", - "vc = gc.load_collection('openeo~hamburg')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "2d78c90d60d5d056", + "### Math\n", + "\n", + "We can also do simple math on vector cubes provided by the geoDB openEO backend. In the following code, we define two functions (`apply_scaling`and `add_offset`), and apply those functions to the vector cube. We download the results and inspect the datacube. Only those data to which the functions can be applied to are scaled: `population` has been scaled, but `id`, `geometry`, and `date` are left untouched.\n" + ], "metadata": { "collapsed": false }, - "outputs": [], - "source": [ - "job.get_results().download_files(\"output\")" - ] + "id": "8f2bdc321f91ac9e" }, { "cell_type": "code", - "execution_count": null, - "id": "7b7d5ced-4933-4162-9082-280afbccf210", - "metadata": {}, - "outputs": [], - "source": [ - "import inspect\n", - "inspect.getfullargspec(oc.upload_file)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "0af8b6fe-dcec-496b-aab9-d020862ebb7f", - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "722c2791-3d48-4213-83a4-bdc38bc2df81", - "metadata": {}, - "outputs": [], - "source": [ - "import inspect\n", - "inspect.getfullargspec(vc.aggregate_spatial)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "33265395-3b55-4753-b542-3b8f15ea5c13", - "metadata": {}, - "outputs": [], - "source": [ - "agg = olci_ndvi.aggregate_spatial(vc, 'mean')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "2cbb380a-3098-4ab1-8b9d-0cee24161f31", - "metadata": {}, - "outputs": [], - "source": [ - "result = agg.save_result(\"GTiff\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "2bbe8021-d0ce-4be8-b296-3a7d16c077b5", - "metadata": {}, - "outputs": [], - "source": [ - "job = result.create_job()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "949aa582-fa89-4fa9-9ef8-575c6ea0d20c", - "metadata": {}, - "outputs": [], - "source": [ - "job.start_and_wait()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "598ffb69-4fe2-473a-92dc-b3a01a77a3ed", - "metadata": {}, - "outputs": [], - "source": [ - "job.get_results().download_files(\"output\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "83b7f7f3-04dd-4440-9c09-5b131eda8c26", - "metadata": {}, - "outputs": [], - "source": [ - "result = olci_ndvi.save_result(\"GTiff\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "a353b83f-6e46-4688-8aac-d18b919b28be", - "metadata": {}, - "outputs": [], - "source": [ - "job = result.create_job()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "bf5a5cdc-d377-44e0-ba35-fc6b9c2dd05c", - "metadata": {}, - "outputs": [], - "source": [ - "job.start_and_wait()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "986c2580-65ea-44b8-b173-d4c77bb71d5d", - "metadata": {}, - "outputs": [], + "execution_count": 212, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\Thomas\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\metadata.py:272: UserWarning: Unknown dimension type 'geometry'\n", + " complain(\"Unknown dimension type {t!r}\".format(t=dim_type))\n" + ] + }, + { + "data": { + "text/plain": " id geometry population \\\n0 1 POLYGON ((9.78652 53.60253, 9.98977 53.68638, ... 0.2 \n1 2 POLYGON ((9.78652 53.60253, 9.98977 53.68638, ... 0.4 \n2 3 POLYGON ((9.78652 53.60253, 9.98977 53.68638, ... 0.5 \n3 4 POLYGON ((9.78652 53.60253, 9.98977 53.68638, ... 0.9 \n4 5 POLYGON ((9.99389 53.69045, 10.00213 53.39996,... 0.4 \n5 6 POLYGON ((9.99389 53.69045, 10.00213 53.39996,... 0.9 \n6 7 POLYGON ((9.99389 53.69045, 10.00213 53.39996,... 0.5 \n7 8 POLYGON ((9.99389 53.69045, 10.00213 53.39996,... 0.8 \n\n date \n0 1990-01-01 00:00:00+00:00 \n1 2000-01-01 00:00:00+00:00 \n2 2010-01-01 00:00:00+00:00 \n3 2020-01-01 00:00:00+00:00 \n4 1990-01-01 00:00:00+00:00 \n5 2000-01-01 00:00:00+00:00 \n6 2010-01-01 00:00:00+00:00 \n7 2020-01-01 00:00:00+00:00 ", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
idgeometrypopulationdate
01POLYGON ((9.78652 53.60253, 9.98977 53.68638, ...0.21990-01-01 00:00:00+00:00
12POLYGON ((9.78652 53.60253, 9.98977 53.68638, ...0.42000-01-01 00:00:00+00:00
23POLYGON ((9.78652 53.60253, 9.98977 53.68638, ...0.52010-01-01 00:00:00+00:00
34POLYGON ((9.78652 53.60253, 9.98977 53.68638, ...0.92020-01-01 00:00:00+00:00
45POLYGON ((9.99389 53.69045, 10.00213 53.39996,...0.41990-01-01 00:00:00+00:00
56POLYGON ((9.99389 53.69045, 10.00213 53.39996,...0.92000-01-01 00:00:00+00:00
67POLYGON ((9.99389 53.69045, 10.00213 53.39996,...0.52010-01-01 00:00:00+00:00
78POLYGON ((9.99389 53.69045, 10.00213 53.39996,...0.82020-01-01 00:00:00+00:00
\n
" + }, + "execution_count": 212, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "job.get_results().download_files(\"output\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "118477d6-32aa-46a1-8e4f-b863b94642b6", - "metadata": {}, - "outputs": [], - "source": [] + "def apply_scaling(x: float) -> float:\n", + " return x * 0.000001\n", + "\n", + "def add_offset(x):\n", + " return x + 1.2345\n", + "\n", + "hamburg_scale = geodb.load_collection('openeo~pop_hamburg')\n", + "hamburg_scale = hamburg_scale.apply(lambda x: apply_scaling(x))\n", + "hamburg_scale.download('./hamburg_scaled.json', 'GeoJSON')\n", + "\n", + "gdf = geopandas.read_file('./hamburg_scaled.json')\n", + "gdf[['id', 'geometry', 'population', 'date']]" + ], + "metadata": { + "collapsed": false, + "ExecuteTime": { + "end_time": "2023-11-21T12:54:31.080321700Z", + "start_time": "2023-11-21T12:54:27.851159Z" + } + }, + "id": "df0c0de2f826109a" } ], "metadata": { From 19ff1b64597acf8dd4665f3ce5f22baa3a1a45fc Mon Sep 17 00:00:00 2001 From: thomasstorm Date: Tue, 21 Nov 2023 14:44:11 +0100 Subject: [PATCH 159/163] finalised JNB #1, and removed wrong info --- notebooks/geoDB-openEO_use_case_1.ipynb | 291 ++++-------------------- notebooks/geoDB-openEO_use_case_2.ipynb | 158 ++----------- xcube_geodb_openeo/backend/processes.py | 57 ----- 3 files changed, 62 insertions(+), 444 deletions(-) diff --git a/notebooks/geoDB-openEO_use_case_1.ipynb b/notebooks/geoDB-openEO_use_case_1.ipynb index 22bb96a..851a9d1 100644 --- a/notebooks/geoDB-openEO_use_case_1.ipynb +++ b/notebooks/geoDB-openEO_use_case_1.ipynb @@ -6,74 +6,31 @@ "source": [ "# Demonstration of basic geoDB capabilities + Use Case #1\n", "\n", + "This notebook demonstrates the STAC capabilities of the geoDB openEO backend, as well as the simple use case #1: accessing and downloading data from the geoDB using the openeo client. \n", + "\n", "## Preparations\n", - "First, some imports are done, and the base URL is set.\n", - "The base URL is where the backend is running, and it will be used in all later examples." + "First, we open a connection to the geoDB openEO backend." ] }, { "cell_type": "code", - "execution_count": 26, - "metadata": { - "ExecuteTime": { - "end_time": "2023-11-16T14:45:40.870573200Z", - "start_time": "2023-11-16T14:45:40.849715200Z" - } - }, + "execution_count": null, "outputs": [], - "source": [ - "import urllib3\n", - "import json\n", - "\n", - "http = urllib3.PoolManager()\n", - "# base_url = 'https://geodb.openeo.dev.brockmann-consult.de'\n", - "base_url = 'http://127.0.0.1:8080'" - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "0.21.1\n" - ] - } - ], "source": [ "import openeo\n", "\n", - "print(openeo.client_version())" + "# geodb_url = 'https://geodb.openeo.dev.brockmann-consult.de'\n", + "geodb_url = 'http://localhost:8080'\n", + "geodb = openeo.connect(geodb_url)" ], "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2023-11-16T14:45:43.176416800Z", - "start_time": "2023-11-16T14:45:42.783487500Z" - } - } - }, - { - "cell_type": "code", - "execution_count": 13, - "outputs": [], - "source": [ - "connection = openeo.connect(base_url)" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2023-11-16T14:34:31.763007300Z", - "start_time": "2023-11-16T14:34:29.677273800Z" - } + "collapsed": false } }, { "cell_type": "markdown", "source": [ - "Print the general metadata:" + "We print the general metadata:" ], "metadata": { "collapsed": false @@ -85,14 +42,14 @@ "metadata": {}, "outputs": [], "source": [ - "connection.capabilities()" + "geodb.capabilities()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Show the file formats the geoDB-openEO-backend supports (currently empty):" + "Show the file formats the geoDB-openEO-backend supports:" ] }, { @@ -101,14 +58,14 @@ "metadata": {}, "outputs": [], "source": [ - "connection.list_file_formats()" + "geodb.list_file_formats()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## Collections listing - STAC part\n", + "### STAC\n", "List the collections currently available using the geoDB-openEO-backend:" ] }, @@ -118,7 +75,7 @@ "metadata": {}, "outputs": [], "source": [ - "connection.list_collection_ids()" + "geodb.list_collection_ids()" ] }, { @@ -134,189 +91,23 @@ "metadata": {}, "outputs": [], "source": [ - "connection.describe_collection('stac_test~_train_tier_1_source')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "outputs": [], - "source": [ - "## Processes listing of the geoDB-openEO backend" - ], - "metadata": { - "collapsed": false - } - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "ExecuteTime": { - "end_time": "2023-11-16T14:38:47.322883200Z", - "start_time": "2023-11-16T14:38:47.248577100Z" - } - }, - "outputs": [ - { - "ename": "NameError", - "evalue": "name 'print_endpoint' is not defined", - "output_type": "error", - "traceback": [ - "\u001B[1;31m---------------------------------------------------------------------------\u001B[0m", - "\u001B[1;31mNameError\u001B[0m Traceback (most recent call last)", - "Cell \u001B[1;32mIn[19], line 1\u001B[0m\n\u001B[1;32m----> 1\u001B[0m \u001B[43mprint_endpoint\u001B[49m(\u001B[38;5;124mf\u001B[39m\u001B[38;5;124m'\u001B[39m\u001B[38;5;132;01m{\u001B[39;00mbase_url\u001B[38;5;132;01m}\u001B[39;00m\u001B[38;5;124m/processes\u001B[39m\u001B[38;5;124m'\u001B[39m)\n", - "\u001B[1;31mNameError\u001B[0m: name 'print_endpoint' is not defined" - ] - } - ], - "source": [ - "print_endpoint(f'{base_url}/processes')" + "geodb.describe_collection('my_eurocrops~AT_2021_EC21')" ] }, { "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Use Case 1\n", - "Run the function `load_collection`, and store the result in a local variable:" - ] - }, - { - "cell_type": "code", - "execution_count": 28, - "outputs": [], "source": [ - "collection = connection.load_collection('openeo~hamburg')\n", - "collection_agg = collection.aggregate_temporal()" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2023-11-16T14:45:55.733058500Z", - "start_time": "2023-11-16T14:45:47.905301900Z" - } - } - }, - { - "cell_type": "code", - "execution_count": 29, - "outputs": [ - { - "ename": "ConnectionError", - "evalue": "('Connection aborted.', ConnectionResetError(10054, 'Eine vorhandene Verbindung wurde vom Remotehost geschlossen', None, 10054, None))", - "output_type": "error", - "traceback": [ - "\u001B[1;31m---------------------------------------------------------------------------\u001B[0m", - "\u001B[1;31mConnectionResetError\u001B[0m Traceback (most recent call last)", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:703\u001B[0m, in \u001B[0;36mHTTPConnectionPool.urlopen\u001B[1;34m(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)\u001B[0m\n\u001B[0;32m 702\u001B[0m \u001B[38;5;66;03m# Make the request on the httplib connection object.\u001B[39;00m\n\u001B[1;32m--> 703\u001B[0m httplib_response \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_make_request\u001B[49m\u001B[43m(\u001B[49m\n\u001B[0;32m 704\u001B[0m \u001B[43m \u001B[49m\u001B[43mconn\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 705\u001B[0m \u001B[43m \u001B[49m\u001B[43mmethod\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 706\u001B[0m \u001B[43m \u001B[49m\u001B[43murl\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 707\u001B[0m \u001B[43m \u001B[49m\u001B[43mtimeout\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mtimeout_obj\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 708\u001B[0m \u001B[43m \u001B[49m\u001B[43mbody\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mbody\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 709\u001B[0m \u001B[43m \u001B[49m\u001B[43mheaders\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mheaders\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 710\u001B[0m \u001B[43m \u001B[49m\u001B[43mchunked\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mchunked\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 711\u001B[0m \u001B[43m\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 713\u001B[0m \u001B[38;5;66;03m# If we're going to release the connection in ``finally:``, then\u001B[39;00m\n\u001B[0;32m 714\u001B[0m \u001B[38;5;66;03m# the response doesn't need to know about the connection. Otherwise\u001B[39;00m\n\u001B[0;32m 715\u001B[0m \u001B[38;5;66;03m# it will also try to release it and we'll have a double-release\u001B[39;00m\n\u001B[0;32m 716\u001B[0m \u001B[38;5;66;03m# mess.\u001B[39;00m\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:449\u001B[0m, in \u001B[0;36mHTTPConnectionPool._make_request\u001B[1;34m(self, conn, method, url, timeout, chunked, **httplib_request_kw)\u001B[0m\n\u001B[0;32m 445\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mBaseException\u001B[39;00m \u001B[38;5;28;01mas\u001B[39;00m e:\n\u001B[0;32m 446\u001B[0m \u001B[38;5;66;03m# Remove the TypeError from the exception chain in\u001B[39;00m\n\u001B[0;32m 447\u001B[0m \u001B[38;5;66;03m# Python 3 (including for exceptions like SystemExit).\u001B[39;00m\n\u001B[0;32m 448\u001B[0m \u001B[38;5;66;03m# Otherwise it looks like a bug in the code.\u001B[39;00m\n\u001B[1;32m--> 449\u001B[0m \u001B[43msix\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mraise_from\u001B[49m\u001B[43m(\u001B[49m\u001B[43me\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;28;43;01mNone\u001B[39;49;00m\u001B[43m)\u001B[49m\n\u001B[0;32m 450\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m (SocketTimeout, BaseSSLError, SocketError) \u001B[38;5;28;01mas\u001B[39;00m e:\n", - "File \u001B[1;32m:3\u001B[0m, in \u001B[0;36mraise_from\u001B[1;34m(value, from_value)\u001B[0m\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:444\u001B[0m, in \u001B[0;36mHTTPConnectionPool._make_request\u001B[1;34m(self, conn, method, url, timeout, chunked, **httplib_request_kw)\u001B[0m\n\u001B[0;32m 443\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[1;32m--> 444\u001B[0m httplib_response \u001B[38;5;241m=\u001B[39m \u001B[43mconn\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mgetresponse\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 445\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mBaseException\u001B[39;00m \u001B[38;5;28;01mas\u001B[39;00m e:\n\u001B[0;32m 446\u001B[0m \u001B[38;5;66;03m# Remove the TypeError from the exception chain in\u001B[39;00m\n\u001B[0;32m 447\u001B[0m \u001B[38;5;66;03m# Python 3 (including for exceptions like SystemExit).\u001B[39;00m\n\u001B[0;32m 448\u001B[0m \u001B[38;5;66;03m# Otherwise it looks like a bug in the code.\u001B[39;00m\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\http\\client.py:1377\u001B[0m, in \u001B[0;36mHTTPConnection.getresponse\u001B[1;34m(self)\u001B[0m\n\u001B[0;32m 1376\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[1;32m-> 1377\u001B[0m \u001B[43mresponse\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mbegin\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 1378\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mConnectionError\u001B[39;00m:\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\http\\client.py:320\u001B[0m, in \u001B[0;36mHTTPResponse.begin\u001B[1;34m(self)\u001B[0m\n\u001B[0;32m 319\u001B[0m \u001B[38;5;28;01mwhile\u001B[39;00m \u001B[38;5;28;01mTrue\u001B[39;00m:\n\u001B[1;32m--> 320\u001B[0m version, status, reason \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_read_status\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 321\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m status \u001B[38;5;241m!=\u001B[39m CONTINUE:\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\http\\client.py:281\u001B[0m, in \u001B[0;36mHTTPResponse._read_status\u001B[1;34m(self)\u001B[0m\n\u001B[0;32m 280\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m \u001B[38;5;21m_read_status\u001B[39m(\u001B[38;5;28mself\u001B[39m):\n\u001B[1;32m--> 281\u001B[0m line \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mstr\u001B[39m(\u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mfp\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mreadline\u001B[49m\u001B[43m(\u001B[49m\u001B[43m_MAXLINE\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;241;43m+\u001B[39;49m\u001B[43m \u001B[49m\u001B[38;5;241;43m1\u001B[39;49m\u001B[43m)\u001B[49m, \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124miso-8859-1\u001B[39m\u001B[38;5;124m\"\u001B[39m)\n\u001B[0;32m 282\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m \u001B[38;5;28mlen\u001B[39m(line) \u001B[38;5;241m>\u001B[39m _MAXLINE:\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\socket.py:704\u001B[0m, in \u001B[0;36mSocketIO.readinto\u001B[1;34m(self, b)\u001B[0m\n\u001B[0;32m 703\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[1;32m--> 704\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_sock\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mrecv_into\u001B[49m\u001B[43m(\u001B[49m\u001B[43mb\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 705\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m timeout:\n", - "\u001B[1;31mConnectionResetError\u001B[0m: [WinError 10054] Eine vorhandene Verbindung wurde vom Remotehost geschlossen", - "\nDuring handling of the above exception, another exception occurred:\n", - "\u001B[1;31mProtocolError\u001B[0m Traceback (most recent call last)", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\requests\\adapters.py:486\u001B[0m, in \u001B[0;36mHTTPAdapter.send\u001B[1;34m(self, request, stream, timeout, verify, cert, proxies)\u001B[0m\n\u001B[0;32m 485\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[1;32m--> 486\u001B[0m resp \u001B[38;5;241m=\u001B[39m \u001B[43mconn\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43murlopen\u001B[49m\u001B[43m(\u001B[49m\n\u001B[0;32m 487\u001B[0m \u001B[43m \u001B[49m\u001B[43mmethod\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mrequest\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mmethod\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 488\u001B[0m \u001B[43m \u001B[49m\u001B[43murl\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43murl\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 489\u001B[0m \u001B[43m \u001B[49m\u001B[43mbody\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mrequest\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mbody\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 490\u001B[0m \u001B[43m \u001B[49m\u001B[43mheaders\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mrequest\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mheaders\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 491\u001B[0m \u001B[43m \u001B[49m\u001B[43mredirect\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;28;43;01mFalse\u001B[39;49;00m\u001B[43m,\u001B[49m\n\u001B[0;32m 492\u001B[0m \u001B[43m \u001B[49m\u001B[43massert_same_host\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;28;43;01mFalse\u001B[39;49;00m\u001B[43m,\u001B[49m\n\u001B[0;32m 493\u001B[0m \u001B[43m \u001B[49m\u001B[43mpreload_content\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;28;43;01mFalse\u001B[39;49;00m\u001B[43m,\u001B[49m\n\u001B[0;32m 494\u001B[0m \u001B[43m \u001B[49m\u001B[43mdecode_content\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;28;43;01mFalse\u001B[39;49;00m\u001B[43m,\u001B[49m\n\u001B[0;32m 495\u001B[0m \u001B[43m \u001B[49m\u001B[43mretries\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mmax_retries\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 496\u001B[0m \u001B[43m \u001B[49m\u001B[43mtimeout\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mtimeout\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 497\u001B[0m \u001B[43m \u001B[49m\u001B[43mchunked\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mchunked\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 498\u001B[0m \u001B[43m \u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 500\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m (ProtocolError, \u001B[38;5;167;01mOSError\u001B[39;00m) \u001B[38;5;28;01mas\u001B[39;00m err:\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:787\u001B[0m, in \u001B[0;36mHTTPConnectionPool.urlopen\u001B[1;34m(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)\u001B[0m\n\u001B[0;32m 785\u001B[0m e \u001B[38;5;241m=\u001B[39m ProtocolError(\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mConnection aborted.\u001B[39m\u001B[38;5;124m\"\u001B[39m, e)\n\u001B[1;32m--> 787\u001B[0m retries \u001B[38;5;241m=\u001B[39m \u001B[43mretries\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mincrement\u001B[49m\u001B[43m(\u001B[49m\n\u001B[0;32m 788\u001B[0m \u001B[43m \u001B[49m\u001B[43mmethod\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43murl\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43merror\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43me\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43m_pool\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;28;43mself\u001B[39;49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43m_stacktrace\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43msys\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mexc_info\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\u001B[43m[\u001B[49m\u001B[38;5;241;43m2\u001B[39;49m\u001B[43m]\u001B[49m\n\u001B[0;32m 789\u001B[0m \u001B[43m\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 790\u001B[0m retries\u001B[38;5;241m.\u001B[39msleep()\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\util\\retry.py:550\u001B[0m, in \u001B[0;36mRetry.increment\u001B[1;34m(self, method, url, response, error, _pool, _stacktrace)\u001B[0m\n\u001B[0;32m 549\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m read \u001B[38;5;129;01mis\u001B[39;00m \u001B[38;5;28;01mFalse\u001B[39;00m \u001B[38;5;129;01mor\u001B[39;00m \u001B[38;5;129;01mnot\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_is_method_retryable(method):\n\u001B[1;32m--> 550\u001B[0m \u001B[38;5;28;01mraise\u001B[39;00m \u001B[43msix\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mreraise\u001B[49m\u001B[43m(\u001B[49m\u001B[38;5;28;43mtype\u001B[39;49m\u001B[43m(\u001B[49m\u001B[43merror\u001B[49m\u001B[43m)\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43merror\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43m_stacktrace\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 551\u001B[0m \u001B[38;5;28;01melif\u001B[39;00m read \u001B[38;5;129;01mis\u001B[39;00m \u001B[38;5;129;01mnot\u001B[39;00m \u001B[38;5;28;01mNone\u001B[39;00m:\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\packages\\six.py:769\u001B[0m, in \u001B[0;36mreraise\u001B[1;34m(tp, value, tb)\u001B[0m\n\u001B[0;32m 768\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m value\u001B[38;5;241m.\u001B[39m__traceback__ \u001B[38;5;129;01mis\u001B[39;00m \u001B[38;5;129;01mnot\u001B[39;00m tb:\n\u001B[1;32m--> 769\u001B[0m \u001B[38;5;28;01mraise\u001B[39;00m value\u001B[38;5;241m.\u001B[39mwith_traceback(tb)\n\u001B[0;32m 770\u001B[0m \u001B[38;5;28;01mraise\u001B[39;00m value\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:703\u001B[0m, in \u001B[0;36mHTTPConnectionPool.urlopen\u001B[1;34m(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)\u001B[0m\n\u001B[0;32m 702\u001B[0m \u001B[38;5;66;03m# Make the request on the httplib connection object.\u001B[39;00m\n\u001B[1;32m--> 703\u001B[0m httplib_response \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_make_request\u001B[49m\u001B[43m(\u001B[49m\n\u001B[0;32m 704\u001B[0m \u001B[43m \u001B[49m\u001B[43mconn\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 705\u001B[0m \u001B[43m \u001B[49m\u001B[43mmethod\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 706\u001B[0m \u001B[43m \u001B[49m\u001B[43murl\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 707\u001B[0m \u001B[43m \u001B[49m\u001B[43mtimeout\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mtimeout_obj\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 708\u001B[0m \u001B[43m \u001B[49m\u001B[43mbody\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mbody\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 709\u001B[0m \u001B[43m \u001B[49m\u001B[43mheaders\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mheaders\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 710\u001B[0m \u001B[43m \u001B[49m\u001B[43mchunked\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mchunked\u001B[49m\u001B[43m,\u001B[49m\n\u001B[0;32m 711\u001B[0m \u001B[43m\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 713\u001B[0m \u001B[38;5;66;03m# If we're going to release the connection in ``finally:``, then\u001B[39;00m\n\u001B[0;32m 714\u001B[0m \u001B[38;5;66;03m# the response doesn't need to know about the connection. Otherwise\u001B[39;00m\n\u001B[0;32m 715\u001B[0m \u001B[38;5;66;03m# it will also try to release it and we'll have a double-release\u001B[39;00m\n\u001B[0;32m 716\u001B[0m \u001B[38;5;66;03m# mess.\u001B[39;00m\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:449\u001B[0m, in \u001B[0;36mHTTPConnectionPool._make_request\u001B[1;34m(self, conn, method, url, timeout, chunked, **httplib_request_kw)\u001B[0m\n\u001B[0;32m 445\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mBaseException\u001B[39;00m \u001B[38;5;28;01mas\u001B[39;00m e:\n\u001B[0;32m 446\u001B[0m \u001B[38;5;66;03m# Remove the TypeError from the exception chain in\u001B[39;00m\n\u001B[0;32m 447\u001B[0m \u001B[38;5;66;03m# Python 3 (including for exceptions like SystemExit).\u001B[39;00m\n\u001B[0;32m 448\u001B[0m \u001B[38;5;66;03m# Otherwise it looks like a bug in the code.\u001B[39;00m\n\u001B[1;32m--> 449\u001B[0m \u001B[43msix\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mraise_from\u001B[49m\u001B[43m(\u001B[49m\u001B[43me\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;28;43;01mNone\u001B[39;49;00m\u001B[43m)\u001B[49m\n\u001B[0;32m 450\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m (SocketTimeout, BaseSSLError, SocketError) \u001B[38;5;28;01mas\u001B[39;00m e:\n", - "File \u001B[1;32m:3\u001B[0m, in \u001B[0;36mraise_from\u001B[1;34m(value, from_value)\u001B[0m\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\urllib3\\connectionpool.py:444\u001B[0m, in \u001B[0;36mHTTPConnectionPool._make_request\u001B[1;34m(self, conn, method, url, timeout, chunked, **httplib_request_kw)\u001B[0m\n\u001B[0;32m 443\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[1;32m--> 444\u001B[0m httplib_response \u001B[38;5;241m=\u001B[39m \u001B[43mconn\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mgetresponse\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 445\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mBaseException\u001B[39;00m \u001B[38;5;28;01mas\u001B[39;00m e:\n\u001B[0;32m 446\u001B[0m \u001B[38;5;66;03m# Remove the TypeError from the exception chain in\u001B[39;00m\n\u001B[0;32m 447\u001B[0m \u001B[38;5;66;03m# Python 3 (including for exceptions like SystemExit).\u001B[39;00m\n\u001B[0;32m 448\u001B[0m \u001B[38;5;66;03m# Otherwise it looks like a bug in the code.\u001B[39;00m\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\http\\client.py:1377\u001B[0m, in \u001B[0;36mHTTPConnection.getresponse\u001B[1;34m(self)\u001B[0m\n\u001B[0;32m 1376\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[1;32m-> 1377\u001B[0m \u001B[43mresponse\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mbegin\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 1378\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mConnectionError\u001B[39;00m:\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\http\\client.py:320\u001B[0m, in \u001B[0;36mHTTPResponse.begin\u001B[1;34m(self)\u001B[0m\n\u001B[0;32m 319\u001B[0m \u001B[38;5;28;01mwhile\u001B[39;00m \u001B[38;5;28;01mTrue\u001B[39;00m:\n\u001B[1;32m--> 320\u001B[0m version, status, reason \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_read_status\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 321\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m status \u001B[38;5;241m!=\u001B[39m CONTINUE:\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\http\\client.py:281\u001B[0m, in \u001B[0;36mHTTPResponse._read_status\u001B[1;34m(self)\u001B[0m\n\u001B[0;32m 280\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m \u001B[38;5;21m_read_status\u001B[39m(\u001B[38;5;28mself\u001B[39m):\n\u001B[1;32m--> 281\u001B[0m line \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mstr\u001B[39m(\u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mfp\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mreadline\u001B[49m\u001B[43m(\u001B[49m\u001B[43m_MAXLINE\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;241;43m+\u001B[39;49m\u001B[43m \u001B[49m\u001B[38;5;241;43m1\u001B[39;49m\u001B[43m)\u001B[49m, \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124miso-8859-1\u001B[39m\u001B[38;5;124m\"\u001B[39m)\n\u001B[0;32m 282\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m \u001B[38;5;28mlen\u001B[39m(line) \u001B[38;5;241m>\u001B[39m _MAXLINE:\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\socket.py:704\u001B[0m, in \u001B[0;36mSocketIO.readinto\u001B[1;34m(self, b)\u001B[0m\n\u001B[0;32m 703\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[1;32m--> 704\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_sock\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mrecv_into\u001B[49m\u001B[43m(\u001B[49m\u001B[43mb\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 705\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m timeout:\n", - "\u001B[1;31mProtocolError\u001B[0m: ('Connection aborted.', ConnectionResetError(10054, 'Eine vorhandene Verbindung wurde vom Remotehost geschlossen', None, 10054, None))", - "\nDuring handling of the above exception, another exception occurred:\n", - "\u001B[1;31mConnectionError\u001B[0m Traceback (most recent call last)", - "Cell \u001B[1;32mIn[29], line 1\u001B[0m\n\u001B[1;32m----> 1\u001B[0m gj \u001B[38;5;241m=\u001B[39m \u001B[43ma\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mdownload\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 2\u001B[0m gj\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\datacube.py:1950\u001B[0m, in \u001B[0;36mDataCube.download\u001B[1;34m(self, outputfile, format, options)\u001B[0m\n\u001B[0;32m 1948\u001B[0m \u001B[38;5;28mformat\u001B[39m \u001B[38;5;241m=\u001B[39m guess_format(outputfile)\n\u001B[0;32m 1949\u001B[0m cube \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_ensure_save_result(\u001B[38;5;28mformat\u001B[39m\u001B[38;5;241m=\u001B[39m\u001B[38;5;28mformat\u001B[39m, options\u001B[38;5;241m=\u001B[39moptions)\n\u001B[1;32m-> 1950\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_connection\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mdownload\u001B[49m\u001B[43m(\u001B[49m\u001B[43mcube\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mflat_graph\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43moutputfile\u001B[49m\u001B[43m)\u001B[49m\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\connection.py:1404\u001B[0m, in \u001B[0;36mConnection.download\u001B[1;34m(self, graph, outputfile, timeout)\u001B[0m\n\u001B[0;32m 1393\u001B[0m \u001B[38;5;250m\u001B[39m\u001B[38;5;124;03m\"\"\"\u001B[39;00m\n\u001B[0;32m 1394\u001B[0m \u001B[38;5;124;03mDownloads the result of a process graph synchronously,\u001B[39;00m\n\u001B[0;32m 1395\u001B[0m \u001B[38;5;124;03mand save the result to the given file or return bytes object if no outputfile is specified.\u001B[39;00m\n\u001B[1;32m (...)\u001B[0m\n\u001B[0;32m 1401\u001B[0m \u001B[38;5;124;03m:param timeout: timeout to wait for response\u001B[39;00m\n\u001B[0;32m 1402\u001B[0m \u001B[38;5;124;03m\"\"\"\u001B[39;00m\n\u001B[0;32m 1403\u001B[0m request \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_build_request_with_process_graph(process_graph\u001B[38;5;241m=\u001B[39mgraph)\n\u001B[1;32m-> 1404\u001B[0m response \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mpost\u001B[49m\u001B[43m(\u001B[49m\u001B[43mpath\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43m/result\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mjson\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mrequest\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mexpected_status\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;241;43m200\u001B[39;49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mstream\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;28;43;01mTrue\u001B[39;49;00m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mtimeout\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mtimeout\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 1406\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m outputfile \u001B[38;5;129;01mis\u001B[39;00m \u001B[38;5;129;01mnot\u001B[39;00m \u001B[38;5;28;01mNone\u001B[39;00m:\n\u001B[0;32m 1407\u001B[0m \u001B[38;5;28;01mwith\u001B[39;00m Path(outputfile)\u001B[38;5;241m.\u001B[39mopen(mode\u001B[38;5;241m=\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mwb\u001B[39m\u001B[38;5;124m\"\u001B[39m) \u001B[38;5;28;01mas\u001B[39;00m f:\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\connection.py:190\u001B[0m, in \u001B[0;36mRestApiConnection.post\u001B[1;34m(self, path, json, **kwargs)\u001B[0m\n\u001B[0;32m 182\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m \u001B[38;5;21mpost\u001B[39m(\u001B[38;5;28mself\u001B[39m, path: \u001B[38;5;28mstr\u001B[39m, json: Optional[\u001B[38;5;28mdict\u001B[39m] \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;01mNone\u001B[39;00m, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs) \u001B[38;5;241m-\u001B[39m\u001B[38;5;241m>\u001B[39m Response:\n\u001B[0;32m 183\u001B[0m \u001B[38;5;250m \u001B[39m\u001B[38;5;124;03m\"\"\"\u001B[39;00m\n\u001B[0;32m 184\u001B[0m \u001B[38;5;124;03m Do POST request to REST API.\u001B[39;00m\n\u001B[0;32m 185\u001B[0m \n\u001B[1;32m (...)\u001B[0m\n\u001B[0;32m 188\u001B[0m \u001B[38;5;124;03m :return: response: Response\u001B[39;00m\n\u001B[0;32m 189\u001B[0m \u001B[38;5;124;03m \"\"\"\u001B[39;00m\n\u001B[1;32m--> 190\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mrequest(\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mpost\u001B[39m\u001B[38;5;124m\"\u001B[39m, path\u001B[38;5;241m=\u001B[39mpath, json\u001B[38;5;241m=\u001B[39mjson, allow_redirects\u001B[38;5;241m=\u001B[39m\u001B[38;5;28;01mFalse\u001B[39;00m, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs)\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\connection.py:727\u001B[0m, in \u001B[0;36mConnection.request\u001B[1;34m(self, method, path, headers, auth, check_error, expected_status, **kwargs)\u001B[0m\n\u001B[0;32m 720\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28msuper\u001B[39m(Connection, \u001B[38;5;28mself\u001B[39m)\u001B[38;5;241m.\u001B[39mrequest(\n\u001B[0;32m 721\u001B[0m method\u001B[38;5;241m=\u001B[39mmethod, path\u001B[38;5;241m=\u001B[39mpath, headers\u001B[38;5;241m=\u001B[39mheaders, auth\u001B[38;5;241m=\u001B[39mauth,\n\u001B[0;32m 722\u001B[0m check_error\u001B[38;5;241m=\u001B[39mcheck_error, expected_status\u001B[38;5;241m=\u001B[39mexpected_status, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs,\n\u001B[0;32m 723\u001B[0m )\n\u001B[0;32m 725\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[0;32m 726\u001B[0m \u001B[38;5;66;03m# Initial request attempt\u001B[39;00m\n\u001B[1;32m--> 727\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[43m_request\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 728\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m OpenEoApiError \u001B[38;5;28;01mas\u001B[39;00m api_exc:\n\u001B[0;32m 729\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m api_exc\u001B[38;5;241m.\u001B[39mhttp_status_code \u001B[38;5;241m==\u001B[39m \u001B[38;5;241m403\u001B[39m \u001B[38;5;129;01mand\u001B[39;00m api_exc\u001B[38;5;241m.\u001B[39mcode \u001B[38;5;241m==\u001B[39m \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mTokenInvalid\u001B[39m\u001B[38;5;124m\"\u001B[39m:\n\u001B[0;32m 730\u001B[0m \u001B[38;5;66;03m# Auth token expired: can we refresh?\u001B[39;00m\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\connection.py:720\u001B[0m, in \u001B[0;36mConnection.request.._request\u001B[1;34m()\u001B[0m\n\u001B[0;32m 719\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m \u001B[38;5;21m_request\u001B[39m():\n\u001B[1;32m--> 720\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28msuper\u001B[39m(Connection, \u001B[38;5;28mself\u001B[39m)\u001B[38;5;241m.\u001B[39mrequest(\n\u001B[0;32m 721\u001B[0m method\u001B[38;5;241m=\u001B[39mmethod, path\u001B[38;5;241m=\u001B[39mpath, headers\u001B[38;5;241m=\u001B[39mheaders, auth\u001B[38;5;241m=\u001B[39mauth,\n\u001B[0;32m 722\u001B[0m check_error\u001B[38;5;241m=\u001B[39mcheck_error, expected_status\u001B[38;5;241m=\u001B[39mexpected_status, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs,\n\u001B[0;32m 723\u001B[0m )\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\rest\\connection.py:119\u001B[0m, in \u001B[0;36mRestApiConnection.request\u001B[1;34m(self, method, path, headers, auth, check_error, expected_status, **kwargs)\u001B[0m\n\u001B[0;32m 115\u001B[0m _log\u001B[38;5;241m.\u001B[39mdebug(\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mRequest `\u001B[39m\u001B[38;5;132;01m{m}\u001B[39;00m\u001B[38;5;124m \u001B[39m\u001B[38;5;132;01m{u}\u001B[39;00m\u001B[38;5;124m` with headers \u001B[39m\u001B[38;5;132;01m{h}\u001B[39;00m\u001B[38;5;124m, auth \u001B[39m\u001B[38;5;132;01m{a}\u001B[39;00m\u001B[38;5;124m, kwargs \u001B[39m\u001B[38;5;132;01m{k}\u001B[39;00m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;241m.\u001B[39mformat(\n\u001B[0;32m 116\u001B[0m m\u001B[38;5;241m=\u001B[39mmethod\u001B[38;5;241m.\u001B[39mupper(), u\u001B[38;5;241m=\u001B[39murl, h\u001B[38;5;241m=\u001B[39mheaders \u001B[38;5;129;01mand\u001B[39;00m headers\u001B[38;5;241m.\u001B[39mkeys(), a\u001B[38;5;241m=\u001B[39m\u001B[38;5;28mtype\u001B[39m(auth)\u001B[38;5;241m.\u001B[39m\u001B[38;5;18m__name__\u001B[39m, k\u001B[38;5;241m=\u001B[39m\u001B[38;5;28mlist\u001B[39m(kwargs\u001B[38;5;241m.\u001B[39mkeys()))\n\u001B[0;32m 117\u001B[0m )\n\u001B[0;32m 118\u001B[0m \u001B[38;5;28;01mwith\u001B[39;00m ContextTimer() \u001B[38;5;28;01mas\u001B[39;00m timer:\n\u001B[1;32m--> 119\u001B[0m resp \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39msession\u001B[38;5;241m.\u001B[39mrequest(\n\u001B[0;32m 120\u001B[0m method\u001B[38;5;241m=\u001B[39mmethod,\n\u001B[0;32m 121\u001B[0m url\u001B[38;5;241m=\u001B[39murl,\n\u001B[0;32m 122\u001B[0m headers\u001B[38;5;241m=\u001B[39m\u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_merged_headers(headers),\n\u001B[0;32m 123\u001B[0m auth\u001B[38;5;241m=\u001B[39mauth,\n\u001B[0;32m 124\u001B[0m timeout\u001B[38;5;241m=\u001B[39mkwargs\u001B[38;5;241m.\u001B[39mpop(\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mtimeout\u001B[39m\u001B[38;5;124m\"\u001B[39m, \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mdefault_timeout),\n\u001B[0;32m 125\u001B[0m \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs\n\u001B[0;32m 126\u001B[0m )\n\u001B[0;32m 127\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m slow_response_threshold \u001B[38;5;129;01mand\u001B[39;00m timer\u001B[38;5;241m.\u001B[39melapsed() \u001B[38;5;241m>\u001B[39m slow_response_threshold:\n\u001B[0;32m 128\u001B[0m _log\u001B[38;5;241m.\u001B[39mwarning(\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mSlow response: `\u001B[39m\u001B[38;5;132;01m{m}\u001B[39;00m\u001B[38;5;124m \u001B[39m\u001B[38;5;132;01m{u}\u001B[39;00m\u001B[38;5;124m` took \u001B[39m\u001B[38;5;132;01m{e:.2f}\u001B[39;00m\u001B[38;5;124ms (>\u001B[39m\u001B[38;5;132;01m{t:.2f}\u001B[39;00m\u001B[38;5;124ms)\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;241m.\u001B[39mformat(\n\u001B[0;32m 129\u001B[0m m\u001B[38;5;241m=\u001B[39mmethod\u001B[38;5;241m.\u001B[39mupper(), u\u001B[38;5;241m=\u001B[39mstr_truncate(url, width\u001B[38;5;241m=\u001B[39m\u001B[38;5;241m64\u001B[39m),\n\u001B[0;32m 130\u001B[0m e\u001B[38;5;241m=\u001B[39mtimer\u001B[38;5;241m.\u001B[39melapsed(), t\u001B[38;5;241m=\u001B[39mslow_response_threshold\n\u001B[0;32m 131\u001B[0m ))\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\requests\\sessions.py:589\u001B[0m, in \u001B[0;36mSession.request\u001B[1;34m(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)\u001B[0m\n\u001B[0;32m 584\u001B[0m send_kwargs \u001B[38;5;241m=\u001B[39m {\n\u001B[0;32m 585\u001B[0m \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mtimeout\u001B[39m\u001B[38;5;124m\"\u001B[39m: timeout,\n\u001B[0;32m 586\u001B[0m \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mallow_redirects\u001B[39m\u001B[38;5;124m\"\u001B[39m: allow_redirects,\n\u001B[0;32m 587\u001B[0m }\n\u001B[0;32m 588\u001B[0m send_kwargs\u001B[38;5;241m.\u001B[39mupdate(settings)\n\u001B[1;32m--> 589\u001B[0m resp \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39msend(prep, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39msend_kwargs)\n\u001B[0;32m 591\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m resp\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\requests\\sessions.py:703\u001B[0m, in \u001B[0;36mSession.send\u001B[1;34m(self, request, **kwargs)\u001B[0m\n\u001B[0;32m 700\u001B[0m start \u001B[38;5;241m=\u001B[39m preferred_clock()\n\u001B[0;32m 702\u001B[0m \u001B[38;5;66;03m# Send the request\u001B[39;00m\n\u001B[1;32m--> 703\u001B[0m r \u001B[38;5;241m=\u001B[39m adapter\u001B[38;5;241m.\u001B[39msend(request, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs)\n\u001B[0;32m 705\u001B[0m \u001B[38;5;66;03m# Total elapsed time of the request (approximately)\u001B[39;00m\n\u001B[0;32m 706\u001B[0m elapsed \u001B[38;5;241m=\u001B[39m preferred_clock() \u001B[38;5;241m-\u001B[39m start\n", - "File \u001B[1;32m~\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\requests\\adapters.py:501\u001B[0m, in \u001B[0;36mHTTPAdapter.send\u001B[1;34m(self, request, stream, timeout, verify, cert, proxies)\u001B[0m\n\u001B[0;32m 486\u001B[0m resp \u001B[38;5;241m=\u001B[39m conn\u001B[38;5;241m.\u001B[39murlopen(\n\u001B[0;32m 487\u001B[0m method\u001B[38;5;241m=\u001B[39mrequest\u001B[38;5;241m.\u001B[39mmethod,\n\u001B[0;32m 488\u001B[0m url\u001B[38;5;241m=\u001B[39murl,\n\u001B[1;32m (...)\u001B[0m\n\u001B[0;32m 497\u001B[0m chunked\u001B[38;5;241m=\u001B[39mchunked,\n\u001B[0;32m 498\u001B[0m )\n\u001B[0;32m 500\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m (ProtocolError, \u001B[38;5;167;01mOSError\u001B[39;00m) \u001B[38;5;28;01mas\u001B[39;00m err:\n\u001B[1;32m--> 501\u001B[0m \u001B[38;5;28;01mraise\u001B[39;00m \u001B[38;5;167;01mConnectionError\u001B[39;00m(err, request\u001B[38;5;241m=\u001B[39mrequest)\n\u001B[0;32m 503\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m MaxRetryError \u001B[38;5;28;01mas\u001B[39;00m e:\n\u001B[0;32m 504\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m \u001B[38;5;28misinstance\u001B[39m(e\u001B[38;5;241m.\u001B[39mreason, ConnectTimeoutError):\n\u001B[0;32m 505\u001B[0m \u001B[38;5;66;03m# TODO: Remove this in 3.0.0: see #2811\u001B[39;00m\n", - "\u001B[1;31mConnectionError\u001B[0m: ('Connection aborted.', ConnectionResetError(10054, 'Eine vorhandene Verbindung wurde vom Remotehost geschlossen', None, 10054, None))" - ] - } - ], - "source": [ - "gj = a.download()\n", - "gj" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2023-11-16T14:57:00.525189300Z", - "start_time": "2023-11-16T14:45:57.505572900Z" - } - } - }, - { - "cell_type": "code", - "execution_count": null, - "outputs": [], - "source": [ - "result = connection.execute({\"process\": {\n", - " \"id\": \"load_collection\",\n", - " \"parameters\": {\n", - " \"id\": \"geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~populated_places_sub\",\n", - " \"spatial_extent\": {\n", - " \"bbox\": \"(33, -10, 71, 43)\"\n", - " }\n", - " }\n", - "}})\n", - "result" + "Show the collection's items, but not using the openeo-client's function -- it has a bug. Rather, we're using the direct URL:\n", + "https://geodb.openeo.dev.brockmann-consult.de/collections/geodb_b34bfae7-9265-4a3e-b921-06549d3c6035~alster_debug/items" ], "metadata": { "collapsed": false } }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "body = json.dumps({\"process\": {\n", - " \"id\": \"load_collection\",\n", - " \"parameters\": {\n", - " \"id\": \"populated_places_sub\",\n", - " \"spatial_extent\": {\n", - " \"bbox\": \"(33, -10, 71, 43)\"\n", - " }\n", - " }\n", - "}})\n", - "r = http.request('POST', f'{base_url}/result',\n", - " headers={'Content-Type': 'application/json'},\n", - " body=body)\n", - "vector_cube = json.loads(r.data)\n", - "vector_cube" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "vector_cube[20]" - ] - }, { "cell_type": "markdown", "source": [ - "## Validating some collections responses using the (3rd party) STAC validator software\n", - "Preparation:" + "Show the processes currently implemented in the geoDB openEO backend:" ], "metadata": { "collapsed": false @@ -328,52 +119,52 @@ "metadata": {}, "outputs": [], "source": [ - "from stac_validator import stac_validator\n", - "import json" + "geodb.list_processes()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Validate response for collection `AT_2021_EC21`:" + "## Use Case 1\n", + "Load a collection using the process `LoadCollection`, which is internally used by the openeo-client function `load_collection`. Then download the collection using the process `SaveResult`, which is also internally used by the openeo-client function `download`.\n", + "Ignore the warning message: the openeo-client complains about the unknown dimension type 'geometry', but this is specified in the STAC extension 'datacube', so it is fine." ] }, { "cell_type": "code", "execution_count": null, - "metadata": {}, "outputs": [], "source": [ - "stac = stac_validator.StacValidate(f'{base_url}/collections/AT_2021_EC21')\n", - "stac.run()\n", - "print(json.dumps(stac.message[0], indent=2))" - ] + "collection = geodb.load_collection('openeo~pop_hamburg')\n", + "collection.download('./hamburg-pop.json', 'GeoJSON')" + ], + "metadata": { + "collapsed": false + } }, { "cell_type": "markdown", - "metadata": {}, "source": [ - "Validate response for collection `populated_places_sub`:" - ] + "Open the downloaded data in a GeoDataFrame, and visualise its geometries:" + ], + "metadata": { + "collapsed": false + } }, { "cell_type": "code", "execution_count": null, - "metadata": {}, "outputs": [], "source": [ - "stac = stac_validator.StacValidate(f'{base_url}/collections/populated_places_sub')\n", - "stac.run()\n", - "print(json.dumps(stac.message[0], indent=2))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] + "import geopandas\n", + "gdf = geopandas.read_file('./hamburg-pop.json')\n", + "\n", + "gdf.plot()" + ], + "metadata": { + "collapsed": false + } } ], "metadata": { diff --git a/notebooks/geoDB-openEO_use_case_2.ipynb b/notebooks/geoDB-openEO_use_case_2.ipynb index 016df31..68d3abb 100644 --- a/notebooks/geoDB-openEO_use_case_2.ipynb +++ b/notebooks/geoDB-openEO_use_case_2.ipynb @@ -17,31 +17,10 @@ }, { "cell_type": "code", - "execution_count": 195, + "execution_count": null, "id": "edcce2fdfc4a403a", - "metadata": { - "ExecuteTime": { - "end_time": "2023-11-21T12:29:14.121770200Z", - "start_time": "2023-11-21T12:29:09.707648900Z" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Authenticated using refresh token.\n" - ] - }, - { - "data": { - "text/plain": "" - }, - "execution_count": 195, - "metadata": {}, - "output_type": "execute_result" - } - ], + "metadata": {}, + "outputs": [], "source": [ "import openeo\n", "\n", @@ -74,25 +53,12 @@ }, { "cell_type": "code", - "execution_count": 197, + "execution_count": null, "id": "7903b501d68f258c", "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2023-11-21T12:30:01.039006100Z", - "start_time": "2023-11-21T12:29:57.851719100Z" - } + "collapsed": false }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "C:\\Users\\Thomas\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\metadata.py:272: UserWarning: Unknown dimension type 'geometry'\n", - " complain(\"Unknown dimension type {t!r}\".format(t=dim_type))\n" - ] - } - ], + "outputs": [], "source": [ "hamburg = geodb.load_collection('openeo~pop_hamburg')\n", "hamburg = hamburg.aggregate_temporal([['2000-01-01', '2030-01-05']], 'mean', context={'pattern': '%Y-%M-%d'})\n", @@ -113,14 +79,9 @@ }, { "cell_type": "code", - "execution_count": 198, + "execution_count": null, "id": "ab0edbcf-c37d-4ccf-b533-70d8877c9419", - "metadata": { - "ExecuteTime": { - "end_time": "2023-11-21T12:30:04.400251400Z", - "start_time": "2023-11-21T12:30:04.324929800Z" - } - }, + "metadata": {}, "outputs": [], "source": [ "olci = cdse.load_collection(\"SENTINEL3_OLCI_L1B\",\n", @@ -147,42 +108,10 @@ }, { "cell_type": "code", - "execution_count": 199, + "execution_count": null, "id": "f056401a-65de-48bd-9f73-1915ea47b14f", - "metadata": { - "ExecuteTime": { - "end_time": "2023-11-21T12:35:20.038996Z", - "start_time": "2023-11-21T12:32:44.537780900Z" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "0:00:00 Job 'j-231121366e30458cba494dc68f586106': send 'start'\n", - "0:00:14 Job 'j-231121366e30458cba494dc68f586106': created (progress N/A)\n", - "0:00:19 Job 'j-231121366e30458cba494dc68f586106': created (progress N/A)\n", - "0:00:26 Job 'j-231121366e30458cba494dc68f586106': running (progress N/A)\n", - "0:00:34 Job 'j-231121366e30458cba494dc68f586106': running (progress N/A)\n", - "0:00:45 Job 'j-231121366e30458cba494dc68f586106': running (progress N/A)\n", - "0:00:57 Job 'j-231121366e30458cba494dc68f586106': running (progress N/A)\n", - "0:01:13 Job 'j-231121366e30458cba494dc68f586106': running (progress N/A)\n", - "0:01:32 Job 'j-231121366e30458cba494dc68f586106': running (progress N/A)\n", - "0:01:56 Job 'j-231121366e30458cba494dc68f586106': running (progress N/A)\n", - "0:02:34 Job 'j-231121366e30458cba494dc68f586106': finished (progress N/A)\n" - ] - }, - { - "data": { - "text/plain": "", - "text/html": "\n \n \n \n \n " - }, - "execution_count": 199, - "metadata": {}, - "output_type": "execute_result" - } - ], + "metadata": {}, + "outputs": [], "source": [ "import json\n", "with open('./hamburg_mean.json') as f:\n", @@ -207,14 +136,9 @@ }, { "cell_type": "code", - "execution_count": 200, + "execution_count": null, "id": "1868c72e-cfb0-458b-82bf-a6e0b57e15d9", - "metadata": { - "ExecuteTime": { - "end_time": "2023-11-21T12:35:55.233822700Z", - "start_time": "2023-11-21T12:35:53.770154Z" - } - }, + "metadata": {}, "outputs": [], "source": [ "result_file = job.get_results().download_files(\"output\")[0]\n", @@ -237,14 +161,9 @@ }, { "cell_type": "code", - "execution_count": 201, + "execution_count": null, "id": "f17b7277-2b4a-40d4-b982-f51a0b57915c", - "metadata": { - "ExecuteTime": { - "end_time": "2023-11-21T12:36:14.012885700Z", - "start_time": "2023-11-21T12:36:13.944682300Z" - } - }, + "metadata": {}, "outputs": [], "source": [ "import geopandas\n", @@ -266,25 +185,12 @@ }, { "cell_type": "code", - "execution_count": 208, + "execution_count": null, "id": "2316d61c-261c-41af-8de6-a5aa30367d0b", "metadata": { - "scrolled": true, - "ExecuteTime": { - "end_time": "2023-11-21T12:46:36.319701800Z", - "start_time": "2023-11-21T12:46:35.884355700Z" - } + "scrolled": true }, - "outputs": [ - { - "data": { - "text/plain": "
", - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAe4AAAGdCAYAAADUoZA5AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAABvuUlEQVR4nO3deXxU1dnA8d9kDwEisiVICCBGMCwia0BUFKPUBesGioBW6mulilJqRduKWsVqBV/Liy0YBFdo3aqIQBBB1kiBKCL7FtBESBQCCUlIct8/npnkzmSSmcl2ZybP9/OZD8nMmXOfGTLz3HPuWWyGYRgopZRSKiCEWB2AUkoppbyniVsppZQKIJq4lVJKqQCiiVsppZQKIJq4lVJKqQCiiVsppZQKIJq4lVJKqQCiiVsppZQKIGFWB9CYysvL+eGHH2jRogU2m83qcJRSqskyDINTp07RoUMHQkK0DemLJpW4f/jhBxISEqwOQymllN2RI0fo2LGj1WEElCaVuFu0aAHIH0rLli0tjkYppZqu/Px8EhISKr6XlfeaVOJ2dI+3bNlSE7dSSvkBvWzpO72woJRSSgUQTdxKKaVUANHErZRSSgUQTdxKKaVUANHErZRSSgUQTdxKKaVUANHErZRSSgUQTdxKKaVUANHErZRSSgUQTdxKKaVUANHErZRSSgUQTdxKKaVUANHErZR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M58S9d+9eOnToQJcuXRgzZgwHDhxwW66kpIS5c+cSGxtLnz59aqzz6aefpm3bttx7b9X1mUtKStiyZQupqalO96emprJhw4Ya6y0uLiY/P9/pplSwGd59OO/f/37F7y1DW+o0MKWCmE+Je9CgQbzxxhssX76cefPmkZOTw5AhQ8jLy6sos2TJEpo3b05UVBSzZs0iPT2dNm3aVFvn+vXrSUtLY968eW4fz83NpaysjPbt2zvd3759e3JycmqMd8aMGcTGxlbcEhISfHi1SgWO5POSK35OCNO/c6WCmU+Je+TIkdxyyy306tWLESNG8OmnnwKwcOHCijLDhw8nMzOTDRs2cO2113L77bdz7Ngxt/WdOnWKu+66i3nz5tWY3IEqc1cNw/C4VeG0adM4efJkxe3IkSPevEylAlqYLcxzIaVUwKrTJzwmJoZevXqxd+9ep/u6detGt27dGDx4MBdccAFpaWlMmzatyvP379/PoUOHuOGGGyruKy8vl8DCwti9ezcJCQmEhoZWaV0fO3asSivcVWRkJJGROrJWKaVU8KjTPO7i4mJ27txJfHx8tWUMw6C4uNjtY927d2f79u1kZmZW3G688caKVntCQgIRERH069eP9PR0p+emp6czZMiQuoSvlFJKBRyfWtxTp07lhhtuoFOnThw7doy//OUv5OfnM2HCBAoKCnj22We58cYbiY+PJy8vjzlz5nD06FFuu+22ijrGjx/Peeedx4wZM4iKiqJnz55OxzjnnHMAnO6fMmUK48aNo3///qSkpDB37lyysrK4//776/DSlVJKqcDjU+I+evQod9xxB7m5ubRt25bBgwezadMmEhMTKSoqYteuXSxcuJDc3Fxat27NgAEDWLt2LcnJlQNnsrKyCAnxraE/evRo8vLyePrpp8nOzqZnz54sXbqUxESdq6qUUqppsRmGYVgdRGPJz88nNjaWkydP0rJlS6vDUUqpJku/j2tP1ypXSimlAogmbqWUUiqAaOJWSimlAogmbqWUUiqAaOJWSimlAogmbqWUUiqAaOJWSimlAogmbqWUUiqAaOJWSimlAkiT2v/PsUhcfn6+xZEopVTT5vgebkKLd9abJpW4T506BUBCQoLFkSillAL5Xo6NjbU6jIDSpNYqLy8v54cffqBFixbYbDarw6kX+fn5JCQkcOTIkSa73q++B0LfB6Hvg/D398EwDE6dOkWHDh183niqqWtSLe6QkBA6duxodRgNomXLln754WxM+h4IfR+Evg/Cn98HbWnXjp7mKKWUUgFEE7dSSikVQDRxB7jIyEiefPJJIiMjrQ7FMvoeCH0fhL4PQt+H4NWkBqcppZRSgU5b3EoppVQA0cStlFJKBRBN3EoppVQA0cStlFJKBRBN3H7s1KlTPPzwwyQmJhIdHc2QIUPYvHlzjc95++236dOnD82aNSM+Pp577rmHvLy8Roq4YdTmffi///s/evToQXR0NBdeeCFvvPFGI0VbP7788ktuuOEGOnTogM1m46OPPnJ63DAMpk+fTocOHYiOjuaKK65gx44dHut9//33ueiii4iMjOSiiy7iww8/bKBXUD8a4n3YsWMHt9xyC507d8Zms/Hyyy833AuoJw3xPsybN49hw4bRqlUrWrVqxYgRI/jqq68a8FWo+qKJ249NnDiR9PR03nzzTbZv305qaiojRozg+++/d1t+3bp1jB8/nnvvvZcdO3bw73//m82bNzNx4sRGjrx++fo+vPrqq0ybNo3p06ezY8cOnnrqKSZNmsQnn3zSyJHXXkFBAX369GH27NluH3/hhReYOXMms2fPZvPmzcTFxXH11VdXrMfvzsaNGxk9ejTjxo3j66+/Zty4cdx+++1kZGQ01Muos4Z4HwoLC+natSvPP/88cXFxDRV6vWqI92H16tXccccdfPHFF2zcuJFOnTqRmppa7edK+RFD+aXCwkIjNDTUWLJkidP9ffr0MZ544gm3z3nxxReNrl27Ot33yiuvGB07dmywOBtabd6HlJQUY+rUqU73TZ482Rg6dGiDxdmQAOPDDz+s+L28vNyIi4sznn/++Yr7ioqKjNjYWOMf//hHtfXcfvvtxrXXXut03zXXXGOMGTOm3mNuCPX1PpglJiYas2bNqudIG1ZDvA+GYRilpaVGixYtjIULF9ZnuKoBaIvbT5WWllJWVkZUVJTT/dHR0axbt87tc4YMGcLRo0dZunQphmHw448/8t5773Hdddc1RsgNojbvQ3FxsdvyX331FWfPnm2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9DcXFxRZ3x8fHG1KlTjW3bthl79+5t9NfnrYZ4H/76178aERERxnvvvWdkZ2dX3E6dOtXor0/5RhO3H1u8eLHRtWtXIyIiwoiLizMmTZpknDhxouLxCRMmGJdffrnTc1555RXjoosuMqKjo434+Hhj7NixxtGjRxs58vrl6/vw3XffGRdffLERHR1ttGzZ0hg1apSxa9cuCyKvvS+++MIAqtwmTJhgGIZMAXryySeNuLg4IzIy0rjsssuM7du3O9Vx+eWXV5R3+Pe//21ceOGFRnh4uNG9e3fj/fffb6RXVDsN8T4cPHjQbZ2unyV/0hDvQ2Jiots6n3zyycZ7YapWdFtPpZRSKoAE/gU/pZRSqgnRxK2UUkoFEE3cSimlVADRxK2UUkoFEE3cSimlVADRxK2UUkoFEE3cSimlVADRxK2UUkoFEE3cSimlVADRxK2UUkoFEE3cSimlVADRxK2UUkoFkP8HZAcwZUKcxQYAAAAASUVORK5CYII=" - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "gdf['color'] = ['#006400', '#90EE90']\n", @@ -316,26 +222,8 @@ }, { "cell_type": "code", - "execution_count": 212, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "C:\\Users\\Thomas\\micromamba\\envs\\xcube-geodb-openeo\\lib\\site-packages\\openeo\\metadata.py:272: UserWarning: Unknown dimension type 'geometry'\n", - " complain(\"Unknown dimension type {t!r}\".format(t=dim_type))\n" - ] - }, - { - "data": { - "text/plain": " id geometry population \\\n0 1 POLYGON ((9.78652 53.60253, 9.98977 53.68638, ... 0.2 \n1 2 POLYGON ((9.78652 53.60253, 9.98977 53.68638, ... 0.4 \n2 3 POLYGON ((9.78652 53.60253, 9.98977 53.68638, ... 0.5 \n3 4 POLYGON ((9.78652 53.60253, 9.98977 53.68638, ... 0.9 \n4 5 POLYGON ((9.99389 53.69045, 10.00213 53.39996,... 0.4 \n5 6 POLYGON ((9.99389 53.69045, 10.00213 53.39996,... 0.9 \n6 7 POLYGON ((9.99389 53.69045, 10.00213 53.39996,... 0.5 \n7 8 POLYGON ((9.99389 53.69045, 10.00213 53.39996,... 0.8 \n\n date \n0 1990-01-01 00:00:00+00:00 \n1 2000-01-01 00:00:00+00:00 \n2 2010-01-01 00:00:00+00:00 \n3 2020-01-01 00:00:00+00:00 \n4 1990-01-01 00:00:00+00:00 \n5 2000-01-01 00:00:00+00:00 \n6 2010-01-01 00:00:00+00:00 \n7 2020-01-01 00:00:00+00:00 ", - "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
idgeometrypopulationdate
01POLYGON ((9.78652 53.60253, 9.98977 53.68638, ...0.21990-01-01 00:00:00+00:00
12POLYGON ((9.78652 53.60253, 9.98977 53.68638, ...0.42000-01-01 00:00:00+00:00
23POLYGON ((9.78652 53.60253, 9.98977 53.68638, ...0.52010-01-01 00:00:00+00:00
34POLYGON ((9.78652 53.60253, 9.98977 53.68638, ...0.92020-01-01 00:00:00+00:00
45POLYGON ((9.99389 53.69045, 10.00213 53.39996,...0.41990-01-01 00:00:00+00:00
56POLYGON ((9.99389 53.69045, 10.00213 53.39996,...0.92000-01-01 00:00:00+00:00
67POLYGON ((9.99389 53.69045, 10.00213 53.39996,...0.52010-01-01 00:00:00+00:00
78POLYGON ((9.99389 53.69045, 10.00213 53.39996,...0.82020-01-01 00:00:00+00:00
\n
" - }, - "execution_count": 212, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "outputs": [], "source": [ "def apply_scaling(x: float) -> float:\n", " return x * 0.000001\n", @@ -351,11 +239,7 @@ "gdf[['id', 'geometry', 'population', 'date']]" ], "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2023-11-21T12:54:31.080321700Z", - "start_time": "2023-11-21T12:54:27.851159Z" - } + "collapsed": false }, "id": "df0c0de2f826109a" } diff --git a/xcube_geodb_openeo/backend/processes.py b/xcube_geodb_openeo/backend/processes.py index e0cf188..78be6b3 100644 --- a/xcube_geodb_openeo/backend/processes.py +++ b/xcube_geodb_openeo/backend/processes.py @@ -171,65 +171,8 @@ def get_file_formats(self) -> Dict: } ] }, - "GPKG": { - "title": "OGC GeoPackage", - "gis_data_types": [ - "raster", - "vector" - ], - "parameters": { - "version": { - "type": "string", - "description": "Set GeoPackage version. In AUTO mode, this will be equivalent to 1.2 starting with GDAL 2.3.", - "enum": [ - "auto", - "1", - "1.1", - "1.2" - ], - "default": "auto" - } - }, - "links": [ - { - "href": "https://gdal.org/drivers/raster/gpkg.html", - "rel": "about", - "title": "GDAL on GeoPackage for raster data" - }, - { - "href": "https://gdal.org/drivers/vector/gpkg.html", - "rel": "about", - "title": "GDAL on GeoPackage for vector data" - } - ] - } }, "input": { - "GPKG": { - "title": "OGC GeoPackage", - "gis_data_types": [ - "raster", - "vector" - ], - "parameters": { - "table": { - "type": "string", - "description": "**RASTER ONLY.** Name of the table containing the tiles. If the GeoPackage dataset only contains one table, this option is not necessary. Otherwise, it is required." - } - }, - "links": [ - { - "href": "https://gdal.org/drivers/raster/gpkg.html", - "rel": "about", - "title": "GDAL on GeoPackage for raster data" - }, - { - "href": "https://gdal.org/drivers/vector/gpkg.html", - "rel": "about", - "title": "GDAL on GeoPackage for vector data" - } - ] - } } } # return {'input': [], 'output': ['GeoJSON']} From 9c1a2f7a562a0ea11d385ad90b9d552534ccd403 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 23 Dec 2024 16:13:15 +0100 Subject: [PATCH 160/163] made tests run again --- environment.yml | 2 +- tests/core/mock_vc_provider.py | 10 +- tests/res/__init__.py | 20 ++++ tests/res/sample-process-broken.json | 19 ++++ ...le-process-spatial_extent-default-crs.json | 22 +++++ tests/res/sample-process-spatial_extent.json | 23 +++++ tests/res/sample-process.json | 20 ++++ tests/server/app/test_data_discovery.py | 2 +- tests/server/app/test_processing.py | 99 +++++++------------ tests/server/app/test_utils.py | 6 +- xcube_geodb_openeo/api/routes.py | 38 ++++++- 11 files changed, 186 insertions(+), 75 deletions(-) create mode 100644 tests/res/__init__.py create mode 100755 tests/res/sample-process-broken.json create mode 100755 tests/res/sample-process-spatial_extent-default-crs.json create mode 100755 tests/res/sample-process-spatial_extent.json create mode 100755 tests/res/sample-process.json diff --git a/environment.yml b/environment.yml index e5527df..fde140e 100644 --- a/environment.yml +++ b/environment.yml @@ -10,7 +10,7 @@ dependencies: - pandas - shapely - xcube >= 1.1.1 - - xcube_geodb >= 1.0.5 + - xcube_geodb >= 1.0.8 - geojson - yaml - ipython diff --git a/tests/core/mock_vc_provider.py b/tests/core/mock_vc_provider.py index cb0459a..20f5add 100644 --- a/tests/core/mock_vc_provider.py +++ b/tests/core/mock_vc_provider.py @@ -60,6 +60,7 @@ def get_vector_cube( self, collection_id: Tuple[str, str], bbox: Optional[Tuple[float, float, float, float]] = None) \ -> VectorCube: + self.bbox = bbox return VectorCube(collection_id, self) def get_vector_dim( @@ -111,7 +112,8 @@ def load_features(self, limit: int = 2, f'{self.bbox_hh[1]:.4f}', f'{self.bbox_hh[2]:.4f}', f'{self.bbox_hh[3]:.4f}'], - 'properties': {'id': 1234, + 'properties': {'datetime': '1970-01-01T00:01:00Z', + 'id': 1234, 'name': 'hamburg', 'geometry': 'mygeometry', 'population': 1000} @@ -127,7 +129,8 @@ def load_features(self, limit: int = 2, f'{self.bbox_pb[1]:.4f}', f'{self.bbox_pb[2]:.4f}', f'{self.bbox_pb[3]:.4f}'], - 'properties': {'id': 4321, + 'properties': {'datetime': '1970-01-01T00:01:00Z', + 'id': 4321, 'name': 'paderborn', 'geometry': 'mygeometry', 'population': 100} @@ -135,13 +138,14 @@ def load_features(self, limit: int = 2, if limit == 1: return [pb_feature] + if self.bbox: + return [hh_feature] return [hh_feature, pb_feature] def get_vector_cube_bbox(self) -> Tuple[float, float, float, float]: return wkt.loads(self.hh).bounds - def get_geometry_types(self) -> List[str]: return ['Polygon'] diff --git a/tests/res/__init__.py b/tests/res/__init__.py new file mode 100644 index 0000000..2f1eda6 --- /dev/null +++ b/tests/res/__init__.py @@ -0,0 +1,20 @@ +# The MIT License (MIT) +# Copyright (c) 2021/2022 by the xcube team and contributors +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. diff --git a/tests/res/sample-process-broken.json b/tests/res/sample-process-broken.json new file mode 100755 index 0000000..44bbf89 --- /dev/null +++ b/tests/res/sample-process-broken.json @@ -0,0 +1,19 @@ +{ + "prozzess": { + "summary": "loads collection sample~features", + "parameters": { + "id": "collection_1" + }, + "process_graph": { + "my_process_graph": { + "process_id": "load_collection", + "arguments": { + "id": "sample~features", + "temporal_extent": "None", + "spatial_extent": "None" + }, + "result": true + } + } + } +} \ No newline at end of file diff --git a/tests/res/sample-process-spatial_extent-default-crs.json b/tests/res/sample-process-spatial_extent-default-crs.json new file mode 100755 index 0000000..dc7bc3e --- /dev/null +++ b/tests/res/sample-process-spatial_extent-default-crs.json @@ -0,0 +1,22 @@ +{ + "process": { + "id": "sample_load_collection", + "summary": "loads collection sample~features", + "parameters": { + "id": "collection_1" + }, + "process_graph": { + "my_process_graph": { + "process_id": "load_collection", + "arguments": { + "id": "sample~features", + "temporal_extent": "None", + "spatial_extent": { + "bbox": "(33, -10, 71, 43)" + } + }, + "result": true + } + } + } +} \ No newline at end of file diff --git a/tests/res/sample-process-spatial_extent.json b/tests/res/sample-process-spatial_extent.json new file mode 100755 index 0000000..998479c --- /dev/null +++ b/tests/res/sample-process-spatial_extent.json @@ -0,0 +1,23 @@ +{ + "process": { + "id": "sample_load_collection", + "summary": "loads collection sample~features", + "parameters": { + "id": "collection_1" + }, + "process_graph": { + "my_process_graph": { + "process_id": "load_collection", + "arguments": { + "id": "sample~features", + "temporal_extent": "None", + "spatial_extent": { + "bbox": "(33, -10, 71, 43)", + "crs": 4326 + } + }, + "result": true + } + } + } +} \ No newline at end of file diff --git a/tests/res/sample-process.json b/tests/res/sample-process.json new file mode 100755 index 0000000..9d4def3 --- /dev/null +++ b/tests/res/sample-process.json @@ -0,0 +1,20 @@ +{ + "process": { + "id": "sample_load_collection", + "summary": "loads collection sample~features", + "parameters": { + "id": "collection_1" + }, + "process_graph": { + "my_process_graph": { + "process_id": "load_collection", + "arguments": { + "id": "sample~features", + "temporal_extent": "None", + "spatial_extent": "None" + }, + "result": true + } + } + } +} \ No newline at end of file diff --git a/tests/server/app/test_data_discovery.py b/tests/server/app/test_data_discovery.py index 9a03f84..6d15791 100644 --- a/tests/server/app/test_data_discovery.py +++ b/tests/server/app/test_data_discovery.py @@ -138,7 +138,7 @@ def test_get_items_by_bbox(self): items_data = json.loads(response.data) self.assertEqual('FeatureCollection', items_data['type']) self.assertIsNotNone(items_data['features']) - self.assertEqual(2, len(items_data['features'])) + self.assertEqual(1, len(items_data['features'])) def test_not_existing_collection(self): url = f'http://localhost:{self.port}' \ diff --git a/tests/server/app/test_processing.py b/tests/server/app/test_processing.py index 59c97cf..8ad19f0 100644 --- a/tests/server/app/test_processing.py +++ b/tests/server/app/test_processing.py @@ -34,7 +34,6 @@ from . import test_utils -@unittest.skip class ProcessingTest(ServerTestCase): def add_extension(self, er: ExtensionRegistry) -> None: @@ -71,8 +70,9 @@ def test_get_predefined_processes(self): load_collection = p self.assertIsNotNone(load_collection) - self.assertEqual(1, len(load_collection['categories'])) - self.assertTrue('import', load_collection['categories'][0]) + self.assertEqual(2, len(load_collection['categories'])) + self.assertTrue('cubes', load_collection['categories'][0]) + self.assertTrue('import', load_collection['categories'][1]) self.assertTrue('Load a collection.', load_collection['summary']) @@ -86,9 +86,9 @@ def test_get_predefined_processes(self): self.assertEqual(list, type(load_collection['parameters'])) collection_param = None - database_param = None + temp_extent_param = None spatial_extent_param = None - self.assertEqual(3, len(load_collection['parameters'])) + self.assertEqual(5, len(load_collection['parameters'])) for p in load_collection['parameters']: self.assertEqual(dict, type(p)) self.assertTrue('name' in p) @@ -96,22 +96,18 @@ def test_get_predefined_processes(self): self.assertTrue('schema' in p) if p['name'] == 'id': collection_param = p - if p['name'] == 'database': - database_param = p + if p['name'] == 'temporal_extent': + temp_extent_param = p if p['name'] == 'spatial_extent': spatial_extent_param = p self.assertIsNotNone(collection_param) - self.assertIsNotNone(database_param) + self.assertIsNotNone(temp_extent_param) self.assertIsNotNone(spatial_extent_param) self.assertEqual('string', collection_param['schema']['type']) self.assertEqual(dict, type(collection_param['schema'])) - self.assertEqual(dict, type(database_param['schema'])) - self.assertEqual('string', database_param['schema']['type']) - self.assertEqual(True, database_param['optional']) - self.assertEqual(list, type(spatial_extent_param['schema'])) self.assertIsNotNone(load_collection['returns']) @@ -120,7 +116,7 @@ def test_get_predefined_processes(self): return_schema = load_collection['returns']['schema'] self.assertEqual(dict, type(return_schema)) self.assertEqual('object', return_schema['type']) - self.assertEqual('vector-cube', return_schema['subtype']) + self.assertEqual('datacube', return_schema['subtype']) def test_get_file_formats(self): response = self.http.request('GET', f'http://localhost:{self.port}' @@ -134,13 +130,8 @@ def test_get_file_formats(self): self.assertTrue('output' in formats) def test_result(self): - body = json.dumps({"process": { - "id": "load_collection", - "parameters": { - "id": "collection_1", - "spatial_extent": None - } - }}) + data = pkgutil.get_data("tests.res", "sample-process.json") + body = data.decode("UTF-8") response = self.http.request('POST', f'http://localhost:{self.port}/result', body=body, @@ -149,25 +140,17 @@ def test_result(self): }) self.assertEqual(200, response.status) - vector_cube = json.loads(response.data) - self.assertEqual(list, type(vector_cube)) - self.assertIsNotNone(vector_cube) - self.assertEqual(2, len(vector_cube)) + feature_collection = json.loads(response.data) + self.assertEqual(dict, type(feature_collection)) + self.assertIsNotNone(feature_collection) + self.assertEqual(2, len(feature_collection["features"])) - test_utils.assert_hamburg_data(self, vector_cube[0]) - test_utils.assert_paderborn_data(self, vector_cube[1]) + test_utils.assert_hamburg_data(self, feature_collection["features"][0]) + test_utils.assert_paderborn_data(self, feature_collection["features"][1]) def test_result_bbox(self): - body = json.dumps({"process": { - "id": "load_collection", - "parameters": { - "id": "collection_1", - "spatial_extent": { - "bbox": "(33, -10, 71, 43)", - "crs": 4326 - } - } - }}) + data = pkgutil.get_data("tests.res", "sample-process-spatial_extent.json") + body = data.decode("UTF-8") response = self.http.request('POST', f'http://localhost:{self.port}/result', body=body, @@ -176,23 +159,17 @@ def test_result_bbox(self): }) self.assertEqual(200, response.status) - vector_cube = json.loads(response.data) - self.assertEqual(list, type(vector_cube)) - self.assertIsNotNone(vector_cube) - self.assertEqual(1, len(vector_cube)) + feature_collection = json.loads(response.data) + self.assertEqual(dict, type(feature_collection)) + self.assertIsNotNone(feature_collection) + self.assertEqual(1, len(feature_collection["features"])) - test_utils.assert_hamburg_data(self, vector_cube[0]) + test_utils.assert_hamburg_data(self, feature_collection["features"][0]) def test_result_bbox_default_crs(self): - body = json.dumps({"process": { - "id": "load_collection", - "parameters": { - "id": "collection_1", - "spatial_extent": { - "bbox": "(33, -10, 71, 43)" - } - } - }}) + data = pkgutil.get_data("tests.res", "sample-process-spatial_extent-default-crs.json") + body = data.decode("UTF-8") + response = self.http.request('POST', f'http://localhost:{self.port}/result', body=body, @@ -201,17 +178,15 @@ def test_result_bbox_default_crs(self): }) self.assertEqual(200, response.status) - vector_cube = json.loads(response.data) - self.assertEqual(list, type(vector_cube)) - self.assertIsNotNone(vector_cube) - self.assertEqual(1, len(vector_cube)) - test_utils.assert_hamburg_data(self, vector_cube[0]) + feature_collection = json.loads(response.data) + self.assertEqual(dict, type(feature_collection)) + self.assertIsNotNone(feature_collection) + self.assertEqual(1, len(feature_collection["features"])) + test_utils.assert_hamburg_data(self, feature_collection["features"][0]) def test_result_missing_parameters(self): - body = json.dumps({'process': { - 'id': 'load_collection', - 'parameters': {} - }}) + data = pkgutil.get_data("tests.res", "sample-process-broken.json") + body = data.decode("UTF-8") response = self.http.request('POST', f'http://localhost:{self.port}/result', body=body, @@ -220,7 +195,7 @@ def test_result_missing_parameters(self): }) self.assertEqual(400, response.status) message = json.loads(response.data) - self.assertTrue('Request body must contain parameter \'id\'.' in + self.assertTrue('Request body must contain parameter \'process\'.' in message['error']['message']) def test_result_no_query_param(self): @@ -228,8 +203,8 @@ def test_result_no_query_param(self): f'http://localhost:{self.port}/result') self.assertEqual(400, response.status) message = json.loads(response.data) - self.assertTrue('Request body must contain key \'process\'.' in - message['error']['message']) + self.assertTrue('Request must contain body with valid process graph,' + ' see openEO specification.', message) def test_invalid_process_id(self): with self.assertRaises(ValueError): diff --git a/tests/server/app/test_utils.py b/tests/server/app/test_utils.py index b5d860c..1dae997 100644 --- a/tests/server/app/test_utils.py +++ b/tests/server/app/test_utils.py @@ -51,12 +51,12 @@ def assert_hamburg(cls, vector_cube): assert_hamburg_data(cls, vector_cube) -def assert_hamburg_data(cls, vector_cube): +def assert_hamburg_data(cls, feature): cls.assertEqual(['9.0000', '52.0000', '11.0000', '54.0000'], - vector_cube['bbox']) + feature['bbox']) cls.assertEqual({'datetime': '1970-01-01T00:01:00Z', 'geometry': 'mygeometry', 'id': 1234, 'name': 'hamburg', 'population': 1000}, - vector_cube['properties']) + feature['properties']) diff --git a/xcube_geodb_openeo/api/routes.py b/xcube_geodb_openeo/api/routes.py index 8e08984..37a2007 100644 --- a/xcube_geodb_openeo/api/routes.py +++ b/xcube_geodb_openeo/api/routes.py @@ -33,6 +33,7 @@ from .context import _fix_time from ..backend import capabilities from ..backend import processes +from ..core.vectorcube import VectorCube from ..defaults import STAC_DEFAULT_ITEMS_LIMIT, STAC_MAX_ITEMS_LIMIT, \ STAC_MIN_ITEMS_LIMIT @@ -66,6 +67,7 @@ class RootHandler(ApiHandler): Initiates the authentication process. """ + @api.operation(operationId='initiate_auth') def get(self): auth_endpoint = ('https://kc.brockmann-consult.de/auth/realms/' 'xcube-geodb-openeo/protocol/openid-connect/auth') @@ -98,8 +100,12 @@ class RootHandler(ApiHandler): Creates and validates an access token. """ + @api.operation(operationId='create_auth_token') def get(self): code = self.request.query['code'][0] + + # these should not come from the config, but must be entered by the user! + clientId = self.ctx.config['geodb_openeo']['kc_clientId'] secret = self.ctx.config['geodb_openeo']['kc_secret'] credentials = (base64.b64encode( @@ -178,18 +184,26 @@ class ResultHandler(ApiHandler): will be downloaded. """ - @api.operation(operationId='result', summary='Execute process' + @api.operation(operationId='result', summary='Execute process ' 'synchronously.') def post(self): """ Processes requested processing task and returns result. """ if not self.request.body: + raise ApiError(400, 'Request must contain body with valid process graph,' + ' see openEO specification.') + try: + request = json.loads(self.request.body) + except Exception as exc: + raise ApiError(400, 'Request must contain body with valid process graph,' + ' see openEO specification. Error: ' + exc.args[0]) + if not 'process' in request: raise (ApiError( 400, - 'Request body must contain key \'process\'.')) + 'Request body must contain parameter \'process\'.')) - processing_request = json.loads(self.request.body)['process'] + processing_request = request['process'] registry = processes.get_processes_registry() graph = processing_request['process_graph'] pg_node = PGNode.from_flat_graph(graph) @@ -213,8 +227,13 @@ def post(self): process.parameters = process_parameters current_result = processes.submit_process_sync(process, self.ctx) - current_result = json.dumps(current_result, default=str) - self.response.finish(current_result) + current_result: VectorCube + try: + current_result.load_features() + except GeoDBError as exc: + raise ApiError(400, exc.args[0]) + final_result = current_result.to_geojson() + self.response.finish(final_result) @staticmethod def ensure_parameters(expected_parameters, process_parameters): @@ -259,6 +278,15 @@ def get(self): items that are presented in the response document. offset (int): Collections are listed starting at offset. """ + + # check if header contains auth token + # - otherwise, redirect to login + # decode token, get id + # get user from identity provider (Auth0, Keycloak) + # check user properties + # if all good, continue + # otherwise, raise error message + limit = _get_limit(self.request) offset = _get_offset(self.request) base_url = get_base_url(self.request) From 79e07eb867989efa3b45e5f39bb45af452630dfc Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 23 Dec 2024 16:33:28 +0100 Subject: [PATCH 161/163] fixed gh-workflow --- .github/workflows/workflow.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 2569ac4..bffdffb 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -64,7 +64,9 @@ jobs: if: ${{ env.SKIP_UNITTESTS == '0' }} with: fail_ci_if_error: true - verbose: false + uses: codecov/codecov-action@v4.0.1 + token: ${{ secrets.CODECOV_TOKEN }} + codecov_yml_path: ./codecov.yml build-docker-image: runs-on: ubuntu-latest From a6fbd64f82578335f4820a6e574660b0247fc2d7 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 23 Dec 2024 16:37:19 +0100 Subject: [PATCH 162/163] fixed gh-workflow --- .github/workflows/workflow.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index bffdffb..6c69bb7 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -60,11 +60,11 @@ jobs: if: ${{ env.SKIP_UNITTESTS == '0' }} run: | pytest --cov=./ --cov-report=xml --tb=native tests - - uses: codecov/codecov-action@v2 + - name: Upload coverage reports to Codecov if: ${{ env.SKIP_UNITTESTS == '0' }} + uses: codecov/codecov-action@v4.0.1 with: fail_ci_if_error: true - uses: codecov/codecov-action@v4.0.1 token: ${{ secrets.CODECOV_TOKEN }} codecov_yml_path: ./codecov.yml From 1b23237b15ea41ab28cc976ac78f34738ed28349 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 23 Dec 2024 16:40:07 +0100 Subject: [PATCH 163/163] improved gh-workflow --- .github/workflows/workflow.yaml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 6c69bb7..1dce499 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -13,10 +13,6 @@ env: SKIP_UNITTESTS: "0" WAIT_FOR_STARTUP: "1" - # If set to 1, docker build is performed - FORCE_DOCKER_BUILD: "1" - - jobs: unittest: runs-on: ubuntu-latest @@ -72,20 +68,18 @@ jobs: runs-on: ubuntu-latest needs: [unittest] name: build-docker-image + if: ${{ github.event_name == 'release'}} steps: # Checkout xcube-geodb-openeo (this project) - name: git-checkout uses: actions/checkout@v2 - if: ${{ steps.deployment-phase.outputs.phase != 'ignore' || env.FORCE_DOCKER_BUILD == '1'}} # Get the base release tag used in docker images - name: get-release-tag id: release run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} - if: ${{ steps.deployment-phase.outputs.phase != 'ignore' || env.FORCE_DOCKER_BUILD == '1'}} # The docker image always needs the version as in version.py - name: get-xcube-geodb-openeo-version id: real-version - if: ${{ steps.deployment-phase.outputs.phase != 'ignore' || env.FORCE_DOCKER_BUILD == '1'}} run: | VERSION=$(echo "`cat xcube_geodb_openeo/version.py | grep version | cut -d "'" -f2`") echo ::set-output name=version::${VERSION} @@ -93,7 +87,6 @@ jobs: - name: deployment-phase id: deployment-phase uses: bc-org/gha-determine-phase@v0.1 - if: ${{ steps.deployment-phase.outputs.phase != 'ignore' || env.FORCE_DOCKER_BUILD == '1'}} with: event_name: ${{ github.event_name }} tag: ${{ steps.release.outputs.tag }}