| 175 | } |
| 176 | |
| 177 | void MetalinesBuilder::CollectFeature(FeatureBuilder const & feature, OsmElement const & element) |
| 178 | { |
| 179 | if (!feature.IsLine()) |
| 180 | return; |
| 181 | |
| 182 | static auto const highwayType = classif().GetTypeByPath({"highway"}); |
| 183 | if (!feature.HasType(highwayType, 1 /* level */) || element.Nodes().front() == element.Nodes().back()) |
| 184 | return; |
| 185 | |
| 186 | auto const & params = feature.GetParams(); |
| 187 | auto const name = feature.GetName(); |
| 188 | if (name.empty() && params.ref.empty()) |
| 189 | return; |
| 190 | |
| 191 | WriteVarUint(*m_writer, static_cast<uint64_t>(std::hash<std::string>{}(std::string(name) + '\0' + params.ref))); |
| 192 | LineString(element).Serialize(*m_writer); |
| 193 | } |
| 194 | |
| 195 | void MetalinesBuilder::Finish() |
| 196 | { |
nothing calls this directly
no test coverage detected