// Copyright (C) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#include <QtCore/qhash.h>
#include <QtCore/qlist.h>
#include <QtCore/qmetaobject.h>
#include <QtCore/qstringlist.h>
#include <QtCore/qstring.h>
#include <qpoicategoryohosmapkit.h>

namespace OhosPoiInternal {

Q_NAMESPACE

enum CategoryId {
    INVALID,
    AUTOMOTIVE,
    AUTOMOTIVE_DEALER,
    ATV_SNOWMOBILE_DEALER,
    BOAT_DEALER,
    BUS_DEALER,
    CAR_DEALER,
    MOTORCYCLE_DEALER,
    RECREATIONAL_VEHICLE_DEALER,
    TRUCK_DEALER,
    USED_CAR_DEALER,
    VAN_DEALER,
    AUTOMOTIVE_REPAIR_SHOP,
    AUTOMOBILE_ACCESSORIES_SHOP,
    AUTOMOTIVE_GLASS_REPLACEMENT_SHOP,
    BODYSHOP,
    GENERAL_AUTO_REPAIR_SERVICE_CENTER,
    MOTORCYCLE_REPAIR_SHOP,
    REPAIR_SHOP,
    ROAD_ASSISTANCE,
    TIRE_REPAIR_SHOP,
    TRUCK_REPAIR_SHOP,
    VAN_REPAIR,
    CAR_RENTAL_COMPANY,
    CAR_RENTAL,
    PICKUP_AND_RETURNS_POINT,
    CAR_WASH,
    CAR_WASH_LEVEL_3,
    TRUCK_WASH,
    ELECTRIC_VEHICLE_CHARGING_STATION,
    EMISSION_TESTING,
    HYDROGEN_FUELING_STATION,
    MOTORING_ORGANIZATION_OFFICE,
    PARKING_LOT,
    BICYCLE_PARKING_PLACE,
    BICYCLE_SHARING_LOCATION,
    COACH_PARKING_AREA,
    PARK_RIDE,
    PARKING_GARAGE,
    PARKING_LOT_LEVEL_3,
    TRAILHEAD,
    TRUCK_PARKING_AREA,
    PETROL_STATION,
    TRUCK_STOP,
    WEIGH_STATION,
    WEIGH_SCALES,
    WEIGH_STATION_LEVEL_3,
    BUSINESS,
    AGRICULTURAL_BUSINESS,
    FARM,
    HORTICULTURE_COMPANY,
    PRODUCE_COMPANY,
    ATM,
    BANK,
    BUSINESS_PARK,
    COMMERCIAL_BUILDING,
    COMPANY,
    ADVERTISING_AND_MARKETING_COMPANY,
    AGRICULTURAL_TECHNOLOGY_COMPANY,
    AIRLINE,
    ANIMAL_SHELTER,
    AUTOMOBILE_COMPANY,
    AUTOMOBILE_MANUFACTURER,
    BICYCLE_SERVICE_AND_MAINTENANCE,
    BILL_PAYMENT_SERVICE,
    BODY_PIERCING_AND_TATTOOS,
    BRIDGE_TUNNEL_ENGINEERING_COMPANY,
    BUS_CHARTER_RENTAL_COMPANY,
    BUS_COMPANY,
    BUSINESS_SERVICES_COMPANY,
    CABLE_TELEPHONE_COMPANY,
    CATERERS,
    CHEMICAL_COMPANY,
    CLEANING_SERVICE_COMPANY,
    COMPUTER_AND_DATA_SERVICES_CORPORATION,
    COMPUTER_SOFTWARE_COMPANY,
    CONSTRUCTION_COMPANY,
    CUSTOMER_SERVICE_CENTER,
    DIVERSIFIED_FINANCIAL_SERVICE_COMPANY,
    ELECTRONICS_COMPANY,
    ENGINEERING_AND_SCIENTIFIC_SERVICES,
    EQUIPMENT_RENTAL_COMPANY,
    FOOD_PRODUCTION,
    FUNERAL_SERVICES,
    HOME_APPLIANCE_REPAIR_COMPANY,
    HUMAN_RESOURCES_AND_RECRUITING_SERVICES,
    IMPORT_AND_EXPORT_COMPANY,
    INSURANCE_COMPANY,
    INTERIOR_AND_EXTERIOR_DESIGN,
    INVESTIGATION_SERVICES,
    INVESTMENT_CONSULTING_FIRM,
    IT_AND_OFFICE_EQUIPMENT_SERVICES,
    KINDERGARTEN_AND_CHILDCARE,
    LANDSCAPING_SERVICES,
    LEGAL_SERVICES,
    LOCKSMITHS_AND_SECURITY_SYSTEM_SERVICES,
    MAID_SERVICES,
    MAIL_PACKAGE_FREIGHT_DELIVERY_COMPANY,
    MANAGEMENT_AND_CONSULTING_SERVICES,
    MANUFACTURING_COMPANY,
    MARRIAGE_AND_MATCHMAKING_SERVICES,
    MECHANICAL_ENGINEERING_COMPANY,
    MINERAL_COMPANY,
    MODELING_AGENCIES,
    MOVING_STORAGE_COMPANY,
    OEM,
    OIL_NATURAL_GAS_COMPANY,
    PHARMACEUTICAL_COMPANY,
    PHOTOGRAPHY,
    PLUMBING,
    POLICE_SERVICES_SECURITY,
    PROPERTY_MANAGEMENT,
    PUBLIC_HEALTH_TECHNOLOGY_COMPANY,
    PUBLISHING_TECHNOLOGY_COMPANY,
    REAL_ESTATE_AGENCY_COMPANY,
    SAVINGS_INSTITUTION,
    SCHOOL_BUS_SERVICE_COMPANY,
    SERVICE_COMPANY,
    SOCIAL_SERVICES,
    SPECIALTY_TRADE_CONTRACTORS,
    TANNING_SALON,
    TAX_SERVICES,
    TAXI_LIMOUSINE_SHUTTLE_SERVICE_COMPANY,
    TELECOMMUNICATIONS_COMPANY,
    TOWING_SERVICE,
    TRANSLATION_AND_INTERPRETATION_SERVICES,
    TRANSPORTATION_COMPANY,
    UTILITIES,
    WASTE_AND_SANITARY,
    WEDDING_SERVICES,
    WELLNESS_CENTER_AND_SERVICES,
    COURIER_DROP_BOX,
    EMERGENCY_MEDICAL_SERVICE_CENTER,
    EXCHANGE,
    CURRENCY_EXCHANGE,
    GOLD_EXCHANGE,
    MONEY_TRANSFERRING_SERVICE,
    STOCK_EXCHANGE,
    EXHIBITION_CONVENTION_CENTER,
    INDUSTRIAL_BUILDING,
    MANUFACTURING_FACTORY,
    MEDIA_COMPANY,
    COMMUNICATION_MEDIA,
    RESEARCH_INSTITUTE,
    EATING_DRINKING,
    PUB_CAFE,
    CAFE,
    COFFEE_TEA,
    INTERNET_CAFE,
    MICROBREWERY_BEER_GARDEN,
    PUB,
    TEA_HOUSE,
    RESTAURANT,
    AFGHAN_RESTAURANT,
    AFRICAN_RESTAURANT,
    ALGERIAN_RESTAURANT,
    AMERICAN_RESTAURANT,
    CALIFORNIAN_RESTAURANT,
    CREOLE_CAJUN_RESTAURANT,
    NATIVE_AMERICAN,
    SOUL_FOOD_RESTAURANT,
    SOUTHERN,
    SOUTHWESTERN,
    ARABIAN_RESTAURANT,
    ARGENTINEAN_RESTAURANT,
    ARMENIAN_RESTAURANT,
    ASIAN_RESTAURANT,
    AUSTRALIAN_RESTAURANT,
    AUSTRIAN_RESTAURANT,
    AZERBAIJANI_RESTAURANT,
    BALKAN_RESTAURANT,
    BALTIC_RESTAURANT,
    BANQUET_HALL,
    BARBECUE_RESTAURANT,
    BELARUSIAN_RESTAURANT,
    BELGIAN_RESTAURANT,
    BISTRO,
    BOHEMIAN_RESTAURANT,
    BOLIVIAN_RESTAURANT,
    BOSNIAN_RESTAURANT,
    BAIANA_RESTAURANT,
    BAKERY_RESTAURANT,
    CAPIXABA_RESTAURANT,
    MINEIRA_RESTAURANT,
    BRAZILIAN_RESTAURANT,
    BREAKFAST,
    BREWPUB,
    BRITISH_RESTAURANT,
    BRUNCH,
    BRUNEIAN_RESTAURANT,
    BUFFET_RESTAURANT,
    BULGARIAN_RESTAURANT,
    BURGER_RESTAURANT,
    BURMESE_RESTAURANT,
    CAFETERIA,
    CAMBODIAN_RESTAURANT,
    CANADIAN_RESTAURANT,
    CARIBBEAN_RESTAURANT,
    CASUAL_DINING,
    CAUCASIAN_RESTAURANT,
    CHICKEN_RESTAURANT,
    CHILEAN_RESTAURANT,
    CHINESE_RESTAURANT,
    BEIJING_RESTAURANT,
    CANTONESE_RESTAURANT,
    CONGEE_RESTAURANT,
    GUANGXI_RESTAURANT,
    HOT_POT_RESTAURANT,
    HUBEI_RESTAURANT,
    HUNAN_RESTAURANT,
    INNER_MONGOLIAN_RESTAURANT,
    ISLAMIC_RESTAURANT,
    JIANGSU_ZHEJIANG_RESTAURANT,
    JIANGXI_RESTAURANT,
    NORTHEASTERN_RESTAURANT,
    SHANDONG_RESTAURANT,
    SHANGHAI_RESTAURANT,
    SZECHUAN_RESTAURANT,
    TAIWANESE_RESTAURANT,
    TIBETAN_RESTAURANT,
    YUNNAN_GUIZHOU_RESTAURANT,
    COLOMBIAN_RESTAURANT,
    CREPERIE,
    CUBAN_RESTAURANT,
    CYPRIOT_RESTAURANT,
    CZECH_RESTAURANT,
    DANISH_RESTAURANT,
    DINNER,
    DOMINICAN_RESTAURANT,
    DOUGHNUT_SHOP,
    DUTCH_RESTAURANT,
    EASTERN_EUROPEAN_RESTAURANT,
    EGYPTIAN_RESTAURANT,
    ENGLISH_RESTAURANT,
    EROTIC_RESTAURANT,
    ETHIOPIAN_RESTAURANT,
    EUROPEAN_RESTAURANT,
    EXOTIC_RESTAURANT,
    FAST_FOOD_RESTAURANT,
    FILIPINO_RESTAURANT,
    FINE_DINING,
    FINNISH_RESTAURANT,
    FONDUE_RESTAURANT,
    FOOD_MARKET_STALL,
    FRENCH_RESTAURANT,
    ALSATIAN_RESTAURANT,
    AUVERGNATE_RESTAURANT,
    BASQUE_RESTAURANT,
    CORSICAN_RESTAURANT,
    LYONNAISE_RESTAURANT,
    PROVENCAL_RESTAURANT,
    SUD_OUEST_RESTAURANT,
    FUSION_RESTAURANT,
    GASTROPUB,
    GERMAN_RESTAURANT,
    GREEK_RESTAURANT,
    GRILL,
    HALAL,
    HOT_DOGS,
    HUNGARIAN_RESTAURANT,
    ICE_CREAM_PARLOR,
    INDIAN_RESTAURANT,
    BENGALI_RESTAURANT,
    GOAN_RESTAURANT,
    GUJARATI_RESTAURANT,
    HYDERABADI_RESTAURANT,
    JAIN_RESTAURANT,
    KONKANI_RESTAURANT,
    MAHARASHTRIAN_RESTAURANT,
    MALVANI_RESTAURANT,
    MUGHLAI_RESTAURANT,
    NORTH_INDIAN_RESTAURANT,
    PARSI_RESTAURANT,
    PUNJABI_RESTAURANT,
    RAJASTHANI_RESTAURANT,
    SOUTH_INDIAN_RESTAURANT,
    TANDOORI_RESTAURANT,
    INDONESIAN_RESTAURANT,
    INTERNATIONAL_HOTEL,
    IRANIAN_RESTAURANT,
    IRISH_RESTAURANT,
    ISRAELI_RESTAURANT,
    ITALIAN_RESTAURANT,
    JAMAICAN_RESTAURANT,
    JAPANESE_RESTAURANT,
    SUSHI_RESTAURANT,
    JUICE_BAR,
    KOREAN_RESTAURANT,
    KOSHER_RESTAURANT,
    LATIN_AMERICAN_RESTAURANT,
    LEBANESE_RESTAURANT,
    LUNCH,
    LUXEMBOURGIAN_RESTAURANT,
    MACROBIOTIC_RESTAURANT,
    MAGHRIB_RESTAURANT,
    MALAYSIAN_RESTAURANT,
    MALTESE_RESTAURANT,
    MAURITIAN_RESTAURANT,
    MEDITERRANEAN_RESTAURANT,
    MEXICAN_RESTAURANT,
    OAXAQUENA_RESTAURANT,
    POBLANA_RESTAURANT,
    VERACRUZANA_RESTAURANT,
    YUCATECA_RESTAURANT,
    MIDDLE_EASTERN_RESTAURANT,
    MONGOLIAN_RESTAURANT,
    MOROCCAN_RESTAURANT,
    MUSSEL_RESTAURANT,
    NATURAL_HEALTHY,
    NEPALESE_RESTAURANT,
    NOODLES,
    NORTH_AFRICAN_RESTAURANT,
    NORTH_AMERICAN_RESTAURANT,
    NORWEGIAN_RESTAURANT,
    OCEANIC_RESTAURANT,
    ORGANIC_RESTAURANT,
    ORIENTAL_RESTAURANT,
    PAKISTANI_RESTAURANT,
    PASTRIES,
    PERUVIAN_RESTAURANT,
    PIZZA_RESTAURANT,
    POLISH_RESTAURANT,
    POLYNESIAN_RESTAURANT,
    PORTUGUESE_RESTAURANT,
    ROADSIDE_RESTAURANT,
    ROMANIAN_RESTAURANT,
    RUSSIAN_RESTAURANT,
    SALAD_BAR,
    SANDWICH_RESTAURANT,
    SAVOYAN_RESTAURANT,
    SCANDINAVIAN_RESTAURANT,
    SCOTTISH_RESTAURANT,
    SEAFOOD_RESTAURANT,
    SEYCHELLOIS_RESTAURANT,
    SICILIAN_RESTAURANT,
    SINGAPOREAN_RESTAURANT,
    SLAVIC_RESTAURANT,
    SLOVAK_RESTAURANT,
    SNACKS_BEVERAGES,
    SOUP_RESTAURANT,
    SOUTH_AFRICAN_RESTAURANT,
    SOUTH_AMERICAN_RESTAURANT,
    SOUTHEAST_ASIAN_RESTAURANT,
    SPANISH_RESTAURANT,
    TAPAS_RESTAURANT,
    SRI_LANKAN_RESTAURANT,
    STEAK_HOUSE,
    SUDANESE_RESTAURANT,
    SURINAMESE_RESTAURANT,
    SWEDISH_RESTAURANT,
    SWISS_RESTAURANT,
    SYRIAN_RESTAURANT,
    TAKEAWAY_RESTAURANT,
    TEPPANYAKI_RESTAURANT,
    THAI_RESTAURANT,
    TUNISIAN_RESTAURANT,
    TURKISH_RESTAURANT,
    UKRAINIAN_RESTAURANT,
    URUGUAYAN_RESTAURANT,
    VEGETARIAN_RESTAURANT,
    VENEZUELAN_RESTAURANT,
    VIETNAMESE_RESTAURANT,
    WELSH_RESTAURANT,
    WESTERN_RESTAURANT,
    YEMENI_RESTAURANT,
    RESTAURANT_AREA,
    GOVERNMENT_PUBLIC_SERVICE,
    CITY_CENTER,
    COURTHOUSE,
    EDUCATIONAL_INSTITUTION,
    ART_SCHOOL,
    CHILD_CARE_FACILITY,
    COACHING_INSTITUTE,
    COLLEGE_UNIVERSITY,
    CULINARY_SCHOOL,
    DANCE_STUDIO_SCHOOL,
    DRIVING_SCHOOL,
    EDUCATIONAL_FACILITY,
    HIGH_SCHOOL,
    JUNIOR_COLLEGE_COMMUNITY_COLLEGE,
    LANGUAGE_SCHOOL,
    MIDDLE_SCHOOL,
    PRESCHOOL,
    PRIMARY_SCHOOL,
    SCHOOL,
    SENIOR_HIGH_SCHOOL,
    SPECIAL_SCHOOL,
    SPORTS_SCHOOL,
    TECHNICAL_SCHOOL,
    TRAINING_AND_DEVELOPMENT,
    VOCATIONAL_TRAINING_SCHOOL,
    EMBASSY,
    EMERGENCY_ASSEMBLY_POINT,
    EARTHQUAKE_ASSEMBLY_POINT,
    FIRE_ASSEMBLY_POINT,
    FLOOD_ASSEMBLY_POINT,
    TSUNAMI_ASSEMBLY_POINT,
    VOLCANIC_ERUPTION_ASSEMBLY_POINT,
    FIRE_STATION,
    GOVERNMENT_OFFICE,
    CITY_HALL,
    CIVIC_COMMUNITY_CENTER,
    COUNTY_COUNCIL,
    INTERNATIONAL_ORGANIZATION,
    NATIONAL_ORGANIZATION,
    TOWN_GOVERNMENT,
    INDIAN_RESERVATION,
    MILITARY_BASE,
    ORGANIZATION,
    NON_GOVERNMENTAL_ORGANIZATION,
    WELFARE_ORGANIZATION,
    POLICE_STATION,
    POST_OFFICE,
    GENERAL_POST_OFFICE,
    LOCAL_POST_OFFICE,
    PRISON,
    PUBLIC_AMENITY,
    GOVERNMENT_OR_COMMUNITY_FACILITY,
    PASSENGER_TRANSPORT_TICKET_OFFICE,
    PEDESTRIAN_SUBWAY,
    PUBLIC_CALL_BOX,
    PUBLIC_RESTROOM,
    REGISTRATION_OFFICE,
    ROAD_RESCUE_POINT,
    STREET_OR_SQUARE,
    TOILET,
    TRAFFIC_CONTROL_DEPARTMENT,
    TRAFFIC_MANAGEMENT_BUREAU,
    HEALTH_CARE,
    DENTAL_CLINIC,
    EMERGENCY_ROOM,
    HEALTHCARE_SERVICE_CENTER,
    AMBULANCE_UNIT,
    BLOOD_BANK,
    GENERAL_PRACTICE,
    NURSING_HOME,
    OPTICAL,
    PERSONAL_CARE_INSTITUTION,
    PERSONAL_SERVICE_CENTER,
    PSYCHIATRIC_INSTITUTE,
    THERAPIST,
    HOSPITAL_CLINIC,
    CHINESE_MEDICINE_HOSPITAL,
    GENERAL_HOSPITAL,
    HOSPITAL_FOR_WOMEN_AND_CHILDREN,
    SPECIALIZED_HOSPITAL,
    MEDICAL_CLINIC,
    GENERAL_CLINIC,
    PHYSIOTHERAPY_CLINIC,
    SPECIALIST_CLINIC,
    PHARMACY,
    VETERINARY_CLINIC,
    LEISURE,
    AMUSEMENT_PARK,
    AMUSEMENT_ARCADE,
    AMUSEMENT_CENTER,
    CINEMA,
    CINEMA_LEVEL_3,
    DRIVE_IN_CINEMA,
    CLUB_ASSOCIATION,
    BEACH_CLUB,
    CAR_CLUB,
    HOCKEY_CLUB,
    COMMUNITY_CENTER,
    COLLECTIVE_COMMUNITY,
    ENTERTAINMENT_PLAZA,
    GAMBLING_LOTTERY_BETTING,
    LEISURE_CENTER,
    FLYING_CLUB,
    POOL_HALL,
    SAUNA_SOLARIUM_MASSAGE_CENTER,
    SPA,
    LIBRARY,
    MARINA,
    MARINA_LEVEL_3,
    YACHT_BASIN,
    MUSEUM,
    ART_MUSEUM,
    CHILDRENS_MUSEUM,
    HISTORY_MUSEUM,
    SCIENCE_MUSEUM,
    NIGHTLIFE,
    ADULT_ENTERTAINMENT,
    BAR,
    COCKTAIL_BAR,
    WINE_BAR,
    LIVE_ENTERTAINMENT_CABARET,
    DANCING_CLUB,
    DISCOTHEQUE,
    VIDEO_ARCADE_GAMING_ROOM,
    NIGHT_CLUB,
    COMEDY_CLUB,
    JAZZ_CLUB,
    KARAOKE_CLUB,
    PRIVATE_CLUB,
    PARK_RECREATION_AREA,
    AVENUE_BOULEVARD,
    BATTLEFIELD_SITE,
    BOAT_LAUNCHING_RAMP,
    CEMETERY,
    FAIRGROUND,
    FISHING_HUNTING_AREA,
    FOREST_AREA,
    HISTORIC_SITE,
    HISTORICAL_PARK,
    LAKESIDE,
    MEMORIAL,
    NATURAL_ATTRACTION_PARK,
    PARK,
    PICNIC_AREA,
    PRESERVED_AREA,
    PROTECTED_AREA,
    RECREATIONAL_AREA,
    SCENIC_RIVER_AREA,
    SEASHORE,
    SKI_RESORT,
    INDOOR_SKI_SLOPE,
    WATER_PARK,
    WILDERNESS_AREA,
    WINTER_SPORT_AREA,
    THEATER_MUSIC_CULTURE,
    AMPHITHEATER,
    CONCERT_HALL,
    CULTURAL_CENTER,
    DINNER_THEATER,
    GALLERY,
    MUSIC_VENUE,
    OPERA,
    PERFORMING_ARTS,
    THEATER,
    TRAIL_SYSTEM,
    ADVENTURE_VEHICLE_TRAIL,
    HIKING_TRAIL,
    HORSE_RIDING_TRAIL,
    MOUNTAIN_BIKE_TRAIL,
    OFF_ROAD_TRAILHEAD,
    OUTDOOR_SERVICE,
    RANGER_STATION,
    ROCK_CLIMBING_TRAIL,
    SKI_LIFT,
    WINERY,
    ZOO_BOTANICAL_GARDEN,
    AQUATIC_ZOO_MARINE_PARK,
    ARBORETA_BOTANICAL_GARDEN,
    WILDLIFE_PARK,
    ZOO,
    ACCOMMODATION,
    CAMPING_GROUND,
    CARAVAN_SITE,
    RECREATIONAL_SITE,
    HOTEL_MOTEL,
    BED_BREAKFAST_GUEST_HOUSE,
    CABIN_LODGE,
    HOSTEL,
    HOTEL,
    MOTEL,
    RESORT,
    REST_CAMPS,
    RESIDENTIAL_ACCOMMODATION,
    APARTMENT_COMPLEX,
    CONDOMINIUM_COMPLEX,
    HOLIDAY_PARK,
    RESIDENTIAL_ESTATE,
    RETIREMENT_COMMUNITY,
    TOWNHOUSE_COMPLEX,
    VACATION_RENTAL,
    APARTMENT,
    BUNGALOW,
    CHALET,
    COTTAGE,
    VILLA,
    MISCELLANEOUS,
    ADMIN_FEATURE,
    CAPITAL,
    CAPITAL_CITY,
    CONTINENT,
    COUNTRY,
    COUNTY,
    GENERAL_CITY,
    HAMLET,
    NEIGHBORHOOD,
    POSTAL_CODE,
    STREET,
    STREET_ADDRESS,
    TOWN,
    GEOGRAPHIC_FEATURE,
    BAY,
    BODY_OF_WATER,
    CANAL,
    CAPE,
    CAVE,
    COVE,
    DRY_LAKE,
    DUNE,
    HARBOR,
    HILL,
    ISLAND,
    LAGOON,
    LAKE,
    MARSH_SWAMP_VLEI,
    MINERAL_HOT_SPRINGS,
    MOUNTAIN_PEAK,
    OASIS,
    PLAIN_FLATLAND,
    PLATEAU,
    QUARRY,
    RAPIDS,
    REEF,
    RESERVOIR,
    RIDGE,
    RIVER_CROSSING,
    ROCKS,
    UNDERSEA_FEATURE,
    VALLEY,
    WATERFALL,
    WELL,
    SHOPPING,
    CONVENIENCE_STORE,
    GROCERY,
    GREENGROCERY,
    DEPARTMENT_STORE,
    MARKET,
    FARMERS_MARKET,
    SHOP,
    FOOD_MARKET,
    INFORMAL_MARKET,
    PUBLIC_MARKET,
    SUPERMARKET,
    ADULT_SHOP,
    AGRICULTURAL_SUPPLIES,
    ART_AND_ANTIQUES_STORE,
    ARTS_AND_CRAFTS_SUPPLIES,
    BAGS_LEATHERWEAR_SHOP,
    BEAUTY_SALON,
    BICYCLE_AND_BICYCLE_ACCESSORIES_SHOP,
    BMX_SHOP,
    BOATING_EQUIPMENT_STORE,
    BOOKSTORE,
    CAMPING_HIKING_SUPPLIES,
    CANOE_KAYAK_STORE,
    CD_DVD_GAME_VIDEO_STORE,
    GAME_VIDEO_RENTALS,
    CLOTHING_ACCESSORIES_STORE,
    MENS_APPAREL,
    WOMENS_APPAREL,
    CHILDRENS_APPAREL,
    SHOE_STORE,
    SPECIALTY_CLOTHING_STORE,
    CONSTRUCTION_MATERIALS_EQUIPMENT_STORE,
    DISCOUNT_STORE,
    DRIVE_THROUGH_BOTTLE_SHOP,
    DRY_CLEANERS,
    ELECTRONICS_STORE,
    PHOTOGRAPHIC_EQUIPMENT_STORE,
    CONSUMER_ELECTRONICS_STORE,
    COMPUTER_STORE,
    OFFICE_EQUIPMENT_STORE,
    MOBILE_SERVICE_CENTER,
    MARINE_ELECTRONIC_EQUIPMENT_STORE,
    MOBILE_PHONE_STORE,
    FLORIST,
    FOOD_DRINK_SHOP,
    BAKERY,
    BUTCHERY,
    FISH_STORE,
    WINE_SPIRITS_STORE,
    DELICATESSEN,
    SPECIALTY_FOOD_STORE,
    SWEET_SHOP,
    DAIRY_GOODS,
    GENERAL_STORE,
    GIFT_STORE,
    GLASSWARE_CERAMIC_SHOP,
    HAIR_SALON_BARBERSHOP,
    HARDWARE_STORE,
    HOBBY_SHOP,
    HOLIDAY_STORE,
    HOUSE_GARDEN,
    CARPET_STORE,
    CURTAIN_TEXTILE_STORE,
    DIY_CENTER,
    FURNITURE_AND_ACCESSORIES_STORE,
    GARDENING_SERVICES,
    KITCHEN_AND_SANITATION_STORE,
    LIGHTING_STORE,
    PAINTING_DECORATING_STORE,
    GLASS_WINDOW_STORE,
    FURNITURE_STORE,
    POWER_EQUIPMENT_DEALER,
    HOME_SPECIALTY_STORE,
    LUMBER,
    HUNTING_FISHING_SHOP,
    JEWELRY_WATCH_STORE,
    LAUNDRY,
    LOCAL_SPECIALTY_STORE,
    LOTTERY_SHOP,
    MAKEUP_AND_COSMETICS_STORE,
    MEDICAL_SUPPLIES_EQUIPMENT_STORE,
    MUSICAL_INSTRUMENT_STORE,
    NAIL_SALON,
    NEWSAGENTS_TOBACCONISTS,
    NON_STORE_RETAILERS,
    OFFICE_SUPPLIES_SERVICES,
    OPTICIANS,
    OUTLET,
    FACTORY_OUTLETS,
    RETAIL_OUTLETS,
    PAWN_SHOP,
    PET_STORE,
    ANIMAL_SERVICES,
    PET_SUPPLY_STORE,
    PHOTOCOPY_SHOP,
    PHOTOGRAPHY_STUDIO,
    REAL_ESTATE_AGENCY,
    RUNNING_WALKING_EQUIPMENT_STORE,
    SECOND_HAND_STORE,
    SECURITY_SUPPLIES_STORE,
    SHOPPING_SERVICE_CENTER,
    SKATE_SHOP,
    SKI_SHOP,
    SNOWBOARD_SHOP,
    SPECIALTY_STORE,
    SPORTS_STORE,
    STAMP_SHOP,
    SURF_SHOP,
    TACK_SHOP,
    TAILORS,
    TOY_STORE,
    TRAVEL_AGENCY,
    WAREHOUSE_SUPERMARKET,
    SHOPPING_CENTER,
    SPORT_FITNESS,
    GOLF_COURSE,
    GOLF_DRIVING_RANGE,
    ICE_SKATING_RINK,
    SPORTS_CENTER,
    BOWLING_ALLEY,
    FITNESS_CLUB_CENTER,
    HORSE_RIDING_STABLE,
    INDOOR_SPORTS,
    SHOOTING_RANGE,
    SPORTS_CENTER_LEVEL_3,
    SQUASH_COURT,
    THEMED_SPORTS_HALL,
    STADIUM,
    ATHLETICS_FIELD,
    BADMINTON_COURT,
    BASEBALL_FIELD,
    BASKETBALL_COURT,
    CRICKET_GROUND,
    FOOTBALL_FIELD,
    HOCKEY_FIELD,
    HORSE_RACING_TRACK,
    ICE_HOCKEY_RINK,
    MOTORSPORT_VENUE,
    MULTIPURPOSE_STADIUM,
    NETBALL_COURT,
    RACE_TRACK,
    RUGBY_GROUND,
    SOCCER_FIELD,
    TABLE_TENNIS_HALL,
    SWIMMING_POOL,
    TENNIS_COURT,
    WATER_SPORTS_CENTER,
    DIVING_CENTER,
    TOURISM,
    ADVENTURE_SPORTS_VENUE,
    BEACH,
    PRIVATE_BEACH,
    PUBLIC_BEACH,
    OBSERVATION_DECK,
    PLACE_OF_WORSHIP,
    ASHRAM,
    BUDDHIST_TEMPLE,
    CHURCH,
    DHARMA_TEMPLE,
    GURDWARA,
    HINDU_TEMPLE,
    JAIN_TEMPLE,
    MORMON_CHURCH,
    MOSQUE,
    PAGODA,
    SHINTO_SHRINE,
    SYNAGOGUE,
    TEMPLE,
    TOURIST_ATTRACTION,
    ARCH,
    BREWERY,
    BRIDGE,
    BUILDING,
    DAM,
    LANDMARK,
    MAUSOLEUM_GRAVE,
    MONUMENT,
    NAMED_INTERSECTION_CHOWK,
    NATURAL_ATTRACTION,
    OBSERVATORY,
    PLANETARIUM,
    STATUE,
    TOWER,
    TUNNEL,
    WATER_HOLE,
    WINERY_LEVEL_3,
    TOURIST_INFORMATION_OFFICE,
    TRANSPORT,
    ACCESS_GATEWAY,
    AIRLINE_ACCESS,
    CHECKPOINT,
    DELIVERY_ENTRANCE,
    ENTRANCE_EXIT,
    HIGHWAY_ENTRANCE,
    HIGHWAY_EXIT,
    SECURITY_GATE,
    STATION_ACCESS,
    AIRPORT,
    AIRFIELD,
    AIRPORT_TERMINAL,
    MILITARY_AUTHORITY,
    PRIVATE_AUTHORITY,
    PUBLIC_AUTHORITY,
    PUBLIC_SPORTS_AIRPORT,
    BORDER_POST,
    FERRY_TERMINAL,
    DOCK,
    FERRY,
    TRAIN_FERRY,
    WATER_TRANSIT,
    HELIPAD,
    INTERSECTION,
    MOUNTAIN_PASS,
    PORT_WAREHOUSE,
    PUBLIC_TRANSPORT_STOP,
    AERIAL_LIFT,
    AERIAL_TRAMWAY,
    BUS_RAPID_TRANSIT,
    BUS_STATION,
    CABLE_TRAM,
    COACH_STATION,
    FUNICULAR,
    LOCAL_TRANSIT,
    PUBLIC_TRANSIT_ACCESS,
    TAXI_STAND,
    TOLL_GATE,
    TRAM_STOP,
    TRANSPORTATION_SERVICE,
    RAILWAY_STATION,
    GENERIC_NODE,
    INCLINED_RAIL,
    INTERCITY_RAILWAY_STATION,
    INTERNATIONAL_RAILWAY_STATION,
    LIGHT_RAIL,
    MONORAIL,
    NATIONAL_RAILWAY_STATION,
    RAILWAY_SIDING,
    SUBWAY,
    REST_AREA,
    COMPLETE_REST_AREA,
    MOTORWAY_SERVICE_REST_AREA,
    REST_AREA_PARKING_AND_RESTROOM_ONLY,
    REST_AREA_PARKING_ONLY,
    SCENIC_OVERLOOK_REST_AREA,
    TRAFFIC,
    TRAFFIC_SIGNAL,
    TRAFFIC_LIGHT,
    TRAFFIC_SIGN,
    TRANSPORT_CENTER,
    CARGO_CENTER,
    AIRPORT_CARGO,
    CARGO_TRANSPORTATION,
    COURIERS,
    LOADING_DOCK,
    LOADING_ZONE,
    RAIL_YARD,
    OTHERS,
    ADDRESS,
    ADMINISTRATIVE_AREA_LEVEL_1,
    ADMINISTRATIVE_AREA_LEVEL_2,
    ADMINISTRATIVE_AREA_LEVEL_3,
    ADMINISTRATIVE_AREA_LEVEL_4,
    ADMINISTRATIVE_AREA_LEVEL_5,
    CITIES,
    COMMERCIAL_DISTRICT,
    ESTABLISHMENT,
    GEOCODE,
    MAP_CONNECT,
    REGIONS,
};
Q_ENUM_NS(CategoryId)

inline uint qHash(OhosPoiInternal::CategoryId key, uint seed = 0) noexcept
{
    return ::qHash(static_cast<int>(key), seed);
}

const QHash<CategoryId, CategoryId> automotiveHierarchy = {
    {CategoryId::AUTOMOTIVE, CategoryId::INVALID},
    {CategoryId::AUTOMOTIVE_DEALER, CategoryId::AUTOMOTIVE},
    {CategoryId::ATV_SNOWMOBILE_DEALER, CategoryId::AUTOMOTIVE_DEALER},
    {CategoryId::BOAT_DEALER, CategoryId::AUTOMOTIVE_DEALER},
    {CategoryId::BUS_DEALER, CategoryId::AUTOMOTIVE_DEALER},
    {CategoryId::CAR_DEALER, CategoryId::AUTOMOTIVE_DEALER},
    {CategoryId::MOTORCYCLE_DEALER, CategoryId::AUTOMOTIVE_DEALER},
    {CategoryId::RECREATIONAL_VEHICLE_DEALER, CategoryId::AUTOMOTIVE_DEALER},
    {CategoryId::TRUCK_DEALER, CategoryId::AUTOMOTIVE_DEALER},
    {CategoryId::USED_CAR_DEALER, CategoryId::AUTOMOTIVE_DEALER},
    {CategoryId::VAN_DEALER, CategoryId::AUTOMOTIVE_DEALER},
    {CategoryId::AUTOMOTIVE_REPAIR_SHOP, CategoryId::AUTOMOTIVE},
    {CategoryId::AUTOMOBILE_ACCESSORIES_SHOP, CategoryId::AUTOMOTIVE_REPAIR_SHOP},
    {CategoryId::AUTOMOTIVE_GLASS_REPLACEMENT_SHOP, CategoryId::AUTOMOTIVE_REPAIR_SHOP},
    {CategoryId::BODYSHOP, CategoryId::AUTOMOTIVE_REPAIR_SHOP},
    {CategoryId::GENERAL_AUTO_REPAIR_SERVICE_CENTER, CategoryId::AUTOMOTIVE_REPAIR_SHOP},
    {CategoryId::MOTORCYCLE_REPAIR_SHOP, CategoryId::AUTOMOTIVE_REPAIR_SHOP},
    {CategoryId::REPAIR_SHOP, CategoryId::AUTOMOTIVE_REPAIR_SHOP},
    {CategoryId::ROAD_ASSISTANCE, CategoryId::AUTOMOTIVE_REPAIR_SHOP},
    {CategoryId::TIRE_REPAIR_SHOP, CategoryId::AUTOMOTIVE_REPAIR_SHOP},
    {CategoryId::TRUCK_REPAIR_SHOP, CategoryId::AUTOMOTIVE_REPAIR_SHOP},
    {CategoryId::VAN_REPAIR, CategoryId::AUTOMOTIVE_REPAIR_SHOP},
    {CategoryId::CAR_RENTAL_COMPANY, CategoryId::AUTOMOTIVE},
    {CategoryId::CAR_RENTAL, CategoryId::CAR_RENTAL_COMPANY},
    {CategoryId::PICKUP_AND_RETURNS_POINT, CategoryId::CAR_RENTAL_COMPANY},
    {CategoryId::CAR_WASH, CategoryId::AUTOMOTIVE},
    {CategoryId::CAR_WASH_LEVEL_3, CategoryId::CAR_WASH},
    {CategoryId::TRUCK_WASH, CategoryId::CAR_WASH},
    {CategoryId::ELECTRIC_VEHICLE_CHARGING_STATION, CategoryId::AUTOMOTIVE},
    {CategoryId::EMISSION_TESTING, CategoryId::AUTOMOTIVE},
    {CategoryId::HYDROGEN_FUELING_STATION, CategoryId::AUTOMOTIVE},
    {CategoryId::MOTORING_ORGANIZATION_OFFICE, CategoryId::AUTOMOTIVE},
    {CategoryId::PARKING_LOT, CategoryId::AUTOMOTIVE},
    {CategoryId::BICYCLE_PARKING_PLACE, CategoryId::PARKING_LOT},
    {CategoryId::BICYCLE_SHARING_LOCATION, CategoryId::PARKING_LOT},
    {CategoryId::COACH_PARKING_AREA, CategoryId::PARKING_LOT},
    {CategoryId::PARK_RIDE, CategoryId::PARKING_LOT},
    {CategoryId::PARKING_GARAGE, CategoryId::PARKING_LOT},
    {CategoryId::PARKING_LOT_LEVEL_3, CategoryId::PARKING_LOT},
    {CategoryId::TRAILHEAD, CategoryId::PARKING_LOT},
    {CategoryId::TRUCK_PARKING_AREA, CategoryId::PARKING_LOT},
    {CategoryId::PETROL_STATION, CategoryId::AUTOMOTIVE},
    {CategoryId::TRUCK_STOP, CategoryId::AUTOMOTIVE},
    {CategoryId::WEIGH_STATION, CategoryId::AUTOMOTIVE},
    {CategoryId::WEIGH_SCALES, CategoryId::WEIGH_STATION},
    {CategoryId::WEIGH_STATION_LEVEL_3, CategoryId::WEIGH_STATION},
};

const QHash<CategoryId, CategoryId> businessHierarchy = {
    {CategoryId::BUSINESS, CategoryId::INVALID},
    {CategoryId::AGRICULTURAL_BUSINESS, CategoryId::BUSINESS},
    {CategoryId::FARM, CategoryId::AGRICULTURAL_BUSINESS},
    {CategoryId::HORTICULTURE_COMPANY, CategoryId::AGRICULTURAL_BUSINESS},
    {CategoryId::PRODUCE_COMPANY, CategoryId::AGRICULTURAL_BUSINESS},
    {CategoryId::ATM, CategoryId::BUSINESS},
    {CategoryId::BANK, CategoryId::BUSINESS},
    {CategoryId::BUSINESS_PARK, CategoryId::BUSINESS},
    {CategoryId::COMMERCIAL_BUILDING, CategoryId::BUSINESS},
    {CategoryId::COMPANY, CategoryId::BUSINESS},
    {CategoryId::ADVERTISING_AND_MARKETING_COMPANY, CategoryId::COMPANY},
    {CategoryId::AGRICULTURAL_TECHNOLOGY_COMPANY, CategoryId::COMPANY},
    {CategoryId::AIRLINE, CategoryId::COMPANY},
    {CategoryId::ANIMAL_SHELTER, CategoryId::COMPANY},
    {CategoryId::AUTOMOBILE_COMPANY, CategoryId::COMPANY},
    {CategoryId::AUTOMOBILE_MANUFACTURER, CategoryId::COMPANY},
    {CategoryId::BICYCLE_SERVICE_AND_MAINTENANCE, CategoryId::COMPANY},
    {CategoryId::BILL_PAYMENT_SERVICE, CategoryId::COMPANY},
    {CategoryId::BODY_PIERCING_AND_TATTOOS, CategoryId::COMPANY},
    {CategoryId::BRIDGE_TUNNEL_ENGINEERING_COMPANY, CategoryId::COMPANY},
    {CategoryId::BUS_CHARTER_RENTAL_COMPANY, CategoryId::COMPANY},
    {CategoryId::BUS_COMPANY, CategoryId::COMPANY},
    {CategoryId::BUSINESS_SERVICES_COMPANY, CategoryId::COMPANY},
    {CategoryId::CABLE_TELEPHONE_COMPANY, CategoryId::COMPANY},
    {CategoryId::CATERERS, CategoryId::COMPANY},
    {CategoryId::CHEMICAL_COMPANY, CategoryId::COMPANY},
    {CategoryId::CLEANING_SERVICE_COMPANY, CategoryId::COMPANY},
    {CategoryId::COMPUTER_AND_DATA_SERVICES_CORPORATION, CategoryId::COMPANY},
    {CategoryId::COMPUTER_SOFTWARE_COMPANY, CategoryId::COMPANY},
    {CategoryId::CONSTRUCTION_COMPANY, CategoryId::COMPANY},
    {CategoryId::CUSTOMER_SERVICE_CENTER, CategoryId::COMPANY},
    {CategoryId::DIVERSIFIED_FINANCIAL_SERVICE_COMPANY, CategoryId::COMPANY},
    {CategoryId::ELECTRONICS_COMPANY, CategoryId::COMPANY},
    {CategoryId::ENGINEERING_AND_SCIENTIFIC_SERVICES, CategoryId::COMPANY},
    {CategoryId::EQUIPMENT_RENTAL_COMPANY, CategoryId::COMPANY},
    {CategoryId::FOOD_PRODUCTION, CategoryId::COMPANY},
    {CategoryId::FUNERAL_SERVICES, CategoryId::COMPANY},
    {CategoryId::HOME_APPLIANCE_REPAIR_COMPANY, CategoryId::COMPANY},
    {CategoryId::HUMAN_RESOURCES_AND_RECRUITING_SERVICES, CategoryId::COMPANY},
    {CategoryId::IMPORT_AND_EXPORT_COMPANY, CategoryId::COMPANY},
    {CategoryId::INSURANCE_COMPANY, CategoryId::COMPANY},
    {CategoryId::INTERIOR_AND_EXTERIOR_DESIGN, CategoryId::COMPANY},
    {CategoryId::INVESTIGATION_SERVICES, CategoryId::COMPANY},
    {CategoryId::INVESTMENT_CONSULTING_FIRM, CategoryId::COMPANY},
    {CategoryId::IT_AND_OFFICE_EQUIPMENT_SERVICES, CategoryId::COMPANY},
    {CategoryId::KINDERGARTEN_AND_CHILDCARE, CategoryId::COMPANY},
    {CategoryId::LANDSCAPING_SERVICES, CategoryId::COMPANY},
    {CategoryId::LEGAL_SERVICES, CategoryId::COMPANY},
    {CategoryId::LOCKSMITHS_AND_SECURITY_SYSTEM_SERVICES, CategoryId::COMPANY},
    {CategoryId::MAID_SERVICES, CategoryId::COMPANY},
    {CategoryId::MAIL_PACKAGE_FREIGHT_DELIVERY_COMPANY, CategoryId::COMPANY},
    {CategoryId::MANAGEMENT_AND_CONSULTING_SERVICES, CategoryId::COMPANY},
    {CategoryId::MANUFACTURING_COMPANY, CategoryId::COMPANY},
    {CategoryId::MARRIAGE_AND_MATCHMAKING_SERVICES, CategoryId::COMPANY},
    {CategoryId::MECHANICAL_ENGINEERING_COMPANY, CategoryId::COMPANY},
    {CategoryId::MINERAL_COMPANY, CategoryId::COMPANY},
    {CategoryId::MODELING_AGENCIES, CategoryId::COMPANY},
    {CategoryId::MOVING_STORAGE_COMPANY, CategoryId::COMPANY},
    {CategoryId::OEM, CategoryId::COMPANY},
    {CategoryId::OIL_NATURAL_GAS_COMPANY, CategoryId::COMPANY},
    {CategoryId::PHARMACEUTICAL_COMPANY, CategoryId::COMPANY},
    {CategoryId::PHOTOGRAPHY, CategoryId::COMPANY},
    {CategoryId::PLUMBING, CategoryId::COMPANY},
    {CategoryId::POLICE_SERVICES_SECURITY, CategoryId::COMPANY},
    {CategoryId::PROPERTY_MANAGEMENT, CategoryId::COMPANY},
    {CategoryId::PUBLIC_HEALTH_TECHNOLOGY_COMPANY, CategoryId::COMPANY},
    {CategoryId::PUBLISHING_TECHNOLOGY_COMPANY, CategoryId::COMPANY},
    {CategoryId::REAL_ESTATE_AGENCY_COMPANY, CategoryId::COMPANY},
    {CategoryId::SAVINGS_INSTITUTION, CategoryId::COMPANY},
    {CategoryId::SCHOOL_BUS_SERVICE_COMPANY, CategoryId::COMPANY},
    {CategoryId::SERVICE_COMPANY, CategoryId::COMPANY},
    {CategoryId::SOCIAL_SERVICES, CategoryId::COMPANY},
    {CategoryId::SPECIALTY_TRADE_CONTRACTORS, CategoryId::COMPANY},
    {CategoryId::TANNING_SALON, CategoryId::COMPANY},
    {CategoryId::TAX_SERVICES, CategoryId::COMPANY},
    {CategoryId::TAXI_LIMOUSINE_SHUTTLE_SERVICE_COMPANY, CategoryId::COMPANY},
    {CategoryId::TELECOMMUNICATIONS_COMPANY, CategoryId::COMPANY},
    {CategoryId::TOWING_SERVICE, CategoryId::COMPANY},
    {CategoryId::TRANSLATION_AND_INTERPRETATION_SERVICES, CategoryId::COMPANY},
    {CategoryId::TRANSPORTATION_COMPANY, CategoryId::COMPANY},
    {CategoryId::UTILITIES, CategoryId::COMPANY},
    {CategoryId::WASTE_AND_SANITARY, CategoryId::COMPANY},
    {CategoryId::WEDDING_SERVICES, CategoryId::COMPANY},
    {CategoryId::WELLNESS_CENTER_AND_SERVICES, CategoryId::COMPANY},
    {CategoryId::COURIER_DROP_BOX, CategoryId::BUSINESS},
    {CategoryId::EMERGENCY_MEDICAL_SERVICE_CENTER, CategoryId::BUSINESS},
    {CategoryId::EXCHANGE, CategoryId::BUSINESS},
    {CategoryId::CURRENCY_EXCHANGE, CategoryId::EXCHANGE},
    {CategoryId::GOLD_EXCHANGE, CategoryId::EXCHANGE},
    {CategoryId::MONEY_TRANSFERRING_SERVICE, CategoryId::EXCHANGE},
    {CategoryId::STOCK_EXCHANGE, CategoryId::EXCHANGE},
    {CategoryId::EXHIBITION_CONVENTION_CENTER, CategoryId::BUSINESS},
    {CategoryId::INDUSTRIAL_BUILDING, CategoryId::BUSINESS},
    {CategoryId::MANUFACTURING_FACTORY, CategoryId::BUSINESS},
    {CategoryId::MEDIA_COMPANY, CategoryId::BUSINESS},
    {CategoryId::COMMUNICATION_MEDIA, CategoryId::MEDIA_COMPANY},
    {CategoryId::RESEARCH_INSTITUTE, CategoryId::BUSINESS},
};

const QHash<CategoryId, CategoryId> eatingDrinkingHierarchy = {
    {CategoryId::EATING_DRINKING, CategoryId::INVALID},
    {CategoryId::PUB_CAFE, CategoryId::EATING_DRINKING},
    {CategoryId::CAFE, CategoryId::PUB_CAFE},
    {CategoryId::COFFEE_TEA, CategoryId::PUB_CAFE},
    {CategoryId::INTERNET_CAFE, CategoryId::PUB_CAFE},
    {CategoryId::MICROBREWERY_BEER_GARDEN, CategoryId::PUB_CAFE},
    {CategoryId::PUB, CategoryId::PUB_CAFE},
    {CategoryId::TEA_HOUSE, CategoryId::PUB_CAFE},
    {CategoryId::RESTAURANT, CategoryId::EATING_DRINKING},
    {CategoryId::AFGHAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::AFRICAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::ALGERIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::AMERICAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::CALIFORNIAN_RESTAURANT, CategoryId::AMERICAN_RESTAURANT},
    {CategoryId::CREOLE_CAJUN_RESTAURANT, CategoryId::AMERICAN_RESTAURANT},
    {CategoryId::NATIVE_AMERICAN, CategoryId::AMERICAN_RESTAURANT},
    {CategoryId::SOUL_FOOD_RESTAURANT, CategoryId::AMERICAN_RESTAURANT},
    {CategoryId::SOUTHERN, CategoryId::AMERICAN_RESTAURANT},
    {CategoryId::SOUTHWESTERN, CategoryId::AMERICAN_RESTAURANT},
    {CategoryId::ARABIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::ARGENTINEAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::ARMENIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::ASIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::AUSTRALIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::AUSTRIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::AZERBAIJANI_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::BALKAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::BALTIC_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::BANQUET_HALL, CategoryId::RESTAURANT},
    {CategoryId::BARBECUE_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::BELARUSIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::BELGIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::BISTRO, CategoryId::RESTAURANT},
    {CategoryId::BOHEMIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::BOLIVIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::BOSNIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::BAIANA_RESTAURANT, CategoryId::BOSNIAN_RESTAURANT},
    {CategoryId::BAKERY_RESTAURANT, CategoryId::BOSNIAN_RESTAURANT},
    {CategoryId::CAPIXABA_RESTAURANT, CategoryId::BOSNIAN_RESTAURANT},
    {CategoryId::MINEIRA_RESTAURANT, CategoryId::BOSNIAN_RESTAURANT},
    {CategoryId::BRAZILIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::BREAKFAST, CategoryId::RESTAURANT},
    {CategoryId::BREWPUB, CategoryId::RESTAURANT},
    {CategoryId::BRITISH_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::BRUNCH, CategoryId::RESTAURANT},
    {CategoryId::BRUNEIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::BUFFET_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::BULGARIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::BURGER_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::BURMESE_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::CAFETERIA, CategoryId::RESTAURANT},
    {CategoryId::CAMBODIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::CANADIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::CARIBBEAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::CASUAL_DINING, CategoryId::RESTAURANT},
    {CategoryId::CAUCASIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::CHICKEN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::CHILEAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::CHINESE_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::BEIJING_RESTAURANT, CategoryId::CHINESE_RESTAURANT},
    {CategoryId::CANTONESE_RESTAURANT, CategoryId::CHINESE_RESTAURANT},
    {CategoryId::CONGEE_RESTAURANT, CategoryId::CHINESE_RESTAURANT},
    {CategoryId::GUANGXI_RESTAURANT, CategoryId::CHINESE_RESTAURANT},
    {CategoryId::HOT_POT_RESTAURANT, CategoryId::CHINESE_RESTAURANT},
    {CategoryId::HUBEI_RESTAURANT, CategoryId::CHINESE_RESTAURANT},
    {CategoryId::HUNAN_RESTAURANT, CategoryId::CHINESE_RESTAURANT},
    {CategoryId::INNER_MONGOLIAN_RESTAURANT, CategoryId::CHINESE_RESTAURANT},
    {CategoryId::ISLAMIC_RESTAURANT, CategoryId::CHINESE_RESTAURANT},
    {CategoryId::JIANGSU_ZHEJIANG_RESTAURANT, CategoryId::CHINESE_RESTAURANT},
    {CategoryId::JIANGXI_RESTAURANT, CategoryId::CHINESE_RESTAURANT},
    {CategoryId::NORTHEASTERN_RESTAURANT, CategoryId::CHINESE_RESTAURANT},
    {CategoryId::SHANDONG_RESTAURANT, CategoryId::CHINESE_RESTAURANT},
    {CategoryId::SHANGHAI_RESTAURANT, CategoryId::CHINESE_RESTAURANT},
    {CategoryId::SZECHUAN_RESTAURANT, CategoryId::CHINESE_RESTAURANT},
    {CategoryId::TAIWANESE_RESTAURANT, CategoryId::CHINESE_RESTAURANT},
    {CategoryId::TIBETAN_RESTAURANT, CategoryId::CHINESE_RESTAURANT},
    {CategoryId::YUNNAN_GUIZHOU_RESTAURANT, CategoryId::CHINESE_RESTAURANT},
    {CategoryId::COLOMBIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::CREPERIE, CategoryId::RESTAURANT},
    {CategoryId::CUBAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::CYPRIOT_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::CZECH_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::DANISH_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::DINNER, CategoryId::RESTAURANT},
    {CategoryId::DOMINICAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::DOUGHNUT_SHOP, CategoryId::RESTAURANT},
    {CategoryId::DUTCH_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::EASTERN_EUROPEAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::EGYPTIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::ENGLISH_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::EROTIC_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::ETHIOPIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::EUROPEAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::EXOTIC_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::FAST_FOOD_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::FILIPINO_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::FINE_DINING, CategoryId::RESTAURANT},
    {CategoryId::FINNISH_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::FONDUE_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::FOOD_MARKET_STALL, CategoryId::RESTAURANT},
    {CategoryId::FRENCH_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::ALSATIAN_RESTAURANT, CategoryId::FRENCH_RESTAURANT},
    {CategoryId::AUVERGNATE_RESTAURANT, CategoryId::FRENCH_RESTAURANT},
    {CategoryId::BASQUE_RESTAURANT, CategoryId::FRENCH_RESTAURANT},
    {CategoryId::CORSICAN_RESTAURANT, CategoryId::FRENCH_RESTAURANT},
    {CategoryId::LYONNAISE_RESTAURANT, CategoryId::FRENCH_RESTAURANT},
    {CategoryId::PROVENCAL_RESTAURANT, CategoryId::FRENCH_RESTAURANT},
    {CategoryId::SUD_OUEST_RESTAURANT, CategoryId::FRENCH_RESTAURANT},
    {CategoryId::FUSION_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::GASTROPUB, CategoryId::RESTAURANT},
    {CategoryId::GERMAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::GREEK_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::GRILL, CategoryId::RESTAURANT},
    {CategoryId::HALAL, CategoryId::RESTAURANT},
    {CategoryId::HOT_DOGS, CategoryId::RESTAURANT},
    {CategoryId::HUNGARIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::ICE_CREAM_PARLOR, CategoryId::RESTAURANT},
    {CategoryId::INDIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::BENGALI_RESTAURANT, CategoryId::INDIAN_RESTAURANT},
    {CategoryId::GOAN_RESTAURANT, CategoryId::INDIAN_RESTAURANT},
    {CategoryId::GUJARATI_RESTAURANT, CategoryId::INDIAN_RESTAURANT},
    {CategoryId::HYDERABADI_RESTAURANT, CategoryId::INDIAN_RESTAURANT},
    {CategoryId::JAIN_RESTAURANT, CategoryId::INDIAN_RESTAURANT},
    {CategoryId::KONKANI_RESTAURANT, CategoryId::INDIAN_RESTAURANT},
    {CategoryId::MAHARASHTRIAN_RESTAURANT, CategoryId::INDIAN_RESTAURANT},
    {CategoryId::MALVANI_RESTAURANT, CategoryId::INDIAN_RESTAURANT},
    {CategoryId::MUGHLAI_RESTAURANT, CategoryId::INDIAN_RESTAURANT},
    {CategoryId::NORTH_INDIAN_RESTAURANT, CategoryId::INDIAN_RESTAURANT},
    {CategoryId::PARSI_RESTAURANT, CategoryId::INDIAN_RESTAURANT},
    {CategoryId::PUNJABI_RESTAURANT, CategoryId::INDIAN_RESTAURANT},
    {CategoryId::RAJASTHANI_RESTAURANT, CategoryId::INDIAN_RESTAURANT},
    {CategoryId::SOUTH_INDIAN_RESTAURANT, CategoryId::INDIAN_RESTAURANT},
    {CategoryId::TANDOORI_RESTAURANT, CategoryId::INDIAN_RESTAURANT},
    {CategoryId::INDONESIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::INTERNATIONAL_HOTEL, CategoryId::RESTAURANT},
    {CategoryId::IRANIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::IRISH_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::ISRAELI_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::ITALIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::JAMAICAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::JAPANESE_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::SUSHI_RESTAURANT, CategoryId::JAPANESE_RESTAURANT},
    {CategoryId::JUICE_BAR, CategoryId::RESTAURANT},
    {CategoryId::KOREAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::KOSHER_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::LATIN_AMERICAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::LEBANESE_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::LUNCH, CategoryId::RESTAURANT},
    {CategoryId::LUXEMBOURGIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::MACROBIOTIC_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::MAGHRIB_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::MALAYSIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::MALTESE_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::MAURITIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::MEDITERRANEAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::MEXICAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::OAXAQUENA_RESTAURANT, CategoryId::MEXICAN_RESTAURANT},
    {CategoryId::POBLANA_RESTAURANT, CategoryId::MEXICAN_RESTAURANT},
    {CategoryId::VERACRUZANA_RESTAURANT, CategoryId::MEXICAN_RESTAURANT},
    {CategoryId::YUCATECA_RESTAURANT, CategoryId::MEXICAN_RESTAURANT},
    {CategoryId::MIDDLE_EASTERN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::MONGOLIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::MOROCCAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::MUSSEL_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::NATURAL_HEALTHY, CategoryId::RESTAURANT},
    {CategoryId::NEPALESE_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::NOODLES, CategoryId::RESTAURANT},
    {CategoryId::NORTH_AFRICAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::NORTH_AMERICAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::NORWEGIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::OCEANIC_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::ORGANIC_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::ORIENTAL_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::PAKISTANI_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::PASTRIES, CategoryId::RESTAURANT},
    {CategoryId::PERUVIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::PIZZA_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::POLISH_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::POLYNESIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::PORTUGUESE_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::ROADSIDE_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::ROMANIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::RUSSIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::SALAD_BAR, CategoryId::RESTAURANT},
    {CategoryId::SANDWICH_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::SAVOYAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::SCANDINAVIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::SCOTTISH_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::SEAFOOD_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::SEYCHELLOIS_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::SICILIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::SINGAPOREAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::SLAVIC_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::SLOVAK_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::SNACKS_BEVERAGES, CategoryId::RESTAURANT},
    {CategoryId::SOUP_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::SOUTH_AFRICAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::SOUTH_AMERICAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::SOUTHEAST_ASIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::SPANISH_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::TAPAS_RESTAURANT, CategoryId::SPANISH_RESTAURANT},
    {CategoryId::SRI_LANKAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::STEAK_HOUSE, CategoryId::RESTAURANT},
    {CategoryId::SUDANESE_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::SURINAMESE_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::SWEDISH_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::SWISS_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::SYRIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::TAKEAWAY_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::TEPPANYAKI_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::THAI_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::TUNISIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::TURKISH_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::UKRAINIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::URUGUAYAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::VEGETARIAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::VENEZUELAN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::VIETNAMESE_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::WELSH_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::WESTERN_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::YEMENI_RESTAURANT, CategoryId::RESTAURANT},
    {CategoryId::RESTAURANT_AREA, CategoryId::RESTAURANT},
};

const QHash<CategoryId, CategoryId> governmentPublicServiceHierarchy = {
    {CategoryId::GOVERNMENT_PUBLIC_SERVICE, CategoryId::INVALID},
    {CategoryId::CITY_CENTER, CategoryId::GOVERNMENT_PUBLIC_SERVICE},
    {CategoryId::COURTHOUSE, CategoryId::GOVERNMENT_PUBLIC_SERVICE},
    {CategoryId::EDUCATIONAL_INSTITUTION, CategoryId::GOVERNMENT_PUBLIC_SERVICE},
    {CategoryId::ART_SCHOOL, CategoryId::EDUCATIONAL_INSTITUTION},
    {CategoryId::CHILD_CARE_FACILITY, CategoryId::EDUCATIONAL_INSTITUTION},
    {CategoryId::COACHING_INSTITUTE, CategoryId::EDUCATIONAL_INSTITUTION},
    {CategoryId::COLLEGE_UNIVERSITY, CategoryId::EDUCATIONAL_INSTITUTION},
    {CategoryId::CULINARY_SCHOOL, CategoryId::EDUCATIONAL_INSTITUTION},
    {CategoryId::DANCE_STUDIO_SCHOOL, CategoryId::EDUCATIONAL_INSTITUTION},
    {CategoryId::DRIVING_SCHOOL, CategoryId::EDUCATIONAL_INSTITUTION},
    {CategoryId::EDUCATIONAL_FACILITY, CategoryId::EDUCATIONAL_INSTITUTION},
    {CategoryId::HIGH_SCHOOL, CategoryId::EDUCATIONAL_INSTITUTION},
    {CategoryId::JUNIOR_COLLEGE_COMMUNITY_COLLEGE, CategoryId::EDUCATIONAL_INSTITUTION},
    {CategoryId::LANGUAGE_SCHOOL, CategoryId::EDUCATIONAL_INSTITUTION},
    {CategoryId::MIDDLE_SCHOOL, CategoryId::EDUCATIONAL_INSTITUTION},
    {CategoryId::PRESCHOOL, CategoryId::EDUCATIONAL_INSTITUTION},
    {CategoryId::PRIMARY_SCHOOL, CategoryId::EDUCATIONAL_INSTITUTION},
    {CategoryId::SCHOOL, CategoryId::EDUCATIONAL_INSTITUTION},
    {CategoryId::SENIOR_HIGH_SCHOOL, CategoryId::EDUCATIONAL_INSTITUTION},
    {CategoryId::SPECIAL_SCHOOL, CategoryId::EDUCATIONAL_INSTITUTION},
    {CategoryId::SPORTS_SCHOOL, CategoryId::EDUCATIONAL_INSTITUTION},
    {CategoryId::TECHNICAL_SCHOOL, CategoryId::EDUCATIONAL_INSTITUTION},
    {CategoryId::TRAINING_AND_DEVELOPMENT, CategoryId::EDUCATIONAL_INSTITUTION},
    {CategoryId::VOCATIONAL_TRAINING_SCHOOL, CategoryId::EDUCATIONAL_INSTITUTION},
    {CategoryId::EMBASSY, CategoryId::GOVERNMENT_PUBLIC_SERVICE},
    {CategoryId::EMERGENCY_ASSEMBLY_POINT, CategoryId::GOVERNMENT_PUBLIC_SERVICE},
    {CategoryId::EARTHQUAKE_ASSEMBLY_POINT, CategoryId::EMERGENCY_ASSEMBLY_POINT},
    {CategoryId::FIRE_ASSEMBLY_POINT, CategoryId::EMERGENCY_ASSEMBLY_POINT},
    {CategoryId::FLOOD_ASSEMBLY_POINT, CategoryId::EMERGENCY_ASSEMBLY_POINT},
    {CategoryId::TSUNAMI_ASSEMBLY_POINT, CategoryId::EMERGENCY_ASSEMBLY_POINT},
    {CategoryId::VOLCANIC_ERUPTION_ASSEMBLY_POINT, CategoryId::EMERGENCY_ASSEMBLY_POINT},
    {CategoryId::FIRE_STATION, CategoryId::GOVERNMENT_PUBLIC_SERVICE},
    {CategoryId::GOVERNMENT_OFFICE, CategoryId::GOVERNMENT_PUBLIC_SERVICE},
    {CategoryId::CITY_HALL, CategoryId::GOVERNMENT_OFFICE},
    {CategoryId::CIVIC_COMMUNITY_CENTER, CategoryId::GOVERNMENT_OFFICE},
    {CategoryId::COUNTY_COUNCIL, CategoryId::GOVERNMENT_OFFICE},
    {CategoryId::INTERNATIONAL_ORGANIZATION, CategoryId::GOVERNMENT_OFFICE},
    {CategoryId::NATIONAL_ORGANIZATION, CategoryId::GOVERNMENT_OFFICE},
    {CategoryId::TOWN_GOVERNMENT, CategoryId::GOVERNMENT_OFFICE},
    {CategoryId::INDIAN_RESERVATION, CategoryId::GOVERNMENT_PUBLIC_SERVICE},
    {CategoryId::MILITARY_BASE, CategoryId::GOVERNMENT_PUBLIC_SERVICE},
    {CategoryId::ORGANIZATION, CategoryId::GOVERNMENT_PUBLIC_SERVICE},
    {CategoryId::NON_GOVERNMENTAL_ORGANIZATION, CategoryId::ORGANIZATION},
    {CategoryId::WELFARE_ORGANIZATION, CategoryId::ORGANIZATION},
    {CategoryId::POLICE_STATION, CategoryId::GOVERNMENT_PUBLIC_SERVICE},
    {CategoryId::POST_OFFICE, CategoryId::GOVERNMENT_PUBLIC_SERVICE},
    {CategoryId::GENERAL_POST_OFFICE, CategoryId::POST_OFFICE},
    {CategoryId::LOCAL_POST_OFFICE, CategoryId::POST_OFFICE},
    {CategoryId::PRISON, CategoryId::GOVERNMENT_PUBLIC_SERVICE},
    {CategoryId::PUBLIC_AMENITY, CategoryId::GOVERNMENT_PUBLIC_SERVICE},
    {CategoryId::GOVERNMENT_OR_COMMUNITY_FACILITY, CategoryId::PUBLIC_AMENITY},
    {CategoryId::PASSENGER_TRANSPORT_TICKET_OFFICE, CategoryId::PUBLIC_AMENITY},
    {CategoryId::PEDESTRIAN_SUBWAY, CategoryId::PUBLIC_AMENITY},
    {CategoryId::PUBLIC_CALL_BOX, CategoryId::PUBLIC_AMENITY},
    {CategoryId::PUBLIC_RESTROOM, CategoryId::PUBLIC_AMENITY},
    {CategoryId::REGISTRATION_OFFICE, CategoryId::PUBLIC_AMENITY},
    {CategoryId::ROAD_RESCUE_POINT, CategoryId::PUBLIC_AMENITY},
    {CategoryId::STREET_OR_SQUARE, CategoryId::PUBLIC_AMENITY},
    {CategoryId::TOILET, CategoryId::PUBLIC_AMENITY},
    {CategoryId::TRAFFIC_CONTROL_DEPARTMENT, CategoryId::GOVERNMENT_PUBLIC_SERVICE},
    {CategoryId::TRAFFIC_MANAGEMENT_BUREAU, CategoryId::GOVERNMENT_PUBLIC_SERVICE},
};

const QHash<CategoryId, CategoryId> healthCareHierarchy = {
    {CategoryId::HEALTH_CARE, CategoryId::INVALID},
    {CategoryId::DENTAL_CLINIC, CategoryId::HEALTH_CARE},
    {CategoryId::EMERGENCY_ROOM, CategoryId::HEALTH_CARE},
    {CategoryId::HEALTHCARE_SERVICE_CENTER, CategoryId::HEALTH_CARE},
    {CategoryId::AMBULANCE_UNIT, CategoryId::HEALTHCARE_SERVICE_CENTER},
    {CategoryId::BLOOD_BANK, CategoryId::HEALTHCARE_SERVICE_CENTER},
    {CategoryId::GENERAL_PRACTICE, CategoryId::HEALTHCARE_SERVICE_CENTER},
    {CategoryId::NURSING_HOME, CategoryId::HEALTHCARE_SERVICE_CENTER},
    {CategoryId::OPTICAL, CategoryId::HEALTHCARE_SERVICE_CENTER},
    {CategoryId::PERSONAL_CARE_INSTITUTION, CategoryId::HEALTHCARE_SERVICE_CENTER},
    {CategoryId::PERSONAL_SERVICE_CENTER, CategoryId::HEALTHCARE_SERVICE_CENTER},
    {CategoryId::PSYCHIATRIC_INSTITUTE, CategoryId::HEALTHCARE_SERVICE_CENTER},
    {CategoryId::THERAPIST, CategoryId::HEALTHCARE_SERVICE_CENTER},
    {CategoryId::HOSPITAL_CLINIC, CategoryId::HEALTH_CARE},
    {CategoryId::CHINESE_MEDICINE_HOSPITAL, CategoryId::HOSPITAL_CLINIC},
    {CategoryId::GENERAL_HOSPITAL, CategoryId::HOSPITAL_CLINIC},
    {CategoryId::HOSPITAL_FOR_WOMEN_AND_CHILDREN, CategoryId::HOSPITAL_CLINIC},
    {CategoryId::SPECIALIZED_HOSPITAL, CategoryId::HOSPITAL_CLINIC},
    {CategoryId::MEDICAL_CLINIC, CategoryId::HEALTH_CARE},
    {CategoryId::GENERAL_CLINIC, CategoryId::MEDICAL_CLINIC},
    {CategoryId::PHYSIOTHERAPY_CLINIC, CategoryId::MEDICAL_CLINIC},
    {CategoryId::SPECIALIST_CLINIC, CategoryId::MEDICAL_CLINIC},
    {CategoryId::PHARMACY, CategoryId::HEALTH_CARE},
    {CategoryId::VETERINARY_CLINIC, CategoryId::HEALTH_CARE},
};

const QHash<CategoryId, CategoryId> leisureHierarchy = {
    {CategoryId::LEISURE, CategoryId::INVALID},
    {CategoryId::AMUSEMENT_PARK, CategoryId::LEISURE},
    {CategoryId::AMUSEMENT_ARCADE, CategoryId::AMUSEMENT_PARK},
    {CategoryId::AMUSEMENT_CENTER, CategoryId::AMUSEMENT_PARK},
    {CategoryId::CINEMA, CategoryId::LEISURE},
    {CategoryId::CINEMA_LEVEL_3, CategoryId::CINEMA},
    {CategoryId::DRIVE_IN_CINEMA, CategoryId::CINEMA},
    {CategoryId::CLUB_ASSOCIATION, CategoryId::LEISURE},
    {CategoryId::BEACH_CLUB, CategoryId::CLUB_ASSOCIATION},
    {CategoryId::CAR_CLUB, CategoryId::CLUB_ASSOCIATION},
    {CategoryId::HOCKEY_CLUB, CategoryId::CLUB_ASSOCIATION},
    {CategoryId::COMMUNITY_CENTER, CategoryId::LEISURE},
    {CategoryId::COLLECTIVE_COMMUNITY, CategoryId::COMMUNITY_CENTER},
    {CategoryId::ENTERTAINMENT_PLAZA, CategoryId::LEISURE},
    {CategoryId::GAMBLING_LOTTERY_BETTING, CategoryId::LEISURE},
    {CategoryId::LEISURE_CENTER, CategoryId::LEISURE},
    {CategoryId::FLYING_CLUB, CategoryId::LEISURE_CENTER},
    {CategoryId::POOL_HALL, CategoryId::LEISURE_CENTER},
    {CategoryId::SAUNA_SOLARIUM_MASSAGE_CENTER, CategoryId::LEISURE_CENTER},
    {CategoryId::SPA, CategoryId::LEISURE_CENTER},
    {CategoryId::LIBRARY, CategoryId::LEISURE},
    {CategoryId::MARINA, CategoryId::LEISURE},
    {CategoryId::MARINA_LEVEL_3, CategoryId::MARINA},
    {CategoryId::YACHT_BASIN, CategoryId::MARINA},
    {CategoryId::MUSEUM, CategoryId::LEISURE},
    {CategoryId::ART_MUSEUM, CategoryId::MUSEUM},
    {CategoryId::CHILDRENS_MUSEUM, CategoryId::MUSEUM},
    {CategoryId::HISTORY_MUSEUM, CategoryId::MUSEUM},
    {CategoryId::SCIENCE_MUSEUM, CategoryId::MUSEUM},
    {CategoryId::NIGHTLIFE, CategoryId::LEISURE},
    {CategoryId::ADULT_ENTERTAINMENT, CategoryId::NIGHTLIFE},
    {CategoryId::BAR, CategoryId::NIGHTLIFE},
    {CategoryId::COCKTAIL_BAR, CategoryId::BAR},
    {CategoryId::WINE_BAR, CategoryId::BAR},
    {CategoryId::LIVE_ENTERTAINMENT_CABARET, CategoryId::NIGHTLIFE},
    {CategoryId::DANCING_CLUB, CategoryId::LIVE_ENTERTAINMENT_CABARET},
    {CategoryId::DISCOTHEQUE, CategoryId::LIVE_ENTERTAINMENT_CABARET},
    {CategoryId::VIDEO_ARCADE_GAMING_ROOM, CategoryId::LIVE_ENTERTAINMENT_CABARET},
    {CategoryId::NIGHT_CLUB, CategoryId::NIGHTLIFE},
    {CategoryId::COMEDY_CLUB, CategoryId::NIGHT_CLUB},
    {CategoryId::JAZZ_CLUB, CategoryId::NIGHT_CLUB},
    {CategoryId::KARAOKE_CLUB, CategoryId::NIGHT_CLUB},
    {CategoryId::PRIVATE_CLUB, CategoryId::NIGHT_CLUB},
    {CategoryId::PARK_RECREATION_AREA, CategoryId::LEISURE},
    {CategoryId::AVENUE_BOULEVARD, CategoryId::PARK_RECREATION_AREA},
    {CategoryId::BATTLEFIELD_SITE, CategoryId::PARK_RECREATION_AREA},
    {CategoryId::BOAT_LAUNCHING_RAMP, CategoryId::PARK_RECREATION_AREA},
    {CategoryId::CEMETERY, CategoryId::PARK_RECREATION_AREA},
    {CategoryId::FAIRGROUND, CategoryId::PARK_RECREATION_AREA},
    {CategoryId::FISHING_HUNTING_AREA, CategoryId::PARK_RECREATION_AREA},
    {CategoryId::FOREST_AREA, CategoryId::PARK_RECREATION_AREA},
    {CategoryId::HISTORIC_SITE, CategoryId::PARK_RECREATION_AREA},
    {CategoryId::HISTORICAL_PARK, CategoryId::PARK_RECREATION_AREA},
    {CategoryId::LAKESIDE, CategoryId::PARK_RECREATION_AREA},
    {CategoryId::MEMORIAL, CategoryId::PARK_RECREATION_AREA},
    {CategoryId::NATURAL_ATTRACTION_PARK, CategoryId::PARK_RECREATION_AREA},
    {CategoryId::PARK, CategoryId::PARK_RECREATION_AREA},
    {CategoryId::PICNIC_AREA, CategoryId::PARK_RECREATION_AREA},
    {CategoryId::PRESERVED_AREA, CategoryId::PARK_RECREATION_AREA},
    {CategoryId::PROTECTED_AREA, CategoryId::PARK_RECREATION_AREA},
    {CategoryId::RECREATIONAL_AREA, CategoryId::PARK_RECREATION_AREA},
    {CategoryId::SCENIC_RIVER_AREA, CategoryId::PARK_RECREATION_AREA},
    {CategoryId::SEASHORE, CategoryId::PARK_RECREATION_AREA},
    {CategoryId::SKI_RESORT, CategoryId::PARK_RECREATION_AREA},
    {CategoryId::INDOOR_SKI_SLOPE, CategoryId::SKI_RESORT},
    {CategoryId::WATER_PARK, CategoryId::SKI_RESORT},
    {CategoryId::WILDERNESS_AREA, CategoryId::PARK_RECREATION_AREA},
    {CategoryId::WINTER_SPORT_AREA, CategoryId::PARK_RECREATION_AREA},
    {CategoryId::THEATER_MUSIC_CULTURE, CategoryId::LEISURE},
    {CategoryId::AMPHITHEATER, CategoryId::THEATER_MUSIC_CULTURE},
    {CategoryId::CONCERT_HALL, CategoryId::THEATER_MUSIC_CULTURE},
    {CategoryId::CULTURAL_CENTER, CategoryId::THEATER_MUSIC_CULTURE},
    {CategoryId::DINNER_THEATER, CategoryId::THEATER_MUSIC_CULTURE},
    {CategoryId::GALLERY, CategoryId::THEATER_MUSIC_CULTURE},
    {CategoryId::MUSIC_VENUE, CategoryId::THEATER_MUSIC_CULTURE},
    {CategoryId::OPERA, CategoryId::THEATER_MUSIC_CULTURE},
    {CategoryId::PERFORMING_ARTS, CategoryId::THEATER_MUSIC_CULTURE},
    {CategoryId::THEATER, CategoryId::THEATER_MUSIC_CULTURE},
    {CategoryId::TRAIL_SYSTEM, CategoryId::LEISURE},
    {CategoryId::ADVENTURE_VEHICLE_TRAIL, CategoryId::TRAIL_SYSTEM},
    {CategoryId::HIKING_TRAIL, CategoryId::TRAIL_SYSTEM},
    {CategoryId::HORSE_RIDING_TRAIL, CategoryId::TRAIL_SYSTEM},
    {CategoryId::MOUNTAIN_BIKE_TRAIL, CategoryId::TRAIL_SYSTEM},
    {CategoryId::OFF_ROAD_TRAILHEAD, CategoryId::TRAIL_SYSTEM},
    {CategoryId::OUTDOOR_SERVICE, CategoryId::TRAIL_SYSTEM},
    {CategoryId::RANGER_STATION, CategoryId::TRAIL_SYSTEM},
    {CategoryId::ROCK_CLIMBING_TRAIL, CategoryId::TRAIL_SYSTEM},
    {CategoryId::SKI_LIFT, CategoryId::TRAIL_SYSTEM},
    {CategoryId::WINERY, CategoryId::LEISURE},
    {CategoryId::WINERY_LEVEL_3, CategoryId::WINERY},
    {CategoryId::ZOO_BOTANICAL_GARDEN, CategoryId::LEISURE},
    {CategoryId::AQUATIC_ZOO_MARINE_PARK, CategoryId::ZOO_BOTANICAL_GARDEN},
    {CategoryId::ARBORETA_BOTANICAL_GARDEN, CategoryId::ZOO_BOTANICAL_GARDEN},
    {CategoryId::WILDLIFE_PARK, CategoryId::ZOO_BOTANICAL_GARDEN},
    {CategoryId::ZOO, CategoryId::ZOO_BOTANICAL_GARDEN},
};

const QHash<CategoryId, CategoryId> accommodationHierarchy = {
    {CategoryId::ACCOMMODATION, CategoryId::INVALID},
    {CategoryId::CAMPING_GROUND, CategoryId::ACCOMMODATION},
    {CategoryId::CARAVAN_SITE, CategoryId::CAMPING_GROUND},
    {CategoryId::RECREATIONAL_SITE, CategoryId::CAMPING_GROUND},
    {CategoryId::HOTEL_MOTEL, CategoryId::ACCOMMODATION},
    {CategoryId::BED_BREAKFAST_GUEST_HOUSE, CategoryId::HOTEL_MOTEL},
    {CategoryId::CABIN_LODGE, CategoryId::HOTEL_MOTEL},
    {CategoryId::HOSTEL, CategoryId::HOTEL_MOTEL},
    {CategoryId::HOTEL, CategoryId::HOTEL_MOTEL},
    {CategoryId::MOTEL, CategoryId::HOTEL_MOTEL},
    {CategoryId::RESORT, CategoryId::HOTEL_MOTEL},
    {CategoryId::REST_CAMPS, CategoryId::HOTEL_MOTEL},
    {CategoryId::RESIDENTIAL_ACCOMMODATION, CategoryId::ACCOMMODATION},
    {CategoryId::APARTMENT_COMPLEX, CategoryId::RESIDENTIAL_ACCOMMODATION},
    {CategoryId::CONDOMINIUM_COMPLEX, CategoryId::RESIDENTIAL_ACCOMMODATION},
    {CategoryId::HOLIDAY_PARK, CategoryId::RESIDENTIAL_ACCOMMODATION},
    {CategoryId::RESIDENTIAL_ESTATE, CategoryId::RESIDENTIAL_ACCOMMODATION},
    {CategoryId::RETIREMENT_COMMUNITY, CategoryId::RESIDENTIAL_ACCOMMODATION},
    {CategoryId::TOWNHOUSE_COMPLEX, CategoryId::RESIDENTIAL_ACCOMMODATION},
    {CategoryId::VACATION_RENTAL, CategoryId::ACCOMMODATION},
    {CategoryId::APARTMENT, CategoryId::VACATION_RENTAL},
    {CategoryId::BUNGALOW, CategoryId::VACATION_RENTAL},
    {CategoryId::CHALET, CategoryId::VACATION_RENTAL},
    {CategoryId::COTTAGE, CategoryId::VACATION_RENTAL},
    {CategoryId::VILLA, CategoryId::VACATION_RENTAL},
};

const QHash<CategoryId, CategoryId> miscellaneousHierarchy = {
    {CategoryId::MISCELLANEOUS, CategoryId::INVALID},
    {CategoryId::ADMIN_FEATURE, CategoryId::MISCELLANEOUS},
    {CategoryId::CAPITAL, CategoryId::ADMIN_FEATURE},
    {CategoryId::CAPITAL_CITY, CategoryId::ADMIN_FEATURE},
    {CategoryId::CONTINENT, CategoryId::ADMIN_FEATURE},
    {CategoryId::COUNTRY, CategoryId::ADMIN_FEATURE},
    {CategoryId::COUNTY, CategoryId::ADMIN_FEATURE},
    {CategoryId::GENERAL_CITY, CategoryId::ADMIN_FEATURE},
    {CategoryId::HAMLET, CategoryId::ADMIN_FEATURE},
    {CategoryId::NEIGHBORHOOD, CategoryId::ADMIN_FEATURE},
    {CategoryId::POSTAL_CODE, CategoryId::ADMIN_FEATURE},
    {CategoryId::STREET, CategoryId::ADMIN_FEATURE},
    {CategoryId::STREET_ADDRESS, CategoryId::ADMIN_FEATURE},
    {CategoryId::TOWN, CategoryId::ADMIN_FEATURE},
    {CategoryId::GEOGRAPHIC_FEATURE, CategoryId::MISCELLANEOUS},
    {CategoryId::BAY, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::BODY_OF_WATER, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::CANAL, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::CAPE, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::CAVE, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::COVE, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::DRY_LAKE, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::DUNE, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::HARBOR, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::HILL, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::ISLAND, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::LAGOON, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::LAKE, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::MARSH_SWAMP_VLEI, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::MINERAL_HOT_SPRINGS, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::MOUNTAIN_PEAK, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::OASIS, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::PLAIN_FLATLAND, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::PLATEAU, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::QUARRY, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::RAPIDS, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::REEF, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::RESERVOIR, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::RIDGE, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::RIVER_CROSSING, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::ROCKS, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::UNDERSEA_FEATURE, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::VALLEY, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::WATERFALL, CategoryId::GEOGRAPHIC_FEATURE},
    {CategoryId::WELL, CategoryId::GEOGRAPHIC_FEATURE},
};

const QHash<CategoryId, CategoryId> shoppingHierarchy = {
    {CategoryId::SHOPPING, CategoryId::INVALID},
    {CategoryId::CONVENIENCE_STORE, CategoryId::SHOPPING},
    {CategoryId::GROCERY, CategoryId::CONVENIENCE_STORE},
    {CategoryId::GREENGROCERY, CategoryId::GROCERY},
    {CategoryId::DEPARTMENT_STORE, CategoryId::SHOPPING},
    {CategoryId::MARKET, CategoryId::SHOPPING},
    {CategoryId::FARMERS_MARKET, CategoryId::MARKET},
    {CategoryId::SHOP, CategoryId::SHOPPING},
    {CategoryId::FOOD_MARKET, CategoryId::SHOP},
    {CategoryId::INFORMAL_MARKET, CategoryId::SHOP},
    {CategoryId::PUBLIC_MARKET, CategoryId::SHOP},
    {CategoryId::SUPERMARKET, CategoryId::SHOP},
    {CategoryId::ADULT_SHOP, CategoryId::SHOP},
    {CategoryId::AGRICULTURAL_SUPPLIES, CategoryId::SHOP},
    {CategoryId::ART_AND_ANTIQUES_STORE, CategoryId::SHOP},
    {CategoryId::ARTS_AND_CRAFTS_SUPPLIES, CategoryId::SHOP},
    {CategoryId::BAGS_LEATHERWEAR_SHOP, CategoryId::SHOP},
    {CategoryId::BEAUTY_SALON, CategoryId::SHOP},
    {CategoryId::BICYCLE_AND_BICYCLE_ACCESSORIES_SHOP, CategoryId::SHOP},
    {CategoryId::BMX_SHOP, CategoryId::SHOP},
    {CategoryId::BOATING_EQUIPMENT_STORE, CategoryId::SHOP},
    {CategoryId::BOOKSTORE, CategoryId::SHOP},
    {CategoryId::CAMPING_HIKING_SUPPLIES, CategoryId::SHOP},
    {CategoryId::CANOE_KAYAK_STORE, CategoryId::SHOP},
    {CategoryId::CD_DVD_GAME_VIDEO_STORE, CategoryId::SHOP},
    {CategoryId::GAME_VIDEO_RENTALS, CategoryId::CD_DVD_GAME_VIDEO_STORE},
    {CategoryId::CLOTHING_ACCESSORIES_STORE, CategoryId::SHOP},
    {CategoryId::MENS_APPAREL, CategoryId::CLOTHING_ACCESSORIES_STORE},
    {CategoryId::WOMENS_APPAREL, CategoryId::CLOTHING_ACCESSORIES_STORE},
    {CategoryId::CHILDRENS_APPAREL, CategoryId::CLOTHING_ACCESSORIES_STORE},
    {CategoryId::SHOE_STORE, CategoryId::CLOTHING_ACCESSORIES_STORE},
    {CategoryId::SPECIALTY_CLOTHING_STORE, CategoryId::CLOTHING_ACCESSORIES_STORE},
    {CategoryId::CONSTRUCTION_MATERIALS_EQUIPMENT_STORE, CategoryId::SHOP},
    {CategoryId::DISCOUNT_STORE, CategoryId::SHOP},
    {CategoryId::DRIVE_THROUGH_BOTTLE_SHOP, CategoryId::SHOP},
    {CategoryId::DRY_CLEANERS, CategoryId::SHOP},
    {CategoryId::ELECTRONICS_STORE, CategoryId::SHOP},
    {CategoryId::PHOTOGRAPHIC_EQUIPMENT_STORE, CategoryId::ELECTRONICS_STORE},
    {CategoryId::CONSUMER_ELECTRONICS_STORE, CategoryId::ELECTRONICS_STORE},
    {CategoryId::COMPUTER_STORE, CategoryId::ELECTRONICS_STORE},
    {CategoryId::OFFICE_EQUIPMENT_STORE, CategoryId::ELECTRONICS_STORE},
    {CategoryId::MOBILE_SERVICE_CENTER, CategoryId::ELECTRONICS_STORE},
    {CategoryId::MARINE_ELECTRONIC_EQUIPMENT_STORE, CategoryId::ELECTRONICS_STORE},
    {CategoryId::MOBILE_PHONE_STORE, CategoryId::ELECTRONICS_STORE},
    {CategoryId::FLORIST, CategoryId::SHOP},
    {CategoryId::FOOD_DRINK_SHOP, CategoryId::SHOP},
    {CategoryId::BAKERY, CategoryId::FOOD_DRINK_SHOP},
    {CategoryId::BUTCHERY, CategoryId::FOOD_DRINK_SHOP},
    {CategoryId::FISH_STORE, CategoryId::FOOD_DRINK_SHOP},
    {CategoryId::WINE_SPIRITS_STORE, CategoryId::FOOD_DRINK_SHOP},
    {CategoryId::DELICATESSEN, CategoryId::FOOD_DRINK_SHOP},
    {CategoryId::SPECIALTY_FOOD_STORE, CategoryId::FOOD_DRINK_SHOP},
    {CategoryId::SWEET_SHOP, CategoryId::FOOD_DRINK_SHOP},
    {CategoryId::DAIRY_GOODS, CategoryId::FOOD_DRINK_SHOP},
    {CategoryId::GENERAL_STORE, CategoryId::SHOP},
    {CategoryId::GIFT_STORE, CategoryId::SHOP},
    {CategoryId::GLASSWARE_CERAMIC_SHOP, CategoryId::SHOP},
    {CategoryId::HAIR_SALON_BARBERSHOP, CategoryId::SHOP},
    {CategoryId::HARDWARE_STORE, CategoryId::SHOP},
    {CategoryId::HOBBY_SHOP, CategoryId::SHOP},
    {CategoryId::HOLIDAY_STORE, CategoryId::SHOP},
    {CategoryId::HOUSE_GARDEN, CategoryId::SHOP},
    {CategoryId::CARPET_STORE, CategoryId::HOUSE_GARDEN},
    {CategoryId::CURTAIN_TEXTILE_STORE, CategoryId::HOUSE_GARDEN},
    {CategoryId::DIY_CENTER, CategoryId::HOUSE_GARDEN},
    {CategoryId::FURNITURE_AND_ACCESSORIES_STORE, CategoryId::HOUSE_GARDEN},
    {CategoryId::GARDENING_SERVICES, CategoryId::HOUSE_GARDEN},
    {CategoryId::KITCHEN_AND_SANITATION_STORE, CategoryId::HOUSE_GARDEN},
    {CategoryId::LIGHTING_STORE, CategoryId::HOUSE_GARDEN},
    {CategoryId::PAINTING_DECORATING_STORE, CategoryId::HOUSE_GARDEN},
    {CategoryId::GLASS_WINDOW_STORE, CategoryId::HOUSE_GARDEN},
    {CategoryId::FURNITURE_STORE, CategoryId::HOUSE_GARDEN},
    {CategoryId::POWER_EQUIPMENT_DEALER, CategoryId::HOUSE_GARDEN},
    {CategoryId::HOME_SPECIALTY_STORE, CategoryId::HOUSE_GARDEN},
    {CategoryId::LUMBER, CategoryId::HOUSE_GARDEN},
    {CategoryId::HUNTING_FISHING_SHOP, CategoryId::SHOP},
    {CategoryId::JEWELRY_WATCH_STORE, CategoryId::SHOP},
    {CategoryId::LAUNDRY, CategoryId::SHOP},
    {CategoryId::LOCAL_SPECIALTY_STORE, CategoryId::SHOP},
    {CategoryId::LOTTERY_SHOP, CategoryId::SHOP},
    {CategoryId::MAKEUP_AND_COSMETICS_STORE, CategoryId::SHOP},
    {CategoryId::MEDICAL_SUPPLIES_EQUIPMENT_STORE, CategoryId::SHOP},
    {CategoryId::MUSICAL_INSTRUMENT_STORE, CategoryId::SHOP},
    {CategoryId::NAIL_SALON, CategoryId::SHOP},
    {CategoryId::NEWSAGENTS_TOBACCONISTS, CategoryId::SHOP},
    {CategoryId::NON_STORE_RETAILERS, CategoryId::SHOP},
    {CategoryId::OFFICE_SUPPLIES_SERVICES, CategoryId::SHOP},
    {CategoryId::OPTICIANS, CategoryId::SHOP},
    {CategoryId::OUTLET, CategoryId::SHOP},
    {CategoryId::FACTORY_OUTLETS, CategoryId::OUTLET},
    {CategoryId::RETAIL_OUTLETS, CategoryId::OUTLET},
    {CategoryId::PAWN_SHOP, CategoryId::SHOP},
    {CategoryId::PET_STORE, CategoryId::SHOP},
    {CategoryId::ANIMAL_SERVICES, CategoryId::PET_STORE},
    {CategoryId::PET_SUPPLY_STORE, CategoryId::PET_STORE},
    {CategoryId::PHOTOCOPY_SHOP, CategoryId::SHOP},
    {CategoryId::PHOTOGRAPHY_STUDIO, CategoryId::SHOP},
    {CategoryId::REAL_ESTATE_AGENCY, CategoryId::SHOP},
    {CategoryId::RUNNING_WALKING_EQUIPMENT_STORE, CategoryId::SHOP},
    {CategoryId::SECOND_HAND_STORE, CategoryId::SHOP},
    {CategoryId::SECURITY_SUPPLIES_STORE, CategoryId::SHOP},
    {CategoryId::SHOPPING_SERVICE_CENTER, CategoryId::SHOP},
    {CategoryId::SKATE_SHOP, CategoryId::SHOP},
    {CategoryId::SKI_SHOP, CategoryId::SHOP},
    {CategoryId::SNOWBOARD_SHOP, CategoryId::SHOP},
    {CategoryId::SPECIALTY_STORE, CategoryId::SHOP},
    {CategoryId::SPORTS_STORE, CategoryId::SHOP},
    {CategoryId::STAMP_SHOP, CategoryId::SHOP},
    {CategoryId::SURF_SHOP, CategoryId::SHOP},
    {CategoryId::TACK_SHOP, CategoryId::SHOP},
    {CategoryId::TAILORS, CategoryId::SHOP},
    {CategoryId::TOY_STORE, CategoryId::SHOP},
    {CategoryId::TRAVEL_AGENCY, CategoryId::SHOP},
    {CategoryId::WAREHOUSE_SUPERMARKET, CategoryId::SHOP},
    {CategoryId::SHOPPING_CENTER, CategoryId::SHOPPING},
};

const QHash<CategoryId, CategoryId> sportFitnessHierarchy = {
    {CategoryId::SPORT_FITNESS, CategoryId::INVALID},
    {CategoryId::GOLF_COURSE, CategoryId::SPORT_FITNESS},
    {CategoryId::GOLF_DRIVING_RANGE, CategoryId::GOLF_COURSE},
    {CategoryId::ICE_SKATING_RINK, CategoryId::SPORT_FITNESS},
    {CategoryId::SPORTS_CENTER, CategoryId::SPORT_FITNESS},
    {CategoryId::BOWLING_ALLEY, CategoryId::SPORTS_CENTER},
    {CategoryId::FITNESS_CLUB_CENTER, CategoryId::SPORTS_CENTER},
    {CategoryId::HORSE_RIDING_STABLE, CategoryId::SPORTS_CENTER},
    {CategoryId::INDOOR_SPORTS, CategoryId::SPORTS_CENTER},
    {CategoryId::SHOOTING_RANGE, CategoryId::SPORTS_CENTER},
    {CategoryId::SPORTS_CENTER_LEVEL_3, CategoryId::SPORTS_CENTER},
    {CategoryId::SQUASH_COURT, CategoryId::SPORTS_CENTER},
    {CategoryId::THEMED_SPORTS_HALL, CategoryId::SPORTS_CENTER},
    {CategoryId::STADIUM, CategoryId::SPORT_FITNESS},
    {CategoryId::ATHLETICS_FIELD, CategoryId::STADIUM},
    {CategoryId::BADMINTON_COURT, CategoryId::STADIUM},
    {CategoryId::BASEBALL_FIELD, CategoryId::STADIUM},
    {CategoryId::BASKETBALL_COURT, CategoryId::STADIUM},
    {CategoryId::CRICKET_GROUND, CategoryId::STADIUM},
    {CategoryId::FOOTBALL_FIELD, CategoryId::STADIUM},
    {CategoryId::HOCKEY_FIELD, CategoryId::STADIUM},
    {CategoryId::HORSE_RACING_TRACK, CategoryId::STADIUM},
    {CategoryId::ICE_HOCKEY_RINK, CategoryId::STADIUM},
    {CategoryId::MOTORSPORT_VENUE, CategoryId::STADIUM},
    {CategoryId::MULTIPURPOSE_STADIUM, CategoryId::STADIUM},
    {CategoryId::NETBALL_COURT, CategoryId::STADIUM},
    {CategoryId::RACE_TRACK, CategoryId::STADIUM},
    {CategoryId::RUGBY_GROUND, CategoryId::STADIUM},
    {CategoryId::SOCCER_FIELD, CategoryId::STADIUM},
    {CategoryId::TABLE_TENNIS_HALL, CategoryId::STADIUM},
    {CategoryId::SWIMMING_POOL, CategoryId::SPORT_FITNESS},
    {CategoryId::TENNIS_COURT, CategoryId::SPORT_FITNESS},
    {CategoryId::WATER_SPORTS_CENTER, CategoryId::SPORT_FITNESS},
    {CategoryId::DIVING_CENTER, CategoryId::WATER_SPORTS_CENTER},
};

const QHash<CategoryId, CategoryId> tourismHierarchy = {
    {CategoryId::TOURISM, CategoryId::INVALID},
    {CategoryId::ADVENTURE_SPORTS_VENUE, CategoryId::TOURISM},
    {CategoryId::BEACH, CategoryId::TOURISM},
    {CategoryId::PRIVATE_BEACH, CategoryId::BEACH},
    {CategoryId::PUBLIC_BEACH, CategoryId::BEACH},
    {CategoryId::OBSERVATION_DECK, CategoryId::TOURISM},
    {CategoryId::PLACE_OF_WORSHIP, CategoryId::TOURISM},
    {CategoryId::ASHRAM, CategoryId::PLACE_OF_WORSHIP},
    {CategoryId::BUDDHIST_TEMPLE, CategoryId::PLACE_OF_WORSHIP},
    {CategoryId::CHURCH, CategoryId::PLACE_OF_WORSHIP},
    {CategoryId::DHARMA_TEMPLE, CategoryId::PLACE_OF_WORSHIP},
    {CategoryId::GURDWARA, CategoryId::PLACE_OF_WORSHIP},
    {CategoryId::HINDU_TEMPLE, CategoryId::PLACE_OF_WORSHIP},
    {CategoryId::JAIN_TEMPLE, CategoryId::PLACE_OF_WORSHIP},
    {CategoryId::MORMON_CHURCH, CategoryId::PLACE_OF_WORSHIP},
    {CategoryId::MOSQUE, CategoryId::PLACE_OF_WORSHIP},
    {CategoryId::PAGODA, CategoryId::PLACE_OF_WORSHIP},
    {CategoryId::SHINTO_SHRINE, CategoryId::PLACE_OF_WORSHIP},
    {CategoryId::SYNAGOGUE, CategoryId::PLACE_OF_WORSHIP},
    {CategoryId::TEMPLE, CategoryId::PLACE_OF_WORSHIP},
    {CategoryId::TOURIST_ATTRACTION, CategoryId::TOURISM},
    {CategoryId::ARCH, CategoryId::TOURIST_ATTRACTION},
    {CategoryId::BREWERY, CategoryId::TOURIST_ATTRACTION},
    {CategoryId::BRIDGE, CategoryId::TOURIST_ATTRACTION},
    {CategoryId::BUILDING, CategoryId::TOURIST_ATTRACTION},
    {CategoryId::DAM, CategoryId::TOURIST_ATTRACTION},
    {CategoryId::LANDMARK, CategoryId::TOURIST_ATTRACTION},
    {CategoryId::MAUSOLEUM_GRAVE, CategoryId::TOURIST_ATTRACTION},
    {CategoryId::MONUMENT, CategoryId::TOURIST_ATTRACTION},
    {CategoryId::NAMED_INTERSECTION_CHOWK, CategoryId::TOURIST_ATTRACTION},
    {CategoryId::NATURAL_ATTRACTION, CategoryId::TOURIST_ATTRACTION},
    {CategoryId::OBSERVATORY, CategoryId::TOURIST_ATTRACTION},
    {CategoryId::PLANETARIUM, CategoryId::TOURIST_ATTRACTION},
    {CategoryId::STATUE, CategoryId::TOURIST_ATTRACTION},
    {CategoryId::TOWER, CategoryId::TOURIST_ATTRACTION},
    {CategoryId::TUNNEL, CategoryId::TOURIST_ATTRACTION},
    {CategoryId::WATER_HOLE, CategoryId::TOURIST_ATTRACTION},
    {CategoryId::TOURIST_INFORMATION_OFFICE, CategoryId::TOURISM }
};

const QHash<CategoryId, CategoryId> transportHierarchy = {
    {CategoryId::TRANSPORT, CategoryId::INVALID},
    {CategoryId::ACCESS_GATEWAY, CategoryId::TRANSPORT},
    {CategoryId::AIRLINE_ACCESS, CategoryId::ACCESS_GATEWAY},
    {CategoryId::CHECKPOINT, CategoryId::ACCESS_GATEWAY},
    {CategoryId::DELIVERY_ENTRANCE, CategoryId::ACCESS_GATEWAY},
    {CategoryId::ENTRANCE_EXIT, CategoryId::ACCESS_GATEWAY},
    {CategoryId::HIGHWAY_ENTRANCE, CategoryId::ACCESS_GATEWAY},
    {CategoryId::HIGHWAY_EXIT, CategoryId::ACCESS_GATEWAY},
    {CategoryId::SECURITY_GATE, CategoryId::ACCESS_GATEWAY},
    {CategoryId::STATION_ACCESS, CategoryId::ACCESS_GATEWAY},
    {CategoryId::AIRPORT, CategoryId::TRANSPORT},
    {CategoryId::AIRFIELD, CategoryId::AIRPORT},
    {CategoryId::AIRPORT_TERMINAL, CategoryId::AIRPORT},
    {CategoryId::MILITARY_AUTHORITY, CategoryId::AIRPORT},
    {CategoryId::PRIVATE_AUTHORITY, CategoryId::AIRPORT},
    {CategoryId::PUBLIC_AUTHORITY, CategoryId::AIRPORT},
    {CategoryId::PUBLIC_SPORTS_AIRPORT, CategoryId::AIRPORT},
    {CategoryId::BORDER_POST, CategoryId::TRANSPORT},
    {CategoryId::FERRY_TERMINAL, CategoryId::TRANSPORT},
    {CategoryId::DOCK, CategoryId::FERRY_TERMINAL},
    {CategoryId::FERRY, CategoryId::FERRY_TERMINAL},
    {CategoryId::TRAIN_FERRY, CategoryId::FERRY_TERMINAL},
    {CategoryId::WATER_TRANSIT, CategoryId::FERRY_TERMINAL},
    {CategoryId::HELIPAD, CategoryId::TRANSPORT},
    {CategoryId::INTERSECTION, CategoryId::TRANSPORT},
    {CategoryId::MOUNTAIN_PASS, CategoryId::TRANSPORT},
    {CategoryId::PORT_WAREHOUSE, CategoryId::TRANSPORT},
    {CategoryId::PUBLIC_TRANSPORT_STOP, CategoryId::TRANSPORT},
    {CategoryId::AERIAL_LIFT, CategoryId::PUBLIC_TRANSPORT_STOP},
    {CategoryId::AERIAL_TRAMWAY, CategoryId::PUBLIC_TRANSPORT_STOP},
    {CategoryId::BUS_RAPID_TRANSIT, CategoryId::PUBLIC_TRANSPORT_STOP},
    {CategoryId::BUS_STATION, CategoryId::PUBLIC_TRANSPORT_STOP},
    {CategoryId::CABLE_TRAM, CategoryId::PUBLIC_TRANSPORT_STOP},
    {CategoryId::COACH_STATION, CategoryId::PUBLIC_TRANSPORT_STOP},
    {CategoryId::FUNICULAR, CategoryId::PUBLIC_TRANSPORT_STOP},
    {CategoryId::LOCAL_TRANSIT, CategoryId::PUBLIC_TRANSPORT_STOP},
    {CategoryId::PUBLIC_TRANSIT_ACCESS, CategoryId::PUBLIC_TRANSPORT_STOP},
    {CategoryId::TAXI_STAND, CategoryId::PUBLIC_TRANSPORT_STOP},
    {CategoryId::TOLL_GATE, CategoryId::PUBLIC_TRANSPORT_STOP},
    {CategoryId::TRAM_STOP, CategoryId::PUBLIC_TRANSPORT_STOP},
    {CategoryId::TRANSPORTATION_SERVICE, CategoryId::PUBLIC_TRANSPORT_STOP},
    {CategoryId::RAILWAY_STATION, CategoryId::TRANSPORT},
    {CategoryId::GENERIC_NODE, CategoryId::RAILWAY_STATION},
    {CategoryId::INCLINED_RAIL, CategoryId::RAILWAY_STATION},
    {CategoryId::INTERCITY_RAILWAY_STATION, CategoryId::RAILWAY_STATION},
    {CategoryId::INTERNATIONAL_RAILWAY_STATION, CategoryId::RAILWAY_STATION},
    {CategoryId::LIGHT_RAIL, CategoryId::RAILWAY_STATION},
    {CategoryId::MONORAIL, CategoryId::RAILWAY_STATION},
    {CategoryId::NATIONAL_RAILWAY_STATION, CategoryId::RAILWAY_STATION},
    {CategoryId::RAILWAY_SIDING, CategoryId::RAILWAY_STATION},
    {CategoryId::SUBWAY, CategoryId::RAILWAY_STATION},
    {CategoryId::REST_AREA, CategoryId::TRANSPORT},
    {CategoryId::COMPLETE_REST_AREA, CategoryId::REST_AREA},
    {CategoryId::MOTORWAY_SERVICE_REST_AREA, CategoryId::REST_AREA},
    {CategoryId::REST_AREA_PARKING_AND_RESTROOM_ONLY, CategoryId::REST_AREA},
    {CategoryId::REST_AREA_PARKING_ONLY, CategoryId::REST_AREA},
    {CategoryId::SCENIC_OVERLOOK_REST_AREA, CategoryId::REST_AREA},
    {CategoryId::TRAFFIC, CategoryId::TRANSPORT},
    {CategoryId::TRAFFIC_SIGNAL, CategoryId::TRAFFIC},
    {CategoryId::TRAFFIC_LIGHT, CategoryId::TRAFFIC_SIGNAL},
    {CategoryId::TRAFFIC_SIGN, CategoryId::TRAFFIC},
    {CategoryId::TRANSPORT_CENTER, CategoryId::TRANSPORT},
    {CategoryId::CARGO_CENTER, CategoryId::TRANSPORT_CENTER},
    {CategoryId::AIRPORT_CARGO, CategoryId::CARGO_CENTER},
    {CategoryId::CARGO_TRANSPORTATION, CategoryId::CARGO_CENTER},
    {CategoryId::COURIERS, CategoryId::CARGO_CENTER},
    {CategoryId::LOADING_DOCK, CategoryId::CARGO_CENTER},
    {CategoryId::LOADING_ZONE, CategoryId::CARGO_CENTER},
    {CategoryId::RAIL_YARD, CategoryId::CARGO_CENTER},
};

const QHash<CategoryId, CategoryId> othersHierarchy = {
    {CategoryId::ADDRESS, CategoryId::INVALID},
    {CategoryId::ADMINISTRATIVE_AREA_LEVEL_1, CategoryId::INVALID},
    {CategoryId::ADMINISTRATIVE_AREA_LEVEL_2, CategoryId::INVALID},
    {CategoryId::ADMINISTRATIVE_AREA_LEVEL_3, CategoryId::INVALID},
    {CategoryId::ADMINISTRATIVE_AREA_LEVEL_4, CategoryId::INVALID},
    {CategoryId::ADMINISTRATIVE_AREA_LEVEL_5, CategoryId::INVALID},
    {CategoryId::CITIES, CategoryId::INVALID},
    {CategoryId::COMMERCIAL_DISTRICT, CategoryId::INVALID},
    {CategoryId::ESTABLISHMENT, CategoryId::INVALID},
    {CategoryId::GEOCODE, CategoryId::INVALID},
    {CategoryId::MAP_CONNECT, CategoryId::INVALID},
    {CategoryId::REGIONS, CategoryId::INVALID},
};

const QList<QHash<CategoryId, CategoryId>> allParentChildHierarchies = {
    automotiveHierarchy,
    businessHierarchy,
    eatingDrinkingHierarchy,
    governmentPublicServiceHierarchy,
    healthCareHierarchy,
    leisureHierarchy,
    accommodationHierarchy,
    miscellaneousHierarchy,
    shoppingHierarchy,
    sportFitnessHierarchy,
    tourismHierarchy,
    transportHierarchy,
    othersHierarchy
};

QString getCategoryIdName(CategoryId categoryId)
{
    return QString::fromLatin1(QMetaEnum::fromType<CategoryId>().valueToKey(static_cast<int>(categoryId)));
}

CategoryId tryGetCategoryId(const QString &categoryName)
{
    bool ok;
    auto categoryId =
        QMetaEnum::fromType<CategoryId>().keyToValue(
            categoryName.toLatin1().constData(), &ok);
    return ok ? static_cast<CategoryId>(categoryId) : CategoryId::INVALID;
}

}

namespace QPoiCategoryOhosMapKit {

QString tryGetParentCategoryIdOrEmpty(const QString &categoryId)
{
    auto enumCategoryId = OhosPoiInternal::tryGetCategoryId(categoryId);
    if (enumCategoryId == OhosPoiInternal::CategoryId::INVALID)
        return QString();

    OhosPoiInternal::CategoryId parentId = OhosPoiInternal::CategoryId::INVALID;

    for (const auto &parentChildHierarchy : OhosPoiInternal::allParentChildHierarchies)
        if (parentChildHierarchy.contains(enumCategoryId))
            parentId = parentChildHierarchy.value(enumCategoryId);

    return parentId != OhosPoiInternal::CategoryId::INVALID
        ? OhosPoiInternal::getCategoryIdName(parentId)
        : QString();
}

QStringList tryGetChildCategoryIdsOrEmpty(const QString &categoryId)
{
    auto enumCategoryId = OhosPoiInternal::tryGetCategoryId(categoryId);
    if (enumCategoryId == OhosPoiInternal::CategoryId::INVALID)
        return QStringList();

    QStringList childCategoryIds;

    for (const auto &parentChildHierarchy : OhosPoiInternal::allParentChildHierarchies) {
        if (parentChildHierarchy.contains(enumCategoryId)) {
            for (auto it = parentChildHierarchy.begin(); it != parentChildHierarchy.end(); ++it)
                if (it.value() == enumCategoryId)
                    childCategoryIds.push_back(OhosPoiInternal::getCategoryIdName(it.key()));
            break;
        }
    }

    return childCategoryIds;
}

}

#include "qpoicategoryohosmapkit.moc"
