User:Trolleway/Maperitive Rules/RailwaysWiki
Jump to navigation
Jump to search
Maperitive style for medium-scale (zoom 9-14) maps of railway lines for Wikipedia articles. Allows multilingual names and relief contours. Used in [1]
Стиль для среднемасштабных карт железнодорожных линий для статьей в Википедии. Поддерживает многоязычные названия и контуры рельефа. Используется на [2]
features lines // tram : railway=tram railway : (railway=rail OR railway=preserved0) and (NOT(service=siding) ) (NOT(service=spur) ) railway main: (railway=rail OR railway=preserved0) AND (usage=main) railway siding : (railway=rail ) AND ( (service=spur) OR (service=siding) OR (service=yard)) railway abandoned : railway=abandoned AND NOT (gauge<0) railway narrow : (railway=narrow_gauge OR railway=miniature OR gauge<1000) AND NOT(railway=abandoned) railway narrow closed: (railway=narrow_gauge OR gauge<0) AND (railway=abandoned) brige : bridge=yes contour major : contour[@isMulti(elevation, 50)] contour minor : contour[@isMulti(elevation, 10) and not @isMulti(elevation, 50)] areas // tram depot : landuse=depot AND depot:vehicle:tram=yes building : building forest : landuse=forest OR natural=wood points, areas station : (railway=station or public_transport=station) and @isFalse(disused) station closed: railway=station and disused=yes halt : railway=halt and @isFalse(disused) halt closed : railway=halt and disused=yes crossing : railway=level_crossing milestone : railway=milestone peat : landuse = peat_cutting properties map-background-color : #ffffff map-background-opacity : 1 map.rendering.text-halo-width : 2 map.rendering.text-halo-opacity : 1 map.rendering.text-halo-color : #ffffff map.rendering.text-line-spacing : 1.25 map.rendering.text-max-width : 50 map.rendering.text-offset-horizontal : 10 map.rendering.lflp.max-allowed-corner-angle : 45 map.rendering.lflp.max-compression : 0.1 rules target : peat define line-width : 1 line-style : dot line-color : gray draw : line define fill-texture : http://upload.wikimedia.org/wikipedia/commons/thumb/7/7f/Icon_peat_mining_texture.svg/185px-Icon_peat_mining_texture.svg.png fill-color : white draw : fill target : $featuretype(area) define line-style : none line-width : 1 if : forest define min-zoom : 9 fill-color : #AED0A0 //mapquest //fill-color : #B9E4C0 elseif : peat1 define min-zoom : 9 fill-color : #e95845 //mapquest //fill-color : #B9E4C0 elseif : beach else stop draw : fill define min-zoom : 5 text-line-spacing : 1.25 text-max-width : 50 text-offset-horizontal : 10 font-weight : bold font-style : italic font-size : 12:9;14:14 text-align-horizontal : far // draw : text target : tram depot define fill-color : red fill-opacity : 1 shape-size : 4 draw : shape target : tram define line-color: red line-width : 4 draw:line define text-line-spacing : 1.25 text-max-width : 50 text-offset-vertical : -6 font-weight : bold font-style : italic font-size : 9:7;10:8 // draw : text target : railway define min-zoom : 6 line-color : #000 line-width : 3 draw : line define min-zoom : 6 max-zoom : 14 line-style : dashlong line-color : white line-width : 3 border-style : solid border-color : #000 border-width : 25% draw : line define text-line-spacing : 1 text-letter-spacing : 0.1 text-max-width : 50 text-offset-vertical : -6 font-weight : bold font-style : italic font-size : 9:7;10:16 text-color : blue // draw : text target : railway main define min-zoom : 6 line-color : #000 line-width : 8 draw : line define min-zoom : 6 max-zoom : 14 line-style : dashlong line-color : white line-width : 3 border-style : solid border-color : #000 border-width : 25% draw : line target : railway siding define min-zoom : 6 line-color : #000 line-width : 3 draw : line define min-zoom : 6 max-zoom : 14 line-style : dashlong line-color : white line-width : 3 border-style : solid border-color : #000 border-width : 25% //draw : line target : railway narrow define min-zoom : 6 line-color : #000 line-width : 3 draw : line define line-width : 2 min-zoom : 9 shape-mode : linear shape : custom shape-def : l: 0,-5; 0,5; m:8,0; shape-spacing : 1.0 draw : shape define text-line-spacing : 1.25 text-max-width : 50 text-offset-vertical : -6 font-weight : bold font-style : italic font-size : 9:7;10:9 text:[[name:ru]] draw : text target : railway narrow closed define min-zoom : 6 line-color : gray line-width : 3 line-style : dash draw : line define min-zoom : 9 shape-mode : linear shape : custom shape-def : 0,-10; 0,10; shape-spacing : 1 draw : shape define text-color : gray text-line-spacing : 1.25 text-max-width : 50 text-offset-vertical : -6 font-weight : bold font-style : italic font-size : 9:7;10:9 draw : text target : railway abandoned define min-zoom : 6 line-color : #a1a1a1 line-width : 5 draw : line define min-zoom : 6 line-style : dot line-color : white line-width : 3 border-style : solid border-color : #a1a1a1 border-width : 25% draw : line target: station define shape-size : 6 fill-color : green draw : shape define text-line-spacing : 1.25 text-max-width : 50 text-offset-horizontal : 10 font-weight : bold font-size : 9:10;10:14 text-align-horizontal : near text: [[name]] "\n" [[name:ru]] draw : text target: station closed define shape-size : 6 fill-color : gray draw : shape define text-line-spacing : 1.25 text-max-width : 50 text-offset-horizontal : 10 font-weight : bold font-size : 14 text-align-horizontal : near draw : text target: halt define min-zoom : 7 shape-size : 3 fill-color : green draw : shape define text-line-spacing : 1.25 text-max-width : 50 text-offset-horizontal : 10 font-weight : bold font-size : 9:10;10:14 text-align-horizontal : near draw : text target: halt closed define shape-size : 4 fill-color : gray draw : shape define text-line-spacing : 1.25 text-max-width : 50 text-offset-horizontal : 10 font-weight : bold font-size : 12 text-align-horizontal : near draw : text target : building define line-width : 1 fill-color : brown min-zoom : 15 draw : fill define text-line-spacing : 1.25 text-max-width : 50 text-offset-horizontal : 10 font-weight : bold font-style : italic font-size : 10 text-align-horizontal : near min-zoom : 15 draw : text target : brige define min-zoom : 9 shape-mode : center shape : custom shape-def : -50,-50; -20,-20; 20,-20; 50,-50 draw : shape define min-zoom : 9 shape-mode : center shape : custom shape-def : -50, 50; -20,20 ; 20,20 ; 50,50 draw : shape target : crossing define min-zoom : 9 icon-image : http://upload.wikimedia.org/wikipedia/commons/7/74/1.3.1.png shape-mode : center draw : icon target : milestone define min-zoom : 9 text : pk shape : custom shape-def : pw:1;f:white;m:-10,8;l:10,8;l:10,-8;l:-10,-8;z shape-mode : center draw : shield target: contour* define line-color : #7f3300 line-opacity : 0.35 curved : true if : *major define min-zoom : 9 line-width : 11:0.1;11.9:1;12:2 else define min-zoom : 12 line-width : 1 draw : contour draw : text