blob: e477976d28a32986bbc4f684be581c2caca5e82f (
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
|
#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>
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(FeatureBuilder1 const & feature)
{
auto const & params = feature.GetParams();
return params.IsValid();
}
} // namespace generator
|