mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
To expand with full Organic Maps and Maps.ME commits history run: git remote add om-historic [om-historic.git repo url] git fetch --tags om-historic git replace squashed-history historic-commits
20 lines
437 B
C++
20 lines
437 B
C++
#include "generator/ways_merger.hpp"
|
|
|
|
namespace generator
|
|
{
|
|
AreaWayMerger::AreaWayMerger(std::shared_ptr<cache::IntermediateDataReaderInterface> const & cache)
|
|
: m_cache(cache)
|
|
{
|
|
}
|
|
|
|
void AreaWayMerger::AddWay(uint64_t id)
|
|
{
|
|
auto e = std::make_shared<WayElement>(id);
|
|
if (m_cache->GetWay(id, *e) && e->IsValid())
|
|
{
|
|
m_map.emplace(e->m_nodes.front(), e);
|
|
m_map.emplace(e->m_nodes.back(), e);
|
|
}
|
|
}
|
|
} // namespace generator
|