diff --git a/cpp/src/main.cpp b/cpp/src/main.cpp index 63eeacb..7dfbb5a 100644 --- a/cpp/src/main.cpp +++ b/cpp/src/main.cpp @@ -77,6 +77,14 @@ int main(int argc, char *argv[]) { CLI11_PARSE(app, argc, argv); + // Always ensure split_levels includes 0 (country-wide output file). + // User-provided --split-levels=1,2,3 means "also split into sub-regions", + // but the country-level file (boundary_ESP_1.json) must always be generated. + if (std::find(split_levels.begin(), split_levels.end(), 0) == + split_levels.end()) { + split_levels.insert(split_levels.begin(), 0); + } + // Set PROJ_DATA so PROJ can find proj.db next to the exe { auto exe_dir = fs::path(argv[0]).parent_path(); diff --git a/dist/win-x64/boundaries.exe b/dist/win-x64/boundaries.exe index f5b68aa..f91b3ca 100644 Binary files a/dist/win-x64/boundaries.exe and b/dist/win-x64/boundaries.exe differ