kopia lustrzana https://github.com/JOSM/MapWithAI
Fix an issue where a bbox was downloaded twice
Signed-off-by: Taylor Smock <taylor.smock@kaart.com>pull/1/head
rodzic
e6a191f6fe
commit
5178fbeacc
|
@ -79,7 +79,7 @@ public class GetDataRunnable extends RecursiveTask<DataSet> implements CancelLis
|
||||||
*/
|
*/
|
||||||
public GetDataRunnable(List<BBox> bbox, DataSet dataSet, ProgressMonitor monitor) {
|
public GetDataRunnable(List<BBox> bbox, DataSet dataSet, ProgressMonitor monitor) {
|
||||||
super();
|
super();
|
||||||
this.bbox = new ArrayList<>(bbox);
|
this.bbox = bbox.stream().distinct().collect(Collectors.toList());
|
||||||
this.dataSet = dataSet;
|
this.dataSet = dataSet;
|
||||||
this.monitor = Optional.ofNullable(monitor).orElse(NullProgressMonitor.INSTANCE);
|
this.monitor = Optional.ofNullable(monitor).orElse(NullProgressMonitor.INSTANCE);
|
||||||
this.monitor.addCancelListener(this);
|
this.monitor.addCancelListener(this);
|
||||||
|
|
|
@ -370,7 +370,7 @@ public final class MapWithAIDataUtils {
|
||||||
returnBounds.add(new BBox(lowerLeft, upperRight));
|
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) {
|
public static List<BBox> reduceBBoxSize(List<BBox> bboxes) {
|
||||||
final List<BBox> returnBBoxes = new ArrayList<>();
|
final List<BBox> returnBBoxes = new ArrayList<>();
|
||||||
bboxes.forEach(bbox -> returnBBoxes.addAll(reduceBBoxSize(bbox)));
|
bboxes.forEach(bbox -> returnBBoxes.addAll(reduceBBoxSize(bbox)));
|
||||||
return returnBBoxes;
|
return returnBBoxes.stream().distinct().collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Ładowanie…
Reference in New Issue