From 05b05a958c33a56d54e574593b704c41a7bed99a Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Mon, 19 Apr 2021 18:17:26 +0200 Subject: [PATCH] Add taginfo project file descriptions --- Docs/TagInfo/mapcomplete_aed.json | 20 +++ Docs/TagInfo/mapcomplete_artworks.json | 20 +++ Docs/TagInfo/mapcomplete_benches.json | 35 +++++ Docs/TagInfo/mapcomplete_bicyclelib.json | 20 +++ Docs/TagInfo/mapcomplete_bookcases.json | 20 +++ Docs/TagInfo/mapcomplete_campersite.json | 25 ++++ .../mapcomplete_charging_stations.json | 20 +++ Docs/TagInfo/mapcomplete_climbing.json | 83 +++++++++++ Docs/TagInfo/mapcomplete_cyclofix.json | 131 ++++++++++++++++++ Docs/TagInfo/mapcomplete_drinking_water.json | 20 +++ Docs/TagInfo/mapcomplete_facadegardens.json | 25 ++++ Docs/TagInfo/mapcomplete_fietsstraten.json | 29 ++++ Docs/TagInfo/mapcomplete_fritures.json | 19 +++ Docs/TagInfo/mapcomplete_ghostbikes.json | 20 +++ Docs/TagInfo/mapcomplete_hailhydrant.json | 35 +++++ Docs/TagInfo/mapcomplete_maps.json | 25 ++++ Docs/TagInfo/mapcomplete_nature.json | 50 +++++++ Docs/TagInfo/mapcomplete_personal.json | 14 ++ Docs/TagInfo/mapcomplete_playgrounds.json | 20 +++ Docs/TagInfo/mapcomplete_shops.json | 19 +++ Docs/TagInfo/mapcomplete_sport_pitches.json | 20 +++ Docs/TagInfo/mapcomplete_surveillance.json | 43 ++++++ Docs/TagInfo/mapcomplete_toilets.json | 20 +++ Docs/TagInfo/mapcomplete_trees.json | 20 +++ Logic/Tags/Or.ts | 6 +- Logic/Tags/RegexTag.ts | 15 +- Logic/Tags/TagsFilter.ts | 2 +- assets/themes/artwork/artwork.json | 2 +- .../themes/sport_pitches/sport_pitches.json | 12 +- scripts/generateTaginfoProjectFiles.ts | 101 ++++++++++++++ 30 files changed, 883 insertions(+), 8 deletions(-) create mode 100644 Docs/TagInfo/mapcomplete_aed.json create mode 100644 Docs/TagInfo/mapcomplete_artworks.json create mode 100644 Docs/TagInfo/mapcomplete_benches.json create mode 100644 Docs/TagInfo/mapcomplete_bicyclelib.json create mode 100644 Docs/TagInfo/mapcomplete_bookcases.json create mode 100644 Docs/TagInfo/mapcomplete_campersite.json create mode 100644 Docs/TagInfo/mapcomplete_charging_stations.json create mode 100644 Docs/TagInfo/mapcomplete_climbing.json create mode 100644 Docs/TagInfo/mapcomplete_cyclofix.json create mode 100644 Docs/TagInfo/mapcomplete_drinking_water.json create mode 100644 Docs/TagInfo/mapcomplete_facadegardens.json create mode 100644 Docs/TagInfo/mapcomplete_fietsstraten.json create mode 100644 Docs/TagInfo/mapcomplete_fritures.json create mode 100644 Docs/TagInfo/mapcomplete_ghostbikes.json create mode 100644 Docs/TagInfo/mapcomplete_hailhydrant.json create mode 100644 Docs/TagInfo/mapcomplete_maps.json create mode 100644 Docs/TagInfo/mapcomplete_nature.json create mode 100644 Docs/TagInfo/mapcomplete_personal.json create mode 100644 Docs/TagInfo/mapcomplete_playgrounds.json create mode 100644 Docs/TagInfo/mapcomplete_shops.json create mode 100644 Docs/TagInfo/mapcomplete_sport_pitches.json create mode 100644 Docs/TagInfo/mapcomplete_surveillance.json create mode 100644 Docs/TagInfo/mapcomplete_toilets.json create mode 100644 Docs/TagInfo/mapcomplete_trees.json create mode 100644 scripts/generateTaginfoProjectFiles.ts diff --git a/Docs/TagInfo/mapcomplete_aed.json b/Docs/TagInfo/mapcomplete_aed.json new file mode 100644 index 0000000..2e4d85d --- /dev/null +++ b/Docs/TagInfo/mapcomplete_aed.json @@ -0,0 +1,20 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete Open AED Map", + "description": "On this map, one can find and mark nearby defibrillators", + "project_url": "https://mapcomplete.osm.be/aed", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/./assets/themes/aed/logo.svg", + "contact_name": "Pieter Vander Vennet, MapComplete", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [ + { + "key": "emergency", + "description": "The MapComplete theme Open AED Map has a layer Defibrillators showing features with this tag", + "value": "defibrillator" + } + ] +} \ No newline at end of file diff --git a/Docs/TagInfo/mapcomplete_artworks.json b/Docs/TagInfo/mapcomplete_artworks.json new file mode 100644 index 0000000..02b3124 --- /dev/null +++ b/Docs/TagInfo/mapcomplete_artworks.json @@ -0,0 +1,20 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete Open Artwork Map", + "description": "Welcome to Open Artwork Map, a map of statues, busts, grafittis, ", + "project_url": "https://mapcomplete.osm.be/artworks", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/./assets/themes/artwork/artwork.svg", + "contact_name": "Pieter Vander Vennet, MapComplete", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [ + { + "key": "tourism", + "description": "The MapComplete theme Open Artwork Map has a layer Artworks showing features with this tag", + "value": "artwork" + } + ] +} \ No newline at end of file diff --git a/Docs/TagInfo/mapcomplete_benches.json b/Docs/TagInfo/mapcomplete_benches.json new file mode 100644 index 0000000..41ba739 --- /dev/null +++ b/Docs/TagInfo/mapcomplete_benches.json @@ -0,0 +1,35 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete Benches", + "description": "A map of benches", + "project_url": "https://mapcomplete.osm.be/benches", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/./assets/themes/benches/bench_poi.svg", + "contact_name": "Pieter Vander Vennet, Florian Edelmann", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [ + { + "key": "amenity", + "description": "The MapComplete theme Benches has a layer Benches showing features with this tag", + "value": "bench" + }, + { + "key": "bench", + "description": "The MapComplete theme Benches has a layer Benches at public transport stops showing features with this tag", + "value": "yes" + }, + { + "key": "bench", + "description": "The MapComplete theme Benches has a layer Benches at public transport stops showing features with this tag", + "value": "stand_up_bench" + }, + { + "key": "leisure", + "description": "The MapComplete theme Benches has a layer Picnic tables showing features with this tag", + "value": "picnic_table" + } + ] +} \ No newline at end of file diff --git a/Docs/TagInfo/mapcomplete_bicyclelib.json b/Docs/TagInfo/mapcomplete_bicyclelib.json new file mode 100644 index 0000000..a972d88 --- /dev/null +++ b/Docs/TagInfo/mapcomplete_bicyclelib.json @@ -0,0 +1,20 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete Bicycle libraries", + "description": "A bicycle library is a place where bicycles can be lent, often for a small yearly fee", + "project_url": "https://mapcomplete.osm.be/bicyclelib", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/./assets/themes/bicycle_library/logo.svg", + "contact_name": "Pieter Vander Vennet, MapComplete", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [ + { + "key": "amenity", + "description": "The MapComplete theme Bicycle libraries has a layer Bicycle library showing features with this tag", + "value": "bicycle_library" + } + ] +} \ No newline at end of file diff --git a/Docs/TagInfo/mapcomplete_bookcases.json b/Docs/TagInfo/mapcomplete_bookcases.json new file mode 100644 index 0000000..98d6795 --- /dev/null +++ b/Docs/TagInfo/mapcomplete_bookcases.json @@ -0,0 +1,20 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete Open Bookcase Map", + "description": "A public bookcase is a small streetside cabinet, box, old phone boot or some other objects where books are stored", + "project_url": "https://mapcomplete.osm.be/bookcases", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/./assets/themes/bookcases/bookcase.svg", + "contact_name": "Pieter Vander Vennet, MapComplete", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [ + { + "key": "amenity", + "description": "The MapComplete theme Open Bookcase Map has a layer Bookcases showing features with this tag", + "value": "public_bookcase" + } + ] +} \ No newline at end of file diff --git a/Docs/TagInfo/mapcomplete_campersite.json b/Docs/TagInfo/mapcomplete_campersite.json new file mode 100644 index 0000000..14cbd86 --- /dev/null +++ b/Docs/TagInfo/mapcomplete_campersite.json @@ -0,0 +1,25 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete Campersites", + "description": "Find sites to spend the night with your camper", + "project_url": "https://mapcomplete.osm.be/campersite", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/./assets/themes/campersites/caravan.svg", + "contact_name": "Pieter Vander Vennet, joost schouppe", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [ + { + "key": "tourism", + "description": "The MapComplete theme Campersites has a layer Camper sites showing features with this tag", + "value": "caravan_site" + }, + { + "key": "amenity", + "description": "The MapComplete theme Campersites has a layer Sanitary dump stations showing features with this tag", + "value": "sanitary_dump_station" + } + ] +} \ No newline at end of file diff --git a/Docs/TagInfo/mapcomplete_charging_stations.json b/Docs/TagInfo/mapcomplete_charging_stations.json new file mode 100644 index 0000000..3a5e02e --- /dev/null +++ b/Docs/TagInfo/mapcomplete_charging_stations.json @@ -0,0 +1,20 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete Charging stations", + "description": "A worldwide map of charging stations", + "project_url": "https://mapcomplete.osm.be/charging_stations", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/./assets/themes/charging_stations/logo.svg", + "contact_name": "Pieter Vander Vennet, ", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [ + { + "key": "amenity", + "description": "The MapComplete theme Charging stations has a layer Charging stations showing features with this tag", + "value": "charging_station" + } + ] +} \ No newline at end of file diff --git a/Docs/TagInfo/mapcomplete_climbing.json b/Docs/TagInfo/mapcomplete_climbing.json new file mode 100644 index 0000000..2176ec5 --- /dev/null +++ b/Docs/TagInfo/mapcomplete_climbing.json @@ -0,0 +1,83 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete Open Climbing Map", + "description": "On this map you will find various climbing opportunities such as climbing gyms, bouldering halls and rocks in nature", + "project_url": "https://mapcomplete.osm.be/climbing", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/./assets/themes/climbing/climbing_icon.svg", + "contact_name": "Pieter Vander Vennet, Christian Neumann ", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [ + { + "key": "club", + "description": "The MapComplete theme Open Climbing Map has a layer Climbing club showing features with this tag", + "value": "climbing" + }, + { + "key": "sport", + "description": "The MapComplete theme Open Climbing Map has a layer Climbing club showing features with this tag", + "value": "climbing" + }, + { + "key": "office", + "description": "The MapComplete theme Open Climbing Map has a layer Climbing club showing features with this tag" + }, + { + "key": "club", + "description": "The MapComplete theme Open Climbing Map has a layer Climbing club showing features with this tag" + }, + { + "key": "sport", + "description": "The MapComplete theme Open Climbing Map has a layer Climbing gyms showing features with this tag", + "value": "climbing" + }, + { + "key": "leisure", + "description": "The MapComplete theme Open Climbing Map has a layer Climbing gyms showing features with this tag", + "value": "sports_centre" + }, + { + "key": "climbing", + "description": "The MapComplete theme Open Climbing Map has a layer Climbing routes showing features with this tag", + "value": "route" + }, + { + "key": "sport", + "description": "The MapComplete theme Open Climbing Map has a layer Climbing opportunities showing features with this tag", + "value": "climbing" + }, + { + "key": "leisure", + "description": "The MapComplete theme Open Climbing Map has a layer Climbing opportunities? showing features with this tag", + "value": "sports_centre" + }, + { + "key": "barrier", + "description": "The MapComplete theme Open Climbing Map has a layer Climbing opportunities? showing features with this tag", + "value": "wall" + }, + { + "key": "barrier", + "description": "The MapComplete theme Open Climbing Map has a layer Climbing opportunities? showing features with this tag", + "value": "retaining_wall" + }, + { + "key": "natural", + "description": "The MapComplete theme Open Climbing Map has a layer Climbing opportunities? showing features with this tag", + "value": "cliff" + }, + { + "key": "natural", + "description": "The MapComplete theme Open Climbing Map has a layer Climbing opportunities? showing features with this tag", + "value": "rock" + }, + { + "key": "natural", + "description": "The MapComplete theme Open Climbing Map has a layer Climbing opportunities? showing features with this tag", + "value": "stone" + } + ] +} \ No newline at end of file diff --git a/Docs/TagInfo/mapcomplete_cyclofix.json b/Docs/TagInfo/mapcomplete_cyclofix.json new file mode 100644 index 0000000..93abd33 --- /dev/null +++ b/Docs/TagInfo/mapcomplete_cyclofix.json @@ -0,0 +1,131 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete Cyclofix - an open map for cyclists", + "description": "The goal of this map is to present cyclists with an easy-to-use solution to find the appropriate infrastructure for their needs", + "project_url": "https://mapcomplete.osm.be/cyclofix", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/assets/themes/cyclofix/logo.svg", + "contact_name": "Pieter Vander Vennet, MapComplete", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [ + { + "key": "amenity", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bike cafe showing features with this tag" + }, + { + "key": "pub", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bike cafe showing features with this tag" + }, + { + "key": "theme", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bike cafe showing features with this tag" + }, + { + "key": "shop", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bike repair/shop showing features with this tag", + "value": "bicycle" + }, + { + "key": "amenity", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bike repair/shop showing features with this tag", + "value": "bicycle_rental" + }, + { + "key": "network", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bike repair/shop showing features with this tag", + "value": "" + }, + { + "key": "shop", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bike repair/shop showing features with this tag", + "value": "sports" + }, + { + "key": "sport", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bike repair/shop showing features with this tag", + "value": "bicycle" + }, + { + "key": "sport", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bike repair/shop showing features with this tag", + "value": "cycling" + }, + { + "key": "sport", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bike repair/shop showing features with this tag", + "value": "" + }, + { + "key": "shop", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bike repair/shop showing features with this tag" + }, + { + "key": "amenity", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bicycle library showing features with this tag", + "value": "bicycle_library" + }, + { + "key": "amenity", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bike stations (repair, pump or both) showing features with this tag", + "value": "bicycle_repair_station" + }, + { + "key": "amenity", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bicycle tube vending machine showing features with this tag", + "value": "vending_machine" + }, + { + "key": "vending", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bicycle tube vending machine showing features with this tag" + }, + { + "key": "amenity", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Drinking water showing features with this tag", + "value": "drinking_water" + }, + { + "key": "theme", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bike related object showing features with this tag" + }, + { + "key": "sport", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bike related object showing features with this tag", + "value": "cycling" + }, + { + "key": "association", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bike related object showing features with this tag" + }, + { + "key": "ngo", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bike related object showing features with this tag" + }, + { + "key": "club", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bike related object showing features with this tag" + }, + { + "key": "service:bicycle:cleaning", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bike cleaning service showing features with this tag", + "value": "yes" + }, + { + "key": "service:bicycle:cleaning", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bike cleaning service showing features with this tag", + "value": "diy" + }, + { + "key": "amenity", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bike cleaning service showing features with this tag", + "value": "bicycle_wash" + }, + { + "key": "amenity", + "description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bike parking showing features with this tag", + "value": "bicycle_parking" + } + ] +} \ No newline at end of file diff --git a/Docs/TagInfo/mapcomplete_drinking_water.json b/Docs/TagInfo/mapcomplete_drinking_water.json new file mode 100644 index 0000000..e7070c5 --- /dev/null +++ b/Docs/TagInfo/mapcomplete_drinking_water.json @@ -0,0 +1,20 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete Drinking Water", + "description": "On this map, publicly accessible drinkging water spots are shown and can be easily added", + "project_url": "https://mapcomplete.osm.be/drinking_water", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/./assets/themes/drinking_water/logo.svg", + "contact_name": "Pieter Vander Vennet, MapComplete", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [ + { + "key": "amenity", + "description": "The MapComplete theme Drinking Water has a layer Drinking water showing features with this tag", + "value": "drinking_water" + } + ] +} \ No newline at end of file diff --git a/Docs/TagInfo/mapcomplete_facadegardens.json b/Docs/TagInfo/mapcomplete_facadegardens.json new file mode 100644 index 0000000..118475b --- /dev/null +++ b/Docs/TagInfo/mapcomplete_facadegardens.json @@ -0,0 +1,25 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete Facade gardens", + "description": "This map shows facade gardens with pictures and useful info about orientation, sunshine and plant types.", + "project_url": "https://mapcomplete.osm.be/facadegardens", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/./assets/themes/facadegardens/geveltuin.svg", + "contact_name": "Pieter Vander Vennet, joost schouppe; stla", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [ + { + "key": "leisure", + "description": "The MapComplete theme Facade gardens has a layer Facade gardens showing features with this tag", + "value": "garden" + }, + { + "key": "garden:type", + "description": "The MapComplete theme Facade gardens has a layer Facade gardens showing features with this tag", + "value": "facade_garden" + } + ] +} \ No newline at end of file diff --git a/Docs/TagInfo/mapcomplete_fietsstraten.json b/Docs/TagInfo/mapcomplete_fietsstraten.json new file mode 100644 index 0000000..88bfcf6 --- /dev/null +++ b/Docs/TagInfo/mapcomplete_fietsstraten.json @@ -0,0 +1,29 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete Fietsstraten", + "description": "Een kaart met alle gekende fietsstraten", + "project_url": "https://mapcomplete.osm.be/fietsstraten", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/./assets/themes/cyclestreets/F111.svg", + "contact_name": "Pieter Vander Vennet, MapComplete", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [ + { + "key": "cyclestreet", + "description": "The MapComplete theme Fietsstraten has a layer Fietsstraten showing features with this tag", + "value": "yes" + }, + { + "key": "proposed:cyclestreet", + "description": "The MapComplete theme Fietsstraten has a layer Toekomstige fietsstraat showing features with this tag", + "value": "yes" + }, + { + "key": "highway", + "description": "The MapComplete theme Fietsstraten has a layer Alle straten showing features with this tag" + } + ] +} \ No newline at end of file diff --git a/Docs/TagInfo/mapcomplete_fritures.json b/Docs/TagInfo/mapcomplete_fritures.json new file mode 100644 index 0000000..629adc3 --- /dev/null +++ b/Docs/TagInfo/mapcomplete_fritures.json @@ -0,0 +1,19 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete Friturenkaart", + "description": "Op deze kaart vind je je favoriete frituur!", + "project_url": "https://mapcomplete.osm.be/fritures", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/./assets/themes/fritures/logo.svg", + "contact_name": "Pieter Vander Vennet, ", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [ + { + "key": "cuisine", + "description": "The MapComplete theme Friturenkaart has a layer Frituren showing features with this tag" + } + ] +} \ No newline at end of file diff --git a/Docs/TagInfo/mapcomplete_ghostbikes.json b/Docs/TagInfo/mapcomplete_ghostbikes.json new file mode 100644 index 0000000..a3433d2 --- /dev/null +++ b/Docs/TagInfo/mapcomplete_ghostbikes.json @@ -0,0 +1,20 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete Ghost bikes", + "description": "A ghost bike is a memorial for a cyclist who died in a traffic accident, in the form of a white bicycle placed permanently near the accident location", + "project_url": "https://mapcomplete.osm.be/ghostbikes", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/./assets/themes/ghostbikes/logo.svg", + "contact_name": "Pieter Vander Vennet, MapComplete", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [ + { + "key": "memorial", + "description": "The MapComplete theme Ghost bikes has a layer Ghost bikes showing features with this tag", + "value": "ghost_bike" + } + ] +} \ No newline at end of file diff --git a/Docs/TagInfo/mapcomplete_hailhydrant.json b/Docs/TagInfo/mapcomplete_hailhydrant.json new file mode 100644 index 0000000..f3b310f --- /dev/null +++ b/Docs/TagInfo/mapcomplete_hailhydrant.json @@ -0,0 +1,35 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete Hydrants, Extinguishers, Fire stations, and Rescue stations.", + "description": "Map to show hydrants, extinguishers, fire stations, and rescue stations.", + "project_url": "https://mapcomplete.osm.be/hailhydrant", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/./assets/themes/hailhydrant/logo.svg", + "contact_name": "Pieter Vander Vennet, ", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [ + { + "key": "emergency", + "description": "The MapComplete theme Hydrants, Extinguishers, Fire stations, and Rescue stations. has a layer Map of hydrants showing features with this tag", + "value": "fire_hydrant" + }, + { + "key": "emergency", + "description": "The MapComplete theme Hydrants, Extinguishers, Fire stations, and Rescue stations. has a layer Map of fire extinguishers. showing features with this tag", + "value": "fire_extinguisher" + }, + { + "key": "amenity", + "description": "The MapComplete theme Hydrants, Extinguishers, Fire stations, and Rescue stations. has a layer Map of fire stations showing features with this tag", + "value": "fire_station" + }, + { + "key": "amenity", + "description": "The MapComplete theme Hydrants, Extinguishers, Fire stations, and Rescue stations. has a layer Map of rescue stations showing features with this tag", + "value": "rescue_station" + } + ] +} \ No newline at end of file diff --git a/Docs/TagInfo/mapcomplete_maps.json b/Docs/TagInfo/mapcomplete_maps.json new file mode 100644 index 0000000..1d3919f --- /dev/null +++ b/Docs/TagInfo/mapcomplete_maps.json @@ -0,0 +1,25 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete A map of maps", + "description": "This theme shows all (touristic) maps that OpenStreetMap knows of", + "project_url": "https://mapcomplete.osm.be/maps", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/./assets/themes/maps/logo.svg", + "contact_name": "Pieter Vander Vennet, MapComplete", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [ + { + "key": "tourism", + "description": "The MapComplete theme A map of maps has a layer Maps showing features with this tag", + "value": "map" + }, + { + "key": "information", + "description": "The MapComplete theme A map of maps has a layer Maps showing features with this tag", + "value": "map" + } + ] +} \ No newline at end of file diff --git a/Docs/TagInfo/mapcomplete_nature.json b/Docs/TagInfo/mapcomplete_nature.json new file mode 100644 index 0000000..b47270f --- /dev/null +++ b/Docs/TagInfo/mapcomplete_nature.json @@ -0,0 +1,50 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete De Natuur in", + "description": "Deze kaart bevat informatie voor natuurliefhebbers", + "project_url": "https://mapcomplete.osm.be/nature", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/./assets/themes/nature/logo.svg", + "contact_name": "Pieter Vander Vennet, ", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [ + { + "key": "amenity", + "description": "The MapComplete theme De Natuur in has a layer Drinking water showing features with this tag", + "value": "drinking_water" + }, + { + "key": "leisure", + "description": "The MapComplete theme De Natuur in has a layer Vogelkijkhutten showing features with this tag", + "value": "bird_hide" + }, + { + "key": "tourism", + "description": "The MapComplete theme De Natuur in has a layer Maps showing features with this tag", + "value": "map" + }, + { + "key": "information", + "description": "The MapComplete theme De Natuur in has a layer Maps showing features with this tag", + "value": "map" + }, + { + "key": "information", + "description": "The MapComplete theme De Natuur in has a layer Information boards showing features with this tag", + "value": "board" + }, + { + "key": "leisure", + "description": "The MapComplete theme De Natuur in has a layer Natuurgebied showing features with this tag", + "value": "nature_reserve" + }, + { + "key": "boundary", + "description": "The MapComplete theme De Natuur in has a layer Natuurgebied showing features with this tag", + "value": "protected_area" + } + ] +} \ No newline at end of file diff --git a/Docs/TagInfo/mapcomplete_personal.json b/Docs/TagInfo/mapcomplete_personal.json new file mode 100644 index 0000000..ee81103 --- /dev/null +++ b/Docs/TagInfo/mapcomplete_personal.json @@ -0,0 +1,14 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete Personal theme", + "description": "Create a personal theme based on all the available layers of all themes", + "project_url": "https://mapcomplete.osm.be/personal", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/./assets/svg/addSmall.svg", + "contact_name": "Pieter Vander Vennet, MapComplete", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [] +} \ No newline at end of file diff --git a/Docs/TagInfo/mapcomplete_playgrounds.json b/Docs/TagInfo/mapcomplete_playgrounds.json new file mode 100644 index 0000000..a91a62b --- /dev/null +++ b/Docs/TagInfo/mapcomplete_playgrounds.json @@ -0,0 +1,20 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete Playgrounds", + "description": "A map with playgrounds", + "project_url": "https://mapcomplete.osm.be/playgrounds", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/./assets/themes/playgrounds/playground.svg", + "contact_name": "Pieter Vander Vennet, ", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [ + { + "key": "leisure", + "description": "The MapComplete theme Playgrounds has a layer Playgrounds showing features with this tag", + "value": "playground" + } + ] +} \ No newline at end of file diff --git a/Docs/TagInfo/mapcomplete_shops.json b/Docs/TagInfo/mapcomplete_shops.json new file mode 100644 index 0000000..57368dd --- /dev/null +++ b/Docs/TagInfo/mapcomplete_shops.json @@ -0,0 +1,19 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete Open Shop Map", + "description": "An editable map with basic shop information", + "project_url": "https://mapcomplete.osm.be/shops", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/./assets/themes/shops/shop.svg", + "contact_name": "Pieter Vander Vennet, MapComplete", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [ + { + "key": "shop", + "description": "The MapComplete theme Open Shop Map has a layer Shop showing features with this tag" + } + ] +} \ No newline at end of file diff --git a/Docs/TagInfo/mapcomplete_sport_pitches.json b/Docs/TagInfo/mapcomplete_sport_pitches.json new file mode 100644 index 0000000..2a68ae1 --- /dev/null +++ b/Docs/TagInfo/mapcomplete_sport_pitches.json @@ -0,0 +1,20 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete Sportvelden", + "description": "Deze kaart toont sportvelden", + "project_url": "https://mapcomplete.osm.be/sport_pitches", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/./assets/layers/sport_pitch/tabletennis.svg", + "contact_name": "Pieter Vander Vennet, ", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [ + { + "key": "leisure", + "description": "The MapComplete theme Sportvelden has a layer Sport pitches showing features with this tag", + "value": "pitch" + } + ] +} \ No newline at end of file diff --git a/Docs/TagInfo/mapcomplete_surveillance.json b/Docs/TagInfo/mapcomplete_surveillance.json new file mode 100644 index 0000000..31f3b27 --- /dev/null +++ b/Docs/TagInfo/mapcomplete_surveillance.json @@ -0,0 +1,43 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete Surveillance under Surveillance", + "description": "Surveillance cameras and other means of surveillance", + "project_url": "https://mapcomplete.osm.be/surveillance", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/./assets/themes/surveillance_cameras/logo.svg", + "contact_name": "Pieter Vander Vennet, ", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [ + { + "key": "camera:direction", + "description": "The MapComplete theme Surveillance under Surveillance has a layer Direction visualization showing features with this tag" + }, + { + "key": "direction", + "description": "The MapComplete theme Surveillance under Surveillance has a layer Direction visualization showing features with this tag" + }, + { + "key": "man_made", + "description": "The MapComplete theme Surveillance under Surveillance has a layer Surveillance camera's showing features with this tag", + "value": "surveillance" + }, + { + "key": "surveillance:type", + "description": "The MapComplete theme Surveillance under Surveillance has a layer Surveillance camera's showing features with this tag", + "value": "camera" + }, + { + "key": "surveillance:type", + "description": "The MapComplete theme Surveillance under Surveillance has a layer Surveillance camera's showing features with this tag", + "value": "ALPR" + }, + { + "key": "surveillance:type", + "description": "The MapComplete theme Surveillance under Surveillance has a layer Surveillance camera's showing features with this tag", + "value": "ANPR" + } + ] +} \ No newline at end of file diff --git a/Docs/TagInfo/mapcomplete_toilets.json b/Docs/TagInfo/mapcomplete_toilets.json new file mode 100644 index 0000000..83fec60 --- /dev/null +++ b/Docs/TagInfo/mapcomplete_toilets.json @@ -0,0 +1,20 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete Open Toilet Map", + "description": "A map of public toilets", + "project_url": "https://mapcomplete.osm.be/toilets", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/./assets/themes/toilets/toilets.svg", + "contact_name": "Pieter Vander Vennet, MapComplete", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [ + { + "key": "amenity", + "description": "The MapComplete theme Open Toilet Map has a layer Toilets showing features with this tag", + "value": "toilets" + } + ] +} \ No newline at end of file diff --git a/Docs/TagInfo/mapcomplete_trees.json b/Docs/TagInfo/mapcomplete_trees.json new file mode 100644 index 0000000..78658a0 --- /dev/null +++ b/Docs/TagInfo/mapcomplete_trees.json @@ -0,0 +1,20 @@ +{ + "data_format": 1, + "data_updated": "20210319T161618Z", + "project": { + "name": "MapComplete Trees", + "description": "Map all the trees", + "project_url": "https://mapcomplete.osm.be/trees", + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", + "icon_url": "https://mapcomplete.osm.be/./assets/themes/trees/logo.svg", + "contact_name": "Pieter Vander Vennet, Midgard", + "contact_email": "pietervdvn@posteo.net" + }, + "tags": [ + { + "key": "natural", + "description": "The MapComplete theme Trees has a layer Tree showing features with this tag", + "value": "tree" + } + ] +} \ No newline at end of file diff --git a/Logic/Tags/Or.ts b/Logic/Tags/Or.ts index 40cee60..12c456a 100644 --- a/Logic/Tags/Or.ts +++ b/Logic/Tags/Or.ts @@ -61,7 +61,11 @@ export class Or extends TagsFilter { } asChange(properties: any): { k: string; v: string }[] { - throw "Can not convert an 'or' into a changeset" + const result = [] + for (const tagsFilter of this.or) { + result.push(...tagsFilter.asChange(properties)) + } + return result; } } diff --git a/Logic/Tags/RegexTag.ts b/Logic/Tags/RegexTag.ts index 7c680b8..987fa36 100644 --- a/Logic/Tags/RegexTag.ts +++ b/Logic/Tags/RegexTag.ts @@ -80,6 +80,19 @@ export class RegexTag extends TagsFilter { } asChange(properties: any): { k: string; v: string }[] { - throw "Cannot convert a regex-tag into a change"; + if(this.invert){ + return [] + } + if (typeof this.key === "string") { + if( typeof this.value === "string"){ + return [{k: this.key, v: this.value}] + } + if(this.value.toString() != "/^..*$/"){ + console.warn("Regex value in tag; using wildcard:", this.key, this.value) + } + return [{k: this.key, v: undefined}] + } + console.error("Cannot export regex tag to asChange; ", this.key, this.value) + return [] } } \ No newline at end of file diff --git a/Logic/Tags/TagsFilter.ts b/Logic/Tags/TagsFilter.ts index 5400aa8..e34b052 100644 --- a/Logic/Tags/TagsFilter.ts +++ b/Logic/Tags/TagsFilter.ts @@ -11,7 +11,7 @@ export abstract class TagsFilter { abstract asHumanString(linkToWiki: boolean, shorten: boolean, properties: any); abstract usedKeys(): string[]; - + /** * Converts the tagsFilter into a list of key-values that should be uploaded to OSM. * Throws an error if not applicable diff --git a/assets/themes/artwork/artwork.json b/assets/themes/artwork/artwork.json index 312a015..7a29cb5 100644 --- a/assets/themes/artwork/artwork.json +++ b/assets/themes/artwork/artwork.json @@ -8,7 +8,7 @@ "de": "Freie Kunstwerk-Karte" }, "description": { - "en": "Welcome to Open Artwork Map, a map of statues, busts, grafittis, ... all over the world", + "en": "Welcome to Open Artwork Map, a map of statues, busts, grafittis and other artwork all over the world", "nl": "Welkom op de Open Kunstwerken Kaart", "fr": "Bienvenue sur la carte ouverte des œuvres d'art, une carte des statues, fresques, ... du monde entier", "de": "Willkommen bei der Freien Kunstwerk-Karte, einer Karte von Statuen, Büsten, Grafitti, ... auf der ganzen Welt" diff --git a/assets/themes/sport_pitches/sport_pitches.json b/assets/themes/sport_pitches/sport_pitches.json index 04e6b6f..42222c6 100644 --- a/assets/themes/sport_pitches/sport_pitches.json +++ b/assets/themes/sport_pitches/sport_pitches.json @@ -1,16 +1,20 @@ { "id": "sport_pitches", "title": { - "nl": "Sportvelden" + "nl": "Sportvelden", + "en": "Sport pitches" }, "shortDescription": { - "nl": "Deze kaart toont sportvelden" + "nl": "Deze kaart toont sportvelden", + "en": "A map showing sport pitches" }, "description": { - "nl": "Een sportveld is een ingerichte plaats met infrastructuur om een sport te beoefenen" + "nl": "Een sportveld is een ingerichte plaats met infrastructuur om een sport te beoefenen", + "en": "A sport pitch is an area where sports are played" }, "language": [ - "nl" + "nl", + "en" ], "maintainer": "", "icon": "./assets/layers/sport_pitch/tabletennis.svg", diff --git a/scripts/generateTaginfoProjectFiles.ts b/scripts/generateTaginfoProjectFiles.ts new file mode 100644 index 0000000..3a95f14 --- /dev/null +++ b/scripts/generateTaginfoProjectFiles.ts @@ -0,0 +1,101 @@ +import {Utils} from "../Utils"; + +Utils.runningFromConsole = true; +import {AllKnownLayouts} from "../Customizations/AllKnownLayouts"; +import LayoutConfig from "../Customizations/JSON/LayoutConfig"; +import {TagsFilter} from "../Logic/Tags/TagsFilter"; +import LanguagePicker from "../UI/LanguagePicker"; +import Locale from "../UI/i18n/Locale"; +import {Layer} from "leaflet"; +import LayerConfig from "../Customizations/JSON/LayerConfig"; +import {Translation} from "../UI/i18n/Translation"; +import {readFileSync, writeFile, writeFileSync} from "fs"; + +const outputDirectory = "Docs/TagInfo" + +function generateLayerUsage(layer: LayerConfig, layout: LayoutConfig): any [] { + const usedTags = layer.source.osmTags.asChange({}) + const result = [] + for (const kv of usedTags) { + const overview = { + // OSM tag key (required) + key: kv.k, + description: "The MapComplete theme " + layout.title.txt + " has a layer " + layer.name.txt + " showing features with this tag" + }; + if (kv.v !== undefined) { + // OSM tag value (optional, if not supplied it means "all values") + overview["value"] = kv.v + } + result.push(overview) + } + return result; +} + +/** + * Generates the JSON-object representing the theme for inclusion on taginfo + * @param layout + */ +function generateTagInfoEntry(layout: LayoutConfig): any { + const usedTags = [] + for (const layer of layout.layers) { + usedTags.push(...generateLayerUsage(layer, layout)) + } + + const t = new Date(); + const generationTime = t.getUTCFullYear() + Utils.TwoDigits(t.getUTCMonth()) + Utils.TwoDigits(t.getUTCDate()) + "T" + Utils.TwoDigits(t.getUTCHours()) + Utils.TwoDigits(t.getUTCMinutes()) + Utils.TwoDigits(t.getSeconds()) + "Z" + + let icon = layout.icon; + if (icon.startsWith("./")) { + icon = icon.substring(2) + } + + const themeInfo = { + // data format version, currently always 1, will get updated if there are incompatible changes to the format (required) + "data_format": 1, + + // "data_url": "...", # this should be the URL under which this project file can be accessed (optional) + // timestamp when project file was updated (optional, will use HTTP header date if not available) + "data_updated": generationTime, + "project": { + "name": "MapComplete " + layout.title.txt, // name of the project (required) + "description": layout.shortDescription.txt, // short description of the project (required) + "project_url": "https://mapcomplete.osm.be/" + layout.id, // home page of the project with general information (required) + "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", // documentation of the project and especially the tags used (optional) + "icon_url": "https://mapcomplete.osm.be/" + layout.icon, // project logo, should work in 16x16 pixels on white and light gray backgrounds (optional) + "contact_name": "Pieter Vander Vennet, " + layout.maintainer, // contact name, needed for taginfo maintainer (required) + "contact_email": "pietervdvn@posteo.net" // contact email, needed for taginfo maintainer (required) + }, + tags: usedTags + } + + const filename = "mapcomplete_" + layout.id + console.log("Writing info about " + layout.id) + writeFileSync(`${outputDirectory}/${filename}.json`, JSON.stringify(themeInfo, null, " ")) + return filename +} + + +console.log("Creating taginfo project files") + +Locale.language.setData("en") +Translation.forcedLanguage = "en" + +const files = [] + +for (const layout of AllKnownLayouts.layoutsList) { + if (layout.hideFromOverview) { + continue; + } + files.push(generateTagInfoEntry(layout)); +} + +const tagInfoList = "../taginfo-projects/project_list.txt" +let projectList = readFileSync(tagInfoList, "UTF8") + .split("\n") + .filter(entry => entry.indexOf("mapcomplete_") < 0) + .concat(files.map(f => `${f} https://raw.githubusercontent.com/pietervdvn/MapComplete/master/Docs/TagInfo/${f}.json`)) + .sort() + .filter(entry => entry != "") + +console.log("Writing taginfo project filelist") +writeFileSync(tagInfoList, projectList.join("\n")+"\n") \ No newline at end of file