src/main/java/de/avatic/lcc/service/api/BatchGeoApiService.java aktualisiert
Fixed nullpointer exception in batch geo coding
This commit is contained in:
parent
462a960c68
commit
03cd1274e9
1 changed files with 2 additions and 1 deletions
|
|
@ -73,7 +73,8 @@ public class BatchGeoApiService {
|
||||||
if (!result.getFeatures().isEmpty() &&
|
if (!result.getFeatures().isEmpty() &&
|
||||||
(result.getFeatures().getFirst().getProperties().getConfidence().equalsIgnoreCase("high") ||
|
(result.getFeatures().getFirst().getProperties().getConfidence().equalsIgnoreCase("high") ||
|
||||||
result.getFeatures().getFirst().getProperties().getConfidence().equalsIgnoreCase("medium") ||
|
result.getFeatures().getFirst().getProperties().getConfidence().equalsIgnoreCase("medium") ||
|
||||||
result.getFeatures().getFirst().getProperties().getMatchCodes().stream().anyMatch(s -> s.equalsIgnoreCase("good")))) {
|
(result.getFeatures().getFirst().getProperties().getMatchCodes() != null &&
|
||||||
|
result.getFeatures().getFirst().getProperties().getMatchCodes().stream().anyMatch(s -> s.equalsIgnoreCase("good"))))) {
|
||||||
var geometry = result.getFeatures().getFirst().getGeometry();
|
var geometry = result.getFeatures().getFirst().getGeometry();
|
||||||
var properties = result.getFeatures().getFirst().getProperties();
|
var properties = result.getFeatures().getFirst().getProperties();
|
||||||
node.setGeoLng(BigDecimal.valueOf(geometry.getCoordinates().get(0)));
|
node.setGeoLng(BigDecimal.valueOf(geometry.getCoordinates().get(0)));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue