diff --git a/geoengine/workflow.py b/geoengine/workflow.py index b16c4df..5a98dde 100644 --- a/geoengine/workflow.py +++ b/geoengine/workflow.py @@ -264,10 +264,10 @@ def get_dataframe( with geoc.ApiClient(session.configuration) as api_client: wfs_api = geoc.OGCWFSApi(api_client) - response = wfs_api.wfs_feature_handler( + response = wfs_api.wfs_handler( workflow=self.__workflow_id.to_dict(), service=geoc.WfsService(geoc.WfsService.WFS), - request=geoc.GetFeatureRequest(geoc.GetFeatureRequest.GETFEATURE), + request=geoc.WfsRequest(geoc.WfsRequest.GETFEATURE), type_names=str(self.__workflow_id), bbox=bbox.bbox_str, version=geoc.WfsVersion(geoc.WfsVersion.ENUM_2_DOT_0_DOT_0), @@ -329,15 +329,15 @@ def wms_get_map_as_image( with geoc.ApiClient(session.configuration) as api_client: wms_api = geoc.OGCWMSApi(api_client) - response = wms_api.wms_map_handler( + response = wms_api.wms_handler( workflow=self.__workflow_id.to_dict(), version=geoc.WmsVersion(geoc.WmsVersion.ENUM_1_DOT_3_DOT_0), service=geoc.WmsService(geoc.WmsService.WMS), - request=geoc.GetMapRequest(geoc.GetMapRequest.GETMAP), + request=geoc.WmsRequest(geoc.WmsRequest.GETMAP), width=int((bbox.spatial_bounds.xmax - bbox.spatial_bounds.xmin) / spatial_resolution.x_resolution), height=int((bbox.spatial_bounds.ymax - bbox.spatial_bounds.ymin) / spatial_resolution.y_resolution), # pylint: disable=line-too-long bbox=bbox.bbox_ogc_str, - format=geoc.GetMapFormat(geoc.GetMapFormat.IMAGE_SLASH_PNG), + format=geoc.WmsResponseFormat(geoc.WmsResponseFormat.IMAGE_SLASH_PNG), layers=str(self), styles="custom:" + raster_colorizer.to_api_dict().to_json(), crs=bbox.srs, diff --git a/pyproject.toml b/pyproject.toml index f04f048..a585096 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ readme = { file = "README.md", content-type = "text/markdown" } license-files = ["LICENSE"] requires-python = ">=3.10" dependencies = [ - "geoengine-openapi-client @ git+https://github.com/geo-engine/openapi-client@backend_pixel_rewrite_v4#subdirectory=python", + "geoengine-openapi-client @ git+https://github.com/geo-engine/openapi-client@ogc_apis_fix#subdirectory=python", "geopandas >=1.0,<2.0", "matplotlib >=3.5,<3.11", "numpy >=1.21,<2.4", @@ -27,7 +27,7 @@ dependencies = [ "rasterio >=1.3,<2", "requests >= 2.26,<3", "rioxarray >=0.9.1, <0.21", - "StrEnum >=0.4.6,<0.5", # TODO: use from stdlib when `python_requires = >=3.11` + "StrEnum >=0.4.6,<0.5", # TODO: use from stdlib when `python_requires = >=3.11` "vega >= 3.5,<4.2", "websockets >= 14.2,<16", "xarray >=0.19,<2025.10", @@ -98,6 +98,4 @@ select = [ ] [tool.pytest.ini_options] -testpaths = [ - "tests", -] +testpaths = ["tests"] diff --git a/tests/test_wfs.py b/tests/test_wfs.py index e5ec137..3715552 100644 --- a/tests/test_wfs.py +++ b/tests/test_wfs.py @@ -266,7 +266,7 @@ def test_geopandas(self): self.assertEqual( # pylint: disable=line-too-long wfs_request["url"], - "http://mock-instance/wfs/956d3656-2d14-5951-96a0-f962b92371cd?version=2.0.0&service=WFS&request=GetFeature&typeNames=956d3656-2d14-5951-96a0-f962b92371cd&bbox=-60.0%2C5.0%2C61.0%2C6.0&time=2014-04-01T12%3A00%3A00.000%2B00%3A00&srsName=EPSG%3A4326", + "http://mock-instance/wfs/956d3656-2d14-5951-96a0-f962b92371cd?bbox=-60.0%2C5.0%2C61.0%2C6.0&request=GetFeature&service=WFS&srsName=EPSG%3A4326&time=2014-04-01T12%3A00%3A00.000%2B00%3A00&typeNames=956d3656-2d14-5951-96a0-f962b92371cd&version=2.0.0", ) expected_df = gpd.GeoDataFrame(