From 743252d2b9988221977b458137abd950661a498a Mon Sep 17 00:00:00 2001 From: Patrick Noll Date: Tue, 9 Apr 2024 17:30:02 +0200 Subject: [PATCH 1/5] Extending the WFS-Probe request to handle the count parameter. max_count added to the PARAM_DEFS with a default of 1000. --- GeoHealthCheck/plugins/probe/wfs.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/GeoHealthCheck/plugins/probe/wfs.py b/GeoHealthCheck/plugins/probe/wfs.py index bdb3b120..1b47dad2 100644 --- a/GeoHealthCheck/plugins/probe/wfs.py +++ b/GeoHealthCheck/plugins/probe/wfs.py @@ -27,7 +27,7 @@ class WfsGetFeatureBbox(Probe): xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - @@ -77,6 +77,13 @@ class WfsGetFeatureBbox(Probe): 'required': True, 'range': None }, + 'max_count': { + 'type': 'string', + 'description': 'Maximum amount of features to select', + 'default': '1000', + 'required': True, + 'range': None + }, 'bbox': { 'type': 'bbox', 'description': 'The tile image extension', From adfaa432c400ad33ff459f8376bfa50fc9d85303 Mon Sep 17 00:00:00 2001 From: Patrick Noll Date: Wed, 10 Apr 2024 16:24:56 +0200 Subject: [PATCH 2/5] set maxfeature instead of count parameter, to be compatible with WFS v1.1.0. --- GeoHealthCheck/plugins/probe/wfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GeoHealthCheck/plugins/probe/wfs.py b/GeoHealthCheck/plugins/probe/wfs.py index 1b47dad2..aba341a6 100644 --- a/GeoHealthCheck/plugins/probe/wfs.py +++ b/GeoHealthCheck/plugins/probe/wfs.py @@ -27,7 +27,7 @@ class WfsGetFeatureBbox(Probe): xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - From d06aadd75a91f514be9eee1ad774d410d6d04a12 Mon Sep 17 00:00:00 2001 From: Patrick Noll Date: Wed, 10 Apr 2024 16:26:32 +0200 Subject: [PATCH 3/5] set default value for maxfeatures to 5. --- GeoHealthCheck/plugins/probe/wfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GeoHealthCheck/plugins/probe/wfs.py b/GeoHealthCheck/plugins/probe/wfs.py index aba341a6..08da49af 100644 --- a/GeoHealthCheck/plugins/probe/wfs.py +++ b/GeoHealthCheck/plugins/probe/wfs.py @@ -80,7 +80,7 @@ class WfsGetFeatureBbox(Probe): 'max_count': { 'type': 'string', 'description': 'Maximum amount of features to select', - 'default': '1000', + 'default': '5', 'required': True, 'range': None }, From a968b106f971b6875a099c209a99dbc5ab642387 Mon Sep 17 00:00:00 2001 From: Patrick Noll Date: Thu, 11 Apr 2024 08:33:34 +0200 Subject: [PATCH 4/5] set max_count to required:False and insert max_count in resources.json for one probe for test purposes. --- GeoHealthCheck/plugins/probe/wfs.py | 2 +- tests/data/resources.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/GeoHealthCheck/plugins/probe/wfs.py b/GeoHealthCheck/plugins/probe/wfs.py index 08da49af..54eff3e8 100644 --- a/GeoHealthCheck/plugins/probe/wfs.py +++ b/GeoHealthCheck/plugins/probe/wfs.py @@ -81,7 +81,7 @@ class WfsGetFeatureBbox(Probe): 'type': 'string', 'description': 'Maximum amount of features to select', 'default': '5', - 'required': True, + 'required': False, 'range': None }, 'bbox': { diff --git a/tests/data/resources.json b/tests/data/resources.json index c893ee00..9de6c99b 100644 --- a/tests/data/resources.json +++ b/tests/data/resources.json @@ -198,6 +198,7 @@ "type_ns_prefix": "bag", "type_ns_uri": "http://bag.geonovum.nl", "srs": "EPSG:28992", + "max_count": "1", "bbox": ["180635", "455870", "180961", "456050"] } }, From f91cba144406c5f6ac78e6d1c407cf663bb6777a Mon Sep 17 00:00:00 2001 From: Patrick Noll Date: Thu, 11 Apr 2024 13:13:44 +0200 Subject: [PATCH 5/5] Fix a typo. Added max_count to fixtures.json and resources.json --- GeoHealthCheck/plugins/probe/wfs.py | 4 ++-- tests/data/fixtures.json | 2 ++ tests/data/resources.json | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/GeoHealthCheck/plugins/probe/wfs.py b/GeoHealthCheck/plugins/probe/wfs.py index 54eff3e8..956de479 100644 --- a/GeoHealthCheck/plugins/probe/wfs.py +++ b/GeoHealthCheck/plugins/probe/wfs.py @@ -27,7 +27,7 @@ class WfsGetFeatureBbox(Probe): xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - @@ -81,7 +81,7 @@ class WfsGetFeatureBbox(Probe): 'type': 'string', 'description': 'Maximum amount of features to select', 'default': '5', - 'required': False, + 'required': True, 'range': None }, 'bbox': { diff --git a/tests/data/fixtures.json b/tests/data/fixtures.json index 299af403..382b34a2 100644 --- a/tests/data/fixtures.json +++ b/tests/data/fixtures.json @@ -178,6 +178,7 @@ "type_ns_prefix": "bag", "type_ns_uri": "http://bag.geonovum.nl", "srs": "EPSG:28992", + "max_count": "1", "bbox": ["180635", "455870", "180961", "456050"] } }, @@ -189,6 +190,7 @@ "type_ns_prefix": "bag", "type_ns_uri": "http://bag.geonovum.nl", "srs": "EPSG:28992", + "max_count": "1", "bbox": ["180635", "455870", "180961", "456050"] } }, diff --git a/tests/data/resources.json b/tests/data/resources.json index 9de6c99b..30f5163c 100644 --- a/tests/data/resources.json +++ b/tests/data/resources.json @@ -187,6 +187,7 @@ "type_ns_prefix": "bag", "type_ns_uri": "http://bag.geonovum.nl", "srs": "EPSG:28992", + "max_count": "1", "bbox": ["180635", "455870", "180961", "456050"] } },