Skip to content

Commit

Permalink
Harvesting / WFS Features / Do not skip attributes even if geom is in…
Browse files Browse the repository at this point in the history
…valid.

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.
  • Loading branch information
fxprunayre committed Mar 5, 2024
1 parent 3608c5a commit 8588a61
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ public CompletableFuture<Void> indexFeatures(Exchange exchange) throws Exception
featurePointer);
LOGGER.warn(msg);
report.put("error_ss", msg);
break;
continue;
}
}

Expand Down

0 comments on commit 8588a61

Please sign in to comment.