Now fix the diagnostic logging to also check all ways (not just outer):


  2525→                                    int total_outer = 0, found = 0, missing = 0;
  2526→                                    for (const auto& [way_id, role] : rel.members) {
  2527→                                        if (role == "outer" || role.empty()) {
  2528→                                            total_outer++;
  2529→                                            auto it = data.way_geometries.find(way_id);
  2530→                                            if (it != data.way_geometries.end() && !it->second.coords.empty()) {
  2531→                                                found++;
  2532→                                            } else {
  2533→                                                missing++;
  2534→                                            }
  2535→                                        }
  2536→                                    }
  2537→                                    if (missing == 0 && found > 0) {
  2538→                                        // All ways found but no ring — dump node IDs
  2539→                                        std::string detail = "  DEBUG '" + rel.name + "': ways:";
  2540→                                        for (const auto& [way_id, role] : rel.members) {
  2541→                                            if (role != "outer" && !role.empty()) continue;
  2542→                                            auto it = data.way_geometries.find(way_id);
  2543→                                            if (it == data.way_geometries.end()) continue;
  2544→                                            detail += " [w" + std::to_string(way_id) +
  2545→                                                      " first=" + std::to_string(it->second.first_node_id) +
  2546→                                                      " last=" + std::to_string(it->second.last_node_id) +
  2547→                                                      " n=" + std::to_string(it->second.coords.size()) + "]";
  2548→                                        }
  2549→                                        std::cerr << detail << std::endl;
  2550→                                    }
  2551→                                    std::cerr << "  WARN: relation '" << rel.name
  2552→                                              << "' (level " << (int)rel.admin_level
  2553→                                              << ", " << rel.members.size() << " members): "
  2554→                                              << "0 rings from " << total_outer << " outer ways ("

                                    int total_outer = 0, found = 0, missing = 0;
                                    for (const auto& [way_id, role] : rel.members) {
                                        if (role == "outer" || role.empty()) {
                                            total_outer++;
                                            auto it = data.way_geometries.find(way_id);
                                            if (it != data.way_geometries.end() && !it->second.coords.empty()) {
                                                found++;
                                            } else {
                                                missing++;
                                            }
                                        }
                                    }
                                    if (missing == 0 && found > 0) {
                                        // All ways found but no ring — dump node IDs
                                        std::string detail = "  DEBUG '" + rel.name + "': ways:";
                                        for (const auto& [way_id, role] : rel.members) {
                                            if (role != "outer" && !role.empty()) continue;
                                            auto it = data.way_geometries.find(way_id);
                                            if (it == data.way_geometries.end()) continue;
                                            detail += " [w" + std::to_string(way_id) +
                                                      " first=" + std::to_string(it->second.first_node_id) +
                                                      " last=" + std::to_string(it->second.last_node_id) +
                                                      " n=" + std::to_string(it->second.coords.size()) + "]";
                                        }
                                        std::cerr << detail << std::endl;
                                    }
                                    std::cerr << "  WARN: relation '" << rel.name
                                              << "' (level " << (int)rel.admin_level
                                              << ", " << rel.members.size() << " members): "
                                              << "0 rings from " << total_outer << " outer ways ("


Edit

                                    int total_outer = 0, found = 0, missing = 0;
                                    for (const auto& [way_id, role] : rel.members) {
                                        if (role == "outer" || role.empty()) {
                                            total_outer++;
                                            auto it = data.way_geometries.find(way_id);
                                            if (it != data.way_geometries.end() && !it->second.coords.empty()) {
                                                found++;
                                            } else {
                                                missing++;
                                            }
                                        }
                                    }
                                    if (missing == 0 && found > 0) {
                                        // All ways found but no ring — dump node IDs
                                        std::string detail = "  DEBUG '" + rel.name + "': ways:";
                                        for (const auto& [way_id, role] : rel.members) {
                                            if (role != "outer" && !role.empty()) continue;
                                            auto it = data.way_geometries.find(way_id);
                                            if (it == data.way_geometries.end()) continue;

                                    int total_ways = 0, found = 0, missing = 0;
                                    for (const auto& [way_id, role] : rel.members) {
                                        total_ways++;
                                        auto it = data.way_geometries.find(way_id);
                                        if (it != data.way_geometries.end() && !it->second.coords.empty()) {
                                            found++;
                                        } else {
                                            missing++;
                                        }
                                    }
                                    if (missing == 0 && found > 0) {
                                        std::string detail = "  DEBUG '" + rel.name + "': ways:";
                                        for (const auto& [way_id, role] : rel.members) {
                                            auto it = data.way_geometries.find(way_id);
                                            if (it == data.way_geometries.end()) continue;