| 105 | } |
| 106 | |
| 107 | void CheckCoverage(SafeTileManager & manager) |
| 108 | { |
| 109 | ForEachMWM(manager, [&](platform::LocalCountryFile const & file) |
| 110 | { |
| 111 | size_t all = 0; |
| 112 | size_t good = 0; |
| 113 | feature::ForEachFeature(file.GetPath(MapFileType::Map), [&](FeatureType & ft, uint32_t) |
| 114 | { |
| 115 | if (!manager.IsAltitudeRoad(ft)) |
| 116 | return; |
| 117 | |
| 118 | ft.ParseGeometry(FeatureType::BEST_GEOMETRY); |
| 119 | all += ft.GetPointsCount(); |
| 120 | |
| 121 | for (size_t i = 0; i < ft.GetPointsCount(); ++i) |
| 122 | { |
| 123 | auto const height = manager.GetAltitude(mercator::ToLatLon(ft.GetPoint(i))); |
| 124 | if (height != geometry::kInvalidAltitude) |
| 125 | good++; |
| 126 | } |
| 127 | }); |
| 128 | |
| 129 | auto const bad = all - good; |
| 130 | auto const percent = (all == 0) ? 0.0 : bad * 100.0 / all; |
| 131 | LOG_SHORT(LINFO, (percent > 10.0 ? "Huge" : "Low", "error rate in:", file.GetCountryName(), "good:", good, |
| 132 | "bad:", bad, "all:", all, "%:", percent)); |
| 133 | }); |
| 134 | } |
| 135 | |
| 136 | void CheckDistance(SafeTileManager & manager) |
| 137 | { |
no test coverage detected