blob: 06c9d65d6da1236638949545095af4d8aba982e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include "generator/collector_addresses.hpp"
#include "generator/feature_builder.hpp"
#include "indexer/ftypes_matcher.hpp"
using namespace feature;
namespace generator
{
CollectorAddresses::CollectorAddresses(std::string const & filename)
: m_addrWriter(std::make_unique<FileWriter>(filename)) {}
void CollectorAddresses::CollectFeature(FeatureBuilder const & feature, OsmElement const &)
{
std::string addr;
auto const & checker = ftypes::IsBuildingChecker::Instance();
if (checker(feature.GetTypes()) && feature.FormatFullAddress(addr))
m_addrWriter->Write(addr.c_str(), addr.size());
}
} // namespace generator
|