mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 05:13:58 +00:00
[traffic] Calculate filter list for active MWMs
Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
@@ -2,6 +2,11 @@
|
||||
|
||||
#include "traffxml/traff_model.hpp"
|
||||
|
||||
#include "geometry/rect2d.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace pugi
|
||||
{
|
||||
class xml_document;
|
||||
@@ -11,4 +16,20 @@ class xml_node;
|
||||
namespace traffxml
|
||||
{
|
||||
bool ParseTraff(pugi::xml_document const & document, TraffFeed & feed);
|
||||
|
||||
/**
|
||||
* @brief Generates a list of XML `filter` elements from a vector of rects representing bboxes.
|
||||
*
|
||||
* The resulting string can be placed inside a TraFF XML `filter_list` element or can be passed as
|
||||
* an extra to an Android intent.
|
||||
*
|
||||
* It will have one `filter` element for each element in `bboxRects`, although simplification may
|
||||
* be applied to reduce the number of rects (currently not implemented).
|
||||
*
|
||||
* The `min_road_class` attribute is not used.
|
||||
*
|
||||
* @param bboxRects The rectangles, each of which represents a bounding box.
|
||||
* @return A string of XML `filter` elements.
|
||||
*/
|
||||
std::string FiltersToXml(std::vector<m2::RectD> & bboxRects);
|
||||
} // namespace traffxml
|
||||
|
||||
Reference in New Issue
Block a user