Opened 9 months ago

Closed 9 months ago

Last modified 9 months 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] { 
    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";
    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

Attachments (0)

Change History (9)

comment:1 Changed 9 months ago by naoliv

Description: modified (diff)

comment:2 Changed 9 months ago by Don-vip

Keywords: building landuse added
Milestone: 18.09

comment:3 Changed 9 months ago by Klumbumbus

Keywords: regression added

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

comment:4 Changed 9 months 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 9 months 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 9 months 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 9 months ago by stoecker

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

comment:8 Changed 9 months ago by Klumbumbus

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

comment:9 Changed 9 months ago by anonymous

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

Modify Ticket

Change Properties
Set your email in Preferences
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.