forked from organicmaps/organicmaps
Generating city_roads section based on cities, town and villages.
This commit is contained in:
parent
c594e3110f
commit
6d588948b2
4 changed files with 6 additions and 4 deletions
|
@ -80,7 +80,7 @@ bool TestMwmBuilder::Add(FeatureBuilder1 & fb)
|
|||
{
|
||||
CHECK(m_collector, ("It's not possible to add features after call to Finish()."));
|
||||
|
||||
if (ftypes::IsTownOrCity(fb.GetTypes()) && fb.GetGeomType() == feature::GEOM_AREA)
|
||||
if (ftypes::IsCityTownOrVillage(fb.GetTypes()) && fb.GetGeomType() == feature::GEOM_AREA)
|
||||
{
|
||||
auto const & metadata = fb.GetMetadataForTesting();
|
||||
uint64_t testId;
|
||||
|
|
|
@ -113,6 +113,8 @@ DEFINE_bool(generate_regions_kv, false,
|
|||
DEFINE_bool(dump_cities_boundaries, false, "Dump cities boundaries to a file");
|
||||
DEFINE_bool(generate_cities_boundaries, false, "Generate cities boundaries section");
|
||||
DEFINE_string(cities_boundaries_data, "", "File with cities boundaries");
|
||||
DEFINE_string(cities_boundaries_data_for_routing, "",
|
||||
"File with cities boundaries for generation city_roads section.");
|
||||
|
||||
DEFINE_bool(generate_world, false, "Generate separate world file.");
|
||||
DEFINE_bool(split_by_polygons, false,
|
||||
|
|
|
@ -211,7 +211,7 @@ void TranslatorPlanet::EmitArea(FeatureBuilder1 & ft, FeatureParams params,
|
|||
if (!ft.IsGeometryClosed())
|
||||
return;
|
||||
|
||||
if (ftypes::IsTownOrCity(params.m_types))
|
||||
if (ftypes::IsCityTownOrVillage(params.m_types))
|
||||
{
|
||||
auto fb = ft;
|
||||
fn(fb);
|
||||
|
|
|
@ -261,13 +261,13 @@ public:
|
|||
};
|
||||
|
||||
template <typename Types>
|
||||
bool IsTownOrCity(Types const & types)
|
||||
bool IsCityTownOrVillage(Types const & types)
|
||||
{
|
||||
feature::TypesHolder h;
|
||||
for (auto const t : types)
|
||||
h.Add(t);
|
||||
auto const type = IsLocalityChecker::Instance().GetType(h);
|
||||
return type == TOWN || type == CITY;
|
||||
return type == CITY || type == TOWN || type == VILLAGE;
|
||||
}
|
||||
|
||||
/// @name Get city radius and population.
|
||||
|
|
Loading…
Add table
Reference in a new issue