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

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

//added name to pgsql query
#landuse[zoom>12] {
  line-width: 1.5;
  line-color: #ccc;
  [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; }
}


/****** NOT USED AND DELETED ***********
#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: @land; } //@water; }

#water {
  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.5; }
    [zoom=14]{ line-width: 0.8; }
  }
}
  
#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: 1.2; }
    [zoom=16]{ line-width: 1.6; }
    [zoom=17]{ line-width: 2; }
    [zoom=18]{ line-width: 3; }
    [zoom>18]{ line-width: 4; }
  }
  [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);

}

/* ================================================================== */
/* Kibera
/* ================================================================== */

#landuse::informal {
  [name = 'mukuru'],
  [name = 'Kingstone'],
  [name = 'Gatoto'],
  [name = 'Kisii village'],
  [name = 'Riverside'],
  [name = 'Mombasa village'],
  [name = 'kariobangi'],
  [name = 'feed the children'],
  [name = 'Rurii'],
  [name = 'Donhom'],
  [name = 'Lungalunga viwandani'],
  [name = 'Gateway village(Mukuru)'],
  [name = 'Wesnya village'],
  [name = 'Diamond village(Mukuru)'],
  [name = 'Jamaica village'],
  [name = 'Riara Zone'],
  [name = 'Estate'],
  [name = 'Vietnam zone'],
  [name = 'sisal village'],
  [name = 'Sinai village'],
  [name = 'Unbilt village'],
  [name = 'Motomoto'],
  [name = 'Milimani village'],
  [name = 'A A zone'],
  [name = 'area 48 village'],
  [name = 'wapewape village'],

  [name = 'mathare'],
  [name = 'Mathare No10'],
  [name = 'Mathare North Area4'],
  [name = 'Mathare North Area3'],
  [name = 'Mathare North Area2'],
  [name = 'Mathare North Area1'],
  [name = 'New Mathare'],
  [name = 'Mathare Village 1'],
  [name = 'Mathare Village 2'],
  [name = 'Kosovo'],
  [name = 'Mathare 3B'],
  [name = 'Mathare 3A'],
  [name = 'Mathare 4A'],
  [name = 'Mathare 3C'],
  [name = 'Thayu'],
  [name = 'Mabatini'],
  [name = 'Ngei 2B'],
  [name = 'Kibichoi'],
  [name = 'Madoya'],
  [name = 'Huruma Flats'],
  [name = 'Casanova'],
  [name = 'Ngei 1'],
  [name = 'Huruma B'],
  [name = 'Kiamaiko'],

  [name = "Raila"],
  [name = "Mashimoni"],
  [name = "Kianda"],
  [name = "Gatwekera"],
  [name = "Soweto West"],
  [name = "Kisumu Ndogo"],
  [name = "Kambi Muru"],
  [name = "Karanja"],
  [name = "Lindi"],
  [name = "Laini Saba"],
  [name = "Makina"],
  [name = "Ayany"],
  [name = "Silanga"],
  [name = "Soweto East"]{
  polygon-opacity:1;
  polygon-fill:@kibera; //#f3eded;
  line-opacity: 1;
  line-color: #ccc;
  line-width:0;
  [zoom >= 18]{line-width: 1.4;}
  [zoom = 17]{line-width: 1.2;}
  [zoom = 16]{line-width: 1;}
  [zoom = 15]{line-width: 0.8;}
  [zoom = 14]{line-width: 0.6;}
  [zoom = 13]{line-width: 0.4;}
  [zoom <= 12]{line-width: 0.3;}
  ::offset{
    polygon-opacity:0;
    line-opacity: 0.2;
    line-color: @highlight;
    line-width: 0;
    [zoom >= 18]{line-width: 10; line-offset: -5;}
    [zoom = 17]{line-width: 6; line-offset: -3;}
    [zoom = 16]{line-width: 4; line-offset: -2;}
    [zoom = 15]{line-width: 3; line-offset: -1.5;}
    [zoom = 14]{line-width: 2; line-offset: -1;}
    [zoom = 13]{line-width: 1.5; line-offset: -0.75;}
  }
}
}