Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
llimllib committed Feb 3, 2012
2 parents 7233d94 + d0c3dda commit cf52518
Show file tree
Hide file tree
Showing 6 changed files with 128 additions and 17 deletions.
5 changes: 2 additions & 3 deletions imposm-mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ class Highway(LineStrings):
'barrier': (
'ditch',
),
'waterway': (
'waterway': (
'stream',
'river',
'canal',
Expand Down Expand Up @@ -269,15 +269,14 @@ class Highway(LineStrings):
'yes',
'wire_fence',
'toll_booth',
'stile ',
'stile',
)}
)
barrierways = LineStrings(
name = 'barrierways',
mapping = {
'barrier': (
'city_wall',
'ditch',
'fence',
'hedge',
'retaining_wall',
Expand Down
51 changes: 48 additions & 3 deletions osm-bright/base.mss
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,16 @@
}
}
/* At the highest zoom levels, render buildings in fancy pseudo-3D */
#buildings[zoom>=17] {
#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
/* ================================================================== */
Expand Down Expand Up @@ -139,7 +144,15 @@ Map { background-color: @water; }
[zoom>17]{ line-width: 30; }
}

/* == 7. ADMINISTRATIVE BOUNDARIES ================================== */
#waterway[type='ditch'][zoom>=7] {
line-color: @water;
line-width: 32;
}

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


#admin[admin_level=2][zoom>1] {
line-color:@admin_2;
Expand All @@ -149,4 +162,36 @@ Map { background-color: @water; }
[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);

}
29 changes: 26 additions & 3 deletions osm-bright/labels.mss
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@
text-name:"[name]";
text-face-name:@sans_bold;
text-placement:line;
text-fill:#777;
text-fill:@road_text;
text-halo-fill:@road_halo;
text-halo-radius:1;
text-min-distance:60;
Expand All @@ -568,7 +568,7 @@
text-name:'[name]';
text-face-name:@sans;
text-placement:line;
text-fill:#777;
text-fill:@road_text;
text-halo-fill:@road_halo;
text-halo-radius:1;
text-min-distance:60;
Expand All @@ -580,11 +580,34 @@
text-face-name:@sans;
text-placement:line;
text-size:9;
text-fill:#777;
text-fill:@road_text;
text-halo-fill:@road_halo;
text-halo-radius:1;
text-min-distance:60;
text-size:11;
}

#motorway_label[oneway!=0][zoom>=16]{
marker-placement:line;
marker-width:3;
marker-fill: #555;
marker-line-opacity:0;
marker-spacing: 250;
}

#mainroad_label[oneway!=0][zoom>=16]{
marker-placement:line;
marker-height:3;
marker-fill: #888;
marker-line-opacity:0;
marker-spacing: 250;
}

#minorroad_label[oneway!=0][zoom>=16]{
marker-placement:line;
marker-height:1;
marker-fill: #bbb;
marker-line-opacity:0;
marker-spacing: 250;
}
/* ****************************************************************** */
54 changes: 47 additions & 7 deletions osm-bright/osm-bright.imposm.mml
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,10 @@
"dbname": "osm",
"extent": "-20037508.34 -20037508.34 20037508.34 20037508.34",
"geometry_field": "",
"id": "roads_high",
"key_field": "",
"project": "osm-bright",
"srs": null,
"table": "( SELECT geometry, type, tunnel, bridge, access, 'fill' AS render,\n CASE\n WHEN type IN ('motorway', 'trunk') THEN 'motorway'\n WHEN type IN ('primary', 'secondary') THEN 'mainroad'\n WHEN type IN ('motorway_link', 'trunk_link', 'primary_link', 'secondary_link', 'tertiary', 'tertiary_link', 'residential', 'unclassified', 'road', 'living_street') THEN 'minorroad'\n WHEN type IN ('service', 'track') THEN 'service'\n WHEN type IN ('path', 'cycleway', 'footway', 'pedestrian', 'steps', 'bridleway') THEN 'noauto'\n WHEN type IN ('light_rail', 'subway', 'narrow_guage', 'rail', 'tram') THEN 'railway'\n ELSE 'other' END AS stylegroup\n FROM osm_roads\n WHERE bridge = 0\n AND tunnel = 0\n ORDER BY z_order\n) AS data",
"type": "postgis"
},
Expand Down Expand Up @@ -355,6 +358,41 @@
"srs-name": "900913",
"status": "on"
},
{
"Datasource": {
"dbname": "osm",
"extent": "-20037508.34 -20037508.34 20037508.34 20037508.34",
"geometry_field": "geometry",
"key_field": "",
"table": "(select geometry, type,\n\tCASE\n\t\tWHEN type IN ('toll_booth', 'stile', 'gate', 'horse_stile','lift_gate', 'kissing_gate','cattle_grid','entrance') THEN 'gate'\n\t\tWHEN type IN ('block', 'bollard', 'chain', 'cycle_barrier', 'spikes', 'fence', 'wire_fence','yes') THEN 'divider'\n\tEND AS stylegroup\nFROM osm_barrierpoints\n) AS data",
"type": "postgis"
},
"class": "",
"geometry": "point",
"id": "barrier_points",
"name": "barrier_points",
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"srs-name": "900913"
},
{
"Datasource": {
"dbname": "osm",
"extent": "-20037508.34 -20037508.34 20037508.34 20037508.34",
"geometry_field": "geometry",
"id": "barrier_lines",
"key_field": "",
"project": "osm-bright",
"srs": null,
"table": "(SELECT geometry, type,\n\tCASE \n\t\tWHEN type IN ('city_wall', 'fence', 'retaining_wall', 'wall', 'wire_fence', 'yes') THEN 'fence'\n\t\tWHEN type IN ('gate', 'spikes', 'bollard', 'lift_gate', 'kissing_gate') THEN 'gate'\n\t\tWHEN type IN ('hedge') THEN 'hedge'\n\tEND AS stylegroup\nFROM osm_barrierways\n) AS data",
"type": "postgis"
},
"class": "",
"geometry": "linestring",
"id": "barrier_lines",
"name": "barrier_lines",
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"srs-name": "900913"
},
{
"Datasource": {
"dbname": "osm",
Expand Down Expand Up @@ -402,9 +440,9 @@
"geometry_field": "geometry",
"id": "motorway_label",
"key_field": "",
"project": "foss4g-2011",
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"table": "( SELECT geometry, type, name, ref, CHAR_LENGTH(ref) AS reflen\n FROM osm_motorways\n WHERE type IN ('motorway', 'trunk')\n AND (name <> '' OR ref <> '')\n) AS data",
"project": "osm-bright",
"srs": null,
"table": "( SELECT geometry, type, name, ref, oneway, CHAR_LENGTH(ref) AS reflen\n FROM osm_motorways\n WHERE type IN ('motorway', 'trunk')\n AND (name <> '' OR ref <> '')\n) AS data",
"type": "postgis"
},
"class": "",
Expand All @@ -422,16 +460,17 @@
"geometry_field": "geometry",
"id": "mainroad_label",
"key_field": "",
"project": "foss4g-2011",
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"table": "(select geometry, type, name, oneway\nfrom osm_mainroads\nwhere name is not null or oneway = 1\n) as label",
"project": "osm-bright",
"srs": null,
"table": "(select geometry, type, name, oneway\nfrom osm_mainroads\nwhere name is not null or oneway <> 0\n) as label",
"type": "postgis"
},
"class": "",
"geometry": "linestring",
"id": "mainroad_label",
"name": "mainroad_label",
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"srs-name": "900913",
"status": "on"
},
{
Expand All @@ -443,14 +482,15 @@
"key_field": "",
"project": "foss4g-2011",
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"table": "(select geometry, type, name, oneway\nfrom osm_minorroads\nwhere name is not null or oneway = 1\n) as label",
"table": "(select geometry, type, name, oneway\nfrom osm_minorroads\nwhere name is not null or oneway <> 0\n) as label",
"type": "postgis"
},
"class": "",
"geometry": "linestring",
"id": "minorroad_label",
"name": "minorroad_label",
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"srs-name": "900913",
"status": "on"
},
{
Expand Down
4 changes: 4 additions & 0 deletions osm-bright/palette.mss
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ Map { font-directory: url(./fonts); }

@poi_text: @poi_text;

@road_text: #777;
@road_halo: #fff;

@other_text: #888;
Expand All @@ -143,3 +144,6 @@ Map { font-directory: url(./fonts); }
@village_halo: @place_halo;

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



2 changes: 1 addition & 1 deletion osm-bright/roads.mss
Original file line number Diff line number Diff line change
Expand Up @@ -372,4 +372,4 @@ come in as well.
}
}

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

0 comments on commit cf52518

Please sign in to comment.