| 30 | { |
| 31 | |
| 32 | std::optional<double> GetMaxSpeedKmPH(std::string const & maxSpeedString) |
| 33 | { |
| 34 | routing::SpeedInUnits speed; |
| 35 | if (!generator::ParseMaxspeedTag(maxSpeedString, speed) || !speed.IsNumeric()) |
| 36 | return {}; |
| 37 | |
| 38 | auto const speedKmPh = measurement_utils::ToSpeedKmPH(speed.GetSpeed(), speed.GetUnits()); |
| 39 | if (speedKmPh < 0.0) |
| 40 | return {}; |
| 41 | |
| 42 | return {speedKmPh}; |
| 43 | } |
| 44 | |
| 45 | CameraCollector::CameraInfo::CameraInfo(OsmElement const & element) |
| 46 | : m_id(element.m_id) |
no test coverage detected