Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 weeks ago

#12494 closed enhancement (fixed)

warn about keys ending with a number

Reported by: Klumbumbus Owned by: team
Priority: normal Milestone: 16.02
Component: Core validator Version:
Keywords: name_, alt_name_1, shop_1, amenity_1 Cc:

Description

Recently there was some discussion about tags ending with _1, _2,...
http://wiki.openstreetmap.org/wiki/Proposed_features/Remove_suffixed_name-tags_from_wiki and further links there
I propose the following validator warning:

*[/.+_[0-9]$/][!/^note_[0-9]$/][!/^description[0-9]$/] {
  throwWarning: tr("questionable key (ending with a number): {0}", "{0.key}");
}

Attachments (0)

Change History (10)

comment:1 Changed 3 years ago by Klumbumbus

Resolution: fixed
Status: newclosed

In 9747/josm:

fix #12494 - warn about keys ending with a number

comment:2 Changed 3 years ago by ijsb

Please consider to not add this to josm just yet. Not only is the voting still under way, but looking at the discussion on the tagging list, there is hardly any consensus about this.

comment:3 Changed 3 years ago by ijsb

Resolution: fixed
Status: closedreopened

comment:4 Changed 3 years ago by Don-vip

I totally agree with this change, let's keep it. We should also add a new one: if name_1 is set without name, we should automatically replace the name_1 key by name.

comment:5 Changed 3 years ago by Klumbumbus

A lot of the keys with _X can be improved by better tagging. This warning is exactly about this. The user is pointed to those keys and can check if it is correct or if tagging can be improved. This warning is to find nonsense tagging like:
way/308921144 tourism=hotel tourism_1=hotel
way/333889629 highway=footway highway_1=steps
way/383638452 historic=yes historic_1=ruins

However it would be ok for me to lower it to info level.

comment:6 in reply to:  4 Changed 3 years ago by Klumbumbus

Replying to Don-vip:

if name_1 is set without name, we should automatically replace the name_1 key by name.

I just checked some of those cases and often there is a description in name_1, so a autofix to name wouldn't be correct.

comment:7 Changed 3 years ago by ijsb

Thanks for discussing this.

I was thinking along the lines of shop=something + shop_1=else (or amenity, or name, ..). The currently obvious alternative is using a semicolon, but shop=something;else does not seem much of an improvement to me. The examples given by Klumbumbus, however, are definitely candidates for improvement.

However it would be ok for me to lower it to info level.

Fine with me!

comment:8 Changed 3 years ago by rickmastfan67

Can we add in an exception for the for any key that starts with 'tiger' so the warning doesn't show up for them? Those were from imports, but also provide info as to how names were sometimes acquired.

For example, on Way 19596993, the 'name_1' tag should be flagged, but not the 'tiger:name_base_1' one.

comment:9 Changed 3 years ago by Klumbumbus

Resolution: fixed
Status: reopenedclosed

In 9836/josm:

fix #12494 - improve "questionable key (ending with a number)" warning

comment:10 Changed 3 weeks ago by Klumbumbus

In 14957/josm:

fix #17554, see #12494 - raise "questionable key (ending with a number)" to warning level

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.