Changeset 12997 in josm


Ignore:
Timestamp:
2017-10-15T02:10:00+02:00 (5 weeks ago)
Author:
Don-vip
Message:

fix #15365 - add "pole with switch" preset + new power icon & new validation rules

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/data/defaultpresets.xml

    r12993 r12997  
    343343        </optional>
    344344    </chunk>
     345    <chunk id="power_pole">
     346        <text key="height" text="Height (meters)" />
     347        <combo key="material" text="Material" values="metal,plastic,steel,stone,wood,concrete" />
     348        <check key="location:transition" text="Location transition" disable_off="true" />
     349        <reference ref="ref_operator_branch" />
     350    </chunk>
     351    <chunk id="optional_rating_phases">
     352        <optional>
     353            <combo key="rating" text="Power rating (kVA/MVA)" values="2700 kVA,12500 kVA,15 MVA,50 MVA,100 MVA" />
     354            <combo key="phases" text="Phases" values="1,3" length="1" />
     355        </optional>
     356    </chunk>
    345357    <chunk id="optional_bridge">
    346358        <optional>
     
    75837595            <combo key="transformer" text="Type of transformer" values="distribution,generator,converter,traction,auto,phase_angle_regulator,yes" match="key" values_context="power" />
    75847596            <reference ref="power_extra" />
    7585             <optional>
    7586                 <combo key="rating" text="Power rating (kVA/MVA)" values="2700 kVA,12500 kVA,15 MVA,50 MVA,100 MVA" />
    7587                 <combo key="phases" text="Phases" values="1,3" length="1" />
    7588             </optional>
     7597            <reference ref="optional_rating_phases" />
    75897598        </item> <!-- Power Transformer -->
    75907599        <item name="Power Switchgear" icon="presets/power/switchgear.svg" type="closedway" preset_name_label="true">
     
    77337742            <space />
    77347743            <key key="power" value="pole" />
    7735             <text key="height" text="Height (meters)" />
    7736             <combo key="material" text="Material" values="metal,plastic,steel,stone,wood,concrete" />
    7737             <check key="location:transition" text="Location transition" disable_off="true" />
    7738             <reference ref="ref_operator_branch" />
     7744            <reference ref="power_pole" />
    77397745        </item> <!-- Pole -->
     7746        <item name="Pole with Switch" icon="presets/power/pole_switch.svg" type="node" preset_name_label="true">
     7747            <link href="http://wiki.openstreetmap.org/wiki/Tag:power=pole"
     7748                  de.href="http://wiki.openstreetmap.org/wiki/DE:Tag:power=pole"
     7749                  es.href="http://wiki.openstreetmap.org/wiki/ES:Tag:power=pole"
     7750                  fi.href="http://wiki.openstreetmap.org/wiki/Fi:Tag:power=pole"
     7751                  fr.href="http://wiki.openstreetmap.org/wiki/FR:Tag:power=pole"
     7752                  it.href="http://wiki.openstreetmap.org/wiki/IT:Tag:power=pole"
     7753                  pl.href="http://wiki.openstreetmap.org/wiki/Pl:Tag:power=pole"
     7754                  pt_BR.href="http://wiki.openstreetmap.org/wiki/Pt-br:Tag:power=pole" />
     7755            <space />
     7756            <key key="power" value="pole" />
     7757            <label text="Pole Attributes:" />
     7758            <reference ref="power_pole" />
     7759            <space />
     7760            <label text="Switch Attributes:" />
     7761            <combo key="switch" text="Type" values="mechanical,circuit_breaker,disconnector,earthing" match="key!" values_context="power" />
     7762            <optional>
     7763                <reference ref="voltage" />
     7764                <reference ref="cables" />
     7765            </optional>
     7766        </item> <!-- Pole with Switch -->
    77407767        <item name="Pole with Transformer" icon="presets/power/pole_transformer.svg" type="node" preset_name_label="true">
    77417768            <link href="http://wiki.openstreetmap.org/wiki/Tag:power=pole"
     
    77507777            <key key="power" value="pole" />
    77517778            <label text="Pole Attributes:" />
    7752             <text key="height" text="Height (meters)" />
    7753             <combo key="material" text="Material" values="metal,plastic,steel,stone,wood,concrete" />
    7754             <check key="location:transition" text="Location transition" disable_off="true" />
    7755             <reference ref="ref_operator_branch" />
     7779            <reference ref="power_pole" />
    77567780            <space />
    77577781            <label text="Transformer Attributes:" />
    77587782            <key key="transformer" value="distribution" match="key!" />
    77597783            <reference ref="voltage_frequency" />
    7760             <optional>
    7761                 <combo key="rating" text="Power rating (kVA/MVA)" values="2700 kVA,12500 kVA,15 MVA,50 MVA,100 MVA" />
    7762                 <combo key="phases" text="Phases" values="1,3" length="1" />
    7763             </optional>
    7764         </item> <!-- Pole with Transformer-->
     7784            <reference ref="optional_rating_phases" />
     7785        </item> <!-- Pole with Transformer -->
    77657786        <item name="Insulator" icon="presets/power/insulator.svg" type="node,way" preset_name_label="true">
    77667787            <link href="http://wiki.openstreetmap.org/wiki/Tag:power=insulator"
  • trunk/data/validator/combinations.mapcss

    r12704 r12997  
    9292
    9393/* {0.key} without {1.tag} */
     94*[switch                       ][!power],
    9495*[transformer                  ][!power],
    9596way[fence_type                 ][barrier!=fence],
     
    145146*[power=plant                  ][!voltage][plant:output:electricity],
    146147*[power=substation             ][!substation],
     148*[power=switch                 ][!switch],
    147149*[power=transformer            ][!transformer],
    148150*[amenity=parking              ][!parking],
     
    152154  assertMatch: "way power=line";
    153155  assertNoMatch: "way power=line voltage=1";
    154   assertNoMatch: "way power=switch";
     156  assertMatch: "way power=switch";
    155157  assertMatch: "way power=substation";
    156158  assertMatch: "way power=substation transformer=foobar";
  • trunk/styles/standard/elemstyles.mapcss

    r12993 r12997  
    11451145node[power=pole] {
    11461146    icon-image: "presets/power/pole.svg";
     1147    set icon_z17;
     1148}
     1149node[power=pole][switch] {
     1150    icon-image: "presets/power/pole_switch.svg";
    11471151    set icon_z17;
    11481152}
Note: See TracChangeset for help on using the changeset viewer.