From 3089398826624693ace0f0c6fa8a99aeb9102955 Mon Sep 17 00:00:00 2001 From: ToastHawaii Date: Sun, 7 Jul 2024 11:48:33 +0200 Subject: [PATCH] add taginfo --- docs/taginfo.json | 237 +++++++++++++++++++++ public/taginfo.json | 237 +++++++++++++++++++++ src/osm-app-component/utilities/taginfo.ts | 15 ++ 3 files changed, 489 insertions(+) create mode 100644 docs/taginfo.json create mode 100644 public/taginfo.json create mode 100644 src/osm-app-component/utilities/taginfo.ts diff --git a/docs/taginfo.json b/docs/taginfo.json new file mode 100644 index 0000000..dc7f56d --- /dev/null +++ b/docs/taginfo.json @@ -0,0 +1,237 @@ +{ + "data_format": 1, + "project": { + "name": "Priceless map", + "description": "Experience the world. Free of charge.", + "project_url": "https://priceless.zottelig.ch/", + "doc_url": "https://github.com/ToastHawaii/priceless-map", + "icon_url": "https://priceless.zottelig.ch/icons/favicon.ico", + "contact_name": "Markus", + "contact_email": "info@zottelig.ch" + }, + "tags": [ + [ + { "key": "tourism", "value": "artwork" }, + { "key": "amenity", "value": "fountain" }, + { "key": "playground", "value": "splash_pad" }, + { "key": "tourism", "value": "attraction" }, + { "key": "tourism" }, + { "key": "heritage" }, + { "key": "historic", "value": "archaeological_site" }, + { "key": "geological", "value": "palaeontological_site" }, + { "key": "educational", "value": "yes" }, + { "key": "route", "value": "educational_trail" }, + { "key": "board_type", "value": "wildlife" }, + { "key": "board_type", "value": "plants" }, + { "key": "board_type", "value": "geology" }, + { "key": "board_type", "value": "nature" }, + { "key": "board_type", "value": "planet_walk" }, + { "key": "board_type", "value": "astronomy" }, + { "key": "board_type", "value": "forestry" }, + { "key": "board_type", "value": "botany" }, + { "key": "board_type", "value": "biology" }, + { "key": "board_type", "value": "birds" }, + { "key": "board_type", "value": "tree" }, + { "key": "board_type", "value": "panorama" }, + { "key": "board_type", "value": "science" }, + { "key": "board_type", "value": "technology" }, + { "key": "amenity", "value": "public_bookcase" }, + { "key": "amenity", "value": "library" }, + { "key": "internet_access" }, + { "key": "wifi" }, + { "key": "historic", "value": "castle" }, + { "key": "historic", "value": "tower" }, + { "key": "historic", "value": "fort" }, + { "key": "man_made", "value": "watermill" }, + { "key": "man_made", "value": "windmill" }, + { "key": "historic" }, + { "key": "board_type", "value": "history" }, + { "key": "historic", "value": "memorial" }, + { "key": "historic", "value": "monument" }, + { "key": "tourism", "value": "museum" }, + { "key": "tourism", "value": "gallery" }, + { "key": "amenity", "value": "arts_centre" }, + { "key": "man_made", "value": "observatory" }, + { "key": "historic", "value": "ruins" }, + { "key": "building", "value": "ruins" }, + { "key": "ruins" }, + { "key": "natural", "value": "cave_entrance" }, + { "key": "denotation", "value": "natural_monument" }, + { "key": "denotation", "value": "landmark" }, + { "key": "natural", "value": "water" }, + { "key": "water", "value": "pond" }, + { "key": "water", "value": "lake" }, + { "key": "water", "value": "reservoir" }, + { "key": "water", "value": "reflecting_pool" }, + { "key": "natural", "value": "rock" }, + { "key": "natural", "value": "stone" }, + { "key": "tourism", "value": "viewpoint" }, + { "key": "viewpoint" }, + { "key": "tower:type", "value": "observation" }, + { "key": "waterway", "value": "waterfall" }, + { "key": "waterway", "value": "dam" }, + { "key": "waterway", "value": "weir" }, + { "key": "natural", "value": "spring" }, + { "key": "social_facility", "value": "outreach" }, + { "key": "amenity", "value": "social_centre" }, + { "key": "healthcare" }, + { "key": "social_facility" }, + { "key": "repair", "value": "assisted_self_service" }, + { "key": "leisure", "value": "hackerspace" }, + { "key": "repair" }, + { "key": "amenity", "value": "bbq" }, + { "key": "bbq" }, + { "key": "amenity", "value": "baking_oven" }, + { "key": "building", "value": "bakehouse" }, + { "key": "amenity", "value": "bicycle_rental" }, + { "key": "amenity", "value": "bicycle_library" }, + { "key": "amenity", "value": "bicycle_repair_station" }, + { "key": "service:bicycle:repair" }, + { "key": "bicycle:repair" }, + { "key": "service:bicycle:diy" }, + { "key": "amenity", "value": "charging_station" }, + { "key": "amenity", "value": "community_centre" }, + { "key": "garden:type", "value": "community" }, + { "key": "landuse", "value": "community_food_growing" }, + { "key": "changing_table" }, + { "key": "amenity", "value": "kneipp_water_cure" }, + { "key": "amenity", "value": "drinking_water" }, + { "key": "drinking_water" }, + { "key": "amenity", "value": "water_point" }, + { "key": "drinking_water:refill" }, + { "key": "emergency", "value": "defibrillator" }, + { "key": "amenity", "value": "food_sharing" }, + { "key": "social_facility", "value": "food_bank" }, + { "key": "social_facility", "value": "soup_kitchen" }, + { "key": "social_facility", "value": "dairy_kitchen" }, + { "key": "amenity", "value": "give_box" }, + { "key": "amenity", "value": "freeshop" }, + { "key": "shop", "value": "charity" }, + { "key": "shop", "value": "second_hand" }, + { "key": "amenity", "value": "toy_library" }, + { "key": "club", "value": "doityourself" }, + { "key": "office", "value": "charity" }, + { "key": "charity", "value": "yes" }, + { "key": "operator:type", "value": "private_non_profit" }, + { "key": "operator:type", "value": "charitable" }, + { "key": "operator:type", "value": "community" }, + { "key": "office", "value": "ngo" }, + { "key": "operator:type", "value": "ngo" }, + { "key": "office", "value": "foundation" }, + { "key": "office", "value": "association" }, + { "key": "healthcare", "value": "blood_donation" }, + { "key": "amenity", "value": "coworking_space" }, + { "key": "office", "value": "coworking" }, + { "key": "amenity", "value": "shower" }, + { "key": "amenity", "value": "compressed_air" }, + { "key": "compressed_air" }, + { "key": "service:bicycle:pump" }, + { "key": "amenity", "value": "toilets" }, + { "key": "building", "value": "toilets" }, + { "key": "toilets" }, + { "key": "leisure", "value": "pitch" }, + { "key": "sport", "value": "basketball" }, + { "key": "sport", "value": "multi" }, + { "key": "sport", "value": "swimming" }, + { "key": "amenity", "value": "public_bath" }, + { "key": "leisure", "value": "water_park" }, + { "key": "leisure", "value": "swimming_pool" }, + { "key": "leisure", "value": "swimming_area" }, + { "key": "leisure", "value": "paddling_pool" }, + { "key": "sport", "value": "bmx" }, + { "key": "sport", "value": "cycling" }, + { "key": "sport", "value": "skateboard" }, + { "key": "sport", "value": "chess" }, + { "key": "sport", "value": "climbing" }, + { "key": "playground", "value": "climbingwall" }, + { "key": "sport", "value": "boules" }, + { "key": "sport", "value": "bowls" }, + { "key": "leisure", "value": "fitness_station" }, + { "key": "sport" }, + { "key": "playground" }, + { "key": "sport", "value": "toboggan" }, + { "key": "piste:type", "value": "sled" }, + { "key": "playground", "value": "sledding" }, + { "key": "route", "value": "fitness_trail" }, + { "key": "sport", "value": "running" }, + { "key": "sport", "value": "athletics" }, + { "key": "sport", "value": "soccer" }, + { "key": "sport", "value": "table_tennis" }, + { "key": "sport", "value": "table_soccer" }, + { "key": "sport", "value": "volleyball" }, + { "key": "sport", "value": "beachvolleyball" }, + { "key": "tourism", "value": "zoo" }, + { "key": "attraction", "value": "animal" }, + { "key": "tourism", "value": "aquarium" }, + { "key": "man_made", "value": "beehive" }, + { "key": "landuse", "value": "apiary" }, + { "key": "landuse", "value": "animal_keeping" }, + { "key": "landuse", "value": "meadow" }, + { "key": "landuse", "value": "farmyard" }, + { "key": "leisure", "value": "bird_hide" }, + { "key": "leisure", "value": "wildlife_hide" }, + { "key": "observation", "value": "wild_animal" }, + { "key": "man_made", "value": "nesting_site" }, + { "key": "man_made", "value": "insect_hotel" }, + { "key": "natural", "value": "anthill" }, + { "key": "natural", "value": "termite_mound" }, + { "key": "attraction", "value": "maze" }, + { "key": "man_made", "value": "surveillance" }, + { "key": "amenity", "value": "piano" }, + { "key": "musical_instrument", "value": "piano" }, + { "key": "musical_instrument:piano" }, + { "key": "man_made", "value": "advertising" }, + { "key": "board_type", "value": "notice" }, + { "key": "leisure", "value": "firepit" }, + { "key": "fireplace" }, + { "key": "openfire" }, + { "key": "information", "value": "map" }, + { "key": "leisure", "value": "garden" }, + { "key": "leisure", "value": "nature_reserve" }, + { "key": "boundary", "value": "national_park" }, + { "key": "boundary", "value": "protected_area" }, + { "key": "leisure", "value": "park" }, + { "key": "landuse", "value": "recreation_ground" }, + { "key": "recycling:batteries", "value": "yes" }, + { "key": "recycling:car_batteries", "value": "yes" }, + { "key": "vending", "value": "bottle_return" }, + { "key": "recycling:cooking_oil", "value": "yes" }, + { "key": "recycling:engine_oil", "value": "yes" }, + { "key": "recycling:oil", "value": "yes" }, + { "key": "recycling:waste_oil", "value": "yes" }, + { "key": "recycling:hazardous_waste", "value": "yes" }, + { "key": "recycling:hydrargyrum", "value": "yes" }, + { "key": "recycling:paint", "value": "yes" }, + { "key": "recycling:hardcore", "value": "yes" }, + { "key": "recycling:rubble", "value": "yes" }, + { "key": "recycling:plastic", "value": "yes" }, + { "key": "recycling:plastic_bottles", "value": "yes" }, + { "key": "recycling:plastic_packaging", "value": "yes" }, + { "key": "recycling:PET", "value": "yes" }, + { "key": "recycling:plastic_bags", "value": "yes" }, + { "key": "recycling:polystyrene_foam", "value": "yes" }, + { "key": "recycling:polyester", "value": "yes" }, + { "key": "recycling:styrofoam", "value": "yes" }, + { "key": "recycling:foil", "value": "yes" }, + { "key": "tourism", "value": "picnic_site" }, + { "key": "leisure", "value": "picnic_table" }, + { "key": "shelter_type", "value": "picnic_shelter" }, + { "key": "place", "value": "square" }, + { "key": "leisure", "value": "common" }, + { "key": "highway", "value": "pedestrian" }, + { "key": "highway", "value": "footway" }, + { "key": "leisure", "value": "playground" }, + { "key": "amenity", "value": "lounger" }, + { "key": "amenity", "value": "hammock" }, + { "key": "amenity", "value": "recycling" }, + { "key": "recycling:clothes", "value": "yes" }, + { "key": "recycling:shoes", "value": "yes" }, + { "key": "social_facility", "value": "clothing_bank" }, + { "key": "recycling:mobile_phones", "value": "yes" }, + { "key": "amenity", "value": "device_charging_station" }, + { "key": "recycling:toys", "value": "yes" }, + { "key": "recycling:furniture", "value": "yes" }, + { "key": "recycling:wood", "value": "yes" } + ] + ] +} diff --git a/public/taginfo.json b/public/taginfo.json new file mode 100644 index 0000000..dc7f56d --- /dev/null +++ b/public/taginfo.json @@ -0,0 +1,237 @@ +{ + "data_format": 1, + "project": { + "name": "Priceless map", + "description": "Experience the world. Free of charge.", + "project_url": "https://priceless.zottelig.ch/", + "doc_url": "https://github.com/ToastHawaii/priceless-map", + "icon_url": "https://priceless.zottelig.ch/icons/favicon.ico", + "contact_name": "Markus", + "contact_email": "info@zottelig.ch" + }, + "tags": [ + [ + { "key": "tourism", "value": "artwork" }, + { "key": "amenity", "value": "fountain" }, + { "key": "playground", "value": "splash_pad" }, + { "key": "tourism", "value": "attraction" }, + { "key": "tourism" }, + { "key": "heritage" }, + { "key": "historic", "value": "archaeological_site" }, + { "key": "geological", "value": "palaeontological_site" }, + { "key": "educational", "value": "yes" }, + { "key": "route", "value": "educational_trail" }, + { "key": "board_type", "value": "wildlife" }, + { "key": "board_type", "value": "plants" }, + { "key": "board_type", "value": "geology" }, + { "key": "board_type", "value": "nature" }, + { "key": "board_type", "value": "planet_walk" }, + { "key": "board_type", "value": "astronomy" }, + { "key": "board_type", "value": "forestry" }, + { "key": "board_type", "value": "botany" }, + { "key": "board_type", "value": "biology" }, + { "key": "board_type", "value": "birds" }, + { "key": "board_type", "value": "tree" }, + { "key": "board_type", "value": "panorama" }, + { "key": "board_type", "value": "science" }, + { "key": "board_type", "value": "technology" }, + { "key": "amenity", "value": "public_bookcase" }, + { "key": "amenity", "value": "library" }, + { "key": "internet_access" }, + { "key": "wifi" }, + { "key": "historic", "value": "castle" }, + { "key": "historic", "value": "tower" }, + { "key": "historic", "value": "fort" }, + { "key": "man_made", "value": "watermill" }, + { "key": "man_made", "value": "windmill" }, + { "key": "historic" }, + { "key": "board_type", "value": "history" }, + { "key": "historic", "value": "memorial" }, + { "key": "historic", "value": "monument" }, + { "key": "tourism", "value": "museum" }, + { "key": "tourism", "value": "gallery" }, + { "key": "amenity", "value": "arts_centre" }, + { "key": "man_made", "value": "observatory" }, + { "key": "historic", "value": "ruins" }, + { "key": "building", "value": "ruins" }, + { "key": "ruins" }, + { "key": "natural", "value": "cave_entrance" }, + { "key": "denotation", "value": "natural_monument" }, + { "key": "denotation", "value": "landmark" }, + { "key": "natural", "value": "water" }, + { "key": "water", "value": "pond" }, + { "key": "water", "value": "lake" }, + { "key": "water", "value": "reservoir" }, + { "key": "water", "value": "reflecting_pool" }, + { "key": "natural", "value": "rock" }, + { "key": "natural", "value": "stone" }, + { "key": "tourism", "value": "viewpoint" }, + { "key": "viewpoint" }, + { "key": "tower:type", "value": "observation" }, + { "key": "waterway", "value": "waterfall" }, + { "key": "waterway", "value": "dam" }, + { "key": "waterway", "value": "weir" }, + { "key": "natural", "value": "spring" }, + { "key": "social_facility", "value": "outreach" }, + { "key": "amenity", "value": "social_centre" }, + { "key": "healthcare" }, + { "key": "social_facility" }, + { "key": "repair", "value": "assisted_self_service" }, + { "key": "leisure", "value": "hackerspace" }, + { "key": "repair" }, + { "key": "amenity", "value": "bbq" }, + { "key": "bbq" }, + { "key": "amenity", "value": "baking_oven" }, + { "key": "building", "value": "bakehouse" }, + { "key": "amenity", "value": "bicycle_rental" }, + { "key": "amenity", "value": "bicycle_library" }, + { "key": "amenity", "value": "bicycle_repair_station" }, + { "key": "service:bicycle:repair" }, + { "key": "bicycle:repair" }, + { "key": "service:bicycle:diy" }, + { "key": "amenity", "value": "charging_station" }, + { "key": "amenity", "value": "community_centre" }, + { "key": "garden:type", "value": "community" }, + { "key": "landuse", "value": "community_food_growing" }, + { "key": "changing_table" }, + { "key": "amenity", "value": "kneipp_water_cure" }, + { "key": "amenity", "value": "drinking_water" }, + { "key": "drinking_water" }, + { "key": "amenity", "value": "water_point" }, + { "key": "drinking_water:refill" }, + { "key": "emergency", "value": "defibrillator" }, + { "key": "amenity", "value": "food_sharing" }, + { "key": "social_facility", "value": "food_bank" }, + { "key": "social_facility", "value": "soup_kitchen" }, + { "key": "social_facility", "value": "dairy_kitchen" }, + { "key": "amenity", "value": "give_box" }, + { "key": "amenity", "value": "freeshop" }, + { "key": "shop", "value": "charity" }, + { "key": "shop", "value": "second_hand" }, + { "key": "amenity", "value": "toy_library" }, + { "key": "club", "value": "doityourself" }, + { "key": "office", "value": "charity" }, + { "key": "charity", "value": "yes" }, + { "key": "operator:type", "value": "private_non_profit" }, + { "key": "operator:type", "value": "charitable" }, + { "key": "operator:type", "value": "community" }, + { "key": "office", "value": "ngo" }, + { "key": "operator:type", "value": "ngo" }, + { "key": "office", "value": "foundation" }, + { "key": "office", "value": "association" }, + { "key": "healthcare", "value": "blood_donation" }, + { "key": "amenity", "value": "coworking_space" }, + { "key": "office", "value": "coworking" }, + { "key": "amenity", "value": "shower" }, + { "key": "amenity", "value": "compressed_air" }, + { "key": "compressed_air" }, + { "key": "service:bicycle:pump" }, + { "key": "amenity", "value": "toilets" }, + { "key": "building", "value": "toilets" }, + { "key": "toilets" }, + { "key": "leisure", "value": "pitch" }, + { "key": "sport", "value": "basketball" }, + { "key": "sport", "value": "multi" }, + { "key": "sport", "value": "swimming" }, + { "key": "amenity", "value": "public_bath" }, + { "key": "leisure", "value": "water_park" }, + { "key": "leisure", "value": "swimming_pool" }, + { "key": "leisure", "value": "swimming_area" }, + { "key": "leisure", "value": "paddling_pool" }, + { "key": "sport", "value": "bmx" }, + { "key": "sport", "value": "cycling" }, + { "key": "sport", "value": "skateboard" }, + { "key": "sport", "value": "chess" }, + { "key": "sport", "value": "climbing" }, + { "key": "playground", "value": "climbingwall" }, + { "key": "sport", "value": "boules" }, + { "key": "sport", "value": "bowls" }, + { "key": "leisure", "value": "fitness_station" }, + { "key": "sport" }, + { "key": "playground" }, + { "key": "sport", "value": "toboggan" }, + { "key": "piste:type", "value": "sled" }, + { "key": "playground", "value": "sledding" }, + { "key": "route", "value": "fitness_trail" }, + { "key": "sport", "value": "running" }, + { "key": "sport", "value": "athletics" }, + { "key": "sport", "value": "soccer" }, + { "key": "sport", "value": "table_tennis" }, + { "key": "sport", "value": "table_soccer" }, + { "key": "sport", "value": "volleyball" }, + { "key": "sport", "value": "beachvolleyball" }, + { "key": "tourism", "value": "zoo" }, + { "key": "attraction", "value": "animal" }, + { "key": "tourism", "value": "aquarium" }, + { "key": "man_made", "value": "beehive" }, + { "key": "landuse", "value": "apiary" }, + { "key": "landuse", "value": "animal_keeping" }, + { "key": "landuse", "value": "meadow" }, + { "key": "landuse", "value": "farmyard" }, + { "key": "leisure", "value": "bird_hide" }, + { "key": "leisure", "value": "wildlife_hide" }, + { "key": "observation", "value": "wild_animal" }, + { "key": "man_made", "value": "nesting_site" }, + { "key": "man_made", "value": "insect_hotel" }, + { "key": "natural", "value": "anthill" }, + { "key": "natural", "value": "termite_mound" }, + { "key": "attraction", "value": "maze" }, + { "key": "man_made", "value": "surveillance" }, + { "key": "amenity", "value": "piano" }, + { "key": "musical_instrument", "value": "piano" }, + { "key": "musical_instrument:piano" }, + { "key": "man_made", "value": "advertising" }, + { "key": "board_type", "value": "notice" }, + { "key": "leisure", "value": "firepit" }, + { "key": "fireplace" }, + { "key": "openfire" }, + { "key": "information", "value": "map" }, + { "key": "leisure", "value": "garden" }, + { "key": "leisure", "value": "nature_reserve" }, + { "key": "boundary", "value": "national_park" }, + { "key": "boundary", "value": "protected_area" }, + { "key": "leisure", "value": "park" }, + { "key": "landuse", "value": "recreation_ground" }, + { "key": "recycling:batteries", "value": "yes" }, + { "key": "recycling:car_batteries", "value": "yes" }, + { "key": "vending", "value": "bottle_return" }, + { "key": "recycling:cooking_oil", "value": "yes" }, + { "key": "recycling:engine_oil", "value": "yes" }, + { "key": "recycling:oil", "value": "yes" }, + { "key": "recycling:waste_oil", "value": "yes" }, + { "key": "recycling:hazardous_waste", "value": "yes" }, + { "key": "recycling:hydrargyrum", "value": "yes" }, + { "key": "recycling:paint", "value": "yes" }, + { "key": "recycling:hardcore", "value": "yes" }, + { "key": "recycling:rubble", "value": "yes" }, + { "key": "recycling:plastic", "value": "yes" }, + { "key": "recycling:plastic_bottles", "value": "yes" }, + { "key": "recycling:plastic_packaging", "value": "yes" }, + { "key": "recycling:PET", "value": "yes" }, + { "key": "recycling:plastic_bags", "value": "yes" }, + { "key": "recycling:polystyrene_foam", "value": "yes" }, + { "key": "recycling:polyester", "value": "yes" }, + { "key": "recycling:styrofoam", "value": "yes" }, + { "key": "recycling:foil", "value": "yes" }, + { "key": "tourism", "value": "picnic_site" }, + { "key": "leisure", "value": "picnic_table" }, + { "key": "shelter_type", "value": "picnic_shelter" }, + { "key": "place", "value": "square" }, + { "key": "leisure", "value": "common" }, + { "key": "highway", "value": "pedestrian" }, + { "key": "highway", "value": "footway" }, + { "key": "leisure", "value": "playground" }, + { "key": "amenity", "value": "lounger" }, + { "key": "amenity", "value": "hammock" }, + { "key": "amenity", "value": "recycling" }, + { "key": "recycling:clothes", "value": "yes" }, + { "key": "recycling:shoes", "value": "yes" }, + { "key": "social_facility", "value": "clothing_bank" }, + { "key": "recycling:mobile_phones", "value": "yes" }, + { "key": "amenity", "value": "device_charging_station" }, + { "key": "recycling:toys", "value": "yes" }, + { "key": "recycling:furniture", "value": "yes" }, + { "key": "recycling:wood", "value": "yes" } + ] + ] +} diff --git a/src/osm-app-component/utilities/taginfo.ts b/src/osm-app-component/utilities/taginfo.ts new file mode 100644 index 0000000..7048532 --- /dev/null +++ b/src/osm-app-component/utilities/taginfo.ts @@ -0,0 +1,15 @@ +import { Filter } from "../control/Filters"; + +export function printTagInfoList(filters: Filter[]) { + console.info( + JSON.stringify( + [...new Set(filters.flatMap((f) => f.tags))].map((f) => { + const keyValue = f.split("="); + if (keyValue.length > 1 && keyValue[1] !== "*") { + return { key: keyValue[0], value: keyValue[1] }; + } + return { key: keyValue[0] }; + }) + ) + ); +}