Skip to content

Commit

Permalink
Changes layer order
Browse files Browse the repository at this point in the history
The layer order used to be as follows.

(bridges)                           B
direction-pre-bridges.directions    R
access-pre-bridges.access           R
waterway-bridges                    R/B
roads-low-zoom                      R/B
aerialways                          R/B
ferry-routes                        T/R
turning-circle-fill                 R
roads-fill                          R
tracks-notunnel-nobridge            R
buildings                           ???
buildings-lz                        ???
highway-area-fill                   R
roads-casing                        R
highway-area-casing                 R
area-barriers.barriers              T/R
cliffs                              T/R
line-barriers.barriers              T/R
tracks-tunnels                      T
footbikecycle-tunnels               T
turning-circle-casing               R
landuse-overlay                     T/R
castlewalls-poly.castlewalls        T/R
castlewalls.castlewalls             T/R
citywalls                           T/R
tunnels                             T

I classified all layers between and including the bridge-layers and the tunnels-layer with one of the following classifications:

B    Bridge level.
R/B  Above roads but below bridges.
R    Road level.
T/R  Above tunnels but below roads.
T    Tunnel level.

I grouped all of the layers within one class together, without changing the order within the classes. For now, I ignored the buildings-layers, due to the difficulties with ordering buildings, highways and highway-areas described in gravitystorm#172.

This change causes a couple of changes in the rendering, which mainly occur in rare cases.
- Casings of turning circles are now drawn above foot/bike/track tunnels (they were already drawn above other tunnels), and above cliffs and barriers (just like other roads are drawn above cliffs and barriers).
- Landuse-overlays (i.e., military and national park), castlewalls, and citywalls are now drawn above foot/bike/track tunnels (they were already drawn above other tunnels).
- Ferry-routes are now drawn below roads (highways, tracks, turning-circles, and highway-areas).
- Railways on level 12 (due to the #roads-low-zoom layer), aerialways, and waterway-bridges are now drawn above access and directions markers of roads (they were already drawn above the roads themselves).
  • Loading branch information
matthijsmelissen committed Sep 17, 2013
1 parent 47d335d commit b06fef2
Showing 1 changed file with 77 additions and 77 deletions.
154 changes: 77 additions & 77 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -478,18 +478,18 @@
],
"Datasource": {
"type": "postgis",
"table": "(select way from planet_osm_line where \"historic\"='citywalls') as citywalls",
"table": "(select way,highway,horse,foot,bicycle from planet_osm_line where highway in ('bridleway','footway','cycleway','path') and tunnel in ('yes','true','1') order by z_order) as roads",
"extent": "-20037508,-19929239,20037508,19929239",
"key_field": "",
"geometry_field": "way",
"dbname": "gis"
},
"id": "citywalls",
"id": "footbikecycle-tunnels",
"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": "citywalls"
"name": "footbikecycle-tunnels"
},
{
"geometry": "linestring",
Expand All @@ -501,20 +501,21 @@
],
"Datasource": {
"type": "postgis",
"table": "(select way from planet_osm_line where \"historic\"='castle_walls') as castle_walls",
"table": "(select way,tracktype from planet_osm_line where highway='track' and tunnel in ('yes','true','1')) as tracks",
"extent": "-20037508,-19929239,20037508,19929239",
"key_field": "",
"geometry_field": "way",
"dbname": "gis"
},
"id": "castlewalls",
"class": "castlewalls",
"id": "tracks-tunnels",
"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": "castlewalls"
"name": "tracks-tunnels"
},
{
"geometry": "linestring",
"extent": [
-179.99999692067183,
-84.96651228427099,
Expand All @@ -523,18 +524,41 @@
],
"Datasource": {
"type": "postgis",
"table": "(select way from planet_osm_polygon where \"historic\"='castle_walls') as castle_walls",
"table": "(select way from planet_osm_line where \"historic\"='citywalls') as citywalls",
"extent": "-20037508,-19929239,20037508,19929239",
"key_field": "",
"geometry_field": "way",
"dbname": "gis"
},
"id": "castlewalls-poly",
"id": "citywalls",
"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": "citywalls"
},
{
"geometry": "linestring",
"extent": [
-179.99999692067183,
-84.96651228427099,
179.99999692067183,
84.96651228427098
],
"Datasource": {
"type": "postgis",
"table": "(select way from planet_osm_line where \"historic\"='castle_walls') as castle_walls",
"extent": "-20037508,-19929239,20037508,19929239",
"key_field": "",
"geometry_field": "way",
"dbname": "gis"
},
"id": "castlewalls",
"class": "castlewalls",
"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": "castlewalls-poly"
"name": "castlewalls"
},
{
"extent": [
Expand All @@ -545,21 +569,20 @@
],
"Datasource": {
"type": "postgis",
"table": "(select way,landuse,leisure\n from planet_osm_polygon\n where (landuse = 'military' or leisure='nature_reserve') and building is null\n ) as landuse_overlay",
"table": "(select way from planet_osm_polygon where \"historic\"='castle_walls') as castle_walls",
"extent": "-20037508,-19929239,20037508,19929239",
"key_field": "",
"geometry_field": "way",
"dbname": "gis"
},
"id": "landuse-overlay",
"class": "",
"id": "castlewalls-poly",
"class": "castlewalls",
"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": "landuse-overlay"
"name": "castlewalls-poly"
},
{
"geometry": "point",
"extent": [
-179.99999692067183,
-84.96651228427099,
Expand All @@ -568,18 +591,18 @@
],
"Datasource": {
"type": "postgis",
"table": "(select distinct on (p.way) p.way as way,l.highway as int_tc_type\n from planet_osm_point p\n join planet_osm_line l\n on ST_DWithin(p.way,l.way,0.1)\n join (values\n ('tertiary',1),\n ('unclassified',2),\n ('residential',3),\n ('living_street',4),\n ('service',5)\n ) as v (highway,prio)\n on v.highway=l.highway\n where p.highway='turning_circle'\n order by p.way,v.prio\n ) as turning_circle",
"table": "(select way,landuse,leisure\n from planet_osm_polygon\n where (landuse = 'military' or leisure='nature_reserve') and building is null\n ) as landuse_overlay",
"extent": "-20037508,-19929239,20037508,19929239",
"key_field": "",
"geometry_field": "way",
"dbname": "gis"
},
"id": "turning-circle-casing",
"id": "landuse-overlay",
"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": "turning-circle-casing"
"name": "landuse-overlay"
},
{
"geometry": "linestring",
Expand All @@ -591,18 +614,18 @@
],
"Datasource": {
"type": "postgis",
"table": "(select way,highway,horse,foot,bicycle from planet_osm_line where highway in ('bridleway','footway','cycleway','path') and tunnel in ('yes','true','1') order by z_order) as roads",
"table": "(select way, barrier from planet_osm_line where barrier is not null) as roads",
"extent": "-20037508,-19929239,20037508,19929239",
"key_field": "",
"geometry_field": "way",
"dbname": "gis"
},
"id": "footbikecycle-tunnels",
"class": "",
"id": "line-barriers",
"class": "barriers",
"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": "footbikecycle-tunnels"
"name": "line-barriers"
},
{
"geometry": "linestring",
Expand All @@ -614,21 +637,20 @@
],
"Datasource": {
"type": "postgis",
"table": "(select way,tracktype from planet_osm_line where highway='track' and tunnel in ('yes','true','1')) as tracks",
"table": "(select way,\"natural\",man_made from planet_osm_line where \"natural\" = 'cliff' or man_made = 'embankment') as roads",
"extent": "-20037508,-19929239,20037508,19929239",
"key_field": "",
"geometry_field": "way",
"dbname": "gis"
},
"id": "tracks-tunnels",
"id": "cliffs",
"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": "tracks-tunnels"
"name": "cliffs"
},
{
"geometry": "linestring",
"extent": [
-179.99999692067183,
-84.96651228427099,
Expand All @@ -637,18 +659,18 @@
],
"Datasource": {
"type": "postgis",
"table": "(select way, barrier from planet_osm_line where barrier is not null) as roads",
"table": "(select way,barrier from planet_osm_polygon where barrier is not null) as barriers",
"extent": "-20037508,-19929239,20037508,19929239",
"key_field": "",
"geometry_field": "way",
"dbname": "gis"
},
"id": "line-barriers",
"id": "area-barriers",
"class": "barriers",
"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": "line-barriers"
"name": "area-barriers"
},
{
"geometry": "linestring",
Expand All @@ -660,20 +682,21 @@
],
"Datasource": {
"type": "postgis",
"table": "(select way,\"natural\",man_made from planet_osm_line where \"natural\" = 'cliff' or man_made = 'embankment') as roads",
"table": "(select way from planet_osm_line where route='ferry' ) as routes",
"extent": "-20037508,-19929239,20037508,19929239",
"key_field": "",
"geometry_field": "way",
"dbname": "gis"
},
"id": "cliffs",
"id": "ferry-routes",
"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": "cliffs"
"name": "ferry-routes"
},
{
"geometry": "point",
"extent": [
-179.99999692067183,
-84.96651228427099,
Expand All @@ -682,18 +705,18 @@
],
"Datasource": {
"type": "postgis",
"table": "(select way,barrier from planet_osm_polygon where barrier is not null) as barriers",
"table": "(select distinct on (p.way) p.way as way,l.highway as int_tc_type\n from planet_osm_point p\n join planet_osm_line l\n on ST_DWithin(p.way,l.way,0.1)\n join (values\n ('tertiary',1),\n ('unclassified',2),\n ('residential',3),\n ('living_street',4),\n ('service',5)\n ) as v (highway,prio)\n on v.highway=l.highway\n where p.highway='turning_circle'\n order by p.way,v.prio\n ) as turning_circle",
"extent": "-20037508,-19929239,20037508,19929239",
"key_field": "",
"geometry_field": "way",
"dbname": "gis"
},
"id": "area-barriers",
"class": "barriers",
"id": "turning-circle-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": "area-barriers"
"name": "turning-circle-casing"
},
{
"extent": [
Expand Down Expand Up @@ -885,18 +908,18 @@
],
"Datasource": {
"type": "postgis",
"table": "(select way from planet_osm_line where route='ferry' ) as routes",
"table": "(select way,access,highway,\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 access is not null and highway is not null\n and (bridge is null or bridge not in ('yes','true','1','viaduct'))\n ) as access",
"extent": "-20037508,-19929239,20037508,19929239",
"key_field": "",
"geometry_field": "way",
"dbname": "gis"
},
"id": "ferry-routes",
"class": "",
"id": "access-pre-bridges",
"class": "access",
"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": "ferry-routes"
"name": "access-pre-bridges"
},
{
"geometry": "linestring",
Expand All @@ -908,18 +931,18 @@
],
"Datasource": {
"type": "postgis",
"table": "(select way,aerialway from planet_osm_line where aerialway is not null) as aerialways",
"table": "(select way,\n case when oneway in ('yes','true','1') then 'yes'::text else oneway end as oneway\n from planet_osm_line\n where oneway is not null\n and (highway is not null or railway is not null or waterway is not null)\n and (bridge is null or bridge not in ('yes','true','1','viaduct'))\n ) as directions",
"extent": "-20037508,-19929239,20037508,19929239",
"key_field": "",
"geometry_field": "way",
"dbname": "gis"
},
"id": "aerialways",
"class": "",
"id": "direction-pre-bridges",
"class": "directions",
"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": "aerialways"
"name": "direction-pre-bridges"
},
{
"geometry": "linestring",
Expand All @@ -931,18 +954,18 @@
],
"Datasource": {
"type": "postgis",
"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",
"table": "(select way,aerialway from planet_osm_line where aerialway is not null) as aerialways",
"extent": "-20037508,-19929239,20037508,19929239",
"key_field": "",
"geometry_field": "way",
"dbname": "gis"
},
"id": "roads-low-zoom",
"id": "aerialways",
"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-low-zoom"
"name": "aerialways"
},
{
"geometry": "linestring",
Expand All @@ -954,41 +977,18 @@
],
"Datasource": {
"type": "postgis",
"table": "(select way,name from planet_osm_line where waterway='canal' and bridge in ('yes','true','1','aqueduct') order by z_order) as water",
"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": "waterway-bridges",
"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": "waterway-bridges"
},
{
"geometry": "linestring",
"extent": [
-179.99999692067183,
-84.96651228427099,
179.99999692067183,
84.96651228427098
],
"Datasource": {
"type": "postgis",
"table": "(select way,access,highway,\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 access is not null and highway is not null\n and (bridge is null or bridge not in ('yes','true','1','viaduct'))\n ) as access",
"extent": "-20037508,-19929239,20037508,19929239",
"key_field": "",
"geometry_field": "way",
"dbname": "gis"
},
"id": "access-pre-bridges",
"class": "access",
"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": "access-pre-bridges"
"name": "roads-low-zoom"
},
{
"geometry": "linestring",
Expand All @@ -1000,18 +1000,18 @@
],
"Datasource": {
"type": "postgis",
"table": "(select way,\n case when oneway in ('yes','true','1') then 'yes'::text else oneway end as oneway\n from planet_osm_line\n where oneway is not null\n and (highway is not null or railway is not null or waterway is not null)\n and (bridge is null or bridge not in ('yes','true','1','viaduct'))\n ) as directions",
"table": "(select way,name from planet_osm_line where waterway='canal' and bridge in ('yes','true','1','aqueduct') order by z_order) as water",
"extent": "-20037508,-19929239,20037508,19929239",
"key_field": "",
"geometry_field": "way",
"dbname": "gis"
},
"id": "direction-pre-bridges",
"class": "directions",
"id": "waterway-bridges",
"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": "direction-pre-bridges"
"name": "waterway-bridges"
},
{
"geometry": "linestring",
Expand Down

0 comments on commit b06fef2

Please sign in to comment.