Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#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 naoliv)

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] {  
    359359way[highway][barrier],
    360360*[highway][waterway][waterway!=dam][waterway!=weir],
    361361way[highway][natural][natural!=ridge],
    362 *[landuse][landuse!=retail][building] {
     362*[building][landuse][landuse!=retail] {
    363363  throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
    364364  group: tr("suspicious tag combination");
    365365  assertNoMatch: "node highway=street_lamp natural=birds_nest";
    way[highway][lanes][!lanes:forward][!lanes:backward][oneway!=yes][oneway!=-1][ju  
    522522  assertNoMatch: "way highway=primary lanes=3 oneway=-1";
    523523  assertNoMatch: "way highway=primary lanes=4";
    524524  assertMatch: "way highway=primary lanes=3";
    525 }
    526  No newline at end of file
     525}

Attachments (0)

Change History (9)

comment:1 by naoliv, 6 years ago

Description: modified (diff)

comment:2 by Don-vip, 6 years ago

Keywords: building landuse added
Milestone: 18.09

comment:3 by Klumbumbus, 6 years ago

Keywords: regression added

Argh. I fall into this trap again and again...

comment:4 by Klumbumbus, 6 years ago

Resolution: fixed
Status: newclosed

In 14275/josm:

fix #16783, see #16157 - fix validator warning message (modified patch by naoliv)

comment:5 by naoliv, 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 Klumbumbus, 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:7 by stoecker, 6 years ago

You also can use 2.key (or not?).

comment:8 by Klumbumbus, 6 years ago

Yes but there are 4 rules grouped together and this wouldn't fit to the other 3.

comment:9 by anonymous, 6 years ago

@Klumbumbus If you mentioned validator speed... what about these tickets? #4626, #13805

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.