From 1ac2f3d5775e97c0c70f9045d6530f9e18075d8d Mon Sep 17 00:00:00 2001 From: Mike Barry Date: Sun, 14 Jan 2024 06:18:22 -0500 Subject: [PATCH] fix --- .../com/onthegomap/planetiler/archive/TileArchiveWriter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/planetiler-core/src/main/java/com/onthegomap/planetiler/archive/TileArchiveWriter.java b/planetiler-core/src/main/java/com/onthegomap/planetiler/archive/TileArchiveWriter.java index 9861cf54bd..8c3fc2bd48 100644 --- a/planetiler-core/src/main/java/com/onthegomap/planetiler/archive/TileArchiveWriter.java +++ b/planetiler-core/src/main/java/com/onthegomap/planetiler/archive/TileArchiveWriter.java @@ -88,8 +88,8 @@ public static void writeOutput(FeatureGroup features, WriteableTileArchive outpu TileArchiveMetadata tileArchiveMetadata, Path layerStatsPath, PlanetilerConfig config, Stats stats) { var timer = stats.startStage("archive"); - int chunksToRead = Math.min(1, features.chunksToRead()); - int readThreads = Math.clamp(config.featureReadThreads(), 1, chunksToRead); + int chunksToRead = Math.max(1, features.chunksToRead()); + int readThreads = Math.min(config.featureReadThreads(), chunksToRead); int threads = config.threads(); int processThreads = threads < 10 ? threads : threads - readThreads; int tileWriteThreads = config.tileWriteThreads();