Drop calculated tags from taginfo

This commit is contained in:
pietervdvn 2021-06-24 14:02:18 +02:00
parent d31baabc5f
commit 2b02991780
2 changed files with 38 additions and 130 deletions

View file

@ -52,31 +52,6 @@
"key": "url",
"description": "Layer 'Climbing club' shows and asks freeform values for key 'url' (in the MapComplete.osm.be theme 'Open Climbing Map')"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing club' shows _embedding_feature:access=yes with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> publicly accessible<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "yes"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing club' shows _embedding_feature:access=permit with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that </span> a permit is needed to access<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "permit"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing club' shows _embedding_feature:access=customers with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> only accessible to customers<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "customers"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing club' shows _embedding_feature:access=members with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> only accessible to club members<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "members"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing club' shows _embedding_feature:access=no with a fixed text, namely 'Not accessible as stated by <a href='#{_embedding_feature:id}'>the containing feature</a>' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "no"
},
{
"key": "access",
"description": "Layer 'Climbing club' shows access=yes with a fixed text, namely 'Publicly accessible to anyone' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
@ -223,31 +198,6 @@
"key": "url",
"description": "Layer 'Climbing gyms' shows and asks freeform values for key 'url' (in the MapComplete.osm.be theme 'Open Climbing Map')"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing gyms' shows _embedding_feature:access=yes with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> publicly accessible<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "yes"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing gyms' shows _embedding_feature:access=permit with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that </span> a permit is needed to access<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "permit"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing gyms' shows _embedding_feature:access=customers with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> only accessible to customers<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "customers"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing gyms' shows _embedding_feature:access=members with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> only accessible to club members<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "members"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing gyms' shows _embedding_feature:access=no with a fixed text, namely 'Not accessible as stated by <a href='#{_embedding_feature:id}'>the containing feature</a>' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "no"
},
{
"key": "access",
"description": "Layer 'Climbing gyms' shows access=yes with a fixed text, namely 'Publicly accessible to anyone' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
@ -409,31 +359,6 @@
"key": "url",
"description": "Layer 'Climbing routes' shows and asks freeform values for key 'url' (in the MapComplete.osm.be theme 'Open Climbing Map')"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing routes' shows _embedding_feature:access=yes with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> publicly accessible<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "yes"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing routes' shows _embedding_feature:access=permit with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that </span> a permit is needed to access<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "permit"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing routes' shows _embedding_feature:access=customers with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> only accessible to customers<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "customers"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing routes' shows _embedding_feature:access=members with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> only accessible to club members<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "members"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing routes' shows _embedding_feature:access=no with a fixed text, namely 'Not accessible as stated by <a href='#{_embedding_feature:id}'>the containing feature</a>' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "no"
},
{
"key": "access",
"description": "Layer 'Climbing routes' shows access=yes with a fixed text, namely 'Publicly accessible to anyone' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
@ -572,6 +497,20 @@
"key": "climbing:grade:french",
"description": "Layer 'Climbing routes' shows and asks freeform values for key 'climbing:grade:french' (in the MapComplete.osm.be theme 'Open Climbing Map')"
},
{
"key": "climbing:bolts",
"description": "Layer 'Climbing routes' shows and asks freeform values for key 'climbing:bolts' (in the MapComplete.osm.be theme 'Open Climbing Map')"
},
{
"key": "climbing:bolted",
"description": "Layer 'Climbing routes' shows climbing:bolted=no with a fixed text, namely 'This route is not bolted' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "no"
},
{
"key": "climbing:bolted",
"description": "Layer 'Climbing routes' shows climbing:bolted=no&climbing:bolts= with a fixed text, namely 'This route is not bolted' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "no&climbing:bolts="
},
{
"key": "description",
"description": "Layer 'Climbing routes' shows and asks freeform values for key 'description' (in the MapComplete.osm.be theme 'Open Climbing Map')"
@ -601,31 +540,6 @@
"key": "url",
"description": "Layer 'Climbing opportunities' shows and asks freeform values for key 'url' (in the MapComplete.osm.be theme 'Open Climbing Map')"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing opportunities' shows _embedding_feature:access=yes with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> publicly accessible<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "yes"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing opportunities' shows _embedding_feature:access=permit with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that </span> a permit is needed to access<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "permit"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing opportunities' shows _embedding_feature:access=customers with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> only accessible to customers<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "customers"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing opportunities' shows _embedding_feature:access=members with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> only accessible to club members<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "members"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing opportunities' shows _embedding_feature:access=no with a fixed text, namely 'Not accessible as stated by <a href='#{_embedding_feature:id}'>the containing feature</a>' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "no"
},
{
"key": "access",
"description": "Layer 'Climbing opportunities' shows access=yes with a fixed text, namely 'Publicly accessible to anyone' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
@ -771,6 +685,15 @@
"description": "Layer 'Climbing opportunities' shows climbing=area with a fixed text, namely 'A climbing area with one or more climbing crags and/or boulders' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "area"
},
{
"key": "rock",
"description": "Layer 'Climbing opportunities' shows and asks freeform values for key 'rock' (in the MapComplete.osm.be theme 'Open Climbing Map')"
},
{
"key": "rock",
"description": "Layer 'Climbing opportunities' shows rock=limestone with a fixed text, namely 'Limestone' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "limestone"
},
{
"key": "leisure",
"description": "The MapComplete theme Open Climbing Map has a layer Climbing opportunities? showing features with this tag",
@ -820,31 +743,6 @@
"key": "url",
"description": "Layer 'Climbing opportunities?' shows and asks freeform values for key 'url' (in the MapComplete.osm.be theme 'Open Climbing Map')"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing opportunities?' shows _embedding_feature:access=yes with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> publicly accessible<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "yes"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing opportunities?' shows _embedding_feature:access=permit with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that </span> a permit is needed to access<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "permit"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing opportunities?' shows _embedding_feature:access=customers with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> only accessible to customers<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "customers"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing opportunities?' shows _embedding_feature:access=members with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> only accessible to club members<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "members"
},
{
"key": "_embedding_feature:access",
"description": "Layer 'Climbing opportunities?' shows _embedding_feature:access=no with a fixed text, namely 'Not accessible as stated by <a href='#{_embedding_feature:id}'>the containing feature</a>' (in the MapComplete.osm.be theme 'Open Climbing Map')",
"value": "no"
},
{
"key": "access",
"description": "Layer 'Climbing opportunities?' shows access=yes with a fixed text, namely 'Publicly accessible to anyone' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",

View file

@ -14,15 +14,20 @@ import {readFileSync, writeFileSync} from "fs";
const outputDirectory = "Docs/TagInfo"
function generateTagOverview(kv: { k: string, v: string }, description: string) {
function generateTagOverview(kv: { k: string, v: string }, description: string) : {
key: string,
description: string,
value?: string
} {
const overview = {
// OSM tag key (required)
key: kv.k,
description: description
description: description,
value : undefined
};
if (kv.v !== undefined) {
// OSM tag value (optional, if not supplied it means "all values")
overview["value"] = kv.v
overview.value = kv.v
}
return overview
}
@ -30,7 +35,11 @@ function generateTagOverview(kv: { k: string, v: string }, description: string)
function generateLayerUsage(layer: LayerConfig, layout: LayoutConfig): any [] {
const usedTags = layer.source.osmTags.asChange({})
const result = []
const result : {
key: string,
description: string,
value?: string
}[] = []
for (const kv of usedTags) {
const description = "The MapComplete theme " + layout.title.txt + " has a layer " + layer.name.txt + " showing features with this tag"
result.push(generateTagOverview(kv, description))
@ -87,7 +96,8 @@ function generateLayerUsage(layer: LayerConfig, layout: LayoutConfig): any [] {
}
}
return result;
return result.filter(result => !result.key.startsWith("_"))
}
/**