Switching buoys and beacons to new subtypes structure

Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
Yannik Bloscheck
2026-01-15 11:02:09 +01:00
parent 942575af60
commit 722194cc7d
5 changed files with 8 additions and 20 deletions

View File

@@ -1,3 +1,9 @@
Types;Related Subtypes
amenity|charging_station;amenity|charging_station|motorcar,amenity|charging_station|motorcycle,amenity|charging_station|bicycle,amenity|charging_station|small,amenity|charging_station|carless
amenity|bench;amenity|bench|backless
amenity|bench;amenity|bench|backless
buoy|lateral|port,spherical_buoy|lateral|port,beacon|lateral|port;lateral|port
buoy|lateral|starboard,spherical_buoy|lateral|starboard,beacon|lateral|starboard;lateral|starboard
buoy|cardinal|east,spherical_buoy|cardinal|east,beacon|cardinal|east;cardinal|east
buoy|cardinal|west,spherical_buoy|cardinal|west,beacon|cardinal|west;cardinal|west
buoy|cardinal|south,spherical_buoy|cardinal|south,beacon|cardinal|south;cardinal|south
buoy|cardinal|north,spherical_buoy|cardinal|north,beacon|cardinal|north;cardinal|north
1 Types Related Subtypes
2 amenity|charging_station amenity|charging_station|motorcar,amenity|charging_station|motorcycle,amenity|charging_station|bicycle,amenity|charging_station|small,amenity|charging_station|carless
3 amenity|bench amenity|bench|backless
4 buoy|lateral|port,spherical_buoy|lateral|port,beacon|lateral|port lateral|port
5 buoy|lateral|starboard,spherical_buoy|lateral|starboard,beacon|lateral|starboard lateral|starboard
6 buoy|cardinal|east,spherical_buoy|cardinal|east,beacon|cardinal|east cardinal|east
7 buoy|cardinal|west,spherical_buoy|cardinal|west,beacon|cardinal|west cardinal|west
8 buoy|cardinal|south,spherical_buoy|cardinal|south,beacon|cardinal|south cardinal|south
9 buoy|cardinal|north,spherical_buoy|cardinal|north,beacon|cardinal|north cardinal|north

View File

@@ -148,8 +148,6 @@ 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

@@ -746,13 +746,6 @@ 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"}));
}
IsCharingStationCarChecker::IsCharingStationCarChecker() : ftypes::BaseChecker(3 /* level */)
{
Classificator const & c = classif();

View File

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

View File

@@ -121,7 +121,6 @@ std::string MapObject::GetLocalizedAllTypes(bool withMainType) const
auto const & isPoi = ftypes::IsPoiChecker::Instance();
auto const & subtypes = ftypes::Subtypes::Instance();
auto const & isDirectional = ftypes::IsDirectionalChecker::Instance();
auto const & amenityChecker = ftypes::IsAmenityChecker::Instance();
auto const & charingStationCarChecker = ftypes::IsCharingStationCarChecker::Instance();
auto const & charingStationCarlessChecker = ftypes::IsCharingStationCarlessChecker::Instance();
@@ -143,7 +142,7 @@ std::string MapObject::GetLocalizedAllTypes(bool withMainType) const
}
// Ignore types that are not POI
if (!isMainType && !isPoi(type) && !subtypes.IsTypeWithSubtypesOrSubtype(type) && !isDirectional(type))
if (!isMainType && !isPoi(type) && !subtypes.IsTypeWithSubtypesOrSubtype(type))
continue;
// Ignore general amenity