import java.util.*; enum Key { // main tags unknown, aerialway, aeroway, amenity, barrier, boundary, building, highway, landuse, leisure, // 10 man_made, natural, power, railway, route, shop, tourism, water, waterway, place, // 20 historic, office, emergency, wetland, military, endCodeKey, // special tags name, name_ja, name_en, bridge_name, tunnel_name, local_ref, operator, ref, s_admin_level, s_layer, s_population, s_ele, s_height, s_width, endStrKey, // string tag admin_level, layer, population, endIntKey, // int tag, ele, height, width, endFloatKey, // float tag // sub tags bridge, tunnel, intermittent, area, oneway, // service, tower_type, tracktype, information, covered, access, parking, junction, religion, sport, // playground, substance, construction, surface, pipeline, location, generator_source, plant_source, power_source, basin, type, endKey, // // pseudo tags 疑似キー(本来のOSMレコードにはない) leisure_sport, placename_flags, bus_timetable, bus_route } enum Val { //========= fixed position ========================// // highway unknown, motorway, motorway_link, trunk, trunk_link, primary, primary_link, secondary, secondary_link, tertiary, tertiary_link, raceway, residential, unclassified, living_street, road, service, service_alley, pedestrian, pedestrian_wide, pedestrian_alley, track1, track2, track, path, footway, cycleway, bridleway, steps, platform, construction, // railway rail, subway, narrow_gauge, light_rail, funicular, preserved, monorail, miniature, turntable, tram, disused, // aeroway runway, taxiway, //================== common (free position) ===============// yes, no, error, //============ access ==========// customers, _private, permissive, destination, agricultural, permit, designated, emergency, discouraged, //============ aerialway ==========// rope_tow, cable_car, gondola, goods, chair_lift, //============ aeroway ==========// helipad, holding_position, apron, aerodrome, hangar, //============ amenity ==========// restaurant, place_of_worship, university, college, school, kindergarten, driving_school, music_school, languge_school, prep_school, preschool, hospital, police, post_office, post_box, parking, parking_space, social_facility, clinic, doctors, dentist, veterinary, pharmacy, atm, bank, bar, bench, bicycle_parking, bicycle_repair_station, biergarten, boat_rental, bureau_de_change, bus_station, car_rental, car_wash, casino, charging_station, car_pooling, car_sharing, community_centre, courthouse, dinking_water, embassy, emergency_phone, ferry_terminal, fuel, fire_station, fountain, hunting_stand, karaoke, karaoke_box, library, marketplace, motorcycle_parking, nightclub, nursing_home, shelter, table, theatre, toilets, drinking_water, cafe, fast_food, food_court, taxi, telephone, vending_machine, waste_basket, waste_disposal, public_bath, grave_yard, prison, pub, photo_booth, religion, recycling, rental_bicycle, bicycle_rental, shower, alpine_hat, townhall, town_hall, vehicle_inspection, torii, public_building, street_lamp, temple, parking_entrance, crematorium, smoking_area, waste_transfer_station, dojo, planetarium, animal_shelter, childcare, ticket_validator, arts_centre, bell, training, exhibition_centre, events_venue, coworking_space, brothel, luggage_locker, baby_care, social_centre, //============== barrier =============// retaining_wall, hedge, fence, wall, gate, lift_gate, block, cycle_barrier, turnstile, chain, bollard, toll_booth, kerb, entrance, swing_gate, handrail, guard_rail, rope, //================ basin ================// detention, retention, stormwater, //=============== boundary =============// administrative, historic, political, protected_area, //=========== bridge ==========// boardwalk, viaduct, //=============== building =============// house, apartments, greenhouse, roof, detached, container, garage, warehouse, train_station, chapel, carport, semidetached_house, shrine, shed, _public, grandstand, civic, dormitory, cabin, stable, hut, church, terrace, transportation, //================= covered ==============// booth, //================= emergency ==============// aed, assembly_point, defibrillator, fire_hydrant, phone, //============ highway ==========// bus_stop, crossing, traffic_signals, proposed, elevator, motorway_junction, emergency_bay, stop, rest_area, turning_circle, services, milestone, traffic_mirror, passing_place, toll_gantry, //============ historic ==============// wayside_shrine, memorial, boundary_stone, tomb, monument, archaeological_site, castle, ruins, manor, //============ information ==========// map, board, guidepost, office, terminal, //============= junction =============// roundabout, separate, priority, circular, //============ landuse ==========// forest, grass, reservoir, basin, farmland, farmyard, industrial, allotments, grassland, retail, meadow, commercial, railway, brownfield, orchard, vineyard, cemetery, military, quarry, recreation_ground, religious, barracks, greenhouse_horticulture, garages, winter_sports, flowerbed, landfill, village_green, greenfield, logistics, //============ leisure ==========// park, pitch, adult_gaming_centre, gambling, amusement_arcade, bird_hide, dog_park, playground, picnic_table, picnic_site, camp_site, slipway, game_centre, bbq, swimming_pool, golf_course, miniature_golf, bowling_alley, fishing, fitness, fitness_centre, fitness_station, stadium, garden, sports_centre, sports_hall, ice_rink, ice_skating, ice_hockey, karting, pachinko, multi, bandstand, sauna, dance, water_park, beach_resort, common, //============== location ================// underground, overground, overhead, underwater, //============ man_made ==========// bridge, wastewater_plant, water_works, works, embankment, pipeline, communications_tower, pier, water_tap, chimney, lighthouse, reservoir_covered, storage_tank, gasometer, silo, survey_point, watermill, street_cabinet, surveillance, water_well, mast, flagpole, tank, water_tower, pumping_station, advertising, manhole, //============ military ==========// airfield, //============ natural ==========// wood, water, tree, scrub, cliff, heath, tree_row, peak, saddle, volcano, stone, spring, sea, bay, cape, beach, waterfall, nature_reserve, valley, hot_spring, wetland, national_park, sand, bare_rock, rock, scree, land, // land は非推奨 //============ office ==========// company, research, architect, government, insurance, coworking, lawyer, tax_advisor, educational_institution, telecommunication, union, publisher, financial, employment_agency, //============ parking ==========// surface, multi_storey, street_side, rooftop, //============ place ==========// state, province, capital, city, county, suburb, town, village, square, hamlet, city_block, locality, peninsula, island, islet, archipelago, quarter, neighbourhood, //============ playground ==========// slide, horizontal_bar, swing, structure, zipwire, climbingframe, springy, seesaw, sandpit, cushion, //============ power ==========// substation, line, pole, generator, plant, coal, gas, oil, diesel, waste, wind, solar, hydro, nuclear, generator_solar, generator_wind, generator_hydro, generator_water, generator_gas, generator_nuclear, generator_coal, tower, //============ railway ==========// station, buffer_stop, _switch, level_crossing, subway_entrance, abandoned, derail, junction, halt, //============ religion ==========// buddhist, christian, hinduist, jewish, muslim, shinto, shintoist, sikhist, taoist, spiritualist, //============ route ==============// bus, ferry, // 2022.5.4 //============ service ==========// alley, driveway, parking_aisle, yard, spur, siding, drive_through, crossover, //================= shop =================// convenience, mall, department_store, supermarket, variety_store, alcohol, antiques, appliance, art, bag, bakery, beauty, bed, beverages, bicycle, books, food, garden_furniture, butcher, camera, car, car_repair, car_parts, charity, chemist, clock, clothes, computer, electrical, confectionery, copyshop, dairy, deli, diy, doityourself, dry_cleaning, electronics, fashion, farm, florist, funeral_directors, furniture, garden_centre, general, gift, greengrocer, hardware, hairdresser, hanko, hifi, houseware, ice_cream, interior_decoration, jewelry, kiosk, laundry, medical_supply, mobile_phone, massage, motorcycle, musical_instrument, newsagent, optician, tobacco, outdoor, paint, pastry, perfumery, pet, photo, photo_studio, seafood, second_hand, sewing, shoes, sports, stationery, storage_rental, tailor, tea, ticket, toys, trade, travel_agency, tyres, video, video_games, internet_cafe, craft, studio, music, cinema, hobby, lottery, newspaper, estate_agent, cosmetic, coffee, rice, fabric, region, watches, frozen_food, pawnbroker, pawnshop, baby_goods, locksmith, model, money_lender, pet_grooming, cosmetics, water_sports, scuba_diving, surf, spices, curtain, nutrition_supplements, household, leather, grocery, exterior, kitchen, //============= sport ================// archery, baseball, golf, tennis, football, soccer, rugby, badminton, basketball, cycling, swimming, skiing, _10pin, gateball, bowls, karate, softball, beachvolleyball, athletics, running, climbing, volleyball, american_football, rugby_union, handball, yoga, //========== surface ===============// paved, asphalt, concrete, unpaved, //============= tourism ==============// theme_park, zoo, attraction, information, hotel, hostel, motel, apartment, guest_house, viewpoint, museum, artwork, alpine_hut, love_hotel, aquarium, chalet, //============== tower_type ==============// communication, cooling, defensive, lighting, observation, //============== tracktype ==============// grade1, grade2, grade3, grade4, grade5, //============== tunnel ==============// culvert, building_passage, covered, //============== type ==============// multipolygon, boundary, route, //============ water, waterway ==========// river, stream, ditch, riverbank, dam, weir, lake, pond, canal, derelict_canal, wadi, pressurised, drain, aqueduct, breakwater, foundation, //============ wetland ==========// bog, mangrove, marsh, reed, reedbed, saltmarsh, swamp, tidalflat, wet_meadow, fen, //=========== 変換 ===========// minus1, // oneway=-1 を oneway=minus1 とする //============ 疑似バリュー(OSMレコードにはない) ==========// bus_stop_small, shop_yes_small, tower_small, tower_communications, tower_observation, tower_lighting, mast_communications, mast_lighting, bus_stop_red, leaftype_unknown, grave_yard_generic, intermittent_water, danger_red_hatch, station_small, } public class Tag { static Key[] keys = Key.values(); // 通し番号から Key を得る static Val[] vals = Val.values(); static HashSet setKeys = new HashSet<>(); static HashSet setVals = new HashSet<>(); static { // 2022.6.9 for (Key k : keys) { setKeys.add(k.name()); } for (Val v : vals) { setVals.add(v.name()); } } static void printAllTags() { for (Key key : keys) { System.out.printf("%d: %s\n", key.ordinal(), key.name()); } for (Val val : vals) { System.out.printf("%d: %s\n", val.ordinal(), val.name()); } } }