void Finish() { m_places.ForEach([this] (Place const & p) { m_emitter(p.GetFeature()); }); }
void EmitFeatureBase(FeatureBuilder1 & ft, FeatureParams const & params) { ft.SetParams(params); if (ft.PreSerialize()) { string addr; if (m_addrWriter && ftypes::IsBuildingChecker::Instance()(params.m_Types) && ft.FormatFullAddress(addr)) m_addrWriter->Write(addr.c_str(), addr.size()); static uint32_t const placeType = classif().GetTypeByPath({"place"}); uint32_t const type = params.FindType(placeType, 1); if (type != ftype::GetEmptyValue() && !ft.GetName().empty()) { m_places.ReplaceEqualInRect(Place(ft, type), [](Place const & p1, Place const & p2) { return p1.IsEqual(p2); }, [](Place const & p1, Place const & p2) { return p1.IsBetterThan(p2); }); } else m_emitter(ft); } }
void forEach(Fn fn) { m_tree.ForEach(fn); }