Drop matchScore for building presets (closes #2793)

Previously matching was too dependant on tag order..
`building=retail + shop=mall` matched `building=retail` preset
`shop=mall + building=retail` matched `shop=mall` preset

Now iD will prefer the preset that's not the building one.
This commit is contained in:
Bryan Housel
2015-11-25 01:50:12 -05:00
parent 97f1830e3b
commit a48e897df6
36 changed files with 76 additions and 6 deletions
+38 -3
View File
@@ -2226,6 +2226,7 @@
"tags": {
"building": "*"
},
"matchScore": 0.4,
"terms": [],
"name": "Building"
},
@@ -2241,6 +2242,7 @@
"tags": {
"building": "apartments"
},
"matchScore": 0.5,
"name": "Apartments"
},
"building/barn": {
@@ -2255,6 +2257,7 @@
"tags": {
"building": "barn"
},
"matchScore": 0.5,
"name": "Barn"
},
"building/bunker": {
@@ -2268,6 +2271,7 @@
"tags": {
"building": "bunker"
},
"matchScore": 0.5,
"name": "Bunker",
"searchable": false
},
@@ -2283,6 +2287,7 @@
"tags": {
"building": "cabin"
},
"matchScore": 0.5,
"name": "Cabin"
},
"building/cathedral": {
@@ -2297,6 +2302,7 @@
"tags": {
"building": "cathedral"
},
"matchScore": 0.5,
"name": "Cathedral Building"
},
"building/chapel": {
@@ -2311,6 +2317,7 @@
"tags": {
"building": "chapel"
},
"matchScore": 0.5,
"name": "Chapel Building"
},
"building/church": {
@@ -2325,6 +2332,7 @@
"tags": {
"building": "church"
},
"matchScore": 0.5,
"name": "Church Building"
},
"building/college": {
@@ -2342,6 +2350,7 @@
"tags": {
"building": "college"
},
"matchScore": 0.5,
"name": "College Building"
},
"building/commercial": {
@@ -2357,6 +2366,7 @@
"tags": {
"building": "commercial"
},
"matchScore": 0.5,
"name": "Commercial Building"
},
"building/construction": {
@@ -2371,6 +2381,7 @@
"tags": {
"building": "construction"
},
"matchScore": 0.5,
"name": "Building Under Construction"
},
"building/detached": {
@@ -2392,6 +2403,7 @@
"residence",
"dwelling"
],
"matchScore": 0.5,
"name": "Detached House"
},
"building/dormitory": {
@@ -2407,6 +2419,7 @@
"tags": {
"building": "dormitory"
},
"matchScore": 0.5,
"name": "Dormitory"
},
"building/entrance": {
@@ -2421,6 +2434,7 @@
"searchable": false
},
"building/garage": {
"icon": "warehouse",
"fields": [
"capacity"
],
@@ -2430,8 +2444,8 @@
"tags": {
"building": "garage"
},
"name": "Garage",
"icon": "warehouse"
"matchScore": 0.5,
"name": "Garage"
},
"building/garages": {
"icon": "warehouse",
@@ -2444,6 +2458,7 @@
"tags": {
"building": "garages"
},
"matchScore": 0.5,
"name": "Garages"
},
"building/greenhouse": {
@@ -2458,6 +2473,7 @@
"tags": {
"building": "greenhouse"
},
"matchScore": 0.5,
"name": "Greenhouse"
},
"building/hospital": {
@@ -2472,6 +2488,7 @@
"tags": {
"building": "hospital"
},
"matchScore": 0.5,
"name": "Hospital Building"
},
"building/hotel": {
@@ -2487,6 +2504,7 @@
"tags": {
"building": "hotel"
},
"matchScore": 0.5,
"name": "Hotel Building"
},
"building/house": {
@@ -2507,6 +2525,7 @@
"residence",
"dwelling"
],
"matchScore": 0.5,
"name": "House"
},
"building/hut": {
@@ -2516,6 +2535,7 @@
"tags": {
"building": "hut"
},
"matchScore": 0.5,
"name": "Hut"
},
"building/industrial": {
@@ -2530,6 +2550,7 @@
"tags": {
"building": "industrial"
},
"matchScore": 0.5,
"name": "Industrial Building"
},
"building/kindergarten": {
@@ -2548,6 +2569,7 @@
"tags": {
"building": "kindergarten"
},
"matchScore": 0.5,
"name": "Preschool/Kindergarten Building"
},
"building/public": {
@@ -2563,6 +2585,7 @@
"tags": {
"building": "public"
},
"matchScore": 0.5,
"name": "Public Building"
},
"building/residential": {
@@ -2577,6 +2600,7 @@
"tags": {
"building": "residential"
},
"matchScore": 0.5,
"name": "Residential Building"
},
"building/retail": {
@@ -2592,6 +2616,7 @@
"tags": {
"building": "retail"
},
"matchScore": 0.5,
"name": "Retail Building"
},
"building/roof": {
@@ -2605,6 +2630,7 @@
"tags": {
"building": "roof"
},
"matchScore": 0.5,
"name": "Roof"
},
"building/school": {
@@ -2625,6 +2651,7 @@
"tags": {
"building": "school"
},
"matchScore": 0.5,
"name": "School Building"
},
"building/semidetached_house": {
@@ -2648,6 +2675,7 @@
"residence",
"dwelling"
],
"matchScore": 0.5,
"name": "Semi-Detached House"
},
"building/shed": {
@@ -2662,6 +2690,7 @@
"tags": {
"building": "shed"
},
"matchScore": 0.5,
"name": "Shed"
},
"building/stable": {
@@ -2676,6 +2705,7 @@
"tags": {
"building": "stable"
},
"matchScore": 0.5,
"name": "Stable"
},
"building/static_caravan": {
@@ -2690,6 +2720,7 @@
"tags": {
"building": "static_caravan"
},
"matchScore": 0.5,
"name": "Static Mobile Home"
},
"building/terrace": {
@@ -2712,6 +2743,7 @@
"residence",
"dwelling"
],
"matchScore": 0.5,
"name": "Row Houses"
},
"building/train_station": {
@@ -2728,6 +2760,7 @@
"tags": {
"building": "train_station"
},
"matchScore": 0.5,
"name": "Train Station",
"searchable": false
},
@@ -2746,10 +2779,11 @@
"tags": {
"building": "university"
},
"matchScore": 0.5,
"name": "University Building"
},
"building/warehouse": {
"icon": "building",
"icon": "warehouse",
"fields": [
"address",
"levels"
@@ -2760,6 +2794,7 @@
"tags": {
"building": "warehouse"
},
"matchScore": 0.5,
"name": "Warehouse"
},
"craft": {
+1
View File
@@ -12,6 +12,7 @@
"tags": {
"building": "*"
},
"matchScore": 0.4,
"terms": [],
"name": "Building"
}
@@ -10,5 +10,6 @@
"tags": {
"building": "apartments"
},
"matchScore": 0.5,
"name": "Apartments"
}
+1
View File
@@ -10,5 +10,6 @@
"tags": {
"building": "barn"
},
"matchScore": 0.5,
"name": "Barn"
}
@@ -9,6 +9,7 @@
"tags": {
"building": "bunker"
},
"matchScore": 0.5,
"name": "Bunker",
"searchable": false
}
+1
View File
@@ -10,5 +10,6 @@
"tags": {
"building": "cabin"
},
"matchScore": 0.5,
"name": "Cabin"
}
@@ -10,5 +10,6 @@
"tags": {
"building": "cathedral"
},
"matchScore": 0.5,
"name": "Cathedral Building"
}
@@ -10,5 +10,6 @@
"tags": {
"building": "chapel"
},
"matchScore": 0.5,
"name": "Chapel Building"
}
@@ -10,5 +10,6 @@
"tags": {
"building": "church"
},
"matchScore": 0.5,
"name": "Church Building"
}
@@ -13,5 +13,6 @@
"tags": {
"building": "college"
},
"matchScore": 0.5,
"name": "College Building"
}
@@ -11,5 +11,6 @@
"tags": {
"building": "commercial"
},
"matchScore": 0.5,
"name": "Commercial Building"
}
@@ -10,5 +10,6 @@
"tags": {
"building": "construction"
},
"matchScore": 0.5,
"name": "Building Under Construction"
}
@@ -17,5 +17,6 @@
"residence",
"dwelling"
],
"matchScore": 0.5,
"name": "Detached House"
}
@@ -11,5 +11,6 @@
"tags": {
"building": "dormitory"
},
"matchScore": 0.5,
"name": "Dormitory"
}
+3 -2
View File
@@ -1,4 +1,5 @@
{
"icon": "warehouse",
"fields": [
"capacity"
],
@@ -8,6 +9,6 @@
"tags": {
"building": "garage"
},
"name": "Garage",
"icon": "warehouse"
"matchScore": 0.5,
"name": "Garage"
}
@@ -9,5 +9,6 @@
"tags": {
"building": "garages"
},
"matchScore": 0.5,
"name": "Garages"
}
@@ -10,5 +10,6 @@
"tags": {
"building": "greenhouse"
},
"matchScore": 0.5,
"name": "Greenhouse"
}
@@ -10,5 +10,6 @@
"tags": {
"building": "hospital"
},
"matchScore": 0.5,
"name": "Hospital Building"
}
+1
View File
@@ -11,5 +11,6 @@
"tags": {
"building": "hotel"
},
"matchScore": 0.5,
"name": "Hotel Building"
}
+1
View File
@@ -16,5 +16,6 @@
"residence",
"dwelling"
],
"matchScore": 0.5,
"name": "House"
}
+1
View File
@@ -5,5 +5,6 @@
"tags": {
"building": "hut"
},
"matchScore": 0.5,
"name": "Hut"
}
@@ -10,5 +10,6 @@
"tags": {
"building": "industrial"
},
"matchScore": 0.5,
"name": "Industrial Building"
}
@@ -14,5 +14,6 @@
"tags": {
"building": "kindergarten"
},
"matchScore": 0.5,
"name": "Preschool/Kindergarten Building"
}
@@ -11,5 +11,6 @@
"tags": {
"building": "public"
},
"matchScore": 0.5,
"name": "Public Building"
}
@@ -10,5 +10,6 @@
"tags": {
"building": "residential"
},
"matchScore": 0.5,
"name": "Residential Building"
}
@@ -11,5 +11,6 @@
"tags": {
"building": "retail"
},
"matchScore": 0.5,
"name": "Retail Building"
}
+1
View File
@@ -9,5 +9,6 @@
"tags": {
"building": "roof"
},
"matchScore": 0.5,
"name": "Roof"
}
@@ -16,5 +16,6 @@
"tags": {
"building": "school"
},
"matchScore": 0.5,
"name": "School Building"
}
@@ -19,5 +19,6 @@
"residence",
"dwelling"
],
"matchScore": 0.5,
"name": "Semi-Detached House"
}
+1
View File
@@ -10,5 +10,6 @@
"tags": {
"building": "shed"
},
"matchScore": 0.5,
"name": "Shed"
}
@@ -10,5 +10,6 @@
"tags": {
"building": "stable"
},
"matchScore": 0.5,
"name": "Stable"
}
@@ -10,5 +10,6 @@
"tags": {
"building": "static_caravan"
},
"matchScore": 0.5,
"name": "Static Mobile Home"
}
@@ -18,5 +18,6 @@
"residence",
"dwelling"
],
"matchScore": 0.5,
"name": "Row Houses"
}
@@ -12,6 +12,7 @@
"tags": {
"building": "train_station"
},
"matchScore": 0.5,
"name": "Train Station",
"searchable":false
}
@@ -13,5 +13,6 @@
"tags": {
"building": "university"
},
"matchScore": 0.5,
"name": "University Building"
}
+2 -1
View File
@@ -1,5 +1,5 @@
{
"icon": "building",
"icon": "warehouse",
"fields": [
"address",
"levels"
@@ -10,5 +10,6 @@
"tags": {
"building": "warehouse"
},
"matchScore": 0.5,
"name": "Warehouse"
}