blob: 3e92123613207d7ac6f7da9f645257ec4012eedc (
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
25
26
27
28
29
30
31
32
33
|
#include "generator/filter_planet.hpp"
#include "generator/feature_builder.hpp"
#include "generator/osm_element.hpp"
#include "indexer/classificator.hpp"
#include "indexer/feature_visibility.hpp"
#include "indexer/ftypes_matcher.hpp"
#include "base/assert.hpp"
#include <algorithm>
using namespace feature;
namespace generator
{
bool FilterPlanet::IsAccepted(OsmElement const & element)
{
if (element.IsRelation())
return element.HasAnyTag({{"type", "multipolygon"}, {"type", "boundary"}});
if (element.IsNode())
return !element.m_tags.empty();
return true;
}
bool FilterPlanet::IsAccepted(FeatureBuilder const & feature)
{
auto const & params = feature.GetParams();
return params.IsValid();
}
} // namespace generator
|