User:Don-vip/JOSM Style Power Lines RTE

From OpenStreetMap Wiki
Jump to: navigation, search

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

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 (RTE)" fr.shortdescription="Lignes électriques (RTE)"
       description="Show power lines voltage in JOSM map display with RTE style"
       fr.description="Afficher la tension des lignes électriques sur la carte de JOSM avec le style RTE"
       version="1.2_2011-06-18">
  <!-- 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#05FFFF"/>
  </rule>
  <rule>
  <!-- width 3: 63kV to 150 kV -->
  <rule>
    <condition k="voltage" v="63000"/>
    <linemod mode="over" width="3" realwidth="3" colour="voltage-63#CE2C91"/>
  </rule>
  <rule>
    <condition k="voltage" v="90000"/>
    <linemod mode="over" width="3" realwidth="3" colour="voltage-90#F8B420"/>
  </rule>
  <rule>
    <condition k="voltage" v="150000"/>
    <linemod mode="over" width="3" realwidth="3" colour="voltage-150#333A97"/>
  </rule>
  <!-- width 4: 225kV -->
  <rule>
    <condition k="voltage" v="225000"/>
    <linemod mode="over" width="4" realwidth="4" colour="voltage-225#00AA4E"/>
  </rule>
  <!-- width 5: 270-400kV -->
  <rule>
    <condition k="voltage" v="270000"/>
    <linemod mode="over" width="4" realwidth="4" colour="voltage-400#EB2C2D"/>
  </rule>
  <rule>
    <condition k="voltage" v="400000"/>
    <linemod mode="over" width="5" realwidth="5" colour="voltage-400#EB2C2D"/>
  </rule>
  <rule>
    <condition k="voltage" v="400000;225000"/>
    <linemod mode="over" width="5" realwidth="5" colour="voltage-400#EB2C2D" dashed="true" dashedcolour="voltage-225#00AA4E"/>
  </rule>
</rules>