Skip to content

Commit

Permalink
fix #17034 - Add power=connection (partly patch by gaben, icon self c…
Browse files Browse the repository at this point in the history
…reated PD and CC0 licensed)

git-svn-id: https://josm.openstreetmap.de/svn/trunk@18324 0c6e7542-c601-0410-84e7-c038aed88b3b
  • Loading branch information
Klumbumbus authored and Klumbumbus committed Nov 19, 2021
1 parent bcd5ede commit ba494ad
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
10 changes: 10 additions & 0 deletions resources/data/defaultpresets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6794,6 +6794,15 @@
<reference ref="ref_operator" />
</optional>
</item> <!-- Catenary mast -->
<item name="Connection" icon="presets/power/connection.svg" name_context="power" type="node" preset_name_label="true">
<link wiki="Tag:power=connection" />
<space />
<key key="power" value="connection" />
<optional>
<reference ref="cables" />
<reference ref="ref_operator" />
</optional>
</item> <!-- Connection -->
<item name="Insulator" icon="presets/power/insulator.svg" type="node,way" preset_name_label="true">
<link wiki="Tag:power=insulator" />
<space />
Expand All @@ -6802,6 +6811,7 @@
<combo key="line_management" text="Line management" values="branch,cross,split,straight,termination,transition,transpose" values_context="Line management" />
<reference ref="ref_operator" />
</item> <!-- Insulator -->
<separator/>
<item name="Power Line" icon="presets/power/line.svg" type="way" preset_name_label="true">
<link wiki="Tag:power=line" />
<space />
Expand Down
1 change: 1 addition & 0 deletions resources/data/validator/geometry.mapcss
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ way[power=transformer],
way[transformer],
way[power=pole],
way[power=catenary_mast],
way[power=connection],
way[power=terminal],
way[power=tower]!:closed,
way[amenity=vending_machine],
Expand Down
4 changes: 4 additions & 0 deletions resources/styles/standard/elemstyles.mapcss
Original file line number Diff line number Diff line change
Expand Up @@ -1265,6 +1265,10 @@ node[power=catenary_mast] {
icon-image: "presets/power/catenary_mast.svg";
set icon_z17;
}
node[power=connection] {
icon-image: "presets/power/connection.svg";
set icon_z17;
}
node[power=insulator] {
icon-image: "presets/power/insulator.svg";
set icon_z17;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class PowerLines extends Test {
static final Collection<String> BUILDING_STATION_TAGS = Arrays.asList("transformer_tower");
/** Values for {@code power} key interpreted as allowed power items */
static final Collection<String> POWER_ALLOWED_TAGS = Arrays.asList("switch", "transformer", "busbar", "generator", "switchgear",
"portal", "terminal", "insulator");
"portal", "terminal", "insulator", "connection");

private final Set<Node> badConnections = new LinkedHashSet<>();
private final Set<Node> missingTowerOrPole = new LinkedHashSet<>();
Expand All @@ -55,7 +55,7 @@ public class PowerLines extends Test {
* Constructs a new {@code PowerLines} test.
*/
public PowerLines() {
super(tr("Power lines"), tr("Checks for nodes in power lines that do not have a power=tower/pole tag."));
super(tr("Power lines"), tr("Checks for nodes in power lines that do not have a power=tower/pole/connection tag."));
}

@Override
Expand Down Expand Up @@ -121,7 +121,7 @@ public void endTest() {
for (Node n : missingTowerOrPole) {
if (!isInPowerStation(n)) {
errors.add(TestError.builder(this, Severity.WARNING, POWER_LINES)
.message(tr("Missing power tower/pole within power line"))
.message(tr("Missing power tower/pole/connection within power line"))
.primitives(n)
.build());
}
Expand Down

0 comments on commit ba494ad

Please sign in to comment.