From c0139c6b82bd96dd62368dc0b7168417fd4510b2 Mon Sep 17 00:00:00 2001 From: Erica Fischer Date: Mon, 14 Apr 2025 13:27:15 -0700 Subject: [PATCH] Write down the plan before I forget --- main.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/main.cpp b/main.cpp index 504ab42a..8a9beba6 100644 --- a/main.cpp +++ b/main.cpp @@ -1555,6 +1555,19 @@ void radix(std::vector &readers, int nreaders, FILE *geomfile, FI fprintf(stderr, "Sorting index \r"); } + // The plan: + // + // Sort index by quadkey + // Calculate maxzoom and drop rate + // Run through index, setting feature_minzoom and dup + // Sort index back by segment+offset + // Run through index and geom in parallel + // adding dup and feature_minzoom to geom + // and sharding index and geom out by dup+quadkey as radix + // Go through each shard, either + // sorting it directly in memory, or + // sharding it further before sorting again + std::vector indexfps; for (ssize_t i = 0; i < nreaders; i++) { FILE *fp = fdopen(readers[i].indexfd, "rb");