forked from organicmaps/organicmaps
[generator] Add toilets-yes type
Signed-off-by: David Martinez <47610359+dvdmrtnz@users.noreply.github.com> [test] Fix toilets-yes test Signed-off-by: David Martinez <47610359+dvdmrtnz@users.noreply.github.com>
This commit is contained in:
parent
508a703cac
commit
73836d8213
4 changed files with 8 additions and 7 deletions
|
@ -585,7 +585,7 @@ natural|water|lock;[natural=water][water=lock];;name;int_name;498;
|
|||
deprecated:waterway|lock:06.2022;499;waterway|canal
|
||||
fee|yes;[fee?];;name;int_name;500;
|
||||
fee|no;[fee=no];;name;int_name;501;
|
||||
deprecated|deprecated;502;x
|
||||
toilets|yes;502;
|
||||
highway|trunk_link|tunnel;[highway=trunk_link][tunnel?];;name;int_name;503;
|
||||
deprecated|deprecated;504;x
|
||||
deprecated|deprecated;505;x
|
||||
|
|
Can't render this file because it contains an unexpected character in line 7 and column 16.
|
|
@ -32,7 +32,6 @@
|
|||
atm=yes : amenity=atm
|
||||
bench=yes : amenity=bench
|
||||
shelter=yes : amenity=shelter
|
||||
toilets=yes : amenity=toilets
|
||||
restaurant=yes : amenity=restaurant
|
||||
ice_cream=yes : amenity=ice_cream
|
||||
|
||||
|
|
|
@ -409,7 +409,7 @@ UNIT_CLASS_TEST(TestWithClassificator, OsmType_Synonyms)
|
|||
TEST(params.IsTypeExist(GetType({"shop"})), ());
|
||||
TEST(params.IsTypeExist(GetType({"amenity", "restaurant"})), ());
|
||||
TEST(params.IsTypeExist(GetType({"tourism", "hotel"})), ());
|
||||
TEST(params.IsTypeExist(GetType({"amenity", "toilets"})), ());
|
||||
TEST(params.IsTypeExist(GetType({"toilets", "yes"})), ());
|
||||
TEST(params.IsTypeExist(GetType({"amenity", "drinking_water"})), ());
|
||||
}
|
||||
|
||||
|
|
|
@ -138,15 +138,16 @@ namespace
|
|||
if (IsUsefulStandaloneType(type, geomType))
|
||||
return true;
|
||||
|
||||
static uint32_t const internet = cl.GetTypeByPath({"internet_access"});
|
||||
static uint32_t const complexEntry = cl.GetTypeByPath({"complex_entry"});
|
||||
|
||||
uint8_t const typeLevel = ftype::GetLevel(type);
|
||||
ftype::TruncValue(type, 1);
|
||||
|
||||
if (geomType != GeomType::Line)
|
||||
{
|
||||
if (type == internet)
|
||||
static uint32_t const arrTypes[] = {
|
||||
cl.GetTypeByPath({"internet_access"}),
|
||||
cl.GetTypeByPath({"toilets"}),
|
||||
};
|
||||
if (base::IsExist(arrTypes, type))
|
||||
return true;
|
||||
|
||||
// Exclude generic 1-arity types like [organic].
|
||||
|
@ -161,6 +162,7 @@ namespace
|
|||
}
|
||||
}
|
||||
|
||||
static uint32_t const complexEntry = cl.GetTypeByPath({"complex_entry"});
|
||||
return (type == complexEntry);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue