Changeset 18324 in josm


Ignore:
Timestamp:
2021-11-20T00:34:04+01:00 (8 months ago)
Author:
Klumbumbus
Message:

fix #17034 - Add power=connection (partly patch by gaben, icon self created PD and CC0 licensed)

Location:
trunk
Files:
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/resources/data/defaultpresets.xml

    r18319 r18324  
    67956795            </optional>
    67966796        </item> <!-- Catenary mast -->
     6797        <item name="Connection" icon="presets/power/connection.svg" name_context="power" type="node" preset_name_label="true">
     6798            <link wiki="Tag:power=connection" />
     6799            <space />
     6800            <key key="power" value="connection" />
     6801            <optional>
     6802                <reference ref="cables" />
     6803                <reference ref="ref_operator" />
     6804            </optional>
     6805        </item> <!-- Connection -->
    67976806        <item name="Insulator" icon="presets/power/insulator.svg" type="node,way" preset_name_label="true">
    67986807            <link wiki="Tag:power=insulator" />
     
    68036812            <reference ref="ref_operator" />
    68046813        </item> <!-- Insulator -->
     6814        <separator/>
    68056815        <item name="Power Line" icon="presets/power/line.svg" type="way" preset_name_label="true">
    68066816            <link wiki="Tag:power=line" />
  • trunk/resources/data/validator/geometry.mapcss

    r18229 r18324  
    108108way[power=pole],
    109109way[power=catenary_mast],
     110way[power=connection],
    110111way[power=terminal],
    111112way[power=tower]!:closed,
  • trunk/resources/styles/standard/elemstyles.mapcss

    r18296 r18324  
    12641264node[power=catenary_mast] {
    12651265    icon-image: "presets/power/catenary_mast.svg";
     1266    set icon_z17;
     1267}
     1268node[power=connection] {
     1269    icon-image: "presets/power/connection.svg";
    12661270    set icon_z17;
    12671271}
  • trunk/src/org/openstreetmap/josm/data/validation/tests/PowerLines.java

    r17111 r18324  
    4545    /** Values for {@code power} key interpreted as allowed power items */
    4646    static final Collection<String> POWER_ALLOWED_TAGS = Arrays.asList("switch", "transformer", "busbar", "generator", "switchgear",
    47             "portal", "terminal", "insulator");
     47            "portal", "terminal", "insulator", "connection");
    4848
    4949    private final Set<Node> badConnections = new LinkedHashSet<>();
     
    5656     */
    5757    public PowerLines() {
    58         super(tr("Power lines"), tr("Checks for nodes in power lines that do not have a power=tower/pole tag."));
     58        super(tr("Power lines"), tr("Checks for nodes in power lines that do not have a power=tower/pole/connection tag."));
    5959    }
    6060
     
    122122            if (!isInPowerStation(n)) {
    123123                errors.add(TestError.builder(this, Severity.WARNING, POWER_LINES)
    124                         .message(tr("Missing power tower/pole within power line"))
     124                        .message(tr("Missing power tower/pole/connection within power line"))
    125125                        .primitives(n)
    126126                        .build());
Note: See TracChangeset for help on using the changeset viewer.