User:Don-vip/JOSM Style Power Lines ITO

From OpenStreetMap Wiki
Jump to navigation Jump to search

I use this stylesheet to enable power lines colouring in JOSM in the same way as ITO Map.

You are free to adapt it, save it to a local file on your machine, and load it in JOSM.

<?xml version="1.0" encoding="UTF-8"?>
<rules xmlns="http://josm.openstreetmap.de/mappaint-style-1.0"
       author="Don-vip" shortdescription="Power lines (ITO)" fr.shortdescription="Lignes électriques (ITO)"
       description="Show power lines voltage in JOSM map display with ITO style"
       fr.description="Afficher la tension des lignes électriques sur la carte de JOSM avec le style ITO"
       version="1.1_2011-06-16">
  <!-- Draw cables as lines -->
  <rule>
    <condition k="power" v="cable"/>
    <line width="1" colour="power#eeeeee"/>
    <icon annotate="true" src="misc/deprecated.png"/>
  </rule>
  <!-- Hide poles above 750 m (you may need to define mappaint.zoomLevelDisplay to true) -->
  <rule>
    <condition k="power" v="pole"/>
    <icon annotate="false" src="presets/empty.png" priority="10000"/>
	<scale_min>750</scale_min>
    <scale_max>6000000</scale_max>
  </rule>
  <!-- Hide poles above 1000 m (you may need to define mappaint.zoomLevelDisplay to true) -->
  <rule>
    <condition k="power" v="tower"/>
    <icon annotate="false" src="presets/empty.png" priority="10000"/>
	<scale_min>1000</scale_min>
    <scale_max>6000000</scale_max>
  </rule>
  <!-- width 2: Minor lines -->
  <rule>
    <condition k="power" v="minor_line"/>
    <linemod mode="over" width="2" realwidth="2" colour="voltage-minor_line#30C600"/>
  </rule>
  <rule>
    <condition k="voltage" v="20000"/>
    <linemod mode="over" width="2" realwidth="2" colour="voltage-minor_line#30C600"/>
  </rule>
  <rule>
    <condition k="voltage" v="33000"/>
    <linemod mode="over" width="2" realwidth="2" colour="voltage-minor_line#30C600"/>
  </rule>
  <rule>
    <condition k="voltage" v="35000"/>
    <linemod mode="over" width="2" realwidth="2" colour="voltage-minor_line#30C600"/>
  </rule>
  <!-- width 3: 60kV to 161 kV -->
  <rule>
    <condition k="voltage" v="60000"/>
    <linemod mode="over" width="3" realwidth="3" colour="voltage-60-90#2299FF"/>
  </rule>
  <rule>
    <condition k="voltage" v="63000"/>
    <linemod mode="over" width="3" realwidth="3" colour="voltage-60-90#2299FF"/>
  </rule>
  <rule>
    <condition k="voltage" v="65000"/>
    <linemod mode="over" width="3" realwidth="3" colour="voltage-60-90#2299FF"/>
  </rule>
  <rule>
    <condition k="voltage" v="66000"/>
    <linemod mode="over" width="3" realwidth="3" colour="voltage-60-90#2299FF"/>
  </rule>
  <rule>
    <condition k="voltage" v="69000"/>
    <linemod mode="over" width="3" realwidth="3" colour="voltage-60-90#2299FF"/>
  </rule>
  <rule>
    <condition k="voltage" v="90000"/>
    <linemod mode="over" width="3" realwidth="3" colour="voltage-60-90#2299FF"/>
  </rule>
  <rule>
    <condition k="voltage" v="110000"/>
    <linemod mode="over" width="3" realwidth="3" colour="voltage-110-161#0000FF"/>
  </rule>
  <rule>
    <condition k="voltage" v="115000"/>
    <linemod mode="over" width="3" realwidth="3" colour="voltage-110-161#0000FF"/>
  </rule>
  <rule>
    <condition k="voltage" v="120000"/>
    <linemod mode="over" width="3" realwidth="3" colour="voltage-110-161#0000FF"/>
  </rule>
  <rule>
    <condition k="voltage" v="132000"/>
    <linemod mode="over" width="3" realwidth="3" colour="voltage-110-161#0000FF"/>
  </rule>
  <rule>
    <condition k="voltage" v="138000"/>
    <linemod mode="over" width="3" realwidth="3" colour="voltage-110-161#0000FF"/>
  </rule>
  <rule>
    <condition k="voltage" v="150000"/>
    <linemod mode="over" width="3" realwidth="3" colour="voltage-110-161#0000FF"/>
  </rule>
  <rule>
    <condition k="voltage" v="154000"/>
    <linemod mode="over" width="3" realwidth="3" colour="voltage-110-161#0000FF"/>
  </rule>
  <rule>
    <condition k="voltage" v="161000"/>
    <linemod mode="over" width="3" realwidth="3" colour="voltage-110-161#0000FF"/>
  </rule>
  <!-- width 4: 200kV to 275 kV -->
  <rule>
    <condition k="voltage" v="200000"/>
    <linemod mode="over" width="4" realwidth="4" colour="voltage-200-275#C8329E"/>
  </rule>
  <rule>
    <condition k="voltage" v="220000"/>
    <linemod mode="over" width="4" realwidth="4" colour="voltage-200-275#C8329E"/>
  </rule>
  <rule>
    <condition k="voltage" v="225000"/>
    <linemod mode="over" width="4" realwidth="4" colour="voltage-200-275#C8329E"/>
  </rule>
  <rule>
    <condition k="voltage" v="230000"/>
    <linemod mode="over" width="4" realwidth="4" colour="voltage-200-275#C8329E"/>
  </rule>
  <rule>
    <condition k="voltage" v="238000"/>
    <linemod mode="over" width="4" realwidth="4" colour="voltage-200-275#C8329E"/>
  </rule>
  <rule>
    <condition k="voltage" v="270000"/>
    <linemod mode="over" width="4" realwidth="4" colour="voltage-200-275#C8329E"/>
  </rule>
  <rule>
    <condition k="voltage" v="275000"/>
    <linemod mode="over" width="4" realwidth="4" colour="voltage-200-275#C8329E"/>
  </rule>
  <!-- width 5: 330kV to 500 kV -->
  <rule>
    <condition k="voltage" v="330000"/>
    <linemod mode="over" width="5" realwidth="5" colour="voltage-330-345#FA2500"/>
  </rule>
  <rule>
    <condition k="voltage" v="345000"/>
    <linemod mode="over" width="5" realwidth="5" colour="voltage-330-345#FA2500"/>
  </rule>
  <rule>
    <condition k="voltage" v="380000"/>
    <linemod mode="over" width="5" realwidth="5" colour="voltage-380-500#FB8114"/>
  </rule>
  <rule>
    <condition k="voltage" v="400000"/>
    <linemod mode="over" width="5" realwidth="5" colour="voltage-380-500#FB8114"/>
  </rule>
  <rule>
    <condition k="voltage" v="420000"/>
    <linemod mode="over" width="5" realwidth="5" colour="voltage-380-500#FB8114"/>
  </rule>
  <rule>
    <condition k="voltage" v="450000"/>
    <linemod mode="over" width="5" realwidth="5" colour="voltage-380-500#FB8114"/>
  </rule>
  <!-- width 6: 500kV and above -->
  <rule>
    <condition k="voltage" v="500000"/>
    <linemod mode="over" width="6" realwidth="6" colour="voltage-380-500#FB8114"/>
  </rule>
  <rule>
    <condition k="voltage" v="750000"/>
    <linemod mode="over" width="6" realwidth="6" colour="voltage-750-765#00FDCE00"/>
  </rule>
  <rule>
    <condition k="voltage" v="765000"/>
    <linemod mode="over" width="6" realwidth="6" colour="voltage-750-765#00FDCE00"/>
  </rule>
</rules>