kopia lustrzana https://github.com/JOSM/MapWithAI
Decrease max download sizes due to timeout issues
Signed-off-by: Taylor Smock <taylor.smock@kaart.com>pull/1/head
rodzic
7d3ccb2247
commit
3686407b18
|
@ -49,7 +49,8 @@ import org.openstreetmap.josm.tools.Utils;
|
|||
*/
|
||||
public final class MapWithAIDataUtils {
|
||||
/** THe maximum dimensions for MapWithAI data (in kilometers) */
|
||||
public static final int MAXIMUM_SIDE_DIMENSIONS = 10_000; // RapiD is about 1km, max is 10km
|
||||
public static final int MAXIMUM_SIDE_DIMENSIONS = 5_000; // RapiD is about 1km, max is 10km, but 10km causes
|
||||
// timeouts
|
||||
private static final int TOO_MANY_BBOXES = 4;
|
||||
private static ForkJoinPool forkJoinPool;
|
||||
static final Object LAYER_LOCK = new Object();
|
||||
|
@ -163,8 +164,7 @@ public final class MapWithAIDataUtils {
|
|||
final List<BBox> realBBoxes = bbox.stream().filter(BBox::isValid).distinct().collect(Collectors.toList());
|
||||
final List<Bounds> realBounds = realBBoxes.stream()
|
||||
.flatMap(tBBox -> MapWithAIDataUtils.reduceBBoxSize(tBBox).stream())
|
||||
.map(MapWithAIDataUtils::bboxToBounds)
|
||||
.collect(Collectors.toList());
|
||||
.map(MapWithAIDataUtils::bboxToBounds).collect(Collectors.toList());
|
||||
if (MapWithAIPreferenceHelper.getMapWithAIUrl().parallelStream()
|
||||
.anyMatch(map -> Boolean.valueOf(map.getOrDefault("enabled", "false")))) {
|
||||
if ((realBBoxes.size() < TOO_MANY_BBOXES) || ConditionalOptionPaneUtil.showConfirmationDialog(
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -38,7 +38,7 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
|||
public class MapWithAIUploadHookTest {
|
||||
@Rule
|
||||
@SuppressFBWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
||||
public JOSMTestRules test = new JOSMTestRules().main().projection();
|
||||
public JOSMTestRules test = new JOSMTestRules().main().projection().preferences();
|
||||
|
||||
/**
|
||||
* Test method for {@link MapWithAIUploadHook#modifyChangesetTags(Map)}.
|
||||
|
|
Ładowanie…
Reference in New Issue