From a7e639d5145a81360fa01f18d0fef2fed5b61064 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Sat, 28 Mar 2020 13:57:06 -0700 Subject: [PATCH] Make the field geometry property accept multiple types Make the Elevation field only universal for nodes (re: #5719) Remove the elevation field from route presets (close #7479) --- data/presets.yaml | 15 ++++++--- data/presets/fields.json | 7 ++-- data/presets/fields/building_area.json | 2 +- data/presets/fields/ele.json | 11 +++++++ .../fields/{elevation.json => ele_node.json} | 6 ++-- data/presets/fields/restrictions.json | 2 +- data/presets/presets.json | 32 +++++++++---------- data/presets/presets/building.json | 1 + data/presets/presets/craft.json | 1 + data/presets/presets/highway/trailhead.json | 2 +- data/presets/presets/man_made/cross.json | 2 +- .../presets/man_made/survey_point.json | 2 +- data/presets/presets/natural/cape.json | 2 +- .../presets/natural/cave_entrance.json | 2 +- data/presets/presets/natural/geyser.json | 2 +- data/presets/presets/natural/peak.json | 2 +- data/presets/presets/natural/saddle.json | 2 +- data/presets/presets/natural/valley.json | 2 +- data/presets/presets/natural/volcano.json | 2 +- data/presets/presets/office.json | 1 + data/presets/presets/shop.json | 1 + .../tourism/information/guidepost.json | 2 +- .../tourism/information/route_marker.json | 2 +- data/presets/schema/field.json | 10 ++++-- data/taginfo.json | 2 +- dist/locales/en.json | 12 ++++--- modules/presets/field.js | 2 +- modules/ui/field.js | 4 +-- 28 files changed, 83 insertions(+), 50 deletions(-) create mode 100644 data/presets/fields/ele.json rename data/presets/fields/{elevation.json => ele_node.json} (65%) diff --git a/data/presets.yaml b/data/presets.yaml index ab280e169..e4a4fa1c0 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -797,6 +797,16 @@ en: # duration field placeholder placeholder: '00:00' terms: '[translate with synonyms or related terms for ''Duration'', separated by commas]' + ele: + # ele=* + label: Elevation + # 'terms: altitude,height' + terms: '[translate with synonyms or related terms for ''Elevation'', separated by commas]' + ele_node: + # ele=* + label: Elevation + # 'terms: altitude,height' + terms: '[translate with synonyms or related terms for ''Elevation'', separated by commas]' electrified: # electrified=* label: Electrification @@ -813,11 +823,6 @@ en: placeholder: 'Contact Line, Electrified Rail...' # 'terms: contact line,powered,third rail' terms: '[translate with synonyms or related terms for ''Electrification'', separated by commas]' - elevation: - # ele=* - label: Elevation - # 'terms: altitude' - terms: '[translate with synonyms or related terms for ''Elevation'', separated by commas]' email: # email=* label: Email diff --git a/data/presets/fields.json b/data/presets/fields.json index 44ba798e5..4f7deeffc 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -52,7 +52,7 @@ "brewery": {"key": "brewery", "type": "semiCombo", "label": "Draft Beers", "terms": ["on tap"]}, "bridge": {"key": "bridge", "type": "typeCombo", "label": "Type", "placeholder": "Default"}, "bridge/support": {"key": "bridge:support", "type": "typeCombo", "label": "Type"}, - "building_area": {"key": "building", "type": "combo", "default": "yes", "geometry": "area", "label": "Building"}, + "building_area": {"key": "building", "type": "combo", "default": "yes", "geometry": ["area"], "label": "Building"}, "building": {"key": "building", "type": "combo", "label": "Building", "terms": ["structure"]}, "building/levels_building": {"key": "building:levels", "type": "number", "minValue": 0, "label": "Building Levels", "placeholder": "2, 4, 6...", "prerequisiteTag": {"key": "building", "valueNot": "no"}}, "building/levels": {"key": "building:levels", "type": "number", "minValue": 0, "label": "Levels", "placeholder": "2, 4, 6..."}, @@ -135,8 +135,9 @@ "drinking_water": {"key": "drinking_water", "type": "check", "label": "Drinkable", "terms": ["drinkworthy", "potable"]}, "drive_through": {"key": "drive_through", "type": "check", "label": "Drive-Through"}, "duration": {"key": "duration", "type": "text", "label": "Duration", "placeholder": "00:00"}, + "ele_node": {"key": "ele", "type": "number", "icon": "elevation", "label": "Elevation", "universal": true, "geometry": ["point", "vertex"], "terms": ["altitude", "height"]}, + "ele": {"key": "ele", "type": "number", "icon": "elevation", "label": "Elevation", "geometry": ["line", "area", "relation"], "terms": ["altitude", "height"]}, "electrified": {"key": "electrified", "type": "combo", "label": "Electrification", "placeholder": "Contact Line, Electrified Rail...", "strings": {"options": {"contact_line": "Contact Line", "rail": "Electrified Rail", "yes": "Yes (unspecified)", "no": "No"}}, "terms": ["contact line", "powered", "third rail"]}, - "elevation": {"key": "ele", "type": "number", "icon": "elevation", "universal": true, "label": "Elevation", "terms": ["altitude"]}, "email": {"key": "email", "type": "email", "placeholder": "example@example.com", "label": "Email"}, "embankment": {"key": "embankment", "type": "typeCombo", "label": "Type", "placeholder": "Default"}, "embassy": {"key": "embassy", "type": "combo", "label": "Type"}, @@ -349,7 +350,7 @@ "resort": {"key": "resort", "type": "combo", "label": "Type"}, "resource": {"key": "resource", "type": "semiCombo", "label": "Resources"}, "restriction": {"key": "restriction", "type": "combo", "label": "Type"}, - "restrictions": {"type": "restrictions", "geometry": "vertex", "icon": "iD-restrictions", "reference": {"rtype": "restriction"}, "label": "Turn Restrictions"}, + "restrictions": {"type": "restrictions", "geometry": ["vertex"], "icon": "iD-restrictions", "reference": {"rtype": "restriction"}, "label": "Turn Restrictions"}, "roof/colour": {"key": "roof:colour", "type": "combo", "label": "Roof Color"}, "room": {"key": "room", "type": "combo", "label": "Type"}, "rooms": {"key": "rooms", "type": "number", "minValue": 0, "label": "Rooms"}, diff --git a/data/presets/fields/building_area.json b/data/presets/fields/building_area.json index 45a62ec5d..4c12b874e 100644 --- a/data/presets/fields/building_area.json +++ b/data/presets/fields/building_area.json @@ -2,6 +2,6 @@ "key": "building", "type": "combo", "default": "yes", - "geometry": "area", + "geometry": ["area"], "label": "Building" } diff --git a/data/presets/fields/ele.json b/data/presets/fields/ele.json new file mode 100644 index 000000000..3a59c3df8 --- /dev/null +++ b/data/presets/fields/ele.json @@ -0,0 +1,11 @@ +{ + "key": "ele", + "type": "number", + "icon": "elevation", + "label": "Elevation", + "geometry": ["line", "area", "relation"], + "terms": [ + "altitude", + "height" + ] +} diff --git a/data/presets/fields/elevation.json b/data/presets/fields/ele_node.json similarity index 65% rename from data/presets/fields/elevation.json rename to data/presets/fields/ele_node.json index 19830edd4..5609dbc66 100644 --- a/data/presets/fields/elevation.json +++ b/data/presets/fields/ele_node.json @@ -2,9 +2,11 @@ "key": "ele", "type": "number", "icon": "elevation", - "universal": true, "label": "Elevation", + "universal": true, + "geometry": ["point", "vertex"], "terms": [ - "altitude" + "altitude", + "height" ] } diff --git a/data/presets/fields/restrictions.json b/data/presets/fields/restrictions.json index ce3889a5d..f63255335 100644 --- a/data/presets/fields/restrictions.json +++ b/data/presets/fields/restrictions.json @@ -1,6 +1,6 @@ { "type": "restrictions", - "geometry": "vertex", + "geometry": ["vertex"], "icon": "iD-restrictions", "reference": { "rtype": "restriction" diff --git a/data/presets/presets.json b/data/presets/presets.json index d7a2724ee..45341e399 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -333,7 +333,7 @@ "bridge/support": {"icon": "fas-archway", "fields": ["bridge/support", "height", "layer", "material"], "moreFields": ["colour", "seamark/type"], "geometry": ["point", "vertex", "area"], "tags": {"bridge:support": "*"}, "name": "Bridge Support"}, "bridge/support/pier": {"icon": "fas-archway", "fields": ["bridge/support", "{bridge/support}"], "geometry": ["point", "vertex", "area"], "tags": {"bridge:support": "pier"}, "name": "Bridge Pier"}, "building_part": {"icon": "maki-building", "fields": ["building/levels", "height", "building/material", "roof/colour"], "moreFields": ["layer"], "geometry": ["area"], "tags": {"building:part": "*"}, "matchScore": 0.5, "terms": ["roof", "simple 3D buildings"], "name": "Building Part"}, - "building": {"icon": "maki-home", "fields": ["name", "building", "building/levels", "height", "address"], "moreFields": ["architect", "building/levels/underground", "building/material", "gnis/feature_id", "layer", "not/name", "operator", "roof/colour", "smoking", "wheelchair"], "geometry": ["area"], "tags": {"building": "*"}, "matchScore": 0.6, "terms": [], "name": "Building"}, + "building": {"icon": "maki-home", "fields": ["name", "building", "building/levels", "height", "address"], "moreFields": ["architect", "building/levels/underground", "building/material", "ele", "gnis/feature_id", "layer", "not/name", "operator", "roof/colour", "smoking", "wheelchair"], "geometry": ["area"], "tags": {"building": "*"}, "matchScore": 0.6, "terms": [], "name": "Building"}, "building/bunker": {"icon": "temaki-bunker", "geometry": ["area"], "tags": {"building": "bunker"}, "matchScore": 0.5, "name": "Bunker", "searchable": false}, "building/entrance": {"icon": "maki-entrance-alt1", "fields": [], "moreFields": [], "geometry": ["vertex"], "tags": {"building": "entrance"}, "name": "Entrance/Exit", "searchable": false}, "building/train_station": {"icon": "maki-building", "geometry": ["point", "vertex", "area"], "tags": {"building": "train_station"}, "matchScore": 0.5, "name": "Train Station Building", "searchable": false}, @@ -387,7 +387,7 @@ "building/warehouse": {"icon": "maki-warehouse", "geometry": ["area"], "tags": {"building": "warehouse"}, "matchScore": 0.5, "name": "Warehouse"}, "club": {"icon": "fas-handshake", "fields": ["name", "club", "operator", "address", "building_area", "opening_hours"], "moreFields": ["access_simple", "building/levels_building", "email", "fax", "gnis/feature_id", "height_building", "internet_access", "internet_access/fee", "internet_access/ssid", "level", "max_age", "min_age", "phone", "website", "wheelchair"], "geometry": ["point", "area"], "tags": {"club": "*"}, "terms": ["social"], "name": "Club"}, "club/sport": {"icon": "maki-pitch", "fields": ["name", "sport", "{club}"], "geometry": ["point", "area"], "tags": {"club": "sport"}, "terms": ["athletics club", "sporting club", "sports association", "sports society"], "name": "Sports Club"}, - "craft": {"icon": "temaki-tools", "fields": ["name", "craft", "operator", "address", "building_area", "opening_hours"], "moreFields": ["air_conditioning", "building/levels_building", "email", "fax", "gnis/feature_id", "height_building", "internet_access", "internet_access/fee", "internet_access/ssid", "level", "phone", "product", "ref/vatin", "website", "wheelchair"], "geometry": ["point", "area"], "tags": {"craft": "*"}, "terms": [], "name": "Craft"}, + "craft": {"icon": "temaki-tools", "fields": ["name", "craft", "operator", "address", "building_area", "opening_hours"], "moreFields": ["air_conditioning", "building/levels_building", "ele", "email", "fax", "gnis/feature_id", "height_building", "internet_access", "internet_access/fee", "internet_access/ssid", "level", "phone", "product", "ref/vatin", "website", "wheelchair"], "geometry": ["point", "area"], "tags": {"craft": "*"}, "terms": [], "name": "Craft"}, "craft/locksmith": {"icon": "maki-marker-stroked", "geometry": ["point", "area"], "tags": {"craft": "locksmith"}, "reference": {"key": "shop", "value": "locksmith"}, "name": "Locksmith", "searchable": false}, "craft/tailor": {"icon": "temaki-needle_and_spool", "geometry": ["point", "area"], "tags": {"craft": "tailor"}, "reference": {"key": "shop", "value": "tailor"}, "name": "Tailor", "searchable": false}, "craft/agricultural_engines": {"icon": "temaki-tools", "geometry": ["point", "area"], "tags": {"craft": "agricultural_engines"}, "name": "Argricultural Engines Mechanic"}, @@ -565,7 +565,7 @@ "highway/track": {"icon": "fas-truck-monster", "fields": ["name", "tracktype", "surface", "width", "structure", "access", "incline", "smoothness"], "moreFields": ["covered", "flood_prone", "horse_scale", "maxweight_bridge", "mtb/scale", "mtb/scale/imba", "mtb/scale/uphill", "stroller", "wheelchair"], "geometry": ["line"], "tags": {"highway": "track"}, "terms": ["woods road", "forest road", "logging road", "fire road", "farm road", "agricultural road", "ranch road", "carriage road", "primitive", "unmaintained", "rut", "offroad", "4wd", "4x4", "four wheel drive", "atv", "quad", "jeep", "double track", "two track"], "name": "Unmaintained Track Road"}, "highway/traffic_mirror": {"icon": "maki-circle-stroked", "geometry": ["point", "vertex"], "fields": ["direction"], "tags": {"highway": "traffic_mirror"}, "terms": ["blind spot", "convex", "corner", "curved", "roadside", "round", "safety", "sphere", "visibility"], "name": "Traffic Mirror"}, "highway/traffic_signals": {"icon": "temaki-traffic_signals", "geometry": ["vertex"], "tags": {"highway": "traffic_signals"}, "fields": ["traffic_signals", "traffic_signals/direction"], "terms": ["light", "stoplight", "traffic light"], "name": "Traffic Signals"}, - "highway/trailhead": {"icon": "fas-hiking", "fields": ["name", "operator", "elevation", "address", "access_simple", "fee", "payment_multi_fee", "charge_fee"], "moreFields": ["gnis/feature_id", "opening_hours"], "geometry": ["vertex"], "tags": {"highway": "trailhead"}, "terms": ["hiking", "mile zero", "mountain biking", "mountaineering", "trail endpoint", "trail start", "staging area", "trekking"], "name": "Trailhead"}, + "highway/trailhead": {"icon": "fas-hiking", "fields": ["name", "operator", "ele_node", "address", "access_simple", "fee", "payment_multi_fee", "charge_fee"], "moreFields": ["gnis/feature_id", "opening_hours"], "geometry": ["vertex"], "tags": {"highway": "trailhead"}, "terms": ["hiking", "mile zero", "mountain biking", "mountaineering", "trail endpoint", "trail start", "staging area", "trekking"], "name": "Trailhead"}, "highway/trunk_link": {"icon": "iD-highway-trunk-link", "fields": ["{highway/motorway_link}"], "moreFields": ["{highway/motorway_link}"], "geometry": ["line"], "tags": {"highway": "trunk_link"}, "terms": ["on ramp", "off ramp", "ramp", "road", "street"], "name": "Trunk Link"}, "highway/trunk": {"icon": "iD-highway-trunk", "fields": ["name", "ref_road_number", "oneway", "maxspeed", "lanes", "surface", "structure", "access"], "moreFields": ["charge_toll", "covered", "incline", "junction_line", "lit", "maxheight", "maxweight_bridge", "minspeed", "not/name", "smoothness", "toll", "width"], "geometry": ["line"], "tags": {"highway": "trunk"}, "terms": ["road", "street"], "name": "Trunk Road"}, "highway/turning_circle": {"icon": "maki-circle-stroked", "geometry": ["vertex"], "tags": {"highway": "turning_circle"}, "terms": ["cul-de-sac"], "name": "Turning Circle"}, @@ -738,7 +738,7 @@ "man_made/chimney": {"icon": "temaki-chimney", "fields": ["operator", "material", "height"], "geometry": ["point", "area"], "tags": {"man_made": "chimney"}, "name": "Chimney"}, "man_made/clearcut": {"icon": "maki-logging", "geometry": ["area"], "tags": {"man_made": "clearcut"}, "terms": ["cut", "forest", "lumber", "tree", "wood"], "name": "Clearcut Forest"}, "man_made/crane": {"icon": "temaki-crane", "fields": ["operator", "manufacturer", "height", "crane/type"], "geometry": ["point", "line", "vertex", "area"], "tags": {"man_made": "crane"}, "name": "Crane"}, - "man_made/cross": {"icon": "maki-religious-christian", "fields": ["name", "material", "height", "elevation", "inscription", "direction"], "geometry": ["point", "vertex"], "tags": {"man_made": "cross"}, "name": "Summit Cross"}, + "man_made/cross": {"icon": "maki-religious-christian", "fields": ["name", "material", "height", "ele_node", "inscription", "direction"], "geometry": ["point", "vertex"], "tags": {"man_made": "cross"}, "name": "Summit Cross"}, "man_made/cutline": {"icon": "maki-logging", "geometry": ["line"], "tags": {"man_made": "cutline"}, "name": "Cut line"}, "man_made/dyke": {"geometry": ["line"], "tags": {"man_made": "dyke"}, "terms": ["Dike", "Dyke", "Floodbank", "Stopbank"], "name": "Levee"}, "man_made/embankment": {"geometry": ["line"], "tags": {"man_made": "embankment"}, "name": "Embankment"}, @@ -775,7 +775,7 @@ "man_made/street_cabinet": {"icon": "fas-door-closed", "geometry": ["point", "area"], "fields": ["ref", "operator", "street_cabinet", "utility_semi", "height", "colour"], "terms": ["cable tv", "monitoring box", "technical box", "telecommunications", "traffic signal controls"], "tags": {"man_made": "street_cabinet"}, "name": "Street Cabinet"}, "man_made/surveillance": {"icon": "temaki-security_camera", "geometry": ["point", "vertex"], "fields": ["surveillance", "surveillance/type", "surveillance/zone", "direction"], "terms": ["anpr", "alpr", "camera", "car plate recognition", "cctv", "guard", "license plate recognition", "monitoring", "number plate recognition", "security", "video", "webcam"], "tags": {"man_made": "surveillance"}, "name": "Surveillance"}, "man_made/surveillance/camera": {"icon": "temaki-security_camera", "geometry": ["point", "vertex"], "fields": ["surveillance", "surveillance/type", "camera/type", "camera/mount", "camera/direction", "surveillance/zone", "contact/webcam"], "moreFields": ["manufacturer"], "terms": ["anpr", "alpr", "camera", "car plate recognition", "cctv", "guard", "license plate recognition", "monitoring", "number plate recognition", "security", "video", "webcam"], "tags": {"man_made": "surveillance", "surveillance:type": "camera"}, "name": "Surveillance Camera"}, - "man_made/survey_point": {"icon": "temaki-benchmark_disk", "fields": ["ref", "elevation", "inscription"], "geometry": ["point", "vertex"], "terms": ["trig point", "triangulation pillar", "trigonometrical station"], "tags": {"man_made": "survey_point"}, "name": "Survey Point"}, + "man_made/survey_point": {"icon": "temaki-benchmark_disk", "fields": ["ref", "ele_node", "inscription"], "geometry": ["point", "vertex"], "terms": ["trig point", "triangulation pillar", "trigonometrical station"], "tags": {"man_made": "survey_point"}, "name": "Survey Point"}, "man_made/torii": {"icon": "temaki-shinto", "fields": ["height", "material", "colour", "lit"], "moreFields": ["name", "operator", "ref"], "geometry": ["point", "vertex", "line"], "terms": ["Japanese gate", "Shinto shrine"], "tags": {"man_made": "torii"}, "name": "Torii"}, "man_made/tower": {"icon": "temaki-tower", "fields": ["tower/type", "tower/construction", "height", "building_area"], "moreFields": ["architect", "gnis/feature_id"], "geometry": ["point", "area"], "tags": {"man_made": "tower"}, "name": "Tower"}, "man_made/tower/bell_tower": {"icon": "fas-bell", "moreFields": ["{man_made/tower}", "opening_hours"], "geometry": ["point", "area"], "terms": ["belfry", "bell gable", "campanile", "church tower", "klockstapel"], "tags": {"man_made": "tower", "tower:type": "bell_tower"}, "reference": {"key": "tower:type", "value": "bell_tower"}, "name": "Bell Tower"}, @@ -804,21 +804,21 @@ "natural/bare_rock": {"geometry": ["area"], "tags": {"natural": "bare_rock"}, "terms": ["rock"], "name": "Bare Rock"}, "natural/bay": {"icon": "temaki-beach", "geometry": ["point", "line", "area"], "fields": ["name"], "tags": {"natural": "bay"}, "terms": [], "name": "Bay"}, "natural/beach": {"icon": "temaki-beach", "fields": ["surface"], "geometry": ["point", "area"], "tags": {"natural": "beach"}, "terms": ["shore"], "name": "Beach"}, - "natural/cape": {"icon": "temaki-beach", "fields": ["name", "elevation", "description"], "geometry": ["point", "vertex"], "tags": {"natural": "cape"}, "terms": ["bay", "coastline", "erosion", "headland", "promontory"], "name": "Cape"}, - "natural/cave_entrance": {"icon": "maki-triangle", "geometry": ["point", "area"], "fields": ["name", "elevation", "access_simple", "direction", "fee", "payment_multi_fee", "charge_fee"], "tags": {"natural": "cave_entrance"}, "terms": ["cavern", "hollow", "grotto", "shelter", "cavity"], "name": "Cave Entrance"}, + "natural/cape": {"icon": "temaki-beach", "fields": ["name", "ele_node", "description"], "geometry": ["point", "vertex"], "tags": {"natural": "cape"}, "terms": ["bay", "coastline", "erosion", "headland", "promontory"], "name": "Cape"}, + "natural/cave_entrance": {"icon": "maki-triangle", "geometry": ["point", "area"], "fields": ["name", "ele_node", "access_simple", "direction", "fee", "payment_multi_fee", "charge_fee"], "tags": {"natural": "cave_entrance"}, "terms": ["cavern", "hollow", "grotto", "shelter", "cavity"], "name": "Cave Entrance"}, "natural/cliff": {"icon": "temaki-cliff_falling_rocks", "fields": ["name", "height"], "geometry": ["point", "vertex", "line", "area"], "tags": {"natural": "cliff"}, "terms": ["crag", "escarpment", "rock face", "scarp"], "name": "Cliff"}, "natural/coastline": {"icon": "temaki-beach", "geometry": ["line"], "tags": {"natural": "coastline"}, "terms": ["shore"], "name": "Coastline"}, "natural/fell": {"geometry": ["area"], "tags": {"natural": "fell"}, "terms": [], "name": "Fell"}, - "natural/geyser": {"icon": "maki-water", "fields": ["name", "geyser/height", "elevation"], "geometry": ["point"], "tags": {"natural": "geyser"}, "terms": ["erupting spring", "geiser", "gieser", "guyser", "hot water", "hydrogeology", "hydrothermal explosion", "steam"], "name": "Geyser"}, + "natural/geyser": {"icon": "maki-water", "fields": ["name", "geyser/height", "ele_node"], "geometry": ["point"], "tags": {"natural": "geyser"}, "terms": ["erupting spring", "geiser", "gieser", "guyser", "hot water", "hydrogeology", "hydrothermal explosion", "steam"], "name": "Geyser"}, "natural/glacier": {"icon": "temaki-snow", "geometry": ["area"], "tags": {"natural": "glacier"}, "terms": ["ice", "snow"], "name": "Glacier"}, "natural/grassland": {"icon": "temaki-grass", "geometry": ["area"], "tags": {"natural": "grassland"}, "terms": ["field", "prairie", "savanna"], "name": "Grassland"}, "natural/heath": {"geometry": ["area"], "tags": {"natural": "heath"}, "terms": [], "name": "Heath"}, "natural/mud": {"geometry": ["area"], "tags": {"natural": "mud"}, "terms": ["wetland"], "name": "Mud"}, - "natural/peak": {"icon": "maki-mountain", "fields": ["name", "elevation"], "geometry": ["point", "vertex"], "tags": {"natural": "peak"}, "terms": ["acme", "aiguille", "alp", "climax", "crest", "crown", "hill", "mount", "mountain", "pinnacle", "summit", "tip", "top"], "name": "Peak"}, + "natural/peak": {"icon": "maki-mountain", "fields": ["name", "ele_node"], "geometry": ["point", "vertex"], "tags": {"natural": "peak"}, "terms": ["acme", "aiguille", "alp", "climax", "crest", "crown", "hill", "mount", "mountain", "pinnacle", "summit", "tip", "top"], "name": "Peak"}, "natural/reef": {"icon": "temaki-beach", "geometry": ["area", "point"], "tags": {"natural": "reef"}, "terms": ["barrier", "coral", "ocean", "sand", "shoal"], "name": "Reef"}, "natural/ridge": {"icon": "temaki-mountain_range", "geometry": ["line"], "tags": {"natural": "ridge"}, "terms": ["crest"], "name": "Ridge"}, "natural/rock": {"icon": "temaki-boulder2", "fields": ["name"], "geometry": ["point", "area"], "tags": {"natural": "rock"}, "terms": ["boulder", "stone", "rock"], "name": "Attached Rock / Boulder"}, - "natural/saddle": {"icon": "temaki-saddle", "fields": ["elevation"], "geometry": ["point", "vertex"], "tags": {"natural": "saddle"}, "terms": ["pass", "mountain pass", "top"], "name": "Saddle"}, + "natural/saddle": {"icon": "temaki-saddle", "fields": ["ele_node"], "geometry": ["point", "vertex"], "tags": {"natural": "saddle"}, "terms": ["pass", "mountain pass", "top"], "name": "Saddle"}, "natural/sand": {"geometry": ["area"], "tags": {"natural": "sand"}, "terms": ["desert"], "name": "Sand"}, "natural/scree": {"geometry": ["area"], "tags": {"natural": "scree"}, "terms": ["loose rocks"], "name": "Scree"}, "natural/scrub": {"geometry": ["area"], "tags": {"natural": "scrub"}, "terms": ["bush", "shrubs"], "name": "Scrub"}, @@ -827,8 +827,8 @@ "natural/stone": {"icon": "temaki-boulder1", "fields": ["name"], "geometry": ["point", "area"], "tags": {"natural": "stone"}, "terms": ["boulder", "stone", "rock"], "name": "Unattached Stone / Boulder"}, "natural/tree_row": {"icon": "temaki-tree_row", "fields": ["leaf_type", "leaf_cycle", "denotation"], "geometry": ["line"], "tags": {"natural": "tree_row"}, "terms": [], "name": "Tree Row"}, "natural/tree": {"icon": "maki-park", "fields": ["leaf_type_singular", "leaf_cycle_singular", "denotation", "height", "diameter"], "moreFields": ["circumference", "species/wikidata"], "geometry": ["point", "vertex"], "tags": {"natural": "tree"}, "terms": [], "name": "Tree"}, - "natural/valley": {"icon": "temaki-valley", "fields": ["name", "elevation", "description"], "geometry": ["vertex", "point", "line"], "tags": {"natural": "valley"}, "terms": ["canyon", "dale", "dell", "dene", "depression", "glen", "gorge", "gully", "gulley", "gultch", "hollow", "ravine", "rift", "vale"], "name": "Valley"}, - "natural/volcano": {"icon": "maki-volcano", "fields": ["name", "elevation", "volcano/status", "volcano/type"], "geometry": ["point", "vertex"], "tags": {"natural": "volcano"}, "terms": ["mountain", "crater"], "name": "Volcano"}, + "natural/valley": {"icon": "temaki-valley", "fields": ["name", "ele_node", "description"], "geometry": ["vertex", "point", "line"], "tags": {"natural": "valley"}, "terms": ["canyon", "dale", "dell", "dene", "depression", "glen", "gorge", "gully", "gulley", "gultch", "hollow", "ravine", "rift", "vale"], "name": "Valley"}, + "natural/volcano": {"icon": "maki-volcano", "fields": ["name", "ele_node", "volcano/status", "volcano/type"], "geometry": ["point", "vertex"], "tags": {"natural": "volcano"}, "terms": ["mountain", "crater"], "name": "Volcano"}, "natural/water": {"icon": "maki-water", "fields": ["name", "water", "intermittent"], "moreFields": ["fishing", "gnis/feature_id", "salt", "tidal"], "geometry": ["area"], "tags": {"natural": "water"}, "name": "Water"}, "natural/water/basin": {"icon": "maki-water", "fields": ["name", "basin", "intermittent_yes"], "geometry": ["area"], "tags": {"natural": "water", "water": "basin"}, "reference": {"key": "water", "value": "basin"}, "terms": ["detention", "drain", "overflow", "rain", "retention"], "name": "Basin"}, "natural/water/canal": {"icon": "iD-waterway-canal", "fields": ["{natural/water}", "salt"], "geometry": ["area"], "tags": {"natural": "water", "water": "canal"}, "reference": {"key": "water", "value": "canal"}, "name": "Canal Area"}, @@ -843,7 +843,7 @@ "natural/wood": {"icon": "maki-park-alt1", "fields": ["name", "leaf_type", "leaf_cycle"], "geometry": ["area", "point"], "tags": {"natural": "wood"}, "terms": ["boreal", "forest", "forrest", "taiga", "tree", "trees", "woodlands", "woods"], "name": "Natural Wood"}, "network/type/node_network": {"fields": ["name", "rwn_ref", "expected_rwn_route_relations", "rcn_ref", "expected_rcn_route_relations"], "geometry": ["vertex"], "tags": {"network:type": "node_network"}, "terms": ["node network", "rcn", "rwn"], "countryCodes": ["be", "de", "lu", "nl"], "matchScore": 0.2, "name": "Recreational Network Node"}, "noexit/yes": {"icon": "maki-barrier", "geometry": ["vertex"], "terms": ["no exit", "road end", "dead end"], "tags": {"noexit": "yes"}, "reference": {"key": "noexit", "value": "*"}, "name": "No Exit"}, - "office": {"icon": "maki-suitcase", "fields": ["name", "office", "address", "building_area", "opening_hours"], "moreFields": ["air_conditioning", "baby_feeding", "building/levels_building", "email", "fax", "gnis/feature_id", "height_building", "internet_access", "internet_access/fee", "internet_access/ssid", "level", "not/name", "operator", "phone", "ref/vatin", "smoking", "website", "wheelchair"], "geometry": ["point", "vertex", "area"], "tags": {"office": "*"}, "terms": [], "name": "Office"}, + "office": {"icon": "maki-suitcase", "fields": ["name", "office", "address", "building_area", "opening_hours"], "moreFields": ["air_conditioning", "baby_feeding", "building/levels_building", "ele", "email", "fax", "gnis/feature_id", "height_building", "internet_access", "internet_access/fee", "internet_access/ssid", "level", "not/name", "operator", "phone", "ref/vatin", "smoking", "website", "wheelchair"], "geometry": ["point", "vertex", "area"], "tags": {"office": "*"}, "terms": [], "name": "Office"}, "office/administrative": {"icon": "maki-suitcase", "geometry": ["point", "area"], "tags": {"office": "administrative"}, "searchable": false, "name": "Administrative Office"}, "office/physician": {"icon": "maki-suitcase", "geometry": ["point", "area"], "tags": {"office": "physician"}, "searchable": false, "name": "Physician"}, "office/travel_agent": {"icon": "maki-suitcase", "geometry": ["point", "area"], "tags": {"office": "travel_agent"}, "reference": {"key": "shop", "value": "travel_agency"}, "name": "Travel Agency", "searchable": false}, @@ -1029,7 +1029,7 @@ "seamark/buoy_lateral/green": {"icon": "temaki-buoy", "geometry": ["point", "vertex"], "terms": ["lateral buoy", "buoy lateral", "cevni", "channel marker", "iala", "lateral mark"], "tags": {"seamark:type": "buoy_lateral", "seamark:buoy_lateral:colour": "green"}, "name": "Green Buoy"}, "seamark/buoy_lateral/red": {"icon": "temaki-buoy", "geometry": ["point", "vertex"], "terms": ["lateral buoy", "buoy lateral", "cevni", "channel marker", "iala", "lateral mark"], "tags": {"seamark:type": "buoy_lateral", "seamark:buoy_lateral:colour": "red"}, "name": "Red Buoy"}, "seamark/mooring": {"icon": "temaki-buoy", "fields": ["ref", "operator", "seamark/mooring/category", "seamark/type"], "geometry": ["point"], "terms": ["dolphin", "pile", "bollard", "buoy", "post"], "tags": {"seamark:type": "mooring"}, "name": "Mooring"}, - "shop": {"icon": "maki-shop", "fields": ["name", "shop", "operator", "address", "building_area", "opening_hours", "payment_multi"], "moreFields": ["air_conditioning", "brand", "building/levels_building", "currency_multi", "email", "fax", "gnis/feature_id", "height_building", "internet_access", "internet_access/fee", "internet_access/ssid", "level", "not/name", "phone", "ref/vatin", "second_hand", "stroller", "website", "wheelchair"], "geometry": ["point", "area"], "tags": {"shop": "*"}, "terms": [], "name": "Shop"}, + "shop": {"icon": "maki-shop", "fields": ["name", "shop", "operator", "address", "building_area", "opening_hours", "payment_multi"], "moreFields": ["air_conditioning", "brand", "building/levels_building", "currency_multi", "ele", "email", "fax", "gnis/feature_id", "height_building", "internet_access", "internet_access/fee", "internet_access/ssid", "level", "not/name", "phone", "ref/vatin", "second_hand", "stroller", "website", "wheelchair"], "geometry": ["point", "area"], "tags": {"shop": "*"}, "terms": [], "name": "Shop"}, "shop/boutique": {"icon": "maki-shop", "fields": ["name", "clothes", "{shop}"], "geometry": ["point", "area"], "tags": {"shop": "boutique"}, "searchable": false, "name": "Boutique"}, "shop/fashion": {"icon": "maki-shop", "fields": ["name", "clothes", "{shop}"], "geometry": ["point", "area"], "tags": {"shop": "fashion"}, "searchable": false, "name": "Fashion Store"}, "shop/fishmonger": {"icon": "maki-shop", "geometry": ["point", "area"], "tags": {"shop": "fishmonger"}, "reference": {"key": "shop", "value": "seafood"}, "name": "Fishmonger", "searchable": false}, @@ -1222,10 +1222,10 @@ "tourism/hotel": {"icon": "fas-concierge-bell", "fields": ["{tourism/motel}"], "moreFields": ["{tourism/motel}", "bar", "stars"], "geometry": ["point", "area"], "tags": {"tourism": "hotel"}, "terms": ["concierge", "lodge", "lodging", "overnight accommodations"], "name": "Hotel"}, "tourism/information": {"icon": "maki-information", "fields": ["information", "operator", "address", "building_area"], "moreFields": ["level"], "geometry": ["point", "vertex", "area"], "tags": {"tourism": "information"}, "name": "Information"}, "tourism/information/board": {"icon": "temaki-info_board", "fields": ["name", "operator", "board_type", "direction"], "geometry": ["point", "vertex"], "tags": {"tourism": "information", "information": "board"}, "reference": {"key": "information", "value": "board"}, "name": "Information Board"}, - "tourism/information/guidepost": {"icon": "fas-map-signs", "fields": ["name", "elevation", "operator", "ref"], "moreFields": ["material"], "geometry": ["point", "vertex"], "terms": ["signpost"], "tags": {"tourism": "information", "information": "guidepost"}, "reference": {"key": "information", "value": "guidepost"}, "name": "Guidepost"}, + "tourism/information/guidepost": {"icon": "fas-map-signs", "fields": ["name", "ele_node", "operator", "ref"], "moreFields": ["material"], "geometry": ["point", "vertex"], "terms": ["signpost"], "tags": {"tourism": "information", "information": "guidepost"}, "reference": {"key": "information", "value": "guidepost"}, "name": "Guidepost"}, "tourism/information/map": {"icon": "fas-map", "fields": ["operator", "map_type", "map_size", "direction"], "geometry": ["point", "vertex"], "tags": {"tourism": "information", "information": "map"}, "reference": {"key": "information", "value": "map"}, "name": "Map"}, "tourism/information/office": {"icon": "maki-information", "fields": ["name", "operator", "address", "building_area", "internet_access", "internet_access/fee"], "moreFields": ["building/levels_building", "email", "fax", "gnis/feature_id", "height_building", "internet_access/ssid", "phone", "website", "wheelchair"], "geometry": ["point", "vertex", "area"], "tags": {"tourism": "information", "information": "office"}, "reference": {"key": "information", "value": "office"}, "name": "Tourist Information Office"}, - "tourism/information/route_marker": {"icon": "maki-information", "fields": ["ref", "operator", "colour", "material", "elevation"], "geometry": ["point", "vertex"], "terms": ["cairn", "painted blaze", "route flag", "route marker", "stone pile", "trail blaze", "trail post", "way marker"], "tags": {"tourism": "information", "information": "route_marker"}, "reference": {"key": "information", "value": "route_marker"}, "name": "Trail Marker"}, + "tourism/information/route_marker": {"icon": "maki-information", "fields": ["ref", "operator", "colour", "material", "ele_node"], "geometry": ["point", "vertex"], "terms": ["cairn", "painted blaze", "route flag", "route marker", "stone pile", "trail blaze", "trail post", "way marker"], "tags": {"tourism": "information", "information": "route_marker"}, "reference": {"key": "information", "value": "route_marker"}, "name": "Trail Marker"}, "tourism/information/terminal": {"icon": "temaki-app_terminal", "fields": ["operator"], "geometry": ["point", "vertex"], "tags": {"tourism": "information", "information": "terminal"}, "reference": {"key": "information", "value": "terminal"}, "name": "Information Terminal"}, "tourism/motel": {"icon": "maki-lodging", "fields": ["name", "brand", "address", "building_area", "rooms", "internet_access", "internet_access/fee"], "moreFields": ["air_conditioning", "brand", "building/levels_building", "email", "fax", "gnis/feature_id", "height_building", "internet_access/ssid", "operator", "payment_multi", "phone", "ref/vatin", "reservation", "smoking", "website", "wheelchair"], "geometry": ["point", "area"], "tags": {"tourism": "motel"}, "terms": ["lodging", "motor hotel", "overnight accommodations"], "name": "Motel"}, "tourism/museum": {"icon": "temaki-museum", "fields": ["name", "operator", "operator/type", "museum", "address", "building_area", "opening_hours"], "moreFields": ["air_conditioning", "building/levels_building", "charge_fee", "email", "fax", "fee", "gnis/feature_id", "height_building", "internet_access", "internet_access/fee", "internet_access/ssid", "level", "payment_multi", "phone", "website", "wheelchair"], "geometry": ["point", "area"], "terms": ["art*", "exhibit*", "gallery", "foundation", "hall", "institution", "paint*", "photo*", "sculpt*"], "tags": {"tourism": "museum"}, "name": "Museum"}, diff --git a/data/presets/presets/building.json b/data/presets/presets/building.json index 7298e2275..ee3674bc6 100644 --- a/data/presets/presets/building.json +++ b/data/presets/presets/building.json @@ -11,6 +11,7 @@ "architect", "building/levels/underground", "building/material", + "ele", "gnis/feature_id", "layer", "not/name", diff --git a/data/presets/presets/craft.json b/data/presets/presets/craft.json index cfd505362..ae438ae32 100644 --- a/data/presets/presets/craft.json +++ b/data/presets/presets/craft.json @@ -11,6 +11,7 @@ "moreFields": [ "air_conditioning", "building/levels_building", + "ele", "email", "fax", "gnis/feature_id", diff --git a/data/presets/presets/highway/trailhead.json b/data/presets/presets/highway/trailhead.json index 5785ba491..88084430c 100644 --- a/data/presets/presets/highway/trailhead.json +++ b/data/presets/presets/highway/trailhead.json @@ -3,7 +3,7 @@ "fields": [ "name", "operator", - "elevation", + "ele_node", "address", "access_simple", "fee", diff --git a/data/presets/presets/man_made/cross.json b/data/presets/presets/man_made/cross.json index 5e8c56f26..33f54afd6 100644 --- a/data/presets/presets/man_made/cross.json +++ b/data/presets/presets/man_made/cross.json @@ -4,7 +4,7 @@ "name", "material", "height", - "elevation", + "ele_node", "inscription", "direction" ], diff --git a/data/presets/presets/man_made/survey_point.json b/data/presets/presets/man_made/survey_point.json index 0c284249c..eba59bc35 100644 --- a/data/presets/presets/man_made/survey_point.json +++ b/data/presets/presets/man_made/survey_point.json @@ -2,7 +2,7 @@ "icon": "temaki-benchmark_disk", "fields": [ "ref", - "elevation", + "ele_node", "inscription" ], "geometry": [ diff --git a/data/presets/presets/natural/cape.json b/data/presets/presets/natural/cape.json index 1614882d6..2130ed5b3 100644 --- a/data/presets/presets/natural/cape.json +++ b/data/presets/presets/natural/cape.json @@ -2,7 +2,7 @@ "icon": "temaki-beach", "fields": [ "name", - "elevation", + "ele_node", "description" ], "geometry": [ diff --git a/data/presets/presets/natural/cave_entrance.json b/data/presets/presets/natural/cave_entrance.json index fd75acbb7..a88b8ab4a 100644 --- a/data/presets/presets/natural/cave_entrance.json +++ b/data/presets/presets/natural/cave_entrance.json @@ -6,7 +6,7 @@ ], "fields": [ "name", - "elevation", + "ele_node", "access_simple", "direction", "fee", diff --git a/data/presets/presets/natural/geyser.json b/data/presets/presets/natural/geyser.json index 956acd362..98641a3be 100644 --- a/data/presets/presets/natural/geyser.json +++ b/data/presets/presets/natural/geyser.json @@ -3,7 +3,7 @@ "fields": [ "name", "geyser/height", - "elevation" + "ele_node" ], "geometry": [ "point" diff --git a/data/presets/presets/natural/peak.json b/data/presets/presets/natural/peak.json index 660cbcf1e..2fa6688d3 100644 --- a/data/presets/presets/natural/peak.json +++ b/data/presets/presets/natural/peak.json @@ -2,7 +2,7 @@ "icon": "maki-mountain", "fields": [ "name", - "elevation" + "ele_node" ], "geometry": [ "point", diff --git a/data/presets/presets/natural/saddle.json b/data/presets/presets/natural/saddle.json index c887d144c..573db6ef8 100644 --- a/data/presets/presets/natural/saddle.json +++ b/data/presets/presets/natural/saddle.json @@ -1,7 +1,7 @@ { "icon": "temaki-saddle", "fields": [ - "elevation" + "ele_node" ], "geometry": [ "point", diff --git a/data/presets/presets/natural/valley.json b/data/presets/presets/natural/valley.json index a90a75020..e427b4a09 100644 --- a/data/presets/presets/natural/valley.json +++ b/data/presets/presets/natural/valley.json @@ -2,7 +2,7 @@ "icon": "temaki-valley", "fields": [ "name", - "elevation", + "ele_node", "description" ], "geometry": [ diff --git a/data/presets/presets/natural/volcano.json b/data/presets/presets/natural/volcano.json index 066a69ebd..ca8aa5074 100644 --- a/data/presets/presets/natural/volcano.json +++ b/data/presets/presets/natural/volcano.json @@ -2,7 +2,7 @@ "icon": "maki-volcano", "fields": [ "name", - "elevation", + "ele_node", "volcano/status", "volcano/type" ], diff --git a/data/presets/presets/office.json b/data/presets/presets/office.json index bc139e672..b9121a733 100644 --- a/data/presets/presets/office.json +++ b/data/presets/presets/office.json @@ -11,6 +11,7 @@ "air_conditioning", "baby_feeding", "building/levels_building", + "ele", "email", "fax", "gnis/feature_id", diff --git a/data/presets/presets/shop.json b/data/presets/presets/shop.json index c7a401027..1ac0a3ae3 100644 --- a/data/presets/presets/shop.json +++ b/data/presets/presets/shop.json @@ -14,6 +14,7 @@ "brand", "building/levels_building", "currency_multi", + "ele", "email", "fax", "gnis/feature_id", diff --git a/data/presets/presets/tourism/information/guidepost.json b/data/presets/presets/tourism/information/guidepost.json index b40bb0063..d392a718e 100644 --- a/data/presets/presets/tourism/information/guidepost.json +++ b/data/presets/presets/tourism/information/guidepost.json @@ -2,7 +2,7 @@ "icon": "fas-map-signs", "fields": [ "name", - "elevation", + "ele_node", "operator", "ref" ], diff --git a/data/presets/presets/tourism/information/route_marker.json b/data/presets/presets/tourism/information/route_marker.json index b35b828a3..0583d21a4 100644 --- a/data/presets/presets/tourism/information/route_marker.json +++ b/data/presets/presets/tourism/information/route_marker.json @@ -5,7 +5,7 @@ "operator", "colour", "material", - "elevation" + "ele_node" ], "geometry": [ "point", diff --git a/data/presets/schema/field.json b/data/presets/schema/field.json index 2e410238e..e027663b9 100644 --- a/data/presets/schema/field.json +++ b/data/presets/schema/field.json @@ -83,8 +83,14 @@ "required": true }, "geometry": { - "description": "If specified, only show the field for this kind of geometry", - "type": "string" + "description": "If specified, only show the field for these kinds of geometry", + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string", + "enum": ["point", "vertex", "line", "area", "relation"] + } }, "default": { "description": "The default value for this field", diff --git a/data/taginfo.json b/data/taginfo.json index a04fdaa5d..6fa8985eb 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -1485,11 +1485,11 @@ {"key": "drinking_water", "description": "🄵 Drinkable"}, {"key": "drive_through", "description": "🄵 Drive-Through"}, {"key": "duration", "description": "🄵 Duration"}, + {"key": "ele", "description": "🄵 Elevation"}, {"key": "electrified", "value": "contact_line", "description": "🄵 Electrification"}, {"key": "electrified", "value": "rail", "description": "🄵 Electrification"}, {"key": "electrified", "value": "yes", "description": "🄵 Electrification"}, {"key": "electrified", "value": "no", "description": "🄵 Electrification"}, - {"key": "ele", "description": "🄵 Elevation"}, {"key": "email", "description": "🄵 Email"}, {"key": "embankment", "description": "🄵 Type, 🄵 Structure"}, {"key": "embassy", "description": "🄵 Type"}, diff --git a/dist/locales/en.json b/dist/locales/en.json index 4ed500f5c..e1c9de88e 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -3289,6 +3289,14 @@ "terms": "", "placeholder": "00:00" }, + "ele_node": { + "label": "Elevation", + "terms": "altitude,height" + }, + "ele": { + "label": "Elevation", + "terms": "altitude,height" + }, "electrified": { "label": "Electrification", "terms": "contact line,powered,third rail", @@ -3300,10 +3308,6 @@ "no": "No" } }, - "elevation": { - "label": "Elevation", - "terms": "altitude" - }, "email": { "label": "Email", "terms": "", diff --git a/modules/presets/field.js b/modules/presets/field.js index cb6e3b2bc..c1d82d05e 100644 --- a/modules/presets/field.js +++ b/modules/presets/field.js @@ -14,7 +14,7 @@ export function presetField(fieldID, field) { // for use in classes, element ids, css selectors _this.safeid = utilSafeClassName(fieldID); - _this.matchGeometry = (geom) => !_this.geometry || _this.geometry === geom; + _this.matchGeometry = (geom) => !_this.geometry || _this.geometry.indexOf(geom) !== -1; _this.matchAllGeometry = (geometries) => { return !_this.geometry || geometries.every(geom => _this.geometry.indexOf(geom) !== -1); diff --git a/modules/ui/field.js b/modules/ui/field.js index cf126005c..867915210 100644 --- a/modules/ui/field.js +++ b/modules/ui/field.js @@ -300,8 +300,8 @@ export function uiField(context, presetField, entityIDs, options) { entityIDs.length > 1 && uiFields[field.type].supportsMultiselection === false) return false; - if (field.geometry && entityIDs.some(function(entityID) { - return field.geometry.indexOf(context.graph().geometry(entityID)) === -1; + if (field.geometry && !entityIDs.every(function(entityID) { + return field.matchGeometry(context.graph().geometry(entityID)); })) return false; if (field.countryCodes || field.notCountryCodes) {