diff --git a/project.mml b/project.mml index 69fea3cf30..1ecec0a41b 100644 --- a/project.mml +++ b/project.mml @@ -733,12 +733,12 @@ "geometry_field": "way", "dbname": "gis" }, - "id": "minor-roads-casing", + "id": "roads-casing", "class": "", "srs-name": "900913", "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", "advanced": {}, - "name": "minor-roads-casing" + "name": "roads-casing" }, { "extent": [ @@ -839,18 +839,18 @@ ], "Datasource": { "type": "postgis", - "table": " (select way,\n coalesce(('highway_' || (case when highway is not null then highway else null end)), ('railway_' ||(case when railway in ('spur','siding')\n or (railway='rail' and service in ('spur','siding','yard'))\n then 'spur-siding-yard'\n when railway in ('light_rail','narrow_gauge','funicular','rail','subway','tram','spur','siding','platform','disused','abandoned','construction','miniature','turntable')\n then railway else null end)), ('aeroway_' || (case when aeroway in ('runway', 'taxiway') then aeroway else null end))) as feature,\n horse,bicycle,foot,construction,\n case when tunnel in ('yes','true','1') then 'yes'::text else 'no'::text end as tunnel,\n case when bridge in ('yes','true','1','viaduct') then 'yes'::text else 'no'::text end as bridge,\n case when service in ('parking_aisle','drive-through','driveway') then 'INT-minor'::text else 'INT-normal'::text end as service\n from planet_osm_line\n where highway is not null\n or aeroway in ('runway','taxiway')\n or railway in ('light_rail','narrow_gauge','funicular','rail','subway','tram','spur','siding','platform','disused','abandoned','construction','miniature','turntable')\n order by z_order) as roads\n", + "table": " (select way,\n coalesce(('highway_' || (case when highway is not null then highway else null end)), ('railway_' ||(case when railway='preserved' and service in ('spur','siding','yard') then 'INT-preserved-ssy'::text\n when railway in ('spur','siding')\n or (railway='rail' and service in ('spur','siding','yard'))\n then 'spur-siding-yard'\n when railway in ('light_rail','narrow_gauge','funicular','rail','subway','tram','spur','siding','monorail','platform','preserved','disused','abandoned','construction','miniature','turntable')\n then railway else null end)), ('aeroway_' || (case when aeroway in ('runway', 'taxiway') then aeroway else null end))) as feature,\n horse,bicycle,foot,construction,\n case when tunnel in ('yes','true','1') then 'yes'::text else 'no'::text end as tunnel,\n case when bridge in ('yes','true','1','viaduct') then 'yes'::text else 'no'::text end as bridge,\n case when service in ('parking_aisle','drive-through','driveway') then 'INT-minor'::text else 'INT-normal'::text end as service\n from planet_osm_line\n where highway is not null\n or aeroway in ('runway','taxiway')\n or railway in ('light_rail','narrow_gauge','funicular','rail','subway','tram','spur','siding','monorail','platform','preserved','disused','abandoned','construction','miniature','turntable')\n order by z_order) as roads\n", "extent": "-20037508,-19929239,20037508,19929239", "key_field": "", "geometry_field": "way", "dbname": "gis" }, - "id": "minor-roads-fill", + "id": "roads-fill", "class": "", "srs-name": "900913", "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", "advanced": {}, - "name": "minor-roads-fill" + "name": "roads-fill" }, { "geometry": "point", @@ -931,18 +931,18 @@ ], "Datasource": { "type": "postgis", - "table": " (select way,coalesce(('highway_' || (case when highway is not null then highway else null end)), ('railway_' || (case when railway='preserved' and service in ('spur','siding','yard') then 'INT-preserved-ssy'::text when railway in ('rail','tram','light_rail','narrow_gauge','preserved','monorail') then railway else null end))) as feature,\n case when tunnel in ('yes','true','1') then 'yes'::text else tunnel end as tunnel\n from planet_osm_roads\n where highway is not null\n or (railway is not null and railway!='preserved' and (service is null or service not in ('spur','siding','yard')))\n or railway='preserved'\n order by z_order\n ) as roads", + "table": " (select way,coalesce(('highway_' || (case when highway is not null then highway else null end)), ('railway_' || (case when railway in ('rail','tram','light_rail','narrow_gauge') then railway else null end))) as feature,\n case when tunnel in ('yes','true','1') then 'yes'::text else tunnel end as tunnel\n from planet_osm_roads\n where highway is not null\n or (railway is not null and railway!='preserved' and (service is null or service not in ('spur','siding','yard')))\n order by z_order\n ) as roads", "extent": "-20037508,-19929239,20037508,19929239", "key_field": "", "geometry_field": "way", "dbname": "gis" }, - "id": "roads", + "id": "roads-low-zoom", "class": "", "srs-name": "900913", "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", "advanced": {}, - "name": "roads" + "name": "roads-low-zoom" }, { "geometry": "linestring", diff --git a/roads.mss b/roads.mss index d18fc8a6c8..d3cebfe2a8 100644 --- a/roads.mss +++ b/roads.mss @@ -492,7 +492,7 @@ } } -#minor-roads-casing::links { +#roads-casing::links { [highway = 'raceway'] { [zoom >= 12] { line-color: pink; @@ -561,7 +561,7 @@ } } -#minor-roads-casing { +#roads-casing { [highway = 'motorway'][tunnel != 'yes'] { [zoom >= 12] { line-width: @motorway-width-z12 + 1; @@ -690,7 +690,7 @@ } } -#minor-roads-fill::links { +#roads-fill::links { [feature = 'highway_motorway_link'][tunnel != 'yes'] { [zoom >= 12] { line-width: @motorway-width-z12 - 1.5; @@ -752,7 +752,7 @@ } } -#minor-roads-fill { +#roads-fill { /* * The construction rules for small roads are strange, since if construction is null its assumed that @@ -1230,6 +1230,48 @@ } } + + [feature = 'railway_preserved'][zoom >= 12] { + line-width: 1.5; + line-color: #aaa; + line-join: round; + [zoom >= 13] { + line-width: 3; + line-color: #999999; + b/line-width: 1; + b/line-color: white; + b/line-dasharray: 0,1,8,1; + b/line-join: round; + } + } + + [feature = 'railway_INT-preserved-ssy'][zoom >= 12] { + line-width: 1; + line-color: #aaa; + line-join: round; + [zoom >= 13] { + line-width: 2; + line-color: #999999; + b/line-width: 0.8; + b/line-color: white; + b/line-dasharray: 0,1,8,1; + b/line-join: round; + } + } + + [feature = 'railway_monorail'][zoom >= 14] { + line-width: 4; + line-color: #fff; + line-opacity: 0.4; + line-cap: round; + line-join: round; + b/line-width: 3; + b/line-color: #777; + b/line-dasharray: 2,3; + b/line-cap: round; + b/line-join: round; + } + [feature = 'railway_disused'], [feature = 'railway_abandoned'], [feature = 'railway_construction'] { @@ -2087,7 +2129,7 @@ } } -#roads { +#roads-low-zoom { [feature = 'highway_motorway'], [feature = 'highway_motorway_link'] { [zoom >= 5][zoom < 12] { @@ -2146,55 +2188,13 @@ [feature = 'railway_tram'], [feature = 'railway_light_rail'], - [feature = 'railway_narrow_gauge'], - [feature = 'railway_funicular'] { + [feature = 'railway_narrow_gauge'] { [zoom >= 8][zoom < 13] { line-width: 1; line-color: #ccc; [zoom >= 10] { line-color: #aaa } } } - - [feature = 'railway_preserved'][zoom >= 12] { - line-width: 1.5; - line-color: #aaa; - line-join: round; - [zoom >= 13] { - line-width: 3; - line-color: #999999; - b/line-width: 1; - b/line-color: white; - b/line-dasharray: 0,1,8,1; - b/line-join: round; - } - } - - [feature = 'railway_INT-preserved-ssy'][zoom >= 12] { - line-width: 1; - line-color: #aaa; - line-join: round; - [zoom >= 13] { - line-width: 2; - line-color: #999999; - b/line-width: 0.8; - b/line-color: white; - b/line-dasharray: 0,1,8,1; - b/line-join: round; - } - } - - [feature = 'railway_monorail'][zoom >= 14] { - line-width: 4; - line-color: #fff; - line-opacity: 0.4; - line-cap: round; - line-join: round; - b/line-width: 3; - b/line-color: #777; - b/line-dasharray: 2,3; - b/line-cap: round; - b/line-join: round; - } } #trams {