mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-03 11:23:48 +00:00
[types] Adding buoys
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
committed by
Yannik Bloscheck
parent
6ae28a0ccf
commit
f664138a42
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user