Now fix the level-2 border-line filter — only exclude relations with country-separator names:


Edit

                                // Skip level 2 border-line relations (no ISO code) —
                                // these are boundary lines between countries, not
                                // country polygons. Osmium rejects them as geometrically invalid.
                                if (rel.admin_level == 2 && rel.country_code.empty()) {
                                    assembled_count.fetch_add(1);
                                    continue;
                                }

                                // Skip level 2 border-line relations — these have names like
                                // "Deutschland - Österreich" (two countries separated by
                                // " - " or " — "). They are boundary lines, not country
                                // polygons, and produce self-intersecting geometry.
                                if (rel.admin_level == 2 && rel.country_code.empty() &&
                                    (rel.name.find(" - ") != std::string::npos ||
                                     rel.name.find(" \xe2\x80\x94 ") != std::string::npos)) { // " — " (em dash)
                                    assembled_count.fetch_add(1);
                                    continue;
                                }