Modify

Opened 2 years ago

Closed 2 years ago

Last modified 2 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 Changed 2 years ago by naoliv

Description: modified (diff)

comment:2 Changed 2 years ago by Don-vip

Keywords: building landuse added
Milestone: 18.09

comment:3 Changed 2 years ago by Klumbumbus

Keywords: regression added

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

comment:4 Changed 2 years ago by Klumbumbus

Resolution: fixed
Status: newclosed

In 14275/josm:

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

comment:5 Changed 2 years ago by naoliv

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 Changed 2 years ago by Klumbumbus

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 Changed 2 years ago by stoecker

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

comment:8 Changed 2 years ago by Klumbumbus

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

comment:9 Changed 2 years ago by anonymous

@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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.