blob: 896d46d04df31167071360ed45f5f9eeaeb66289 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#include "generator/relation_tags_enricher.hpp"
#include "generator/intermediate_data.hpp"
#include "generator/osm_element.hpp"
namespace generator
{
RelationTagsEnricher::RelationTagsEnricher(cache::IntermediateDataReader & cache)
: m_cache(cache) {}
void RelationTagsEnricher::operator()(OsmElement & p)
{
if (p.IsNode())
{
m_nodeRelations.Reset(p.id, &p);
m_cache.ForEachRelationByNodeCached(p.id, m_nodeRelations);
}
else if (p.IsWay())
{
m_wayRelations.Reset(p.id, &p);
m_cache.ForEachRelationByWayCached(p.id, m_wayRelations);
}
}
} // namespace generator
|