Opened 11 years ago

Last modified 11 years ago

#10594 closed enhancement

Synonymous values in the shop key — at Version 1

Reported by: mkoniecz Owned by: team
Priority: normal Milestone: 14.10
Component: Core validator Version:
Keywords: template_report shop Cc:

Description (last modified by Don-vip)

Some shop values are obvious duplicates of more commonly used, documented values. I confirmed that in these examples values are really synonymous by discussion on tagging mailing list (under title "Synonymous values in the shop key").

I attach proposed validator rules and testcase.

*[shop=bags] {
  throwWarning: tr("{0}={1} is deprecated", "{0.key}", "{0.value}");
  fixAdd: "shop=bag";
  assertMatch: "way shop=bag";
  assertNoMatch: "way barrier=fence";
}

*[shop=antique] {
  throwWarning: tr("{0}={1} is deprecated", "{0.key}", "{0.value}");
  fixAdd: "shop=antiques";
  assertMatch: "way shop=antique";
  assertNoMatch: "way shop=antiques";
}

*[shop=pets] {
  throwWarning: tr("{0}={1} is deprecated", "{0.key}", "{0.value}");
  fixAdd: "shop=pet";
  assertMatch: "way shop=pets";
  assertNoMatch: "way shop=pet";
}

*[shop=pharmacy] {
  throwWarning: tr("{0}={1} is deprecated", "{0.key}", "{0.value}");
  fixAdd: "amenity=pharmacy";
  fixRemove: "shop";
  assertMatch: "way shop=pharmacy";
  assertNoMatch: "way amenity=pharmacy";
}
Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2014-10-05 01:34:55
Last Changed Author: Don-vip
Revision: 7599
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Relative URL: ^/trunk
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2014-10-05 01:24:20 +0200 (Sun, 05 Oct 2014)
Last Changed Rev: 7599

Identification: JOSM/1.5 (7599 en) Linux Ubuntu 14.04.1 LTS
Memory Usage: 218 MB / 721 MB (74 MB allocated, but free)
Java version: 1.7.0_67, Oracle Corporation, Java HotSpot(TM) Server VM

Plugins:
- ImportImagePlugin (30416)
- OpeningHoursEditor (30609)
- PicLayer (30436)
- buildings_tools (30485)
- geotools (30569)
- jts (30416)
- log4j (30416)
- measurement (30641)
- notes (v0.9.4)
- turnrestrictions (30651)

Change History (2)

by mkoniecz, 11 years ago

Attachment: shop_testcase.osm added

comment:1 by Don-vip, 11 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.