I'm having a memory!

I adjusted it to not have memory errors.
This commit is contained in:
Justin Kunimune 2020-11-01 15:18:06 -05:00
parent 79f62412cd
commit f902916da4
3 changed files with 7 additions and 6 deletions

View File

@ -255,6 +255,8 @@ public class MapDesignerRaster extends MapApplication {
protected void failed() {
getException().printStackTrace();
if (this.getException() instanceof OutOfMemoryError)
showError("Failure!", "Java memory constraints forbid that image size. I'm sorry; I never should have let you input a number that big. Please try something smaller.");
}
protected void succeeded() {

View File

@ -31,7 +31,6 @@ import java.util.List;
import javax.imageio.ImageIO;
import maps.Cylindrical;
import maps.Gyorffy;
import maps.Lenticular;
import maps.Meshed;
@ -50,13 +49,13 @@ public class MapEvaluator {
public static final double STEP = 1e-2;
public static final boolean ONLY_LAND = false;
public static final boolean ONLY_LAND = true;
public static final double THRESHOLD = 3;
public static final Projection[] PROJECTIONS = {
Tobler.TOBLER, Pseudocylindrical.ECKERT_IV, Lenticular.WAGNER_VIII, Meshed.DANSEIJI_I,
// WinkelTripel.WINKEL_TRIPEL, Gyorffy.E, Meshed.DANSEIJI_II,
// Pseudocylindrical.HOMOLOSINE_INTERRUPTED, Meshed.DANSEIJI_III,
// Polyhedral.DYMAXION, Meshed.DANSEIJI_IV,
WinkelTripel.WINKEL_TRIPEL, Gyorffy.E, Meshed.DANSEIJI_II,
Pseudocylindrical.HOMOLOSINE_INTERRUPTED, Meshed.DANSEIJI_III,
Polyhedral.DYMAXION, Meshed.DANSEIJI_IV,
};
/**

View File

@ -38,7 +38,7 @@ import javafx.scene.layout.VBox;
public class MapConfigurationDialog extends Dialog<Boolean> {
public final int MIN_SIZE = 5, MAX_SIZE = 100000;
public final int MIN_SIZE = 5, MAX_SIZE = 30000;
public final double DEF_SIZE = 1500;