From da8e4afe599f33672a467b331dc9cb2c6b4591c3 Mon Sep 17 00:00:00 2001 From: Mike Barry Date: Fri, 12 Jan 2024 07:14:45 -0500 Subject: [PATCH] require same tile ordering --- .../java/com/onthegomap/planetiler/util/CompareArchives.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/planetiler-core/src/main/java/com/onthegomap/planetiler/util/CompareArchives.java b/planetiler-core/src/main/java/com/onthegomap/planetiler/util/CompareArchives.java index 7a99c6b933..3aefe7f0b3 100644 --- a/planetiler-core/src/main/java/com/onthegomap/planetiler/util/CompareArchives.java +++ b/planetiler-core/src/main/java/com/onthegomap/planetiler/util/CompareArchives.java @@ -141,6 +141,11 @@ private Result getResult(PlanetilerConfig config) { } var order = input1.format().preferredOrder(); + var order2 = input2.format().preferredOrder(); + if (order != order2) { + throw new IllegalArgumentException( + "Archive orders must be the same to compare, got " + order + " and " + order2); + } var stats = config.arguments().getStats(); var total = new AtomicLong(0); var diffs = new AtomicLong(0);