User:Vicuna/MaperitiveRules/RuralBusHeadways
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.
This ruleset is made to be used for rural bus lines. The default ruleset displays all kind of services in a comparable way. The problem is, that rural bus lines have very long headways. With the following ruleset it is possible to see differences between a route with an hourly service or only every 4 hours.
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 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 selten : relation[type=route (route=bus OR route=trolleybus) (headway<1441 OR interval<1441)] bus 120 : relation[type=route (route=bus OR route=trolleybus) (headway<121 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)] tram : relation[type=route route=tram] tram selten : relation[type=route route=tram (headway<1441 OR interval<1441)] tram 60 : relation[type=route route=tram (headway<61 OR interval<61)] tram 30 : relation[type=route route=tram (headway<31 OR interval<31)] tram 20 : relation[type=route route=tram (headway<21 OR interval<21)] tram 15 : relation[type=route route=tram (headway<16 OR interval<16)] tram 10 : relation[type=route route=tram (headway<11 OR interval<11)] tram 5 : relation[type=route route=tram (headway<6 OR interval<6)] rules target : station define min-zoom : 9 shape : circle shape-size : 9:1; 11:2; 13:6; 15:10; 17:16 fill-color : white draw : shape define min-zoom : 10 font-family : Arial font-size : 10:10; 12:14; 14:18; 16:22; 18:24 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;16:14;20:16 min-zoom : 14 text-align-vertical : near text-offset-vertical : 100% draw : text target : stop area define min-zoom : 10 max-zoom : 13 shape : circle shape-size : 10:1; 11:2; 12:3; 13:4; 15:6 fill-color : yellow draw : shape define font-family : Times font-size : 10:6;12:10 min-zoom : 10 max-zoom : 13 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:2;11:4;13:6;14:10 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:3;14:5;20:11 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:8;14:16;20:24 draw : line target : metro 10 define line-color : blue line-width : 10:6;14:10;20:18 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:4;14:8;20:16 draw : line target : sbahn 30 define line-color : green line-width : 10:3;14:6;20:12 draw : line target : tram define line-color : red line-width : 10:2;14:4;20:8 font-size : 12 draw : line define font-family : Verdana text-color : black font-size : 6:8;14:12 text-func : tramLabels(e) draw : text target : tram 5 define line-color : red line-width : 1:8; 10:16; 13:20; 15:32; 17:40 draw : line target : tram 10 define line-color : red line-width : 1:8; 10:16; 13:20; 15:28; 17:36 draw : line target : tram 15 define line-color : red line-width : 1:8; 10:16; 13:20; 15:24; 17:32 draw : line target : tram 20 define line-color : red line-width : 1:8; 10:16; 13:16; 15:22; 17:28 draw : line target : tram 30 define line-color : red line-width : 1:8; 10:12; 13:12; 15:18; 17:24 draw : line target : tram 60 define line-color : red line-width : 1:6; 10:8; 13:8; 15:12; 17:12 draw : line target : tram selten define line-color : red line-width : 4 draw : line target : bus define line-color : #FF00CC line-width : 1:1; 10:2; 13:2; 15:3; 17:3 draw : line target : bus 5 define line-color : #95276E line-width : 1:8; 10:16; 13:20; 15:32; 17:40 draw : line target : bus 10 define line-color : #95276E line-width : 1:8; 10:16; 13:20; 15:28; 17:36 draw : line target : bus 15 define line-color : #95276E line-width : 1:8; 10:16; 13:20; 15:24; 17:32 draw : line target : bus 20 define line-color : #95276E line-width : 1:8; 10:16; 13:16; 15:22; 17:28 draw : line target : bus 30 define line-color : #95276E line-width : 1:8; 10:12; 13:12; 15:18; 17:24 draw : line target : bus 60 define line-color : #95276E line-width : 1:6; 10:8; 13:8; 15:12; 17:12 draw : line target : bus 120 define line-color : #95276E line-width : 1:4; 10:6; 13:6; 15:6; 17:6 draw : line target : bus selten define line-color : #95276E line-width : 1:2; 10:4; 13:4; 15:6; 17:6 draw : line