Closed vycius closed 6 days ago
Seems reasonable to increase the limit. This is meant to protect against a zip bomb that fills up all available disk space, but we expect these files to be pretty big. Would 100gb work?
Yes, increasing the limit to 100GB is reasonable.
Describe the bug
ZIP_THRESHOLD_SIZE
can easily be exceeded with larger GeoPackage files.To Reproduce Steps to reproduce the behavior:
example.java
usingaddGeoPackageSource
with a URL pointing to a larger zip archive:import java.nio.file.Path;
class PolygonProcessor implements Profile {
}
public class Example extends ForwardingProfile { public static void main(String[] args) throws Exception { var arguments = Arguments.fromArgs(args).withDefault("download", true);
}
Exception in thread "main" com.onthegomap.planetiler.Planetiler$PlanetilerException: Error occurred during stage large at com.onthegomap.planetiler.Planetiler.run(Planetiler.java:829) at lt.example.main(Example.java:32) Caused by: java.io.UncheckedIOException: java.io.IOException: The uncompressed data size 1GB is too much for the application resource capacity at com.onthegomap.planetiler.util.FileUtils.safeCopy(FileUtils.java:288) at com.onthegomap.planetiler.reader.GeoPackageReader.openGeopackage(GeoPackageReader.java:77) at com.onthegomap.planetiler.reader.GeoPackageReader.(GeoPackageReader.java:59)
at com.onthegomap.planetiler.reader.GeoPackageReader.lambda$process$0(GeoPackageReader.java:108)
at com.onthegomap.planetiler.reader.SourceFeatureProcessor.getFeatureCount(SourceFeatureProcessor.java:159)
at com.onthegomap.planetiler.reader.SourceFeatureProcessor.processFiles(SourceFeatureProcessor.java:78)
at com.onthegomap.planetiler.reader.SourceFeatureProcessor.processFiles(SourceFeatureProcessor.java:65)
at com.onthegomap.planetiler.reader.GeoPackageReader.process(GeoPackageReader.java:105)
at com.onthegomap.planetiler.Planetiler.lambda$addGeoPackageSource$4(Planetiler.java:404)
at com.onthegomap.planetiler.Planetiler.lambda$ifSourceUsed$12(Planetiler.java:955)
at com.onthegomap.planetiler.Planetiler.run(Planetiler.java:827)
... 1 more
Caused by: java.io.IOException: The uncompressed data size 1GB is too much for the application resource capacity
at com.onthegomap.planetiler.util.FileUtils.safeCopy(FileUtils.java:283)
... 11 more
openjdk 22.0.1 2024-04-16 OpenJDK Runtime Environment Homebrew (build 22.0.1) OpenJDK 64-Bit Server VM Homebrew (build 22.0.1, mixed mode, sharing)