  2040→                                        if (street && !wnodes.empty()) {
  2041→                                            double sum_lat = 0, sum_lng = 0;
  2042→                                            int valid = 0;
  2043→                                            for (const auto& nr : wnodes) {
  2044→                                                try {
  2045→                                                    auto loc = index.get(nr.positive_ref());
  2046→                                                    if (loc.valid()) {
  2047→                                                        sum_lat += loc.lat();
  2048→                                                        sum_lng += loc.lon();
  2049→                                                        valid++;
  2050→                                                    }
  2051→                                                } catch (...) {}
  2052→                                            }
  2053→                                            if (valid > 0) {
  2054→                                                // Store coords for later S2 cell computation
  2055→                                                local.building_addr_coords.push_back({sum_lat / valid, sum_lng / valid});
  2056→                                                // Placeholder addr point — string IDs filled in during merge
  2057→                                                local.building_addrs.push_back({
  2058→                                                    static_cast<float>(sum_lat / valid),
  2059→                                                    static_cast<float>(sum_lng / valid),

                                        if (street && !wnodes.empty()) {
                                            double sum_lat = 0, sum_lng = 0;
                                            int valid = 0;
                                            for (const auto& nr : wnodes) {
                                                try {
                                                    auto loc = index.get(nr.positive_ref());
                                                    if (loc.valid()) {
                                                        sum_lat += loc.lat();
                                                        sum_lng += loc.lon();
                                                        valid++;
                                                    }
                                                } catch (...) {}
                                            }
                                            if (valid > 0) {
                                                // Store coords for later S2 cell computation
                                                local.building_addr_coords.push_back({sum_lat / valid, sum_lng / valid});
                                                // Placeholder addr point — string IDs filled in during merge
                                                local.building_addrs.push_back({
                                                    static_cast<float>(sum_lat / valid),
                                                    static_cast<float>(sum_lng / valid),


Edit

                                            for (const auto& nr : wnodes) {
                                                try {
                                                    auto loc = index.get(nr.positive_ref());
                                                    if (loc.valid()) {
                                                        sum_lat += loc.lat();
                                                        sum_lng += loc.lon();
                                                        valid++;
                                                    }
                                                } catch (...) {}
                                            }

                                            for (const auto& nr : wnodes) {
                                                auto loc = index.get(nr.positive_ref());
                                                if (loc.valid()) {
                                                    sum_lat += loc.lat();
                                                    sum_lng += loc.lon();
                                                    valid++;
                                                }
                                            }