one way fix

one way fix

/* LABELS.MSS CONTENTS:
 * - place names
 * - area labels
 * - waterway labels
 */

/* Font sets are defined in palette.mss */

/* Mapnik does not yet support character-spacing adjustments for
   labels placed along a line. We can fake this using the replace()
   function in the text-name parameter by replacing each character
   with itself followed by one or more spaces. */

/* ================================================================== */
/* PLACE NAMES
/* ================================================================== */

#place::country[type='country'][zoom>3][zoom<9] {
  text-name:'[name]';
  text-face-name:@sans_bold;
  text-placement:point;
  text-fill:@country_text;
  text-halo-fill: @country_halo;
  text-halo-radius: 1;
  [zoom=3] {
    text-size:10 + @text_adjust;
    text-wrap-width: 40;
  }
  [zoom=4] {
    text-size:11 + @text_adjust;
    text-wrap-width: 50;
  }
  [zoom>4] {
    text-halo-radius: 2;
  }
  [zoom=5] {
    text-size:11 + @text_adjust;
    text-wrap-width: 50;
    text-line-spacing: 1;
  }
  [zoom=6] {
    text-size:12 + @text_adjust;
    text-character-spacing: 1;
    text-wrap-width: 80;
    text-line-spacing: 2;
  }
  [zoom=7] {
    text-size:14 + @text_adjust;
    text-character-spacing: 2;
  }
}

#place::state[type='state'][zoom>=5][zoom<=10] {
  text-name:'[name]';
  text-face-name:@sans_bold_italic;
  text-placement:point;
  text-fill:@state_text;
  text-halo-fill: @state_halo;
  text-halo-radius: 1;
  [zoom=6] {
    text-size:10 + @text_adjust;
    text-wrap-width: 40;
  }
  [zoom=7] {
    text-size:11 + @text_adjust;
    text-wrap-width: 50;
  }
  [zoom>8] {
    text-halo-radius: 2;
  }
  [zoom=8] {
    text-size:11 + @text_adjust;
    text-wrap-width: 50;
    text-line-spacing: 1;
  }
  [zoom=9] {
    text-size:12 + @text_adjust;
    text-character-spacing: 1;
    text-wrap-width: 80;
    text-line-spacing: 2;
  }
  [zoom=10] {
    text-size:14 + @text_adjust;
    text-character-spacing: 2;
  }
}

// ---- Cities ------------------------------------------------------

#place::city[type='city'][zoom>=2][zoom<=15] {
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:point;
  text-fill:@city_text;
  text-halo-fill:@city_halo;
  text-halo-radius:2;
  [zoom<=8] {
    text-size: 10;
    text-halo-radius:1;
  }
  [zoom=9] {
    text-size:10;
    text-wrap-width: 60;
  }
  [zoom=10] {
    text-size:11;
    text-wrap-width: 70;
  }
  [zoom=11] {
    text-size:12;
    text-character-spacing: 1;
    text-wrap-width: 80;
  }
  [zoom=12] {
    text-size:13;
    text-character-spacing: 1;
    text-wrap-width: 100;
  }
  [zoom=13] {
    text-size:14;
    text-character-spacing: 2;
    text-wrap-width: 200;
    text-transform: uppercase;
  }
  [zoom=14] {
    text-size:15;
    text-character-spacing: 4;
    text-wrap-width: 300;
    text-transform: uppercase;
  }
  [zoom=15] {
    text-size:16;
    text-character-spacing: 6;
    text-wrap-width: 400;
    text-transform: uppercase;
  }
}

// ---- Towns -------------------------------------------------------

#place::town[type='town'][zoom>=9][zoom<=17] {
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:point;
  text-fill:@town_text;
  text-size:9;
  text-halo-fill:@town_halo;
  text-halo-radius:1;
  text-wrap-width: 50;
  [zoom>=10] {
    text-halo-radius:2;
    text-size: 10;
  }
  [zoom>=11]{ text-size:11; }
  [zoom>=12]{
    text-size:12;
    text-line-spacing: 1;
  }
  [zoom>=13]{
    text-transform: uppercase;
    text-character-spacing: 1;
    text-line-spacing: 2;
  }
  [zoom>=14]{
    text-size:13;
    text-character-spacing: 2;
    text-line-spacing: 3;
  }
  [zoom>=15]{
    text-size:14;
    text-character-spacing: 3;
    text-line-spacing: 4;
  }
  [zoom>=15]{
    text-size:15;
    text-character-spacing: 4;
    text-line-spacing: 5;
  }
  [zoom>=17]{
    text-size:16;
    text-character-spacing: 5;
    text-line-spacing: 6;
  }
}

// ---- Other small places ------------------------------------------

#place::small[type='village'][zoom>=13],
#place::small[type='suburb'][zoom>=13],
#place::small[type='hamlet'][zoom>=13]{
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:point;
  text-fill:@other_text;
  text-size:10;
  text-halo-fill:@other_halo;
  text-halo-radius:1;
  text-wrap-width: 30;
  [zoom>=14] {
    text-size:11;
    text-character-spacing: 1;
    text-wrap-width: 40;
    text-line-spacing: 1;
  }
  [zoom>=15] {
    text-halo-radius: 2;
    text-transform: uppercase;
    text-character-spacing: 1;
    text-wrap-width: 60;
    text-line-spacing: 1;
  }
  [zoom>=16] {
    text-size:12;
    text-character-spacing: 2;
    text-wrap-width: 120;
    text-line-spacing: 2;
  }
  [zoom>=17] {
    text-size:13;
    text-character-spacing: 3;
    text-wrap-width: 160;
    text-line-spacing: 4;
  }
  [zoom>=18] {
    text-size:14;
    text-character-spacing: 4;
    text-line-spacing: 6;
  }
}

#place::small[type='locality'][zoom>=15] {
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:point;
  text-fill:@locality_text;
  text-size:9;
  text-halo-fill:@locality_halo;
  text-halo-radius:1;
  text-wrap-width: 30;
  [zoom>=16] {
    text-size:10;
    text-wrap-width: 60;
    text-line-spacing: 1;
  }
  [zoom>=17] {
    text-size:11;
    text-wrap-width: 120;
    text-line-spacing: 2;
  }
  [zoom>=18] {
    text-size:12;
    text-character-spacing: 1;
    text-line-spacing: 4;
  }
}

// ==================================================================
// AREA LABELS
// ==================================================================

#area_label[type='golf_course'][zoom>=10],
#area_label[type='park'][zoom>=10] {
  text-name: "''";
  text-fill: @park * 0.6;
  text-halo-fill: fadeout(@park,25%);
  text-halo-radius: 2;
  text-face-name:@sans;
  text-wrap-width:30;
  [zoom=10][area>102400000],
  [zoom=11][area>25600000],
  [zoom=13][area>1600000],
  [zoom=14][area>320000],
  [zoom=15][area>80000],
  [zoom=16][area>20000],
  [zoom=17][area>5000],
  [zoom>=18][area>=0] {
    text-name: "[name]";
  }
  [zoom>=15][area>1600000],
  [zoom>=16][area>80000],
  [zoom>=17][area>20000],
  [zoom>=18][area>5000] {
    text-name: "[name]";
    text-size: 12;
    text-line-spacing: 2;
    text-wrap-width: 60;
  }
  [zoom=16][area>1600000],
  [zoom=17][area>80000],
  [zoom>=18][area>20000] {
    text-size: 14;
    text-line-spacing: 4;
    text-character-spacing: 1;
    text-wrap-width: 120;
  }
  [zoom>=17][area>1600000],
  [zoom>=18][area>80000] {
    text-size: 16;
    text-line-spacing: 6;
    text-character-spacing: 2;
    text-wrap-width: 180;
  }
}

#area_label[type='cemetery'][zoom>=10] {
  text-name: "''";
  text-fill: @cemetery * 0.6;
  text-halo-fill: fadeout(@cemetery,25%);
  text-halo-radius: 2;
  text-face-name:@sans;
  text-wrap-width:30;
  [zoom=10][area>102400000],
  [zoom=11][area>25600000],
  [zoom=13][area>1600000],
  [zoom=14][area>320000],
  [zoom=15][area>80000],
  [zoom=16][area>20000],
  [zoom=17][area>5000],
  [zoom>=18][area>=0] {
    text-name: "[name]";
  }
  [zoom=15][area>1600000],
  [zoom=16][area>80000],
  [zoom=17][area>20000],
  [zoom>=18][area>5000] {
    text-name: "[name]";
    text-size: 12;
    text-line-spacing: 2;
    text-wrap-width: 60;
  }
  [zoom=16][area>1600000],
  [zoom=17][area>80000],
  [zoom>=18][area>20000] {
    text-size: 14;
    text-line-spacing: 4;
    text-character-spacing: 1;
    text-wrap-width: 120;
  }
  [zoom>=17][area>1600000],
  [zoom>=18][area>80000] {
    text-size: 16;
    text-line-spacing: 6;
    text-character-spacing: 2;
    text-wrap-width: 180;
  }
}

#area_label[type='hospital'][zoom>=10] {
  text-name: "''";
  text-fill: @hospital * 0.6;
  text-halo-fill: fadeout(lighten(@hospital,10%),50%);
  text-halo-radius: 2;
  text-face-name:@sans;
  text-wrap-width:30;
  [zoom=14][area>320000],
  [zoom=15][area>80000],
  [zoom=16][area>20000],
  [zoom=17][area>5000],
  [zoom>=18][area>=0] {
    text-name: "[name]";
  }
  [zoom=16][area>80000],
  [zoom=17][area>20000],
  [zoom>=18][area>5000] {
    text-name: "[name]";
    text-size: 12;
    text-line-spacing: 2;
    text-wrap-width: 60;
  }
  [zoom=17][area>80000],
  [zoom>=18][area>20000] {
    text-size: 14;
    text-line-spacing: 4;
    text-character-spacing: 1;
    text-wrap-width: 120;
  }
  [zoom>=18][area>80000] {
    text-size: 16;
    text-line-spacing: 6;
    text-character-spacing: 2;
    text-wrap-width: 180;
  }
}

#area_label[type='college'][zoom>=10],
#area_label[type='school'][zoom>=10],
#area_label[type='university'][zoom>=10] {
  text-name: "''";
  text-fill: @school * 0.6;
  text-halo-fill: fadeout(lighten(@school,10%),50%);
  text-halo-radius: 2;
  text-face-name:@sans;
  text-wrap-width:30;
  [zoom=14][area>320000],
  [zoom=15][area>80000],
  [zoom=16][area>20000],
  [zoom=17][area>5000],
  [zoom>=18][area>=0] {
    text-name: "[name]";
  }
  [zoom=16][area>80000],
  [zoom=17][area>20000],
  [zoom>=18][area>5000] {
    text-name: "[name]";
    text-size: 12;
    text-line-spacing: 2;
    text-wrap-width: 60;
  }
  [zoom=17][area>80000],
  [zoom>=18][area>20000] {
    text-size: 14;
    text-line-spacing: 4;
    text-character-spacing: 1;
    text-wrap-width: 120;
  }
  [zoom>=18][area>80000] {
    text-size: 16;
    text-line-spacing: 6;
    text-character-spacing: 2;
    text-wrap-width: 180;
  }
}

#area_label[type='water'][zoom>=10] {
  text-name: "''";
  text-fill: @water * 0.75;
  text-halo-fill: fadeout(lighten(@water,5%),25%);
  text-halo-radius: 1;
  text-face-name:@sans_italic;
  text-wrap-width:30;
  [zoom=10][area>102400000],
  [zoom=11][area>25600000],
  [zoom=13][area>1600000],
  [zoom=14][area>320000],
  [zoom=15][area>80000],
  [zoom=16][area>20000],
  [zoom=17][area>5000],
  [zoom=18][area>=0] {
    text-name: "[name]";
  }
  [zoom=15][area>1600000],
  [zoom=16][area>80000],
  [zoom=17][area>20000],
  [zoom=18][area>5000] {
    text-name: "[name]";
    text-size: 12;
    text-line-spacing: 2;
    text-wrap-width: 60;
    text-character-spacing: 1;
  }
  [zoom=16][area>1600000],
  [zoom=17][area>80000],
  [zoom=18][area>20000] {
    text-size: 14;
    text-line-spacing: 4;
    text-character-spacing: 2;
    text-wrap-width: 120;
  }
  [zoom>=17][area>1600000],
  [zoom>=18][area>80000] {
    text-size: 16;
    text-line-spacing: 6;
    text-character-spacing: 3;
    text-wrap-width: 180;
  }
}

#poi[type='university'][zoom>=15],
#poi[type='hospital'][zoom>=16],
#poi[type='school'][zoom>=17],
#poi[type='library'][zoom>=17] {
  text-name:"[name]";
  text-face-name:@sans;
  text-size:10;
  text-wrap-width:30;
  text-fill: @poi_text;
}

// Islands and islets

#island_label_polygon {
  [zoom=10][area>2000000],
  [zoom=11][area>500000],
  [zoom=12][area>200000],
  [zoom=13][area>50000],
  [zoom=14][area>10000],
  [zoom=15][area>2500],
  [zoom>15][area>0] {
    text-name: "[name]";
    text-fill:@island_text;
    text-face-name:@sans;
    text-size:9;
    text-halo-fill:@island_halo;
    text-halo-radius:1;
    text-wrap-width: 50;
    text-placement: interior;
  }
}

// nodes with name and place=island/islet
#island_label_point {
  [zoom>=13] {
    text-name: "[name]";
    text-fill:@island_text;
    text-face-name:@sans;
    text-size:9;
    text-halo-fill:@island_halo;
    text-halo-radius:1;
    text-wrap-width: 50;
    text-placement: interior;
  }
}

// Residential is often used as neighborhood name, block name and more

#area_label[type = 'residential']{
  [zoom=12][area>1280000],
  [zoom=13][area>640000],
  [zoom=14][area>320000],
  [zoom=15][area>240000],
  [zoom=16][area>90000],
  [zoom=17][area>10000],
  [zoom=18][area>=0] {
    text-name: "[name]";
    text-fill:@other_text;
    text-face-name:@sans;
    text-size:9;
    text-halo-fill:@other_halo;
    text-halo-radius:1;
    text-wrap-width: 50;
    text-placement: interior;
  }
}

// ==================================================================
// WATERWAY LABELS
// ==================================================================

#waterway_label[type='river'][zoom>=13],
#waterway_label[type='canal'][zoom>=15],
#waterway_label[type='stream'][zoom>=17] {
  text-name: '[name]';
  text-face-name: @sans_italic;
  text-fill: @water * 0.75;
  text-halo-fill: fadeout(lighten(@water,5%),25%);
  text-halo-radius: 1;
  text-placement: line;
  text-min-distance: 400;
  text-size: 10;
  [type='river'][zoom=14],
  [type='canal'][zoom=16],
  [type='stream'][zoom=18] {
    text-name: "[name].replace('([\S\ ])','$1 ')";
  }
  [type='river'][zoom=15],
  [type='canal'][zoom=17] {
    text-size: 11;
    text-name: "[name].replace('([\S\ ])','$1 ')";
  }
  [type='river'][zoom>=16],
  [type='canal'][zoom=18] {
    text-size: 14;
    text-name: "[name].replace('([\S\ ])','$1 ')";
    text-spacing: 300;
  }
}

// ==================================================================
// ROAD LABELS
// ==================================================================

#motorway_label[zoom>=11][zoom<=14][reflen<=8] {
  shield-name: "[ref]";
  shield-size: 9;
  shield-face-name: @sans_bold;
  shield-fill: #fff;
  shield-file: url(img/shield-motorway-1.png);
  [type='motorway'] {
    [reflen=1] { shield-file: url(img/shield-motorway-1.png); }
    [reflen=2] { shield-file: url(img/shield-motorway-2.png); }
    [reflen=3] { shield-file: url(img/shield-motorway-3.png); }
    [reflen=4] { shield-file: url(img/shield-motorway-4.png); }
    [reflen=5] { shield-file: url(img/shield-motorway-5.png); }
    [reflen=6] { shield-file: url(img/shield-motorway-6.png); }
    [reflen=7] { shield-file: url(img/shield-motorway-7.png); }
    [reflen=8] { shield-file: url(img/shield-motorway-8.png); }
  }
  [type='trunk'] {
    [reflen=1] { shield-file: url(img/shield-trunk-1.png); }
    [reflen=2] { shield-file: url(img/shield-trunk-2.png); }
    [reflen=3] { shield-file: url(img/shield-trunk-3.png); }
    [reflen=4] { shield-file: url(img/shield-trunk-4.png); }
    [reflen=5] { shield-file: url(img/shield-trunk-5.png); }
    [reflen=6] { shield-file: url(img/shield-trunk-6.png); }
    [reflen=7] { shield-file: url(img/shield-trunk-7.png); }
    [reflen=8] { shield-file: url(img/shield-trunk-8.png); }
  }
  [zoom=11] { shield-min-distance: 60; } //50
  [zoom=12] { shield-min-distance: 80; } //60
  [zoom=13] { shield-min-distance: 120; } //120
  [zoom=14] { shield-min-distance: 180; }
}

#motorway_label[type='motorway'][zoom>9],
#motorway_label[type='trunk'][zoom>9] {
  text-name:"[name]";
  text-face-name:@sans_bold;
  text-placement:line;
  text-fill:@road_text;
  text-halo-fill:@road_halo;
  text-halo-radius:1;
  text-min-distance:60;
  text-size:10;
  [zoom=11] { text-min-distance:70; }
  [zoom=12] { text-min-distance:80; }
  [zoom=13] { text-min-distance:100; }
}

#mainroad_label[type='primary'][zoom>12],
#mainroad_label[type='secondary'][zoom>13],
#mainroad_label[type='tertiary'][zoom>13] {
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:line;
  text-fill:@road_text;
  text-halo-fill:@road_halo;
  text-halo-radius:1;
  text-min-distance:60;
  text-size:11;
}

#minorroad_label[zoom>14] {
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:line;
  text-size:9;
  text-fill:@road_text;
  text-halo-fill:@road_halo;
  text-halo-radius:1;
  text-min-distance:60;
  text-size:11;
}

// ==================================================================
// ONE-WAY ARROWS
// ==================================================================

#motorway_label[zoom>=16],
#mainroad_label[zoom>=16],
#minorroad_label[zoom>=16] {
  [oneway = 'yes'],
  [oneway='-1'] {
     marker-placement:line;
     marker-max-error: 0.5;
     marker-spacing: 200;
     marker-file: url(img/icon/oneway.svg);
     [oneway='-1'] { marker-file: url(img/icon/oneway-reverse.svg); }
     [zoom=16] { marker-transform: "scale(0.5)"; }
     [zoom=17] { marker-transform: "scale(0.75)"; }
  }
}

// house names and numbers

#housenumbers {
  [zoom >= 18] {
    text-name: "[addr:housenumber]";
    text-placement: interior;
    text-min-distance: 1;
    text-wrap-width: 0;
    text-face-name: @sans_lt;
    text-fill: #444;
    text-size: 9;
  }
}

#housenames {
  [zoom >= 17] {
    text-name: "[addr:housename]";
    text-placement: interior;
    text-wrap-width: 20;
    text-face-name: @sans_lt;
    text-size: 8;
    text-fill: #444;
    [zoom >= 18] {
      text-size: 9;
    }
  }
}

/* LABELS.MSS CONTENTS:
 * - place names
 * - area labels
 * - waterway labels
 */

/* Font sets are defined in palette.mss */

/* Mapnik does not yet support character-spacing adjustments for
   labels placed along a line. We can fake this using the replace()
   function in the text-name parameter by replacing each character
   with itself followed by one or more spaces. */

/* ================================================================== */
/* PLACE NAMES
/* ================================================================== */

#place::country[type='country'][zoom>3][zoom<9] {
  text-name:'[name]';
  text-face-name:@sans_bold;
  text-placement:point;
  text-fill:@country_text;
  text-halo-fill: @country_halo;
  text-halo-radius: 1;
  [zoom=3] {
    text-size:10 + @text_adjust;
    text-wrap-width: 40;
  }
  [zoom=4] {
    text-size:11 + @text_adjust;
    text-wrap-width: 50;
  }
  [zoom>4] {
    text-halo-radius: 2;
  }
  [zoom=5] {
    text-size:11 + @text_adjust;
    text-wrap-width: 50;
    text-line-spacing: 1;
  }
  [zoom=6] {
    text-size:12 + @text_adjust;
    text-character-spacing: 1;
    text-wrap-width: 80;
    text-line-spacing: 2;
  }
  [zoom=7] {
    text-size:14 + @text_adjust;
    text-character-spacing: 2;
  }
}

#place::state[type='state'][zoom>=5][zoom<=10] {
  text-name:'[name]';
  text-face-name:@sans_bold_italic;
  text-placement:point;
  text-fill:@state_text;
  text-halo-fill: @state_halo;
  text-halo-radius: 1;
  [zoom=6] {
    text-size:10 + @text_adjust;
    text-wrap-width: 40;
  }
  [zoom=7] {
    text-size:11 + @text_adjust;
    text-wrap-width: 50;
  }
  [zoom>8] {
    text-halo-radius: 2;
  }
  [zoom=8] {
    text-size:11 + @text_adjust;
    text-wrap-width: 50;
    text-line-spacing: 1;
  }
  [zoom=9] {
    text-size:12 + @text_adjust;
    text-character-spacing: 1;
    text-wrap-width: 80;
    text-line-spacing: 2;
  }
  [zoom=10] {
    text-size:14 + @text_adjust;
    text-character-spacing: 2;
  }
}

// ---- Cities ------------------------------------------------------

#place::city[type='city'][zoom>=2][zoom<=15] {
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:point;
  text-fill:@city_text;
  text-halo-fill:@city_halo;
  text-halo-radius:2;
  [zoom<=8] {
    text-size: 10;
    text-halo-radius:1;
  }
  [zoom=9] {
    text-size:10;
    text-wrap-width: 60;
  }
  [zoom=10] {
    text-size:11;
    text-wrap-width: 70;
  }
  [zoom=11] {
    text-size:12;
    text-character-spacing: 1;
    text-wrap-width: 80;
  }
  [zoom=12] {
    text-size:13;
    text-character-spacing: 1;
    text-wrap-width: 100;
  }
  [zoom=13] {
    text-size:14;
    text-character-spacing: 2;
    text-wrap-width: 200;
    text-transform: uppercase;
  }
  [zoom=14] {
    text-size:15;
    text-character-spacing: 4;
    text-wrap-width: 300;
    text-transform: uppercase;
  }
  [zoom=15] {
    text-size:16;
    text-character-spacing: 6;
    text-wrap-width: 400;
    text-transform: uppercase;
  }
}

// ---- Towns -------------------------------------------------------

#place::town[type='town'][zoom>=9][zoom<=17] {
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:point;
  text-fill:@town_text;
  text-size:9;
  text-halo-fill:@town_halo;
  text-halo-radius:1;
  text-wrap-width: 50;
  [zoom>=10] {
    text-halo-radius:2;
    text-size: 10;
  }
  [zoom>=11]{ text-size:11; }
  [zoom>=12]{
    text-size:12;
    text-line-spacing: 1;
  }
  [zoom>=13]{
    text-transform: uppercase;
    text-character-spacing: 1;
    text-line-spacing: 2;
  }
  [zoom>=14]{
    text-size:13;
    text-character-spacing: 2;
    text-line-spacing: 3;
  }
  [zoom>=15]{
    text-size:14;
    text-character-spacing: 3;
    text-line-spacing: 4;
  }
  [zoom>=15]{
    text-size:15;
    text-character-spacing: 4;
    text-line-spacing: 5;
  }
  [zoom>=17]{
    text-size:16;
    text-character-spacing: 5;
    text-line-spacing: 6;
  }
}

// ---- Other small places ------------------------------------------

#place::small[type='village'][zoom>=13],
#place::small[type='suburb'][zoom>=13],
#place::small[type='hamlet'][zoom>=13]{
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:point;
  text-fill:@other_text;
  text-size:10;
  text-halo-fill:@other_halo;
  text-halo-radius:1;
  text-wrap-width: 30;
  [zoom>=14] {
    text-size:11;
    text-character-spacing: 1;
    text-wrap-width: 40;
    text-line-spacing: 1;
  }
  [zoom>=15] {
    text-halo-radius: 2;
    text-transform: uppercase;
    text-character-spacing: 1;
    text-wrap-width: 60;
    text-line-spacing: 1;
  }
  [zoom>=16] {
    text-size:12;
    text-character-spacing: 2;
    text-wrap-width: 120;
    text-line-spacing: 2;
  }
  [zoom>=17] {
    text-size:13;
    text-character-spacing: 3;
    text-wrap-width: 160;
    text-line-spacing: 4;
  }
  [zoom>=18] {
    text-size:14;
    text-character-spacing: 4;
    text-line-spacing: 6;
  }
}

#place::small[type='locality'][zoom>=15] {
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:point;
  text-fill:@locality_text;
  text-size:9;
  text-halo-fill:@locality_halo;
  text-halo-radius:1;
  text-wrap-width: 30;
  [zoom>=16] {
    text-size:10;
    text-wrap-width: 60;
    text-line-spacing: 1;
  }
  [zoom>=17] {
    text-size:11;
    text-wrap-width: 120;
    text-line-spacing: 2;
  }
  [zoom>=18] {
    text-size:12;
    text-character-spacing: 1;
    text-line-spacing: 4;
  }
}

// ==================================================================
// AREA LABELS
// ==================================================================

#area_label[type='golf_course'][zoom>=10],
#area_label[type='park'][zoom>=10] {
  text-name: "''";
  text-fill: @park * 0.6;
  text-halo-fill: fadeout(@park,25%);
  text-halo-radius: 2;
  text-face-name:@sans;
  text-wrap-width:30;
  [zoom=10][area>102400000],
  [zoom=11][area>25600000],
  [zoom=13][area>1600000],
  [zoom=14][area>320000],
  [zoom=15][area>80000],
  [zoom=16][area>20000],
  [zoom=17][area>5000],
  [zoom>=18][area>=0] {
    text-name: "[name]";
  }
  [zoom>=15][area>1600000],
  [zoom>=16][area>80000],
  [zoom>=17][area>20000],
  [zoom>=18][area>5000] {
    text-name: "[name]";
    text-size: 12;
    text-line-spacing: 2;
    text-wrap-width: 60;
  }
  [zoom=16][area>1600000],
  [zoom=17][area>80000],
  [zoom>=18][area>20000] {
    text-size: 14;
    text-line-spacing: 4;
    text-character-spacing: 1;
    text-wrap-width: 120;
  }
  [zoom>=17][area>1600000],
  [zoom>=18][area>80000] {
    text-size: 16;
    text-line-spacing: 6;
    text-character-spacing: 2;
    text-wrap-width: 180;
  }
}

#area_label[type='cemetery'][zoom>=10] {
  text-name: "''";
  text-fill: @cemetery * 0.6;
  text-halo-fill: fadeout(@cemetery,25%);
  text-halo-radius: 2;
  text-face-name:@sans;
  text-wrap-width:30;
  [zoom=10][area>102400000],
  [zoom=11][area>25600000],
  [zoom=13][area>1600000],
  [zoom=14][area>320000],
  [zoom=15][area>80000],
  [zoom=16][area>20000],
  [zoom=17][area>5000],
  [zoom>=18][area>=0] {
    text-name: "[name]";
  }
  [zoom=15][area>1600000],
  [zoom=16][area>80000],
  [zoom=17][area>20000],
  [zoom>=18][area>5000] {
    text-name: "[name]";
    text-size: 12;
    text-line-spacing: 2;
    text-wrap-width: 60;
  }
  [zoom=16][area>1600000],
  [zoom=17][area>80000],
  [zoom>=18][area>20000] {
    text-size: 14;
    text-line-spacing: 4;
    text-character-spacing: 1;
    text-wrap-width: 120;
  }
  [zoom>=17][area>1600000],
  [zoom>=18][area>80000] {
    text-size: 16;
    text-line-spacing: 6;
    text-character-spacing: 2;
    text-wrap-width: 180;
  }
}

#area_label[type='hospital'][zoom>=10] {
  text-name: "''";
  text-fill: @hospital * 0.6;
  text-halo-fill: fadeout(lighten(@hospital,10%),50%);
  text-halo-radius: 2;
  text-face-name:@sans;
  text-wrap-width:30;
  [zoom=14][area>320000],
  [zoom=15][area>80000],
  [zoom=16][area>20000],
  [zoom=17][area>5000],
  [zoom>=18][area>=0] {
    text-name: "[name]";
  }
  [zoom=16][area>80000],
  [zoom=17][area>20000],
  [zoom>=18][area>5000] {
    text-name: "[name]";
    text-size: 12;
    text-line-spacing: 2;
    text-wrap-width: 60;
  }
  [zoom=17][area>80000],
  [zoom>=18][area>20000] {
    text-size: 14;
    text-line-spacing: 4;
    text-character-spacing: 1;
    text-wrap-width: 120;
  }
  [zoom>=18][area>80000] {
    text-size: 16;
    text-line-spacing: 6;
    text-character-spacing: 2;
    text-wrap-width: 180;
  }
}

#area_label[type='college'][zoom>=10],
#area_label[type='school'][zoom>=10],
#area_label[type='university'][zoom>=10] {
  text-name: "''";
  text-fill: @school * 0.6;
  text-halo-fill: fadeout(lighten(@school,10%),50%);
  text-halo-radius: 2;
  text-face-name:@sans;
  text-wrap-width:30;
  [zoom=14][area>320000],
  [zoom=15][area>80000],
  [zoom=16][area>20000],
  [zoom=17][area>5000],
  [zoom>=18][area>=0] {
    text-name: "[name]";
  }
  [zoom=16][area>80000],
  [zoom=17][area>20000],
  [zoom>=18][area>5000] {
    text-name: "[name]";
    text-size: 12;
    text-line-spacing: 2;
    text-wrap-width: 60;
  }
  [zoom=17][area>80000],
  [zoom>=18][area>20000] {
    text-size: 14;
    text-line-spacing: 4;
    text-character-spacing: 1;
    text-wrap-width: 120;
  }
  [zoom>=18][area>80000] {
    text-size: 16;
    text-line-spacing: 6;
    text-character-spacing: 2;
    text-wrap-width: 180;
  }
}

#area_label[type='water'][zoom>=10] {
  text-name: "''";
  text-fill: @water * 0.75;
  text-halo-fill: fadeout(lighten(@water,5%),25%);
  text-halo-radius: 1;
  text-face-name:@sans_italic;
  text-wrap-width:30;
  [zoom=10][area>102400000],
  [zoom=11][area>25600000],
  [zoom=13][area>1600000],
  [zoom=14][area>320000],
  [zoom=15][area>80000],
  [zoom=16][area>20000],
  [zoom=17][area>5000],
  [zoom=18][area>=0] {
    text-name: "[name]";
  }
  [zoom=15][area>1600000],
  [zoom=16][area>80000],
  [zoom=17][area>20000],
  [zoom=18][area>5000] {
    text-name: "[name]";
    text-size: 12;
    text-line-spacing: 2;
    text-wrap-width: 60;
    text-character-spacing: 1;
  }
  [zoom=16][area>1600000],
  [zoom=17][area>80000],
  [zoom=18][area>20000] {
    text-size: 14;
    text-line-spacing: 4;
    text-character-spacing: 2;
    text-wrap-width: 120;
  }
  [zoom>=17][area>1600000],
  [zoom>=18][area>80000] {
    text-size: 16;
    text-line-spacing: 6;
    text-character-spacing: 3;
    text-wrap-width: 180;
  }
}

#poi[type='university'][zoom>=15],
#poi[type='hospital'][zoom>=16],
#poi[type='school'][zoom>=17],
#poi[type='library'][zoom>=17] {
  text-name:"[name]";
  text-face-name:@sans;
  text-size:10;
  text-wrap-width:30;
  text-fill: @poi_text;
}

// Islands and islets

#island_label_polygon {
  [zoom=10][area>2000000],
  [zoom=11][area>500000],
  [zoom=12][area>200000],
  [zoom=13][area>50000],
  [zoom=14][area>10000],
  [zoom=15][area>2500],
  [zoom>15][area>0] {
    text-name: "[name]";
    text-fill:@island_text;
    text-face-name:@sans;
    text-size:9;
    text-halo-fill:@island_halo;
    text-halo-radius:1;
    text-wrap-width: 50;
    text-placement: interior;
  }
}

// nodes with name and place=island/islet
#island_label_point {
  [zoom>=13] {
    text-name: "[name]";
    text-fill:@island_text;
    text-face-name:@sans;
    text-size:9;
    text-halo-fill:@island_halo;
    text-halo-radius:1;
    text-wrap-width: 50;
    text-placement: interior;
  }
}

// Residential is often used as neighborhood name, block name and more

#area_label[type = 'residential']{
  [zoom=12][area>1280000],
  [zoom=13][area>640000],
  [zoom=14][area>320000],
  [zoom=15][area>240000],
  [zoom=16][area>90000],
  [zoom=17][area>10000],
  [zoom=18][area>=0] {
    text-name: "[name]";
    text-fill:@other_text;
    text-face-name:@sans;
    text-size:9;
    text-halo-fill:@other_halo;
    text-halo-radius:1;
    text-wrap-width: 50;
    text-placement: interior;
  }
}

// ==================================================================
// WATERWAY LABELS
// ==================================================================

#waterway_label[type='river'][zoom>=13],
#waterway_label[type='canal'][zoom>=15],
#waterway_label[type='stream'][zoom>=17] {
  text-name: '[name]';
  text-face-name: @sans_italic;
  text-fill: @water * 0.75;
  text-halo-fill: fadeout(lighten(@water,5%),25%);
  text-halo-radius: 1;
  text-placement: line;
  text-min-distance: 400;
  text-size: 10;
  [type='river'][zoom=14],
  [type='canal'][zoom=16],
  [type='stream'][zoom=18] {
    text-name: "[name].replace('([\S\ ])','$1 ')";
  }
  [type='river'][zoom=15],
  [type='canal'][zoom=17] {
    text-size: 11;
    text-name: "[name].replace('([\S\ ])','$1 ')";
  }
  [type='river'][zoom>=16],
  [type='canal'][zoom=18] {
    text-size: 14;
    text-name: "[name].replace('([\S\ ])','$1 ')";
    text-spacing: 300;
  }
}

// ==================================================================
// ROAD LABELS
// ==================================================================

#motorway_label[zoom>=11][zoom<=14][reflen<=8] {
  shield-name: "[ref]";
  shield-size: 9;
  shield-face-name: @sans_bold;
  shield-fill: #fff;
  shield-file: url(img/shield-motorway-1.png);
  [type='motorway'] {
    [reflen=1] { shield-file: url(img/shield-motorway-1.png); }
    [reflen=2] { shield-file: url(img/shield-motorway-2.png); }
    [reflen=3] { shield-file: url(img/shield-motorway-3.png); }
    [reflen=4] { shield-file: url(img/shield-motorway-4.png); }
    [reflen=5] { shield-file: url(img/shield-motorway-5.png); }
    [reflen=6] { shield-file: url(img/shield-motorway-6.png); }
    [reflen=7] { shield-file: url(img/shield-motorway-7.png); }
    [reflen=8] { shield-file: url(img/shield-motorway-8.png); }
  }
  [type='trunk'] {
    [reflen=1] { shield-file: url(img/shield-trunk-1.png); }
    [reflen=2] { shield-file: url(img/shield-trunk-2.png); }
    [reflen=3] { shield-file: url(img/shield-trunk-3.png); }
    [reflen=4] { shield-file: url(img/shield-trunk-4.png); }
    [reflen=5] { shield-file: url(img/shield-trunk-5.png); }
    [reflen=6] { shield-file: url(img/shield-trunk-6.png); }
    [reflen=7] { shield-file: url(img/shield-trunk-7.png); }
    [reflen=8] { shield-file: url(img/shield-trunk-8.png); }
  }
  [zoom=11] { shield-min-distance: 60; } //50
  [zoom=12] { shield-min-distance: 80; } //60
  [zoom=13] { shield-min-distance: 120; } //120
  [zoom=14] { shield-min-distance: 180; }
}

#motorway_label[type='motorway'][zoom>9],
#motorway_label[type='trunk'][zoom>9] {
  text-name:"[name]";
  text-face-name:@sans_bold;
  text-placement:line;
  text-fill:@road_text;
  text-halo-fill:@road_halo;
  text-halo-radius:1;
  text-min-distance:60;
  text-size:10;
  [zoom=11] { text-min-distance:70; }
  [zoom=12] { text-min-distance:80; }
  [zoom=13] { text-min-distance:100; }
}

#mainroad_label[type='primary'][zoom>12],
#mainroad_label[type='secondary'][zoom>13],
#mainroad_label[type='tertiary'][zoom>13] {
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:line;
  text-fill:@road_text;
  text-halo-fill:@road_halo;
  text-halo-radius:1;
  text-min-distance:60;
  text-size:11;
}

#minorroad_label[zoom>14] {
  text-name:'[name]';
  text-face-name:@sans;
  text-placement:line;
  text-size:9;
  text-fill:@road_text;
  text-halo-fill:@road_halo;
  text-halo-radius:1;
  text-min-distance:60;
  text-size:11;
}

// ==================================================================
// ONE-WAY ARROWS
// ==================================================================

#motorway_label[oneway!=0][oneway!='no'][oneway!='false'][zoom>=16],
#mainroad_label[oneway!=0][oneway!='no'][oneway!='false'][zoom>=16],
#minorroad_label[oneway!=0][oneway!='no'][oneway!='false'][zoom>=16] {
  marker-placement:line;
  marker-max-error: 0.5;
  marker-spacing: 200;
  marker-file: url(img/icon/oneway.svg);
  [oneway=-1] { marker-file: url(img/icon/oneway-reverse.svg); }
  [oneway='reverse'] { marker-file: url(img/icon/oneway-reverse.svg); }
  [zoom=16] { marker-transform: "scale(0.5)"; }
  [zoom=17] { marker-transform: "scale(0.75)"; }
}

/* house names and numbers */

#housenumbers {
  [zoom >= 18] {
    text-name: "[addr:housenumber]";
    text-placement: interior;
    text-min-distance: 1;
    text-wrap-width: 0;
    text-face-name: @sans_lt;
    text-fill: #444;
    text-size: 9;
  }
}

#housenames {
  [zoom >= 17] {
    text-name: "[addr:housename]";
    text-placement: interior;
    text-wrap-width: 20;
    text-face-name: @sans_lt;
    text-size: 8;
    text-fill: #444;
    [zoom >= 18] {
      text-size: 9;
    }
  }
}


borders did not show properly

borders did not show properly

admin_level must be compared to a string

/* BASE.MSS CONTENTS
 * - Landuse & landcover
 * - Water areas
 * - Water ways
 * - Administrative Boundaries
 *
 */

/* ================================================================== */
/* LANDUSE & LANDCOVER
/* ================================================================== */

#land-low[zoom>=0][zoom<10],
#land-high[zoom>=10] {
  polygon-fill: @land;
  polygon-gamma: 0.75;
}

#landuse_gen0[zoom>3][zoom<=9],
#landuse_gen1[zoom>9][zoom<=12],
#landuse[zoom>12] {
  [type='cemetery']      { polygon-fill: @cemetery; }
  [type='college']       { polygon-fill: @school; }
  [type='commercial']    { polygon-fill: @industrial; }
  [type='common']        { polygon-fill: @park; }
  [type='forest']        { polygon-fill: @wooded; }
  [type='golf_course']   { polygon-fill: @sports; }
  [type='grass']         { polygon-fill: @grass; }
  [type='hospital']      { polygon-fill: @hospital; }
  [type='industrial']    { polygon-fill: @industrial; }
  [type='park']          { polygon-fill: @park; }
  [type='parking']       { polygon-fill: @parking; }
  [type='pedestrian']    { polygon-fill: @pedestrian_fill; }
  [type='pitch']         { polygon-fill: @sports; }
  [type='residential']   { polygon-fill: @residential; }
  [type='school']        { polygon-fill: @school; }
  [type='sports_center'] { polygon-fill: @sports; }
  [type='stadium']       { polygon-fill: @sports; }
  [type='university']    { polygon-fill: @school; }
  [type='wood']          { polygon-fill: @wooded; }
}

#landuse_overlays[type='nature_reserve'][zoom>6] {
  line-color: darken(@wooded,25%);
  line-opacity:  0.3;
  line-dasharray: 1,1;
  polygon-fill: darken(@wooded,25%);
  polygon-opacity: 0.1;
  [zoom=7] { line-width: 0.4; }
  [zoom=8] { line-width: 0.6; }
  [zoom=9] { line-width: 0.8; }
  [zoom=10] { line-width: 1.0; }
  [zoom=11] { line-width: 1.5; }
  [zoom>=12] { line-width: 2.0; }
}

#landuse_overlays[type='wetland'][zoom>11] {
  [zoom>11][zoom<=14] { polygon-pattern-file:url(img/marsh-16.png); }
  [zoom>14] { polygon-pattern-file:url(img/marsh-32.png);}
  }

/* ---- BUILDINGS ---- */
#buildings[zoom>=12][zoom<=16] {
  polygon-fill:@building;
  [zoom>=14] {
    line-color:darken(@building,5%);
    line-width:0.2;
  }
  [zoom>=16] {
    line-color:darken(@building,10%);
    line-width:0.4;
  }
}
// At the highest zoom levels, render buildings in fancy pseudo-3D.
// Ordering polygons by their Y-position is necessary for this effect
// so we use a separate layer that does this for us.
#buildings[zoom>=17][type != 'hedge'] {
  building-fill:@building;
  building-height:1.25;
}

#buildings[zoom>=17][type = 'hedge'] {
  building-fill:@wooded;
  building-height:1.25;
}

/* ================================================================== */
/* WATER AREAS
/* ================================================================== */

Map { background-color: @water; }

#water_gen0[zoom>3][zoom<=9],
#water_gen1[zoom>9][zoom<=12],
#water[zoom>12] {
  polygon-fill: @water;
}

/* ================================================================== */
/* WATER WAYS
/* ================================================================== */

#waterway_low[zoom>=8][zoom<=12] {
  line-color: @water;
  [zoom=8] { line-width: 0.1; }
  [zoom=9] { line-width: 0.2; }
  [zoom=10]{ line-width: 0.4; }
  [zoom=11]{ line-width: 0.6; }
  [zoom=12]{ line-width: 0.8; }
}

#waterway_med[zoom>=13][zoom<=14] {
  line-color: @water;
  [type='river'],
  [type='canal'] {
    line-cap: round;
    line-join: round;
    [zoom=13]{ line-width: 1; }
    [zoom=14]{ line-width: 1.5; }
  }
  [type='stream'] {
    [zoom=13]{ line-width: 0.2; }
    [zoom=14]{ line-width: 0.4; }
  }
}

#waterway_high[zoom>=15] {
  line-color: @water;
  [type='river'],
  [type='canal'] {
    line-cap: round;
    line-join: round;
    [zoom=15]{ line-width: 2; }
    [zoom=16]{ line-width: 3; }
    [zoom=17]{ line-width: 4; }
    [zoom=18]{ line-width: 5; }
    [zoom=19]{ line-width: 6; }
    [zoom>19]{ line-width: 7; }
  }
  [type='stream'] {
    [zoom=15]{ line-width: 0.6; }
    [zoom=16]{ line-width: 0.8; }
    [zoom=17]{ line-width: 1; }
    [zoom=18]{ line-width: 1.5; }
    [zoom>18]{ line-width: 2; }
  }
  [type='ditch'],
  [type='drain'] {
    [zoom=15]{ line-width: 0.1; }
    [zoom=16]{ line-width: 0.3; }
    [zoom=17]{ line-width: 0.5; }
    [zoom=18]{ line-width: 0.7; }
    [zoom=19]{ line-width: 1; }
    [zoom>19]{ line-width: 1.5; }
  }
}

/* ================================================================== */
/* ADMINISTRATIVE BOUNDARIES
/* ================================================================== */

#admin[admin_level='2'][zoom>1] {
  line-color:@admin_2;
  line-width:0.5;
  [zoom=2] { line-opacity: 0.25; }
  [zoom=3] { line-opacity: 0.3; }
  [zoom=4] { line-opacity: 0.4; }
}

/* ================================================================== */
/* BARRIER POINTS
/* ================================================================== */

#barrier_points[zoom>=17][stylegroup = 'divider'] {
  marker-height: 2;
  marker-fill: #c7c7c7;
  marker-line-opacity:0;
  marker-allow-overlap:true;
}

/* ================================================================== */
/* BARRIER LINES
/* ================================================================== */

#barrier_lines[zoom>=17][stylegroup = 'gate'] {
  line-width:2.5;
  line-color:#aab;
  line-dasharray:3,2;
}

#barrier_lines[zoom>=17][stylegroup = 'fence'] {
  line-width:1.75;
  line-color:#aab;
  line-dasharray:1,1;
}

#barrier_lines[zoom>=17][stylegroup = 'hedge'] {
  line-width:3;
  line-color:darken(@park,5%);

}

/* BASE.MSS CONTENTS
 * - Landuse & landcover
 * - Water areas
 * - Water ways
 * - Administrative Boundaries
 *
 */

/* ================================================================== */
/* LANDUSE & LANDCOVER
/* ================================================================== */

#land-low[zoom>=0][zoom<10],
#land-high[zoom>=10] {
  polygon-fill: @land;
  polygon-gamma: 0.75;
}

#landuse_gen0[zoom>3][zoom<=9],
#landuse_gen1[zoom>9][zoom<=12],
#landuse[zoom>12] {
  [type='cemetery']      { polygon-fill: @cemetery; }
  [type='college']       { polygon-fill: @school; }
  [type='commercial']    { polygon-fill: @industrial; }
  [type='common']        { polygon-fill: @park; }
  [type='forest']        { polygon-fill: @wooded; }
  [type='golf_course']   { polygon-fill: @sports; }
  [type='grass']         { polygon-fill: @grass; }
  [type='hospital']      { polygon-fill: @hospital; }
  [type='industrial']    { polygon-fill: @industrial; }
  [type='park']          { polygon-fill: @park; }
  [type='parking']       { polygon-fill: @parking; }
  [type='pedestrian']    { polygon-fill: @pedestrian_fill; }
  [type='pitch']         { polygon-fill: @sports; }
  [type='residential']   { polygon-fill: @residential; }
  [type='school']        { polygon-fill: @school; }
  [type='sports_center'] { polygon-fill: @sports; }
  [type='stadium']       { polygon-fill: @sports; }
  [type='university']    { polygon-fill: @school; }
  [type='wood']          { polygon-fill: @wooded; }
}

#landuse_overlays[type='nature_reserve'][zoom>6] {
  line-color: darken(@wooded,25%);
  line-opacity:  0.3;
  line-dasharray: 1,1;
  polygon-fill: darken(@wooded,25%);
  polygon-opacity: 0.1;
  [zoom=7] { line-width: 0.4; }
  [zoom=8] { line-width: 0.6; }
  [zoom=9] { line-width: 0.8; }
  [zoom=10] { line-width: 1.0; }
  [zoom=11] { line-width: 1.5; }
  [zoom>=12] { line-width: 2.0; }
}

#landuse_overlays[type='wetland'][zoom>11] {
  [zoom>11][zoom<=14] { polygon-pattern-file:url(img/marsh-16.png); }
  [zoom>14] { polygon-pattern-file:url(img/marsh-32.png);}
  }

/* ---- BUILDINGS ---- */
#buildings[zoom>=12][zoom<=16] {
  polygon-fill:@building;
  [zoom>=14] {
    line-color:darken(@building,5%);
    line-width:0.2;
  }
  [zoom>=16] {
    line-color:darken(@building,10%);
    line-width:0.4;
  }
}
// At the highest zoom levels, render buildings in fancy pseudo-3D.
// Ordering polygons by their Y-position is necessary for this effect
// so we use a separate layer that does this for us.
#buildings[zoom>=17][type != 'hedge'] {
  building-fill:@building;
  building-height:1.25;
}

#buildings[zoom>=17][type = 'hedge'] {
  building-fill:@wooded;
  building-height:1.25;
}

/* ================================================================== */
/* WATER AREAS
/* ================================================================== */

Map { background-color: @water; }

#water_gen0[zoom>3][zoom<=9],
#water_gen1[zoom>9][zoom<=12],
#water[zoom>12] {
  polygon-fill: @water;
}

/* ================================================================== */
/* WATER WAYS
/* ================================================================== */

#waterway_low[zoom>=8][zoom<=12] {
  line-color: @water;
  [zoom=8] { line-width: 0.1; }
  [zoom=9] { line-width: 0.2; }
  [zoom=10]{ line-width: 0.4; }
  [zoom=11]{ line-width: 0.6; }
  [zoom=12]{ line-width: 0.8; }
}

#waterway_med[zoom>=13][zoom<=14] {
  line-color: @water;
  [type='river'],
  [type='canal'] {
    line-cap: round;
    line-join: round;
    [zoom=13]{ line-width: 1; }
    [zoom=14]{ line-width: 1.5; }
  }
  [type='stream'] {
    [zoom=13]{ line-width: 0.2; }
    [zoom=14]{ line-width: 0.4; }
  }
}

#waterway_high[zoom>=15] {
  line-color: @water;
  [type='river'],
  [type='canal'] {
    line-cap: round;
    line-join: round;
    [zoom=15]{ line-width: 2; }
    [zoom=16]{ line-width: 3; }
    [zoom=17]{ line-width: 4; }
    [zoom=18]{ line-width: 5; }
    [zoom=19]{ line-width: 6; }
    [zoom>19]{ line-width: 7; }
  }
  [type='stream'] {
    [zoom=15]{ line-width: 0.6; }
    [zoom=16]{ line-width: 0.8; }
    [zoom=17]{ line-width: 1; }
    [zoom=18]{ line-width: 1.5; }
    [zoom>18]{ line-width: 2; }
  }
  [type='ditch'],
  [type='drain'] {
    [zoom=15]{ line-width: 0.1; }
    [zoom=16]{ line-width: 0.3; }
    [zoom=17]{ line-width: 0.5; }
    [zoom=18]{ line-width: 0.7; }
    [zoom=19]{ line-width: 1; }
    [zoom>19]{ line-width: 1.5; }
  }
}

/* ================================================================== */
/* ADMINISTRATIVE BOUNDARIES
/* ================================================================== */

#admin[admin_level=2][zoom>1] {
  line-color:@admin_2;
  line-width:0.5;
  [zoom=2] { line-opacity: 0.25; }
  [zoom=3] { line-opacity: 0.3; }
  [zoom=4] { line-opacity: 0.4; }
}

/* ================================================================== */
/* BARRIER POINTS
/* ================================================================== */

#barrier_points[zoom>=17][stylegroup = 'divider'] {
  marker-height: 2;
  marker-fill: #c7c7c7;
  marker-line-opacity:0;
  marker-allow-overlap:true;
}

/* ================================================================== */
/* BARRIER LINES
/* ================================================================== */

#barrier_lines[zoom>=17][stylegroup = 'gate'] {
  line-width:2.5;
  line-color:#aab;
  line-dasharray:3,2;
}

#barrier_lines[zoom>=17][stylegroup = 'fence'] {
  line-width:1.75;
  line-color:#aab;
  line-dasharray:1,1;
}

#barrier_lines[zoom>=17][stylegroup = 'hedge'] {
  line-width:3;
  line-color:darken(@park,5%);

}


Update comment in geography class.

Update comment in geography class.

/**********************************************************

'Geography Class'
=================

Note that this map doing some rather complex things thus
slowish rendering should not be surprising. A pre-rendered
demo is online at <http://mapbox.com/tileset/geography-class>

Hover Interaction & Embedded Data
---------------------------------

When you move your cursor around the map you should see the
name and flag of the country you are hovering over appear
in the top left. You can pull any attributes from a data
layer to form tooltips like this. Here, we are pulling a
text attribute and a base64-encoded PNG image from a GeoJSON
file of country polygons. Click on the settings wrench at the
top right, then on the 'Tooltips' tab to see how this was
set up.

Layers overview
---------------

### country-interaction [countries_interaction.geojson]

This is an invisible layer used to add hover interactivity
to the map. It is derived fro the 1:50M resolution Natural
Earth dataset. GeoJSON was chosen over shapefile in this
instance to allow for the inclusion of base64-encoded PNG
data (not possible in a DBF due to the limit of
255 bytes per cell).

### paper [world_extent_merc.geojson]

The shapefile is a rectangle extending to the bounds of the
map filled with a repeating transparent pattern to give the
map a folded paper texture.

### cities [populated_places_by_pop.zip]

This is essentially Natural Earth's Populated Places
shapefile, but the elements have been reordered such by
population (descending). This is to take advantage of the
fact that Mapnik will give priority to elements stored first
in the datasource. Using various classification attributes
in the shapefile, only certain cities will be shown at
certain zoom levels.

### country-name [country-labels.zip]

Labeled points of the world's country names. Derived from
Natural Earth Data but hand-tweaked by MapBox.

### geo-lines [geographic-lines.zip]

Important lines such as the equator, Arctic and Antarctic
circles, and the international date line.

### admin-0-line-land [admin-0-line-land.zip]

These are international borders that occur over land or
lakes. International maritime borders are a separate layer.

### lakes [lakes.zip]

The world's lakes. The style is designed such that smaller
lakes only appear as you zoom in.

### rivers [rivers_lake_centerlines_scale_ranks.zip]

### country [admin_0_countries.zip]

Countries - the rainbow.mss stylesheet colors each of these
individually.

### land-glow [admin_0_countries.zip]

A copy of the country layer providing the shadow/glow around
the continents.

***********************************************************************/

@water: #ddeeff;
@land: #ffffdd;
@line: #226688;

/* Water bodies */
Map {
  background-color: @water;
}

/* Required to 'activate' the polygons for interactivity */
#country-interaction {
  polygon-opacity:0;
}

#lakes[Name1!=''][zoom>2],
#lakes[Name1=''][zoom>4] {
  polygon-fill:@water;
  line-color:@line * 1.5;
  line-width:0.4;
  line-opacity:0.4;
}
#lakes[Name1!=''][zoom=4] {
  line-width:0.6;
  line-opacity:0.6;
}
#lakes[zoom=5] {
  line-width:2;
  line-opacity:0.8;
}
#lakes[zoom>5] {
  line-width:1.8;
  line-opacity:1;
}

#rivers[ScaleRank=1][zoom>=3],
#rivers[ScaleRank=2][zoom>=4],
#rivers[ScaleRank=3][zoom>=5],
#rivers[ScaleRank=4][zoom>=5],
#rivers[ScaleRank=5][zoom>=6],
#rivers[ScaleRank=6][zoom>=6],
#rivers[ScaleRank=7][zoom>=7],
#rivers[ScaleRank=8][zoom>=7],
#rivers[ScaleRank=9][zoom>=8] {
  line-color:@line * 1.5;
  line-join:round;
}
#rivers[ScaleRank=1][zoom=3],
#rivers[ScaleRank=2][zoom=4],
#rivers[ScaleRank=3][zoom=5],
#rivers[ScaleRank=4][zoom=5],
#rivers[ScaleRank=5][zoom=6],
#rivers[ScaleRank=6][zoom=6],
#rivers[ScaleRank=7][zoom=7],
#rivers[ScaleRank=8][zoom=7],
#rivers[ScaleRank=9][zoom=8] {
  line-width:0.2;
  line-opacity:0.4;
}
#rivers[ScaleRank=1][zoom=4],
#rivers[ScaleRank=2][zoom=5],
#rivers[ScaleRank=3][zoom=6],
#rivers[ScaleRank=4][zoom=6],
#rivers[ScaleRank=5][zoom=7],
#rivers[ScaleRank=6][zoom=7],
#rivers[ScaleRank=7][zoom=8],
#rivers[ScaleRank=8][zoom=8],
#rivers[ScaleRank=9][zoom=9] {
  line-width:0.4;
  line-opacity:0.6;
}
#rivers[ScaleRank=1][zoom=5],
#rivers[ScaleRank=2][zoom=6],
#rivers[ScaleRank=3][zoom=7],
#rivers[ScaleRank=4][zoom=7],
#rivers[ScaleRank=5][zoom=8],
#rivers[ScaleRank=6][zoom=8],
#rivers[ScaleRank=7][zoom=9],
#rivers[ScaleRank=8][zoom=9],
#rivers[ScaleRank=9][zoom=10] {
  line-width:0.6;
  line-opacity:0.8;
}
#rivers[ScaleRank=1][zoom=6],
#rivers[ScaleRank=2][zoom=7],
#rivers[ScaleRank=3][zoom=8],
#rivers[ScaleRank=4][zoom=8],
#rivers[ScaleRank=5][zoom=9],
#rivers[ScaleRank=6][zoom=9],
#rivers[ScaleRank=7][zoom=10],
#rivers[ScaleRank=8][zoom=10],
#rivers[ScaleRank=9][zoom=11] {
  line-width:0.8;
  line-opacity:1;
}

#glacier {
  polygon-fill:#fff;
  polygon-opacity:0.5;
}

/* Useful/significant lines */
#geo-lines[DISPLAY!='International Date Line - Pre 1995 alignment'] {
  line-color:@line;
  line-dasharray:6,2;
  [zoom=0] { line-width:0.2; }
  [zoom=1] { line-width:0.4; }
  [zoom=2] { line-width:0.6; }
  [zoom=3] { line-width:0.8; }
  [zoom>3] { line-width:1; }
}

.border.country[zoom>1],
.border.disputed[zoom>2] {
  line-width:1;
  line-color:#fff;
  line-join:round;
  .country[FeatureCla='Disputed (please verify)'] {
    [zoom=3] { line-dasharray:4,1; }
    [zoom=4] { line-dasharray:5,2; }
    [zoom=5] { line-dasharray:6,2; }
    [zoom=6] { line-dasharray:8,3; }
    [zoom>6] { line-dasharray:10,3; }
  }
  .disputed[FeatureCla='Breakaway'] {
    [zoom=3] { line-dasharray: 3,2; }
    [zoom=4] { line-dasharray: 4,4; }
    [zoom=5] { line-dasharray: 5,5; }
    [zoom=6] { line-dasharray: 6,6; }
    [zoom>6] { line-dasharray: 8,8; }
  }
  .disputed[FeatureCla='Claim boundary'] {
    line-dasharray: 1,3;
    [zoom>6] { line-dasharray: 2,4; }
  }
  .country[FeatureCla='Indefinite (please verify)'] {
    line-dasharray: 6,1;
  }
}

#state[ADM0_A3="USA"],
#state[ADM0_A3="CAN"],
#state[ADM0_A3="AUS"] {
  [zoom>3] {
    line-color:@line;
    line-opacity:0.25;
    line-width:1.2;
    line-dasharray:6,2,2,2;
  }
}

/* Transparent PNG overlay for paper texture */
#paper[zoom<2] {
  polygon-pattern-file:url(textures/paperfolds_256.png);
}
#paper[zoom>1] {
  polygon-pattern-file:url(textures/paperfolds_512.png);
}

/**********************************************************

'Geography Class'
=================

Note that this map doing some rather complex things thus
slowish rendering should not be surprising. A pre-rendered
demo is online at <http://mapbox.com/tileset/geography-class>

Hover Interaction & Embedded Data
---------------------------------

When you move your cursor around the map you should see the
name and flag of the country you are hovering over appear
in the top left. You can pull any attributes from a data
layer to form tooltips like this. Here, we are pulling a
text attribute and a base64-encoded PNG image from a GeoJSON
file of country polygons. Click on the settings wrench at the
top right, then on the 'Interaction' tab to see how this was
set up.

Layers overview
---------------

### country-interaction [countries_interaction.geojson]

This is an invisible layer used to add hover interactivity
to the map. It is derived fro the 1:50M resolution Natural
Earth dataset. GeoJSON was chosen over shapefile in this
instance to allow for the inclusion of base64-encoded PNG
data (not possible in a DBF due to the limit of
255 bytes per cell).

### paper [world_extent_merc.geojson]

The shapefile is a rectangle extending to the bounds of the
map filled with a repeating transparent pattern to give the
map a folded paper texture.

### cities [populated_places_by_pop.zip]

This is essentially Natural Earth's Populated Places
shapefile, but the elements have been reordered such by
population (descending). This is to take advantage of the
fact that Mapnik will give priority to elements stored first
in the datasource. Using various classification attributes
in the shapefile, only certain cities will be shown at
certain zoom levels.

### country-name [country-labels.zip]

Labeled points of the world's country names. Derived from
Natural Earth Data but hand-tweaked by MapBox.

### geo-lines [geographic-lines.zip]

Important lines such as the equator, Arctic and Antarctic
circles, and the international date line.

### admin-0-line-land [admin-0-line-land.zip]

These are international borders that occur over land or
lakes. International maritime borders are a separate layer.

### lakes [lakes.zip]

The world's lakes. The style is designed such that smaller
lakes only appear as you zoom in.

### rivers [rivers_lake_centerlines_scale_ranks.zip]

### country [admin_0_countries.zip]

Countries - the rainbow.mss stylesheet colors each of these
individually.

### land-glow [admin_0_countries.zip]

A copy of the country layer providing the shadow/glow around
the continents.

***********************************************************************/

@water: #ddeeff;
@land: #ffffdd;
@line: #226688;

/* Water bodies */
Map {
  background-color: @water;
}

/* Required to 'activate' the polygons for interactivity */
#country-interaction {
  polygon-opacity:0;
}

#lakes[Name1!=''][zoom>2],
#lakes[Name1=''][zoom>4] {
  polygon-fill:@water;
  line-color:@line * 1.5;
  line-width:0.4;
  line-opacity:0.4;
}
#lakes[Name1!=''][zoom=4] {
  line-width:0.6;
  line-opacity:0.6;
}
#lakes[zoom=5] {
  line-width:2;
  line-opacity:0.8;
}
#lakes[zoom>5] {
  line-width:1.8;
  line-opacity:1;
}

#rivers[ScaleRank=1][zoom>=3],
#rivers[ScaleRank=2][zoom>=4],
#rivers[ScaleRank=3][zoom>=5],
#rivers[ScaleRank=4][zoom>=5],
#rivers[ScaleRank=5][zoom>=6],
#rivers[ScaleRank=6][zoom>=6],
#rivers[ScaleRank=7][zoom>=7],
#rivers[ScaleRank=8][zoom>=7],
#rivers[ScaleRank=9][zoom>=8] {
  line-color:@line * 1.5;
  line-join:round;
}
#rivers[ScaleRank=1][zoom=3],
#rivers[ScaleRank=2][zoom=4],
#rivers[ScaleRank=3][zoom=5],
#rivers[ScaleRank=4][zoom=5],
#rivers[ScaleRank=5][zoom=6],
#rivers[ScaleRank=6][zoom=6],
#rivers[ScaleRank=7][zoom=7],
#rivers[ScaleRank=8][zoom=7],
#rivers[ScaleRank=9][zoom=8] {
  line-width:0.2;
  line-opacity:0.4;
}
#rivers[ScaleRank=1][zoom=4],
#rivers[ScaleRank=2][zoom=5],
#rivers[ScaleRank=3][zoom=6],
#rivers[ScaleRank=4][zoom=6],
#rivers[ScaleRank=5][zoom=7],
#rivers[ScaleRank=6][zoom=7],
#rivers[ScaleRank=7][zoom=8],
#rivers[ScaleRank=8][zoom=8],
#rivers[ScaleRank=9][zoom=9] {
  line-width:0.4;
  line-opacity:0.6;
}
#rivers[ScaleRank=1][zoom=5],
#rivers[ScaleRank=2][zoom=6],
#rivers[ScaleRank=3][zoom=7],
#rivers[ScaleRank=4][zoom=7],
#rivers[ScaleRank=5][zoom=8],
#rivers[ScaleRank=6][zoom=8],
#rivers[ScaleRank=7][zoom=9],
#rivers[ScaleRank=8][zoom=9],
#rivers[ScaleRank=9][zoom=10] {
  line-width:0.6;
  line-opacity:0.8;
}
#rivers[ScaleRank=1][zoom=6],
#rivers[ScaleRank=2][zoom=7],
#rivers[ScaleRank=3][zoom=8],
#rivers[ScaleRank=4][zoom=8],
#rivers[ScaleRank=5][zoom=9],
#rivers[ScaleRank=6][zoom=9],
#rivers[ScaleRank=7][zoom=10],
#rivers[ScaleRank=8][zoom=10],
#rivers[ScaleRank=9][zoom=11] {
  line-width:0.8;
  line-opacity:1;
}

#glacier {
  polygon-fill:#fff;
  polygon-opacity:0.5;
}

/* Useful/significant lines */
#geo-lines[DISPLAY!='International Date Line - Pre 1995 alignment'] {
  line-color:@line;
  line-dasharray:6,2;
  [zoom=0] { line-width:0.2; }
  [zoom=1] { line-width:0.4; }
  [zoom=2] { line-width:0.6; }
  [zoom=3] { line-width:0.8; }
  [zoom>3] { line-width:1; }
}

.border.country[zoom>1],
.border.disputed[zoom>2] {
  line-width:1;
  line-color:#fff;
  line-join:round;
  .country[FeatureCla='Disputed (please verify)'] {
    [zoom=3] { line-dasharray:4,1; }
    [zoom=4] { line-dasharray:5,2; }
    [zoom=5] { line-dasharray:6,2; }
    [zoom=6] { line-dasharray:8,3; }
    [zoom>6] { line-dasharray:10,3; }
  }
  .disputed[FeatureCla='Breakaway'] {
    [zoom=3] { line-dasharray: 3,2; }
    [zoom=4] { line-dasharray: 4,4; }
    [zoom=5] { line-dasharray: 5,5; }
    [zoom=6] { line-dasharray: 6,6; }
    [zoom>6] { line-dasharray: 8,8; }
  }
  .disputed[FeatureCla='Claim boundary'] {
    line-dasharray: 1,3;
    [zoom>6] { line-dasharray: 2,4; }
  }
  .country[FeatureCla='Indefinite (please verify)'] {
    line-dasharray: 6,1;
  }
}

#state[ADM0_A3="USA"],
#state[ADM0_A3="CAN"],
#state[ADM0_A3="AUS"] {
  [zoom>3] {
    line-color:@line;
    line-opacity:0.25;
    line-width:1.2;
    line-dasharray:6,2,2,2;
  }
}

/* Transparent PNG overlay for paper texture */
#paper[zoom<2] {
  polygon-pattern-file:url(textures/paperfolds_256.png);
}
#paper[zoom>1] {
  polygon-pattern-file:url(textures/paperfolds_512.png);
}


Update line styling

Update line styling

@traversed-color: #264653;
@untraversed-color: #e76f51;

#traversed-paths {
    background/line-color: @traversed-color;
    background/line-width: 2;
    [zoom >= 16] {
        background/line-width: 4;
        line-color: #fff;
        line-width: 2;
        line-dasharray: 2,2;
    }
}

#untraversed-paths {
    line-color: @untraversed-color;
    line-width: 2;
    [zoom >= 16] {
        line-width: 4;
    }
}

@traversed-color: #264653;
@untraversed-color: #e76f51;

#traversed-paths {
    [zoom >= 5] {
        background/line-color: @traversed-color;
        background/line-width: 2;
        [zoom >= 16] {
            background/line-width: 4;
            line-color: #fff;
            line-width: 0.8;
            line-dasharray: 6,6;
        }
    }
}

#untraversed-paths {
    [zoom >= 5] {
        background/line-color: @untraversed-color;
        background/line-width: 2;
        [zoom >= 16] {
            background/line-width: 4;
            line-color: #fff;
            line-width: 0.8;
            line-dasharray: 6,6;
        }
    }
}


change golf icon to black as green on green isn't readable

/*
==Database level==
* join adjacent way segments with same classification and name
  for labels layer and increase text-spacing so labels aren't
  repeated right next to each other

* optimise queries as to select just what is required for rendering

* select way area so can style bay names larger for larger bays

==Style level==
* ShieldSymbolizers for POIs with names at high zooms (eg police station
  icon with name)
*/

/*
  Large labeled areas such as park, golf courses and schools.

  These labels are shown at z15-17, before we see POI features.

  We use the way_area to show labels for larger areas from lower zooms.

  By placing a point-file below all the text-* attributes mapnik will
  render a marker icon if it decides it can't fit the text due to other labels
  in the way.
*/

@school_label_halo_colour: #342101;
@park_label_halo_colour: #0e300e;

/**  Parks  **/

/* only show from z15+ where area > 30,000 */
#park-labels[zoom > 14][way_area > 30000] {
  text-name: "[name]";
  text-face-name: "Liberation Sans Regular";
  text-fill: white;
  text-placement: interior;
  text-halo-fill: @park_label_halo_colour;
  text-halo-radius: 2.0;
  text-wrap-width: 20;
  text-opacity: 0.75;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
}

/* start showing on z16+ on area > 10,000 */
#park-labels[zoom > 15][way_area >= 10000][way_area < 30000] {
  text-name: "[name]";
  text-face-name: "Liberation Sans Regular";
  text-fill: white;
  text-placement: interior;
  text-halo-fill: @park_label_halo_colour;
  text-halo-radius: 2.0;
  text-wrap-width: 20;
  text-opacity: 0.75;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
}

/* show the rest from z17+ */
#park-labels[zoom > 16][way_area < 10000] {
  text-name: "[name]";
  text-face-name: "Liberation Sans Regular";
  text-fill: white;
  text-placement: interior;
  text-halo-fill: @park_label_halo_colour;
  text-halo-radius: 2.0;
  text-wrap-width: 20;
  text-opacity: 0.75;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
}

/**  Golf Courses  **/

/* since most are large, just render all labels from zoom 15+ */
#leisure[leisure='golf_course'][zoom > 14] {
  text-name: "[name]";
  text-face-name: "Liberation Sans Regular";
  text-fill: white;
  text-placement: interior;
  text-halo-fill: #021402;
  text-halo-radius: 2.0;
  text-wrap-width: 50;
  text-opacity: 0.75;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }

  /* if mapnik can't place a label, try an icon instead */
  point-file: url('/usr/share/icons/sjjb/png/sport/golf.glow.000000.12.png');
}

/**  Schools  **/

/* only show from z15+ where area > 30,000 */
#school-labels[zoom > 14][way_area > 30000] {
  text-name: "[name]";
  text-face-name: "Liberation Sans Regular";
  text-fill: white;
  text-placement: interior;
  text-halo-fill: @school_label_halo_colour;
  text-halo-radius: 2.0;
  text-wrap-width: 20;
  text-opacity: 0.75;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }

  /* if mapnik can't place a label, try an icon instead */
  point-file: url('/usr/share/icons/sjjb/png/education/school.glow.734A08.12.png');
}

/* start showing on z16+ on area > 10,000 */
#school-labels[zoom > 15][way_area >= 10000][way_area < 30000] {
  text-name: "[name]";
  text-face-name: "Liberation Sans Regular";
  text-fill: white;
  text-placement: interior;
  text-halo-fill: @school_label_halo_colour;
  text-halo-radius: 2.0;
  text-wrap-width: 20;
  text-opacity: 0.75;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }

  point-file: url('/usr/share/icons/sjjb/png/education/school.glow.734A08.16.png');
}

/* show the rest from z17+ */
#school-labels[zoom > 16][way_area < 10000] {
  text-name: "[name]";
  text-face-name: "Liberation Sans Regular";
  text-fill: white;
  text-placement: interior;
  text-halo-fill: @school_label_halo_colour;
  text-halo-radius: 2.0;
  text-wrap-width: 20;
  text-opacity: 0.75;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }

  point-file: url('/usr/share/icons/sjjb/png/education/school.glow.734A08.20.png');
}

/* building names */
#building-label[zoom > 16] {
  text-name: "[name]";
  text-face-name: "Liberation Sans Regular";
  text-fill: white;
  text-placement: interior;
  text-halo-fill: black;
  text-halo-radius: 2.0;
  text-wrap-width: 20;

  [zoom > 21] { text-size: 17; }
  [zoom = 21] { text-size: 16; }
  [zoom = 20] { text-size: 15; }
  [zoom = 19] { text-size: 14; }
  [zoom = 18] { text-size: 12; }
  [zoom = 17] { text-size: 10; }
}

/*
  Miscellaneous items
  */

/* ferry routes */
#ferry-route[zoom > 6][zoom < 12] {
  line-color: white;
  line-width: 0.7;
  line-opacity: 0.5;
}

#ferry-route[zoom > 11] {
  line-color: #00066f;
  line-dasharray: 6,6;

  [zoom = 12] { line-width: 0.8; }
  [zoom = 13] { line-width: 1.0; }
  [zoom = 14] { line-width: 1.3; }
  [zoom = 15] { line-width: 1.6; }
  [zoom > 15] { line-width: 2.0; }

  ::halo{
    line-color: white;
    line-width: 1.0;
    line-opacity: 0.5;

    [zoom = 13] { line-width: 1.2; }
    [zoom = 14] { line-width: 1.5; }
    [zoom = 15] { line-width: 1.8; }
    [zoom > 15] { line-width: 2.2; }
  }
}

#landuse[landuse='military'][zoom > 10] {
  ::outline {
    line-color: #f55000;
    line-width: 3;
    line-opacity: 0.329;
  }

  polygon-pattern-file: url('/usr/share/icons/osmt/military-pattern.png');
}

/*
==Database level==
* join adjacent way segments with same classification and name
  for labels layer and increase text-spacing so labels aren't
  repeated right next to each other

* optimise queries as to select just what is required for rendering

* select way area so can style bay names larger for larger bays

==Style level==
* ShieldSymbolizers for POIs with names at high zooms (eg police station
  icon with name)
*/

/*
  Large labeled areas such as park, golf courses and schools.

  These labels are shown at z15-17, before we see POI features.

  We use the way_area to show labels for larger areas from lower zooms.

  By placing a point-file below all the text-* attributes mapnik will
  render a marker icon if it decides it can't fit the text due to other labels
  in the way.
*/

@school_label_halo_colour: #342101;
@park_label_halo_colour: #0e300e;

/**  Parks  **/

/* only show from z15+ where area > 30,000 */
#park-labels[zoom > 14][way_area > 30000] {
  text-name: "[name]";
  text-face-name: "Liberation Sans Regular";
  text-fill: white;
  text-placement: interior;
  text-halo-fill: @park_label_halo_colour;
  text-halo-radius: 2.0;
  text-wrap-width: 20;
  text-opacity: 0.75;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
}

/* start showing on z16+ on area > 10,000 */
#park-labels[zoom > 15][way_area >= 10000][way_area < 30000] {
  text-name: "[name]";
  text-face-name: "Liberation Sans Regular";
  text-fill: white;
  text-placement: interior;
  text-halo-fill: @park_label_halo_colour;
  text-halo-radius: 2.0;
  text-wrap-width: 20;
  text-opacity: 0.75;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
}

/* show the rest from z17+ */
#park-labels[zoom > 16][way_area < 10000] {
  text-name: "[name]";
  text-face-name: "Liberation Sans Regular";
  text-fill: white;
  text-placement: interior;
  text-halo-fill: @park_label_halo_colour;
  text-halo-radius: 2.0;
  text-wrap-width: 20;
  text-opacity: 0.75;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
}

/**  Golf Courses  **/

/* since most are large, just render all labels from zoom 15+ */
#leisure[leisure='golf_course'][zoom > 14] {
  text-name: "[name]";
  text-face-name: "Liberation Sans Regular";
  text-fill: white;
  text-placement: interior;
  text-halo-fill: #021402;
  text-halo-radius: 2.0;
  text-wrap-width: 50;
  text-opacity: 0.75;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }

  /* if mapnik can't place a label, try an icon instead */
  point-file: url('/usr/share/icons/sjjb/png/sport/golf.glow.39AC39.12.png');
}

/**  Schools  **/

/* only show from z15+ where area > 30,000 */
#school-labels[zoom > 14][way_area > 30000] {
  text-name: "[name]";
  text-face-name: "Liberation Sans Regular";
  text-fill: white;
  text-placement: interior;
  text-halo-fill: @school_label_halo_colour;
  text-halo-radius: 2.0;
  text-wrap-width: 20;
  text-opacity: 0.75;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }

  /* if mapnik can't place a label, try an icon instead */
  point-file: url('/usr/share/icons/sjjb/png/education/school.glow.734A08.12.png');
}

/* start showing on z16+ on area > 10,000 */
#school-labels[zoom > 15][way_area >= 10000][way_area < 30000] {
  text-name: "[name]";
  text-face-name: "Liberation Sans Regular";
  text-fill: white;
  text-placement: interior;
  text-halo-fill: @school_label_halo_colour;
  text-halo-radius: 2.0;
  text-wrap-width: 20;
  text-opacity: 0.75;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }

  point-file: url('/usr/share/icons/sjjb/png/education/school.glow.734A08.16.png');
}

/* show the rest from z17+ */
#school-labels[zoom > 16][way_area < 10000] {
  text-name: "[name]";
  text-face-name: "Liberation Sans Regular";
  text-fill: white;
  text-placement: interior;
  text-halo-fill: @school_label_halo_colour;
  text-halo-radius: 2.0;
  text-wrap-width: 20;
  text-opacity: 0.75;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }

  point-file: url('/usr/share/icons/sjjb/png/education/school.glow.734A08.20.png');
}

/* building names */
#building-label[zoom > 16] {
  text-name: "[name]";
  text-face-name: "Liberation Sans Regular";
  text-fill: white;
  text-placement: interior;
  text-halo-fill: black;
  text-halo-radius: 2.0;
  text-wrap-width: 20;

  [zoom > 21] { text-size: 17; }
  [zoom = 21] { text-size: 16; }
  [zoom = 20] { text-size: 15; }
  [zoom = 19] { text-size: 14; }
  [zoom = 18] { text-size: 12; }
  [zoom = 17] { text-size: 10; }
}

/*
  Miscellaneous items
  */

/* ferry routes */
#ferry-route[zoom > 6][zoom < 12] {
  line-color: white;
  line-width: 0.7;
  line-opacity: 0.5;
}

#ferry-route[zoom > 11] {
  line-color: #00066f;
  line-dasharray: 6,6;

  [zoom = 12] { line-width: 0.8; }
  [zoom = 13] { line-width: 1.0; }
  [zoom = 14] { line-width: 1.3; }
  [zoom = 15] { line-width: 1.6; }
  [zoom > 15] { line-width: 2.0; }

  ::halo{
    line-color: white;
    line-width: 1.0;
    line-opacity: 0.5;

    [zoom = 13] { line-width: 1.2; }
    [zoom = 14] { line-width: 1.5; }
    [zoom = 15] { line-width: 1.8; }
    [zoom > 15] { line-width: 2.2; }
  }
}

#landuse[landuse='military'][zoom > 10] {
  ::outline {
    line-color: #f55000;
    line-width: 3;
    line-opacity: 0.329;
  }

  polygon-pattern-file: url('/usr/share/icons/osmt/military-pattern.png');
}


Symbol 52 seems to be a second heel

Symbol 52 seems to be a second heel

// TODO: Missing symbols
// '240' double staccato
// '241' tripe staccato
// '242' quadruple staccato

function InitModifierSymbols () {
    //$module(SymbolStyles.mss)

    // Create a dictionary with symbol index number as key (sobj.Index) and a value that determines the element that has to be created
    // All the symbols defined here should be created as children of note elements (modifier)
    // Artic() is the element that has to be created like -> modifier = libmei.Artic();
    // Every other SparseArray determines an attribute that needs to be added to modifier
    // E.g.: '52' becomes <artic artic='heel' />

    modifierMap = CreateDictionary(
        '52', CreateSparseArray('Artic', CreateDictionary('artic','heel')),                     //heel
        '53', CreateSparseArray('Artic', CreateDictionary('artic','heel')),                     //heel (2) (was toe in previous version, but this seems to be wrong)
        '54', CreateSparseArray('Artic', CreateDictionary('artic','toe')),                      //toe
        '160', CreateSparseArray('Artic', CreateDictionary('artic','stop')),                    //stop
        '162', CreateSparseArray('Artic', CreateDictionary('artic','open')),                    //open
        '163', CreateSparseArray('Artic', CreateDictionary('artic','damp')),                    //damp
        '164', CreateSparseArray('Artic', CreateDictionary('artic','damp')),                    //damp (2)
        '165', CreateSparseArray('Artic', CreateDictionary('artic','damp')),                    //damp (3)
        '166', CreateSparseArray('Artic', CreateDictionary('artic','damp')),                    //damp (4)
        '212', CreateSparseArray('Artic', CreateDictionary('artic','ten', 'place','above')),    //ten above
        '214', CreateSparseArray('Artic', CreateDictionary('artic','marc', 'place','above')),   //marc above
        '217', CreateSparseArray('Artic', CreateDictionary('artic','upbow', 'place','above')),  //upbow above
        '218', CreateSparseArray('Artic', CreateDictionary('artic','dnbow', 'place','above')),  //dnbow above
        '233', CreateSparseArray('Artic', CreateDictionary('artic','upbow', 'place','below')),  //upbow below
        '234', CreateSparseArray('Artic', CreateDictionary('artic','dnbow', 'place','below')),  //dnbow below
        '243', CreateSparseArray('Artic', CreateDictionary('artic','snap')),                    //snap
        '480', CreateSparseArray('Artic', CreateDictionary('artic','scoop')),                   //scoop
        '481', CreateSparseArray('Artic', CreateDictionary('artic','fall')),                    //fall
        '490', CreateSparseArray('Artic', CreateDictionary('artic','fingernail')),              //fingernail
        '494', CreateSparseArray('Artic', CreateDictionary('artic','doit')),                    //doit
        '495', CreateSparseArray('Artic', CreateDictionary('artic','plop'))                     //plop
    );

    return modifierMap;
}  //$end

function InitControlEventSymbols () {
    //$module(SymbolStyles.mss)

    // Create a dictionary with symbol index number as key (sobj.Index) and a value that determines the element that has to be created
    // All the symbols defined here should be created as children of measure (control events)
    // Turn() is the element that has to be created like -> controlEvent = libmei.Turn();
    // Every other SparseArray determines an attribute that needs to be added to modifier
    // E.g.: '36' becomes <turn form='lower' />

    controlEventMap = CreateDictionary(
        '36', CreateSparseArray('Mordent', CreateDictionary('form', 'lower')),      //inverted mordent
        '37', CreateSparseArray('Mordent', CreateDictionary('form','upper')),       //mordent
        '38', CreateSparseArray('Turn', CreateDictionary('form', 'upper')),         //turn
        '39', CreateSparseArray('Turn', CreateDictionary('form', 'lower'))          //inverted turn
    );

    return controlEventMap;

}   //$end

// TODO: Missing symbols
// '240' double staccato
// '241' tripe staccato
// '242' quadruple staccato

function InitModifierSymbols () {
    //$module(SymbolStyles.mss)

    // Create a dictionary with symbol index number as key (sobj.Index) and a value that determines the element that has to be created
    // All the symbols defined here should be created as children of note elements (modifier)
    // Artic() is the element that has to be created like -> modifier = libmei.Artic();
    // Every other SparseArray determines an attribute that needs to be added to modifier
    // E.g.: '52' becomes <artic artic='heel' />

    modifierMap = CreateDictionary(
        '52', CreateSparseArray('Artic', CreateDictionary('artic','heel')),                     //heel
        '53', CreateSparseArray('Artic', CreateDictionary('artic','toe')),                      //toe
        '54', CreateSparseArray('Artic', CreateDictionary('artic','toe')),                      //toe (2)
        '160', CreateSparseArray('Artic', CreateDictionary('artic','stop')),                    //stop
        '162', CreateSparseArray('Artic', CreateDictionary('artic','open')),                    //open
        '163', CreateSparseArray('Artic', CreateDictionary('artic','damp')),                    //damp
        '164', CreateSparseArray('Artic', CreateDictionary('artic','damp')),                    //damp (2)
        '165', CreateSparseArray('Artic', CreateDictionary('artic','damp')),                    //damp (3)
        '166', CreateSparseArray('Artic', CreateDictionary('artic','damp')),                    //damp (4)
        '212', CreateSparseArray('Artic', CreateDictionary('artic','ten', 'place','above')),    //ten above
        '214', CreateSparseArray('Artic', CreateDictionary('artic','marc', 'place','above')),   //marc above
        '217', CreateSparseArray('Artic', CreateDictionary('artic','upbow', 'place','above')),  //upbow above
        '218', CreateSparseArray('Artic', CreateDictionary('artic','dnbow', 'place','above')),  //dnbow above
        '233', CreateSparseArray('Artic', CreateDictionary('artic','upbow', 'place','below')),  //upbow below
        '234', CreateSparseArray('Artic', CreateDictionary('artic','dnbow', 'place','below')),  //dnbow below
        '243', CreateSparseArray('Artic', CreateDictionary('artic','snap')),                    //snap
        '480', CreateSparseArray('Artic', CreateDictionary('artic','scoop')),                   //scoop
        '481', CreateSparseArray('Artic', CreateDictionary('artic','fall')),                    //fall
        '490', CreateSparseArray('Artic', CreateDictionary('artic','fingernail')),              //fingernail
        '494', CreateSparseArray('Artic', CreateDictionary('artic','doit')),                    //doit
        '495', CreateSparseArray('Artic', CreateDictionary('artic','plop'))                     //plop
    );

    return modifierMap;
}  //$end

function InitControlEventSymbols () {
    //$module(SymbolStyles.mss)

    // Create a dictionary with symbol index number as key (sobj.Index) and a value that determines the element that has to be created
    // All the symbols defined here should be created as children of measure (control events)
    // Turn() is the element that has to be created like -> controlEvent = libmei.Turn();
    // Every other SparseArray determines an attribute that needs to be added to modifier
    // E.g.: '36' becomes <turn form='lower' />

    controlEventMap = CreateDictionary(
        '36', CreateSparseArray('Mordent', CreateDictionary('form', 'lower')),      //inverted mordent
        '37', CreateSparseArray('Mordent', CreateDictionary('form','upper')),       //mordent
        '38', CreateSparseArray('Turn', CreateDictionary('form', 'upper')),         //turn
        '39', CreateSparseArray('Turn', CreateDictionary('form', 'lower'))          //inverted turn
    );

    return controlEventMap;

}   //$end


clean up todo list

clean up todo list

/*
==Database level==
* join adjacent way segments with same classification and name
  for labels layer and increase text-spacing so labels aren't
  repeated right next to each other

* optimise queries as to select just what is required for rendering

* select way area so can style bay names larger for larger bays

==Style level==
* ShieldSymbolizers for POIs with names at high zooms (eg police station
  icon with name)
*/

#park-labels[zoom > 14] {
  text-name: "[name]";
  text-face-name: "Liberation Sans Regular";
  text-fill: white;
  text-placement: interior;
  text-halo-fill: #0e300e;
  text-halo-radius: 2.0;
  text-wrap-width: 20;
  text-opacity: 0.75;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
}

/*
no background-color as this is a tranparent overlay map for aerial imagery
Map {
  background-color: #b8dee6;
}
*/

/*

TODO:

* deploy live on my site once mapnik2 is packaged for debian using
  tilemill's carto to mapnik XML export option

==Database level==
* join adjacent way segments with same classification and name
  for labels layer and increase text-spacing so labels aren't
  repeated right next to each other

* optimise queries as to select just what is required for rendering

* select way area so can style bay names larger for larger bays

==Style level==
* park names, school names, bay names, etc...
  (with green, yellow, blue halos respectivly)

* more POI (all the sjjb icons)

* make poi icon zoom to scale related, so at high zooms make the icon larger

* define cut off at low zooms for some POI icons (eg. show gates at lower
  zooms than atms)

* ShieldSymbolizers for POIs with names at high zooms (eg police station
  icon with name)

* add addr

* oneway arrows

* get rid of the small circle artifacts on ~zoom 15
*/

#park-labels[zoom > 14] {
  text-name: "[name]";
  text-face-name: "Liberation Sans Regular";
  text-fill: white;
  text-placement: interior;
  text-halo-fill: #0e300e;
  text-halo-radius: 2.0;
  text-wrap-width: 20;
  text-opacity: 0.75;

  [zoom > 21] { text-size: 30; }
  [zoom = 21] { text-size: 25; }
  [zoom = 20] { text-size: 20; }
  [zoom = 19] { text-size: 15; }
  [zoom = 18] { text-size: 13; }
  [zoom = 17] { text-size: 12; }
  [zoom = 16] { text-size: 11; }
  [zoom = 15] { text-size: 11; }
}