User:Vicuna/MaperitiveRules/PublicTransportHeadways
Jump to navigation
Jump to search
This is a ruleset for Maperitive for the visualization of public transport headways. The tag "headway" in the route relation is used for the drawing. A shorter time headway (higher frequency) of a route leads to a thicker line on the map.
The following colours are used:
- Red - Tram
- Magenta - Bus
- Orange - Train
- Blue - Subway / Underground
- Green - Suburban Train / S-Bahn (route=light_rail)
features station : railway=station OR railway=halt OR public_transport=station OR building=train_station stop : railway=tram_stop OR highway=bus_stop OR amenity=bus_station OR public_transport=stop_position stop area : relation[type=public_transport public_transport=stop_area] lines aerialway : aerialway contour major : contour[@isMulti(elevation, 50)] contour minor : contour[@isMulti(elevation, 10) and not @isMulti(elevation, 50)] foot path major : (highway=footway OR highway=path) AND (NOT trail_visibility OR @isOneOf(trail_visibility, excellent, good)) foot path minor : (highway=footway OR highway=path) AND (trail_visibility AND NOT @isOneOf(trail_visibility, excellent, good)) road major : highway=motorway OR highway=trunk OR highway=primary OR highway=secondary OR highway=tertiary road minor : highway=residential OR highway=unclassified track major : (highway=track AND (tracktype=grade1 OR tracktype=grade2 OR NOT tracktype)) track minor : (highway=track AND (tracktype=grade3 OR tracktype=grade4 OR tracktype=grade5)) railway : railway=rail OR railway=light_rail OR railway=subway OR railway=monorail OR railway=tram platform : public_transport=platform OR highway=platform OR railway=platform train : relation[type=route route=train] metro : relation[type=route route=subway] metro 10 : relation[type=route route=subway (headway<11 OR interval<11)] metro 5 : relation[type=route route=subway (headway<6 OR interval<6)] sbahn : relation[type=route route=light_rail] sbahn 30 : relation[type=route route=light_rail (headway<31 OR interval<31)] sbahn 15 : relation[type=route route=light_rail (headway<16 OR interval<16)] bus : relation[type=route (route=bus OR route=trolleybus)] bus 240 : relation[type=route (route=bus OR route=trolleybus) (headway<240 OR interval<120)] bus 120 : relation[type=route (route=bus OR route=trolleybus) (headway<120 OR interval<120)] bus 60 : relation[type=route (route=bus OR route=trolleybus) (headway<61 OR interval<61)] bus 30 : relation[type=route (route=bus OR route=trolleybus) (headway<31 OR interval<31)] bus 20 : relation[type=route (route=bus OR route=trolleybus) (headway<21 OR interval<21)] bus 15 : relation[type=route (route=bus OR route=trolleybus) (headway<16 OR interval<16)] bus 10 : relation[type=route (route=bus OR route=trolleybus) (headway<11 OR interval<11)] bus 5 : relation[type=route (route=bus OR route=trolleybus) (headway<6 OR interval<6)] bus selten : relation[type=route (route=bus OR route=trolleybus) (headway<1441 OR interval<1441)] tram : relation[type=route route=tram] tram 15 : relation[type=route route=tram (headway<16 OR interval<16)] tram 10 : relation[type=route (route=tram OR route=trolleybus) (headway<11 OR interval<11)] tram 5 : relation[type=route (route=tram OR route=trolleybus) (headway<6 OR interval<6)] power line : @isOneOf(power, line, minor_line) stream : waterway=stream areas building : building=yes residential : landuse=residential forest : landuse=forest OR natural=wood OR leisure=park meadow : landuse=meadow water : natural=water OR waterway=riverbank OR landuse=reservoir OR landuse=basin nature reserve : boundary=national_park OR boundary=protected_area OR leisure=nature_reserve military : landuse=military OR military=danger_area properties curved : true text-halo-width : 30% text-halo-opacity : 0.75 rules target : station define min-zoom : 11 shape : circle shape-size : 11:1;13:2;15:8;17:10;20:12 fill-color : white draw : shape define font-family : Arial font-size : 14:6;18:12;20:16 min-zoom : 14 text-align-vertical : near text-offset-vertical : 100% draw : text target : stop define min-zoom : 12 shape : circle shape-size : 12:1;18:6 fill-color : yellow draw : shape define font-family : Arial font-size : 14:10;20:16 min-zoom : 14 text-align-vertical : near text-offset-vertical : 100% draw : text target : stop area define min-zoom : 10 max-zoom : 15 shape : circle shape-size : 11:1;13:2;15:6 fill-color : yellow draw : shape define font-family : Arial font-size : 14:10;20:16 min-zoom : 14 text-align-vertical : near text-offset-vertical : 100% draw : text // lines target : aerialway define shape-size : 12:2;16:6 shape-spacing : 11:1;13:4;14:6 for : aerialway=cable_car OR aerialway=gondola define min-zoom : 12.5 fill-color : white line-width : 13:2;15:3 elsefor : aerialway=chair_lift define min-zoom : 13.5 fill-color : black line-width : 13:1;14:2 else define min-zoom : 14 fill-color : black line-width : 13:1;14:2 draw : line define line-width : 2 draw : shape target : railway define line-width : 9:1;10:2;13:2;14:3 draw : line target : train define line-color : orange line-width : 10:3;14:4;20:8 draw : line target : train 60 define line-color : orange line-width : 10:2;14:4;20:12 draw : line target : metro define line-color : blue line-width : 10:3;14:4;20:8 draw : line target : metro 5 define line-color : blue line-width : 10:16;14:32;20:48 draw : line target : metro 10 define line-color : blue line-width : 10:12;14:20;20:36 draw : line target : sbahn define line-color : green line-width : 10:3;14:4;20:8 draw : line target : sbahn 15 define line-color : green line-width : 10:8;14:16;20:32 draw : line target : sbahn 30 define line-color : green line-width : 10:4;14:8;20:24 draw : line target : tram define line-color : red line-width : 10:3;14:4;20:8 font-size : 12 draw : line target : tram 15 define line-color : red line-width : 10:8;14:16;20:32 draw : line target : tram 10 define line-color : red line-width : 10:12;14:20;20:36 draw : line target : tram 5 define line-color : red line-width : 10:16;14:32;20:48 draw : line target : bus define line-color : #FF00CC line-width : 10:1;14:2;20:4 text : ref draw : line target : bus 5 define line-color : #95276E line-width : 10:16;14:32;20:48 draw : line target : bus 10 define line-color : #95276E line-width : 10:12;14:20;20:36 draw : line target : bus 15 define line-color : #95276E line-width : 10:8;14:16;20:32 draw : line target : bus 20 define line-color : #95276E line-width : 10:6;14:12;20:28 draw : line target : bus 30 define line-color : #95276E line-width : 10:4;14:8;20:24 draw : line target : bus 60 define line-color : #95276E line-width : 10:2;14:4;20:12 draw : line target : bus 120 define line-color : #95276E line-width : 10:2;14:2;20:8 draw : line target : bus 240 define line-color : #95276E line-width : 10:2;14:2;20:6 draw : line target : road * if : road major define min-zoom : 15 line-color : #FFE66B else define min-zoom : 15 line-color : white define line-width : 10:0.5;13:2;14:2;16:3 border-style : solid border-color : black border-width : 80% border-opacity : 0.8 draw : line target : road minor define min-zoom : 10 max-zoom : 14 line-color : black line-width : 1 border-style : none draw : line target : track major define min-zoom : 14 line-color : white line-width : 13.9:1;14:2;16:3 border-style : solid border-color : black border-width : 60% border-opacity : 0.8 draw : line define min-zoom : 12 max-zoom : 14 line-color : black line-width : 1 border-style : none draw : line target : track minor define min-zoom : 14.5 line-color : white line-width : 13.9:1;14:2;16:3 border-style : solid border-color : black border-width : 60% border-opacity : 0.8 draw : line target : foot path* define line-color : black line-style : dash border-style : none if : *major define min-zoom : 14.5 line-width : 14.5:1;15.5:2 else define min-zoom : 15 line-width : 1 draw : line target : stream define min-zoom : 13 line-color : #78C1C1 line-width : 13:1;14:2;16:3 draw : line define min-zoom : 15 font-size : 15:10;17:17 font-style : italic font-weight : bold text-color : #78C1C1 black 10% map.rendering.lflp.min-buffer-space : 5 map.rendering.lflp.max-allowed-corner-angle : 90 draw : text target: contour* define line-color : #7f3300 line-opacity : 0.35 curved : true if : *major define min-zoom : 13 line-width : 11:0.1;12.9:1;13:2 else define min-zoom : 13 line-width : 1 draw : contour // areas target : building define fill-color : #BDB76B line-style : none min-zoom : 12 draw : fill target : nature_reserve define line-color : #8DC56C black 20% line-opacity : 1 line-width : 3 line-style : dash font-size : 3:3;12:12 text-color : green font-weight : normal text : @up(name) draw : line define min-zoom : 13.5 draw : text target : military define fill-color : red fill-hatch : swne fill-hatch-color : white fill-hatch-opacity : 0 line-style : none draw : fill target : $featuretype(area) define line-style : none line-width : 1 if : forest define min-zoom : 9 fill-color : #ADFF2F // fill-texture : Textures/ForestNoiseLight.jpg elseif : water define fill-color : #4682B4 elseif : residential define fill-color : #F0E68C else stop draw : fill define min-zoom : 17 draw : text target : water define min-zoom : 15 font-size : 15:10;17:17 font-style : italic font-weight : bold text-color : #78C1C1 black 10% draw : text