From 8588a6151d86a72066ceb81a9c293fe8cf198654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Prunayre?= Date: Mon, 15 Jan 2024 15:47:00 +0100 Subject: [PATCH] Harvesting / WFS Features / Do not skip attributes even if geom is invalid. Example harvesting OGC service https://sextant.ifremer.fr/services/wms/environnement_marin and indexing feature type surval_parametre_polygone. 491 features are reported to be indexed in the UI and the following WARNING appear during harvesting: ``` 2024-01-15T15:40:10,400 WARN [geonetwork.harvest.wfs.features] - Feature ms:surval_parametre_polygone#521/id:surval_parametre_polygone.60007755: Cannot apply precision reducer on invalid geometry. Check the geometry validity. The feature will be indexed but with no geometry. ``` The feature with invalid geometry are indexed but without other attributes (because geometry is first attribute to be parsed and the break move to next feature). Use continue to parse other feature attributes (which will have an empty geometry but will be reported in the UI). After the change 529 features are properly indexed and can be exported as CSV. To test export as CSV the feature table, feature 60008195 is missing. --- .../harvester/wfsfeatures/worker/EsWFSFeatureIndexer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workers/wfsfeature-harvester/src/main/java/org/fao/geonet/harvester/wfsfeatures/worker/EsWFSFeatureIndexer.java b/workers/wfsfeature-harvester/src/main/java/org/fao/geonet/harvester/wfsfeatures/worker/EsWFSFeatureIndexer.java index dc46c4afdde..3d0857ddbb6 100644 --- a/workers/wfsfeature-harvester/src/main/java/org/fao/geonet/harvester/wfsfeatures/worker/EsWFSFeatureIndexer.java +++ b/workers/wfsfeature-harvester/src/main/java/org/fao/geonet/harvester/wfsfeatures/worker/EsWFSFeatureIndexer.java @@ -363,7 +363,7 @@ public CompletableFuture indexFeatures(Exchange exchange) throws Exception featurePointer); LOGGER.warn(msg); report.put("error_ss", msg); - break; + continue; } }