//package com.example.osm; import java.util.HashMap; import java.util.Map; public class Tag { // static Key[] keys; // 通し番号から Key を得る //static Val[] vals; /* static { keys = new Key[Key.values().length]; for (Key k : Key.values()) { // mapKeys.put(k.name(), k.ordinal()); // keys[k.ordinal()] = k; } vals = new Val[Val.values().length]; for (Val v : Val.values()) { // mapVals.put(v.name(), v.ordinal()); // vals[v.ordinal()] = v; } } */ public 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, // sub tags bridge, tunnel, intermittent, area, oneway, // 30 service, tower_type, tracktype, information, covered, access, parking, junction, religion, sport, // 40 playground, substance, construction, surface, pipeline, location, generator_source, power_source, basin, type, // 50 // special tags name, name_ja, name_en, bridge_name, tunnel_name, local_ref, operator, ref, // string tag, 58 admin_level, layer, population, // int tag, 61 ele, height, width, // float tag // pseudo tags 疑似キー(OSMレコードにはない) leisure_sport, placename_flags, } public 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, //============ 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, //=============== 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, //============ 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, 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, //============== 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, } static String[] prefixs = { "東京都立", "神奈川県立", "町田市立", "横浜市立", "国立", "都立", "道立", "府立", "県立", "市立", "町立", "村立", "区立", }; static String[] suffixs = { "小学校", "中学校", "高等学校", "高校", "学園", "学院", "児童公園", "第一公園", "第二公園", "第三公園", "第四公園", "第五公園", "第六公園", "動物病院", "内科病院", "外科病院", "総合病院", "病院", "ホスピタル", "内科医院", "内科クリニック", "内科", "整形外科", "外科", "皮膚科", "耳鼻科", "歯科クリニック", "デンタルクリニック", "デンタル・クリニック", "歯科", "クリニック", "一丁目", "二丁目", "三丁目", "四丁目", "五丁目", "六丁目", "七丁目", "八丁目", "九丁目", "十丁目", "丁目", }; } /** public class Tag { public static Key[] keys; // 通し番号から Key を得る public static Val[] vals; public static Map mapKeys = new HashMap<>(); public static Map mapVals = new HashMap<>(); static { keys = new Key[Key.values().length]; for (Key k : Key.values()) { mapKeys.put(k.name(), k.ordinal()); keys[k.ordinal()] = k; } vals = new Val[Val.values().length]; for (Val v : Val.values()) { mapVals.put(v.name(), v.ordinal()); vals[v.ordinal()] = v; } } public enum Key { unknown, aerialway, aeroway, amenity, barrier, boundary, building, highway, landuse, leisure, man_made, natural, power, railway, route, shop, tourism, water, waterway, place, historic, office, emergency, wetland, military, bridge, tunnel, intermittent, area, oneway, service, tower_type, tracktype, information, covered, access, parking, junction, religion, sport, playground, substance, construction, surface, pipeline, location, generator_source, power_source, type, name, bridge_name, tunnel_name, local_ref, operator, ref, // string tag admin_level, layer, population, // int tag ele, height, width, // float tag leisure_sport, // 疑似キー(OSMレコードにはない) } public 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, //============ 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, //=============== boundary =============// administrative, historic, political, //=========== 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, //============ 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, //============ 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, //============== 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_communication, tower_observation, } } **/