| 635 | } |
| 636 | |
| 637 | bool Processor::SearchCoordinates() |
| 638 | { |
| 639 | bool coords_found = false; |
| 640 | buffer_vector<ms::LatLon, 3> results; |
| 641 | double lat, lon; |
| 642 | |
| 643 | if (MatchLatLonDegree(m_query.m_query, lat, lon)) |
| 644 | { |
| 645 | coords_found = true; |
| 646 | results.emplace_back(lat, lon); |
| 647 | } |
| 648 | |
| 649 | auto ll = MatchUTMCoords(m_query.m_query); |
| 650 | if (ll) |
| 651 | { |
| 652 | coords_found = true; |
| 653 | results.emplace_back(ll->m_lat, ll->m_lon); |
| 654 | } |
| 655 | |
| 656 | ll = MatchMGRSCoords(m_query.m_query); |
| 657 | if (ll) |
| 658 | { |
| 659 | coords_found = true; |
| 660 | results.emplace_back(ll->m_lat, ll->m_lon); |
| 661 | } |
| 662 | |
| 663 | istringstream iss(m_query.m_query); |
| 664 | string token; |
| 665 | while (iss >> token) |
| 666 | { |
| 667 | ge0::Ge0Parser parser; |
| 668 | ge0::Ge0Parser::Result r; |
| 669 | if (parser.Parse(token, r)) |
| 670 | { |
| 671 | coords_found = true; |
| 672 | results.emplace_back(r.m_lat, r.m_lon); |
| 673 | } |
| 674 | |
| 675 | geo::GeoURLInfo info; |
| 676 | if (m_geoUrlParser.Parse(token, info)) |
| 677 | { |
| 678 | coords_found = true; |
| 679 | results.emplace_back(info.m_lat, info.m_lon); |
| 680 | } |
| 681 | } |
| 682 | |
| 683 | base::SortUnique(results); |
| 684 | for (auto const & r : results) |
| 685 | { |
| 686 | m_emitter.AddResultNoChecks( |
| 687 | m_ranker.MakeResult(RankerResult(r.m_lat, r.m_lon), true /* needAddress */, true /* needHighlighting */)); |
| 688 | m_emitter.Emit(); |
| 689 | } |
| 690 | return coords_found; |
| 691 | } |
| 692 | |
| 693 | void Processor::SearchPlusCode() |
| 694 | { |
nothing calls this directly
no test coverage detected