| 122 | } |
| 123 | |
| 124 | bool FeatureMakerSimple::BuildFromRelation(OsmElement & p, FeatureBuilderParams const & params) |
| 125 | { |
| 126 | HolesRelation helper(m_cache); |
| 127 | helper.Build(&p); |
| 128 | auto const & holesGeometry = helper.GetHoles(); |
| 129 | auto const size = m_queue.size(); |
| 130 | |
| 131 | auto const createFB = [&](auto && pts, auto const & ids) |
| 132 | { |
| 133 | FeatureBuilder fb; |
| 134 | |
| 135 | fb.AssignArea(std::move(pts), holesGeometry); |
| 136 | CHECK(fb.IsGeometryClosed(), ()); |
| 137 | |
| 138 | for (uint64_t id : ids) |
| 139 | fb.AddOsmId(base::MakeOsmWay(id)); |
| 140 | fb.AddOsmId(base::MakeOsmRelation(p.m_id)); |
| 141 | |
| 142 | fb.SetParams(params); |
| 143 | fb.SetArea(); |
| 144 | |
| 145 | m_queue.push(std::move(fb)); |
| 146 | }; |
| 147 | |
| 148 | helper.GetOuter().ForEachArea(true /* collectID */, [&](auto && pts, auto && ids) { createFB(std::move(pts), ids); }); |
| 149 | |
| 150 | return size != m_queue.size(); |
| 151 | } |
| 152 | |
| 153 | FeatureMaker::FeatureMaker(IDRInterfacePtr const & cache) : FeatureMakerSimple(cache) |
| 154 | { |
nothing calls this directly
no test coverage detected