Changeset 14593 in josm for trunk/data/validator


Ignore:
Timestamp:
2018-12-23T01:25:15+01:00 (6 years ago)
Author:
Klumbumbus
Message:

fix #15774 - Update emergency=fire_hydrant preset (based on patch by elgolfo and bus-mt), add a bunch of validator checks

Location:
trunk/data/validator
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/data/validator/combinations.mapcss

    r14364 r14593  
    8888
    8989/* {0.key} without {1.tag} */
     90node[fire_hydrant:type         ][emergency!=fire_hydrant][disused:emergency!=fire_hydrant],
    9091*[transformer                  ][!power],
    9192way[fence_type                 ][barrier!=fence],
     
    116117
    117118/* {0.tag} without {1.key} (warning level) */
     119node[emergency=fire_hydrant][!fire_hydrant:type],
    118120way[boundary=administrative][!admin_level],
    119121relation[boundary=administrative][!admin_level],
     
    526528  assertMatch: "way highway=primary lanes=3";
    527529}
     530
     531/* #15774 */
     532node[emergency=fire_hydrant][fire_hydrant:count][fire_hydrant:count!=1] {
     533  throwOther: tr("{0} together with {1}. Tag each hydrant separately.", "{0.tag}", "{1.tag}");
     534}
  • trunk/data/validator/deprecated.mapcss

    r14393 r14593  
    13381338  group: tr("deprecated tagging");
    13391339}
     1340
     1341/* #15774 */
     1342node[amenity=fire_hydrant] {
     1343  throwWarning: tr("{0} is deprecated", "{0.tag}");
     1344  suggestAlternative: "emergency=fire_hydrant";
     1345  fixChangeKey: "amenity => emergency";
     1346  group: tr("deprecated tagging");
     1347}
     1348node[fire_hydrant:type=pond] {
     1349  throwWarning: tr("{0} is deprecated", "{0.tag}");
     1350  suggestAlternative: "water_source=pond";
     1351  fixAdd: "water_source=pond";
     1352  fixRemove: "{0.key}";
     1353  group: tr("deprecated tagging");
     1354}
     1355node[fire_hydrant:flow_capacity] {
     1356  throwWarning: tr("{0} is deprecated", "{0.key}");
     1357  suggestAlternative: "flow_rate";
     1358  group: tr("deprecated tagging");
     1359}
     1360node[emergency=fire_hydrant][in_service=no] {
     1361  throwWarning: tr("{0} is deprecated", "{1.tag}");
     1362  suggestAlternative: "disused:emergency=fire_hydrant";
     1363  fixAdd: "disused:emergency=fire_hydrant";
     1364  fixRemove: "{1.key}";
     1365  fixRemove: "{0.key}";
     1366  group: tr("deprecated tagging");
     1367}
     1368node[fire_hydrant:water_source] {
     1369  throwWarning: tr("{0} is deprecated", "{0.key}");
     1370  suggestAlternative: "water_source";
     1371  fixChangeKey: "fire_hydrant:water_source => water_source";
     1372  group: tr("deprecated tagging");
     1373}
  • trunk/data/validator/geometry.mapcss

    r14577 r14593  
    9393
    9494/* {0} on a way, should be a node */
     95way[emergency=fire_hydrant],
    9596way[entrance],
    9697way[door],
  • trunk/data/validator/ignoretags.cfg

    r14580 r14593  
    181181K:allotments=plot
    182182K:land_area=administrative
     183K:fire_hydrant:pressure
    183184;
    184185; Highway Key/Value Pairs
  • trunk/data/validator/numeric.mapcss

    r14359 r14593  
    334334  assertNoMatch: "node ele=4";
    335335}
    336 *[ele][ele !~ /^-?[0-9]+(\.[0-9]+)?$/]!.ele_meter_remove_autofix!.ele_separator_autofix{
     336*[ele][ele !~ /^-?[0-9]+(\.[0-9]+)?$/]!.ele_meter_remove_autofix!.ele_separator_autofix {
    337337  throwWarning: tr("{0} must be a numeric value, in meters and without units", "{0.key}");
    338338  assertNoMatch: "node ele=12m";
     
    344344  assertMatch: "node ele=high";
    345345}
     346
     347/* #15774 */
     348node[fire_hydrant:pressure="#"] {
     349  throwError: tr("unusual value of {0}", "{0.key}");
     350}
  • trunk/data/validator/unnecessary.mapcss

    r13378 r14593  
    6565  group: tr("unnecessary tag");
    6666}
     67
     68/* #15774 */
     69node[emergency=fire_hydrant][fire_hydrant:count=1] {
     70  throwWarning: tr("{0} is unnecessary for {1}", "{1.tag}", "{0.tag}");
     71  group: tr("unnecessary tag");
     72  fixRemove: "{1.key}";
     73}
Note: See TracChangeset for help on using the changeset viewer.