#16783 closed defect (fixed)
[PATCH] small fix for landuse + building warning
Reported by: | naoliv | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 18.09 |
Component: | Core validator | Version: | |
Keywords: | building landuse regression | Cc: |
Description (last modified by )
With an object having landuse
+ building
we see a warning saying suspicious tag combination - landuse together with landuse
Changing the order fixes this:
-
data/validator/combinations.mapcss
diff --git a/data/validator/combinations.mapcss b/data/validator/combinations.mapcss index ecfb1ab15..683293fe5 100644
a b node[amenity][amenity =~ /^(restaurant|cafe|fast_food)$/][!name][noname!=yes] { 359 359 way[highway][barrier], 360 360 *[highway][waterway][waterway!=dam][waterway!=weir], 361 361 way[highway][natural][natural!=ridge], 362 *[ landuse][landuse!=retail][building] {362 *[building][landuse][landuse!=retail] { 363 363 throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}"); 364 364 group: tr("suspicious tag combination"); 365 365 assertNoMatch: "node highway=street_lamp natural=birds_nest"; … … way[highway][lanes][!lanes:forward][!lanes:backward][oneway!=yes][oneway!=-1][ju 522 522 assertNoMatch: "way highway=primary lanes=3 oneway=-1"; 523 523 assertNoMatch: "way highway=primary lanes=4"; 524 524 assertMatch: "way highway=primary lanes=3"; 525 } 526 No newline at end of file 525 }
Attachments (0)
Change History (9)
comment:1 by , 6 years ago
Description: | modified (diff) |
---|
comment:2 by , 6 years ago
Keywords: | building landuse added |
---|---|
Milestone: | → 18.09 |
comment:3 by , 6 years ago
Keywords: | regression added |
---|
comment:5 by , 6 years ago
On my first version I did use the tags in the same order that you committed.
But then I thought that it was visually better to group the similar tags side-by-side :-)
comment:6 by , 6 years ago
I don't know if the validator already works this way but if not then maybe on day it will skip the rule as soon as it finds the first non matching selector. This way the validation could be faster.
As landuse appears less often than building in the osm database I choose this order for best ("hypothetical") performance...
comment:8 by , 6 years ago
Yes but there are 4 rules grouped together and this wouldn't fit to the other 3.
Argh. I fall into this trap again and again...