User:Wikifriend70/Maperitive Regeln/BAB-Maxspeed

From OpenStreetMap Wiki
Jump to navigation Jump to search

Vorwort

Diese Seite bzw. Maperitive Regeln befinden sich noch im Aufbau

//     Rules for Maperitive by Wikifriend70
//     Based on rules by Igor Brejc - http://igorbrejc.net/
//
features		
	lines
		oneway : oneway=yes OR oneway=true OR oneway=-1
		highway motorway : highway=motorway
		highway motorway link : highway=motorway_link
		
		boundary country : boundary=administrative AND (admin_level=2 OR admin_level=4)
		boundary province : boundary=administrative AND admin_level=6
		
	points
		place city : place=city
		place town : place=town
		highway junction : highway=motorway_junction
	
properties
	map-background-color	: #F1EEE8
	map-background-opacity	: 1
	map-sea-color : #B5D0D0
	font-weight : bold
	font-family : Verdana
	text-max-width : 7
	text-halo-width : 25%
	text-halo-opacity : 0.75
	text-align-horizontal : center
	text-align-vertical : center
	align-horizontal : near
	align-vertical : near
	font-stretch : 0.9
	map.rendering.lflp.min-buffer-space : 5
	map.rendering.lflp.max-allowed-corner-angle : 40
	
rules

	target : $featuretype(point)
		if : place*
			define
				font-weight : bold
	
			if : *city
				define
					font-size : 6:8;14:20
					min-zoom : 6
					max-zoom : 14
			elseif : *town
				define
					font-size : 9:8;12:10;20:20
					min-zoom : 9
			
			draw : text

	target : boundary*
		define
			line-color : #9E1A99 
			line-opacity : 0.5
		if : boundary country
			define
				line-width : 6:1;9:2;10:5
		elseif : boundary province
			define
				min-zoom : 4
				line-width : 4:1;11:2
				line-style : dash
		
		draw : line


	target : highway junction
		define
			shape : circle
			shape-size : 15:10;18:20
			fill-color : white
			line-style : solid
			min-zoom : 14
		draw : shape

		define
//			text : ref
			text-color : #ae4242
			min-zoom : 15
			font-size : 12
			text-max-width : 10
			text-offset-vertical : 1
			text-align-vertical : near
		draw : text

	target : highway*
		define
			font-size : 12:6;15:7;18:10
			font-weight : bold

		for : oneway=yes OR oneway=true
			define 
				min-zoom : 12
				shape : custom
				shape-def : 60,0,20,-40,20,-15,-60,-15,-60,15,20,15,20,40;Z
				shape-size : 12
				shape-aspect : 0.75
				shape-spacing : 6
				fill-color : #6C70D4
				line-style : none
			for : oneway=-1
				define
					angle : 180
			draw : shape 

		define
			min-zoom : 12
			font-size : 11:6;14:8;16:16;18:30
			text : ref
		draw : text
	
	
		define
    			line-offset : 10:0;11:3;13:1;14.9:0
    			line-offset-sides : right
		draw : line

		define
			min-zoom : 7
			line-style : solid
			line-join : round
			line-start-cap : round
			line-end-cap : round
			line-color : blue
			

		for : maxspeed<61
			define 
				min-zoom : 7
				line-color : #640000
				line-width : 7:1;12:3;13:4;16:4;18:5
		
			draw : line

		for : maxspeed=70
			define 
				min-zoom : 7
				line-color : #B40000
				line-width : 7:1;12:3;13:4;16:4;18:5
		
			draw : line


		for : maxspeed=80
			define 
				min-zoom : 7
				line-color : #FF0000
				line-width : 7:1;12:3;13:4;16:4;18:5
				
			draw : line

	
		for : maxspeed=90
			define 
				min-zoom : 7
				line-color : #FF8000
				line-width : 7:1;12:3;13:4;16:4;18:5
		
			draw : line


		for : maxspeed=100
			define 
				min-zoom : 7
				line-color : #FFC800
				line-width : 7:1;12:3;13:4;16:4;18:5
		
			draw : line

		for : maxspeed=120
			define 
				min-zoom : 7
				line-color : #96FF00
				line-width : 7:1;12:3;13:4;16:4;18:5
		
			draw : line

		for : maxspeed=130
			define 
				min-zoom : 7
				line-color : #00C800
				line-width : 7:1;12:3;13:4;16:4;18:5
		
			draw : line

		for : maxspeed>131
			define 
				min-zoom : 7
				line-color : #0050FF
				line-width : 7:1;12:3;13:4;16:4;18:5
		
			draw : line

		for : maxspeed=signals
			define 
				min-zoom : 7
				line-color : gray
				line-style : solid
				line-width : 7:1;12:3;13:4;16:4;18:5
//				border-style : solid
//				border-color : blue
//				border-width : 15%

		
			draw : line

		if : *motorway*
			if : *link
				define
					line-width : 7:1;12:3;13:4;16:5;18:6
				
			else
				define
					line-width : 7:1;9:2;12:3;13:7;16:10;18:12

			draw : line
			
	

		elseif : *trunk*
			define
				min-zoom : 12
				line-color : #96D296
				line-width : 11:1;13:2;15:10;18:12
//				border-style : solid
//				border-color : #96D296 black 20%
//				border-width : 15%
			draw : line
//			define
//				min-zoom : 7
//				max-zoom : 12
//				border-style : none
//			draw : line

		
			draw : text