Fix an issue where a bbox was downloaded twice

Signed-off-by: Taylor Smock <taylor.smock@kaart.com>
pull/1/head
Taylor Smock 2019-11-13 09:20:31 -07:00
rodzic e6a191f6fe
commit 5178fbeacc
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 625F6A74A3E4311A
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -79,7 +79,7 @@ public class GetDataRunnable extends RecursiveTask<DataSet> implements CancelLis
*/
public GetDataRunnable(List<BBox> bbox, DataSet dataSet, ProgressMonitor monitor) {
super();
this.bbox = new ArrayList<>(bbox);
this.bbox = bbox.stream().distinct().collect(Collectors.toList());
this.dataSet = dataSet;
this.monitor = Optional.ofNullable(monitor).orElse(NullProgressMonitor.INSTANCE);
this.monitor.addCancelListener(this);

Wyświetl plik

@ -370,7 +370,7 @@ public final class MapWithAIDataUtils {
returnBounds.add(new BBox(lowerLeft, upperRight));
}
}
return returnBounds;
return returnBounds.stream().distinct().collect(Collectors.toList());
}
/**
@ -381,7 +381,7 @@ public final class MapWithAIDataUtils {
public static List<BBox> reduceBBoxSize(List<BBox> bboxes) {
final List<BBox> returnBBoxes = new ArrayList<>();
bboxes.forEach(bbox -> returnBBoxes.addAll(reduceBBoxSize(bbox)));
return returnBBoxes;
return returnBBoxes.stream().distinct().collect(Collectors.toList());
}
/**