Changes between Version 4 and Version 5 of Styles/Surface
- Timestamp:
- 2011-03-16T07:35:24+01:00 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Styles/Surface
v4 v5 1 1 This style visualizes the surface=* and smoothness tags on highways. Currently it does the following: 2 2 3 - show highways that neither have surface=* or smoothness=* as solid black3 - show highways that neither have surface=* or smoothness=* as dotted black 4 4 5 5 - with the smoothness tag render a 6 - blue thin line for smoothness=excellent 7 - move from green (=good) to red (=impassable) for the rest of smoothness values, at the same time thicken the way and use dashed stiles as smoothness values 8 9 - with the surface tag render a 10 - soft white halo (but only for values paved|asphalt|concrete|concrete_pavers) 11 - for the rest render the value with text (light brown for dirt, ground, mud, light green for grass, etc..) 12 13 - do not render text for the most common values (excellent, good, asphalt, paved) as they are easily identifyable by color code and would distract from the problem zones 6 - white solid for smoothness=excellent 7 - then move from green (=good) to red (=impassable) for the rest of smoothness values and use dashed stiles as smoothness values 8 - ways that have smoothness but lack surface are of width 1.5 9 10 - with the surface tag render 11 - ways with a width of 3.0 12 - a noticable black casing for values paved|asphalt|concrete|concrete_pavers 13 - for the rest render the value with text and text-color (light brown for dirt, ground, mud, light green for grass, etc..) 14 - ways that have surface but not smoothness are rendered solid gray at width 3.0 15 16 - do not render text for the most common values (excellent, good, asphalt, paved) as they are easily identifyable by color code and would distract from the "problem zones" 14 17 15 18 {{{ … … 26 29 } 27 30 31 28 32 meta[lang=de] 29 33 { … … 98 102 way[highway][!area] 99 103 { 100 color: #202020;101 104 opacity: 1.0; 102 105 z-index: 1.0; … … 105 108 106 109 110 way[highway][!surface][!smoothness] 111 { 112 color: #202020; 113 dashes: list(2,1); 114 } 115 116 way[highway][!surface][smoothness] 117 { 118 color: #202020; 119 width: 1.5; 120 } 121 122 way[highway][surface] 123 { 124 color: #909090; 125 width: 3; 126 } 127 107 128 way[highway][smoothness=impassable] 108 129 { 109 width: 4;110 130 color: eval(rgb((7*0.142*(1-red(prop(color)))) + red(prop(color)), (1*0.142*(1-green(prop(color)))) + green(prop(color)), blue(prop(color)))); 111 dashes: list( 3,5,2,2,5,3);131 dashes: list(2,10,5,10); 112 132 } 113 133 114 134 way[highway][smoothness=very_horrible] 115 135 { 116 width: 4;117 136 color: eval(rgb((6*0.142*(1-red(prop(color)))) + red(prop(color)), (2*0.142*(1-green(prop(color)))) + green(prop(color)), blue(prop(color)))); 118 dashes: list( 3,5,2,2,5,3);137 dashes: list(2,10,5,3); 119 138 } 120 139 121 140 way[highway][smoothness=horrible] 122 141 { 123 width: 4;124 142 color: eval(rgb((5*0.142*(1-red(prop(color)))) + red(prop(color)), (3*0.142*(1-green(prop(color)))) + green(prop(color)), blue(prop(color)))); 125 dashes: list(3,5,2,2 ,5,3);143 dashes: list(3,5,2,2); 126 144 } 127 145 128 146 way[highway][smoothness=very_bad] 129 147 { 130 width: 3;131 148 color: eval(rgb((4*0.142*(1-red(prop(color)))) + red(prop(color)), (4*0.142*(1-green(prop(color)))) + green(prop(color)), blue(prop(color)))); 132 dashes: list( 3,5,2,2);149 dashes: list(4,4,2,2); 133 150 } 134 151 135 152 way[highway][smoothness=bad] 136 153 { 137 width: 3;138 154 color: eval(rgb((3*0.142*(1-red(prop(color)))) + red(prop(color)), (5*0.142*(1-green(prop(color)))) + green(prop(color)), blue(prop(color)))); 139 dashes: list( 4,4,2,2);155 dashes: list(7,5); 140 156 } 141 157 142 158 way[highway][smoothness=intermediate] 143 159 { 144 width: 2;145 160 color: eval(rgb((2*0.142*(1-red(prop(color)))) + red(prop(color)), (6*0.142*(1-green(prop(color)))) + green(prop(color)), blue(prop(color)))); 146 dashes: list( 7,5);161 dashes: list(10,2); 147 162 } 148 163 149 164 way[highway][smoothness=good] 150 165 { 151 color: eval(rgb((1*0.142*(1-red(prop(color)))) + red(prop(color)), (7*0.142*(1-green(prop(color)))) + green(prop(color)), 0.4)); 152 dashes: list(10,2); 166 color: eval(rgb((1*0.142*(1-red(prop(color)))) + red(prop(color)), (7*0.142*(1-green(prop(color)))) + green(prop(color)), blue(prop(color)))); 153 167 } 154 168 155 169 way[highway][smoothness=excellent] 156 170 { 157 color: eval(rgb(red(prop(color)), green(prop(color)), 1.0));171 color: white; 158 172 } 159 173 … … 165 179 print-text: true; 166 180 text-color: #B0E0EE; 167 text-offset: 4; 168 } 169 170 way[highway][surface=unpaved], 171 way[highway][surface=dirt], 172 way[highway][surface=ground], 173 way[highway][surface=mud] 181 text-offset: 5; 182 } 183 184 way[highway][surface=grass] 185 { 186 text-color: #B0FFB0; 187 } 188 189 way[highway][surface=~/unpaved.*|dirt.*|earth.*|ground.*|mud.*/] 174 190 { 175 191 text-color: #FFB0B0; 176 192 } 177 193 178 way[highway][surface=grass] 179 { 180 text-color: #B0FFB0; 181 } 182 183 way[highway][surface=gravel], 184 way[highway][surface=fine_gravel], 185 way[highway][surface=pebblestone] 194 way[highway][surface=~/.*gravel.*|pebble.*/] 186 195 { 187 196 text-color: #FFFFB0; 188 197 } 189 198 190 way[highway][surface=paved], 191 way[highway][surface=asphalt], 192 way[highway][surface=concrete], 193 way[highway][surface=concrete_pavers] 199 way[highway][surface=~/paved.*|asphalt.*|concrete.*|cobble.*/][smoothness=~/excellent|good|intermediate|bad/] 194 200 { 195 201 print-text: false; 196 casing-width: + 2;197 casing-color: #7777AA;202 casing-width: +3; 203 casing-color: black; 198 204 casing-dashes: eval(prop(dashes)); 199 205 } … … 224 230 225 231 232 226 233 }}} 227 234
