[types] Adding buoys

Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
Yannik Bloscheck
2025-11-12 01:57:32 +01:00
committed by Yannik Bloscheck
parent 6ae28a0ccf
commit f664138a42
122 changed files with 645 additions and 36 deletions

View File

@@ -144,6 +144,8 @@ bool TypeAlwaysExists(uint32_t type, GeomType geomType = GeomType::Undefined)
cl.GetTypeByPath({"internet_access"}),
cl.GetTypeByPath({"toilets"}),
cl.GetTypeByPath({"drinking_water"}),
cl.GetTypeByPath({"lateral"}),
cl.GetTypeByPath({"cardinal"}),
};
if (base::IsExist(arrTypes, type))
return true;

View File

@@ -740,6 +740,13 @@ IsPublicTransportStopChecker::IsPublicTransportStopChecker()
m_types.push_back(c.GetTypeByPath({"railway", "tram_stop"}));
}
IsDirectionalChecker::IsDirectionalChecker() : ftypes::BaseChecker(1 /* level */)
{
Classificator const & c = classif();
m_types.push_back(c.GetTypeByPath({"cardinal"}));
m_types.push_back(c.GetTypeByPath({"lateral"}));
}
IsTaxiChecker::IsTaxiChecker()
{
Classificator const & c = classif();

View File

@@ -503,6 +503,14 @@ public:
DECLARE_CHECKER_INSTANCE(IsPublicTransportStopChecker);
};
class IsDirectionalChecker : public ftypes::BaseChecker
{
IsDirectionalChecker();
public:
DECLARE_CHECKER_INSTANCE(IsDirectionalChecker);
};
class IsTaxiChecker : public BaseChecker
{
IsTaxiChecker();

View File

@@ -119,6 +119,7 @@ std::string MapObject::GetLocalizedAllTypes(bool withMainType) const
copy.SortBySpec();
auto const & isPoi = ftypes::IsPoiChecker::Instance();
auto const & isDirectional = ftypes::IsDirectionalChecker::Instance();
auto const & amenityChecker = ftypes::IsAmenityChecker::Instance();
std::ostringstream oss;
@@ -133,7 +134,7 @@ std::string MapObject::GetLocalizedAllTypes(bool withMainType) const
}
// Ignore types that are not POI
if (!isMainType && !isPoi(type))
if (!isMainType && !isPoi(type) && !isDirectional(type))
continue;
// Ignore general amenity