Changeset 18535 in josm


Ignore:
Timestamp:
2022-08-13T18:39:30+02:00 (2 years ago)
Author:
Klumbumbus
Message:

see #21836 - Add some power/voltage validation rules:

  • voltage:primary/secondary/tertiary without transformer
  • voltage:primary/secondary/tertiary on a way
  • voltage:primary/secondary/tertiary not in correct number format (should be in volts with no units/delimiter/spaces)
  • don't warn about unknown numeric values of voltage:primary/secondary/tertiary
  • transformer together with voltage on nodes
  • voltage:secondary is lower than voltage:primary on transformer=generator
  • deprecate voltage-high and voltage-low in favor of voltage:primary/secondary
Location:
trunk/resources/data/validator
Files:
5 edited

Legend:

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

    r18527 r18535  
    1111
    1212/* {0.key} without {1.key} (warning level) */
     13node[voltage:primary           ][!transformer],
     14node[voltage:secondary         ][!transformer],
     15node[voltage:tertiary          ][!transformer],
    1316way[junction                   ][!highway][junction!=yes][!area:highway],
    1417way[living_street              ][!highway],
     
    346349}
    347350
    348 /* {0.key} together with {1.key}, #18267, #17630, #17604 */
     351/* {0.key} together with {1.key}, #18267, #17630, #17604, #21836 */
     352node[transformer][voltage],
    349353node[marker][cover],
    350354node[marker][voltage],
     
    10611065  assertNoMatch: "relation piste:type=nordic piste:grooming=classic";
    10621066}
     1067
     1068/* #21836 */
     1069*[voltage:primary][voltage:secondary][transformer=generator][tag("voltage:secondary")<tag("voltage:primary")] {
     1070  throwWarning: tr("{0} is lower than {1} on {2}.", "{1.key}", "{0.key}", "{2.tag}");
     1071  group: tr("suspicious tag combination");
     1072}
  • trunk/resources/data/validator/deprecated.mapcss

    r18524 r18535  
    23822382}
    23832383
     2384/* #21836 */
     2385*[voltage-high],
     2386*[voltage-low] {
     2387  throwWarning: tr("{0} is deprecated", "{0.key}");
     2388  suggestAlternative: "voltage:primary";
     2389  suggestAlternative: "voltage:secondary";
     2390  group: tr("deprecated tagging");
     2391}
     2392
    23842393/* When tags are deprecated they should be added to ignoretags.cfg too. */
  • trunk/resources/data/validator/geometry.mapcss

    r18459 r18535  
    9696
    9797/* {0} on a way, should be a node */
     98way[voltage:primary],
     99way[voltage:secondary],
     100way[voltage:tertiary],
    98101way[line_attachment],
    99102way[line_management],
  • trunk/resources/data/validator/ignoretags.cfg

    r18524 r18535  
    136136E:distance
    137137E:voltage
     138E:voltage:primary
     139E:voltage:secondary
     140E:voltage:tertiary
    138141E:amperage
    139142E:generator:output:electricity
     
    727730K:surface=decoturf
    728731K:school=entrance
     732E:voltage-high
     733E:voltage-low
    729734;
    730735; Tags not yet decided (to remove from this section when added or moved up when deprecated)
  • trunk/resources/data/validator/numeric.mapcss

    r18385 r18535  
    373373}
    374374
    375 way[voltage][voltage =~ /(.*[A-Za-z].*)|.*,.*|.*( ).*/] {
     375way[voltage][voltage =~ /(.*[A-Za-z].*)|.*,.*|.*( ).*/],
     376way[voltage:primary][voltage:primary =~ /(.*[A-Za-z].*)|.*,.*|.*( ).*/],
     377way[voltage:secondary][voltage:secondary =~ /(.*[A-Za-z].*)|.*,.*|.*( ).*/],
     378way[voltage:tertiary][voltage:tertiary =~ /(.*[A-Za-z].*)|.*,.*|.*( ).*/] {
    376379  throwWarning: tr("voltage should be in volts with no units/delimiter/spaces");
    377380  assertMatch: "way voltage=medium";
Note: See TracChangeset for help on using the changeset viewer.