Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up low-zoom layer #166

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
96 changes: 48 additions & 48 deletions roads.mss
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@
}
}

#minor-roads-casing::links {
#roads-casing::links {
[highway = 'raceway'] {
[zoom >= 12] {
line-color: pink;
Expand Down Expand Up @@ -561,7 +561,7 @@
}
}

#minor-roads-casing {
#roads-casing {
[highway = 'motorway'][tunnel != 'yes'] {
[zoom >= 12] {
line-width: @motorway-width-z12 + 1;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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'] {
Expand Down Expand Up @@ -2087,7 +2129,7 @@
}
}

#roads {
#roads-low-zoom {
[feature = 'highway_motorway'],
[feature = 'highway_motorway_link'] {
[zoom >= 5][zoom < 12] {
Expand Down Expand Up @@ -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 {
Expand Down