diff --git a/stylesheet/black-and-white/inc/datasource-settings.xml.inc.template b/stylesheet/black-and-white/inc/datasource-settings.xml.inc.template new file mode 100644 index 0000000..e4f6661 --- /dev/null +++ b/stylesheet/black-and-white/inc/datasource-settings.xml.inc.template @@ -0,0 +1,17 @@ + + +postgis +%(password)s +%(host)s +%(port)s +%(user)s +%(dbname)s + +%(estimate_extent)s + + +%(extent)s diff --git a/stylesheet/black-and-white/inc/entities.xml.inc b/stylesheet/black-and-white/inc/entities.xml.inc new file mode 100644 index 0000000..66d50f6 --- /dev/null +++ b/stylesheet/black-and-white/inc/entities.xml.inc @@ -0,0 +1,46 @@ + +%settings; + + + + + + +%layers; +250000000000"> +500000000"> +200000000"> +200000000"> +100000000"> +100000000"> +50000000"> +50000000"> +25000000"> +25000000"> +12500000"> +12500000"> +6500000"> +6500000"> +3000000"> +3000000"> +1500000"> +1500000"> +750000"> +750000"> +400000"> +400000"> +200000"> +200000"> +100000"> +100000"> +50000"> +50000"> +25000"> +25000"> +12500"> +12500"> +5000"> +5000"> +2500"> +2500"> + diff --git a/stylesheet/black-and-white/inc/fontset-settings.xml.inc.template b/stylesheet/black-and-white/inc/fontset-settings.xml.inc.template new file mode 100644 index 0000000..9b83544 --- /dev/null +++ b/stylesheet/black-and-white/inc/fontset-settings.xml.inc.template @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/stylesheet/black-and-white/inc/layer-addressing.xml.inc b/stylesheet/black-and-white/inc/layer-addressing.xml.inc new file mode 100644 index 0000000..dff712b --- /dev/null +++ b/stylesheet/black-and-white/inc/layer-addressing.xml.inc @@ -0,0 +1,57 @@ + + + + + interpolation + + + (select way from &prefix;_line where "addr:interpolation" is not null) as interpolation + + &datasource-settings; + + + + housenumbers + + + (select way,"addr:housenumber" from &prefix;_polygon where "addr:housenumber" is not null and building is not null + union + select way,"addr:housenumber" from &prefix;_point where "addr:housenumber" is not null + ) as housenumbers + + &datasource-settings; + + + + housenames + + + (select way,"addr:housename" from &prefix;_polygon where "addr:housename" is not null and building is not null + union + select way,"addr:housename" from &prefix;_point where "addr:housename" is not null + ) as housenames + + &datasource-settings; + + + diff --git a/stylesheet/black-and-white/inc/layer-admin.xml.inc b/stylesheet/black-and-white/inc/layer-admin.xml.inc new file mode 100644 index 0000000..e9a522e --- /dev/null +++ b/stylesheet/black-and-white/inc/layer-admin.xml.inc @@ -0,0 +1,108 @@ + + + + + + admin-01234 + + + (select way,admin_level + from &prefix;_roads + where "boundary"='administrative' + and admin_level in ('0','1','2','3','4') + ) as admin + &datasource-settings; + + + + admin-5678 + + + (select way,admin_level + from &prefix;_roads + where "boundary"='administrative' + and admin_level in ('5','6','7','8') + ) as admin + &datasource-settings; + + + + admin-other + + + (select way,admin_level + from &prefix;_roads + where "boundary"='administrative' + and (admin_level is null or admin_level not in ('0','1','2','3','4','5','6','7','8')) + ) as admin + &datasource-settings; + + diff --git a/stylesheet/black-and-white/inc/layer-aerialways.xml.inc b/stylesheet/black-and-white/inc/layer-aerialways.xml.inc new file mode 100644 index 0000000..de73e6a --- /dev/null +++ b/stylesheet/black-and-white/inc/layer-aerialways.xml.inc @@ -0,0 +1,24 @@ + + + + aerialways + + + (select way,aerialway from &prefix;_line where aerialway is not null) as aerialways + + &datasource-settings; + + diff --git a/stylesheet/black-and-white/inc/layer-amenity-points.xml.inc b/stylesheet/black-and-white/inc/layer-amenity-points.xml.inc new file mode 100644 index 0000000..da8e4c2 --- /dev/null +++ b/stylesheet/black-and-white/inc/layer-amenity-points.xml.inc @@ -0,0 +1,405 @@ + + + + points + + + (select way,amenity,shop,tourism,highway,man_made,access,religion,waterway,lock,historic,leisure + from &prefix;_point + where amenity is not null + or shop is not null + or tourism in ('alpine_hut','camp_site','caravan_site','guest_house','hostel','hotel','motel','museum','viewpoint','bed_and_breakfast','information','chalet') + or highway in ('bus_stop','traffic_signals','ford') + or man_made in ('mast','water_tower') + or historic in ('memorial','archaeological_site') + or waterway='lock' + or lock='yes' + or leisure in ('playground','slipway') + ) as points + &datasource-settings; + + + + points + + + (select way,amenity,shop,tourism,highway,man_made,access,religion,waterway,lock,historic,leisure + from &prefix;_polygon + where amenity is not null + or shop is not null + or tourism in ('alpine_hut','camp_site','caravan_site','guest_house','hostel','hotel','motel','museum','viewpoint','bed_and_breakfast','information','chalet') + or highway in ('bus_stop','traffic_signals') + or man_made in ('mast','water_tower') + or historic in ('memorial','archaeological_site') + or leisure='playground' + ) as points + &datasource-settings; + + diff --git a/stylesheet/black-and-white/inc/layer-amenity-stations.xml.inc b/stylesheet/black-and-white/inc/layer-amenity-stations.xml.inc new file mode 100644 index 0000000..75a3ff2 --- /dev/null +++ b/stylesheet/black-and-white/inc/layer-amenity-stations.xml.inc @@ -0,0 +1,95 @@ + + + + stations + + + (select way,name,railway,aerialway,disused + from &prefix;_point + where railway in ('station','halt','tram_stop','subway_entrance') + or aerialway='station' + ) as stations + + &datasource-settings; + + + + stations + + + (select way,name,railway,aerialway,disused + from &prefix;_polygon + where railway in ('station','halt','tram_stop') + or aerialway='station' + ) as stations + + &datasource-settings; + + + diff --git a/stylesheet/black-and-white/inc/layer-amenity-symbols.xml.inc b/stylesheet/black-and-white/inc/layer-amenity-symbols.xml.inc new file mode 100644 index 0000000..23eca66 --- /dev/null +++ b/stylesheet/black-and-white/inc/layer-amenity-symbols.xml.inc @@ -0,0 +1,151 @@ + + + + symbols + + + (select * + from &prefix;_point + where aeroway in ('airport','aerodrome','helipad') + or barrier in ('bollard','gate','lift_gate','block') + or highway in ('mini_roundabout','gate') + or man_made in ('lighthouse','power_wind','windmill','mast') + or (power='generator' and ("generator:source"='wind' or power_source='wind')) + or "natural" in ('peak','volcano','spring','tree','cave_entrance') + or railway='level_crossing' + ) as symbols + &datasource-settings; + + + + symbols + + + (select * + from &prefix;_polygon + where aeroway in ('airport','aerodrome','helipad') + or barrier in ('bollard','gate','lift_gate','block') + or highway in ('mini_roundabout','gate') + or man_made in ('lighthouse','power_wind','windmill','mast') + or (power='generator' and ("generator:source"='wind' or power_source='wind')) + or "natural" in ('peak','volcano','spring','tree') + or railway='level_crossing' + ) as symbols + &datasource-settings; + + diff --git a/stylesheet/black-and-white/inc/layer-buildings.xml.inc b/stylesheet/black-and-white/inc/layer-buildings.xml.inc new file mode 100644 index 0000000..b5376b0 --- /dev/null +++ b/stylesheet/black-and-white/inc/layer-buildings.xml.inc @@ -0,0 +1,92 @@ + + + + + + + buildings-lz + + + (select way,building,railway,amenity from &prefix;_polygon + where railway='station' + or building in ('station','supermarket') + or amenity='place_of_worship' + order by z_order,way_area desc) as buildings + + &datasource-settings; + + + + + + buildings + + + (select way,aeroway, + case + when building in ('residential','house','garage','garages','detached','terrace','apartments') then 'INT-light'::text + else building + end as building + from &prefix;_polygon + where (building is not null + and building not in ('no','station','supermarket','planned') + and (railway is null or railway != 'station') + and (amenity is null or amenity != 'place_of_worship')) + or aeroway = 'terminal' + order by z_order,way_area desc) as buildings + + &datasource-settings; + + + + diff --git a/stylesheet/black-and-white/inc/layer-citywall.xml.inc b/stylesheet/black-and-white/inc/layer-citywall.xml.inc new file mode 100644 index 0000000..dc307f0 --- /dev/null +++ b/stylesheet/black-and-white/inc/layer-citywall.xml.inc @@ -0,0 +1,52 @@ + + + + citywalls + + (select way from &prefix;_line where "historic"='citywalls') as citywalls + &datasource-settings; + + + + castle_walls + + (select way from &prefix;_line where "historic"='castle_walls') as castle_walls + &datasource-settings; + + + + castle_walls + + (select way from &prefix;_polygon where "historic"='castle_walls') as castle_walls + &datasource-settings; + + + + + diff --git a/stylesheet/black-and-white/inc/layer-ferry-routes.xml.inc b/stylesheet/black-and-white/inc/layer-ferry-routes.xml.inc new file mode 100644 index 0000000..311747e --- /dev/null +++ b/stylesheet/black-and-white/inc/layer-ferry-routes.xml.inc @@ -0,0 +1,21 @@ + + + + ferry-routes + + + (select way from &prefix;_line where route='ferry' ) as routes + + &datasource-settings; + + diff --git a/stylesheet/black-and-white/inc/layer-landcover.xml.inc b/stylesheet/black-and-white/inc/layer-landcover.xml.inc new file mode 100644 index 0000000..2abe83b --- /dev/null +++ b/stylesheet/black-and-white/inc/layer-landcover.xml.inc @@ -0,0 +1,385 @@ + + + + + + landcover + + + (select way,aeroway,amenity,landuse,leisure,man_made,military,"natural",power,tourism,name,highway, + case when religion in ('christian','jewish') then religion else 'INT-generic'::text end as religion + from &prefix;_polygon + where landuse is not null + or leisure is not null + or aeroway in ('apron','aerodrome') + or amenity in ('parking','university','college','school','hospital','kindergarten','grave_yard') + or military in ('barracks','danger_area') + or "natural" in ('field','beach','desert','heath','mud','grassland','wood','sand','scrub') + or power in ('station','sub_station','generator') + or tourism in ('attraction','camp_site','caravan_site','picnic_site','zoo') + or highway in ('services','rest_area') + order by z_order,way_area desc + ) as leisure + + &datasource-settings; + + + + landcover_line + + + (select way + from &prefix;_line + where man_made='cutline' + ) as leisure + + &datasource-settings; + + + + sports_grounds + + + (select way,leisure, + case when leisure='pitch' then 2 + when leisure='track' then 1 + else 0 end as prio + from &prefix;_polygon + where leisure in ('sports_centre','stadium','pitch','track') + order by z_order,prio,way_area desc + ) as sports_grounds + + &datasource-settings; + + + diff --git a/stylesheet/black-and-white/inc/layer-placenames.xml.inc b/stylesheet/black-and-white/inc/layer-placenames.xml.inc new file mode 100644 index 0000000..9071fdb --- /dev/null +++ b/stylesheet/black-and-white/inc/layer-placenames.xml.inc @@ -0,0 +1,193 @@ + + + + + + + + + + + + country + state + + + (select way,place,name,ref + from &prefix;_point + where place in ('country','state') + ) as placenames + &datasource-settings; + + + + capital + + + (select way,place,name,ref + from &prefix;_point + where place in ('city','metropolis','town') and capital='yes' + ) as placenames + &datasource-settings; + + + + city + town + + + (select way,place,name + from &prefix;_point + where place in ('city','metropolis','town','large_town','small_town') + and (capital is null or capital != 'yes') + ) as placenames + &datasource-settings; + + + + suburb + village + hamlet + + + (select way,place,name + from &prefix;_point + where place in ('suburb','village','large_village','hamlet','locality','isolated_dwelling','farm') + ) as placenames + &datasource-settings; + + + diff --git a/stylesheet/black-and-white/inc/layer-power.xml.inc b/stylesheet/black-and-white/inc/layer-power.xml.inc new file mode 100644 index 0000000..848d7c9 --- /dev/null +++ b/stylesheet/black-and-white/inc/layer-power.xml.inc @@ -0,0 +1,68 @@ + + + + + + power_line + + (select way from &prefix;_line where "power"='line') as power_line + &datasource-settings; + + + + power_minorline + + (select way from &prefix;_line where "power"='minor_line') as power_minorline + &datasource-settings; + + + + power_towers + + (select way from &prefix;_point where power='tower') as power_towers + &datasource-settings; + + + + power_poles + + (select way from &prefix;_point where power='pole') as power_poles + &datasource-settings; + + + diff --git a/stylesheet/black-and-white/inc/layer-shapefiles.xml.inc b/stylesheet/black-and-white/inc/layer-shapefiles.xml.inc new file mode 100644 index 0000000..f6217ab --- /dev/null +++ b/stylesheet/black-and-white/inc/layer-shapefiles.xml.inc @@ -0,0 +1,73 @@ + + + + + + + + world + + shape + &world_boundaries;/shoreline_300 + + + + coast-poly + + shape + &world_boundaries;/processed_p + + + + builtup + + shape + &world_boundaries;/builtup_area + + + + necountries + + shape + &world_boundaries;/110m_admin_0_boundary_lines_land.shp + + + + nepopulated + + shape + &world_boundaries;/ne_10m_populated_places.shp + latin1 + + + diff --git a/stylesheet/black-and-white/inc/layer-water.xml.inc b/stylesheet/black-and-white/inc/layer-water.xml.inc new file mode 100644 index 0000000..d5ff649 --- /dev/null +++ b/stylesheet/black-and-white/inc/layer-water.xml.inc @@ -0,0 +1,374 @@ + + + + + + + + + + + + water-lines-casing + + + (select way,waterway + from &prefix;_line + where waterway in ('stream','drain','ditch') + and (tunnel is null or tunnel != 'yes') + ) as water_lines + &datasource-settings; + + + + water_areas + + + (select way,"natural",waterway,landuse,name + from &prefix;_polygon + where (waterway in ('dock','mill_pond','riverbank','canal') + or landuse in ('reservoir','water','basin') + or "natural" in ('lake','water','land','glacier','mud','bay')) + and building is null + order by z_order,way_area desc + ) as water_areas + &datasource-settings; + + + + + water-areas-overlay + + + (select way,"natural" + from &prefix;_polygon + where "natural" in ('marsh','wetland') and building is null + order by z_order,way_area desc + ) as water_areas + &datasource-settings; + + + + glaciers-text + + + (select way,name,way_area + from &prefix;_polygon + where "natural"='glacier' and building is null + order by way_area desc + ) as glaciers + &datasource-settings; + + + + + water-lines-low-zoom + + + (select way,waterway + from &prefix;_line + where waterway='river' + ) as water_lines + &datasource-settings; + + + + + water_lines + + + (select way,waterway,disused,lock,name, + case when tunnel in ('yes','true','1') then 'yes'::text else tunnel end as tunnel + from &prefix;_line + where waterway in ('weir','river','canal','derelict_canal','stream','drain','ditch','wadi') + and (bridge is null or bridge not in ('yes','true','1','aqueduct')) + order by z_order + ) as water_lines + &datasource-settings; + + diff --git a/stylesheet/black-and-white/inc/layer-water_features.xml.inc b/stylesheet/black-and-white/inc/layer-water_features.xml.inc new file mode 100644 index 0000000..4c312f2 --- /dev/null +++ b/stylesheet/black-and-white/inc/layer-water_features.xml.inc @@ -0,0 +1,120 @@ + + + + + + + dam + + + (select way,name from &prefix;_line where waterway='dam') as dam + &datasource-settings; + + + + marinas-area + + + (select way from &prefix;_polygon where leisure ='marina') as marinas + + &datasource-settings; + + + + piers-area + + + (select way,man_made from &prefix;_polygon where man_made in ('pier','breakwater','groyne')) as piers + + &datasource-settings; + + + + piers + + + (select way,man_made from &prefix;_line where man_made in ('pier','breakwater','groyne')) as piers + + &datasource-settings; + + + + locks + + + (select way,waterway from &prefix;_point where waterway='lock_gate') as locks + + &datasource-settings; + + + + diff --git a/stylesheet/black-and-white/inc/layers.xml.inc b/stylesheet/black-and-white/inc/layers.xml.inc new file mode 100644 index 0000000..2405e5b --- /dev/null +++ b/stylesheet/black-and-white/inc/layers.xml.inc @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/stylesheet/black-and-white/inc/settings.xml.inc.template b/stylesheet/black-and-white/inc/settings.xml.inc.template new file mode 100644 index 0000000..ef23169 --- /dev/null +++ b/stylesheet/black-and-white/inc/settings.xml.inc.template @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/stylesheet/black-and-white/osm.xml b/stylesheet/black-and-white/osm.xml new file mode 100644 index 0000000..0dd195b --- /dev/null +++ b/stylesheet/black-and-white/osm.xml @@ -0,0 +1,4063 @@ + + +%entities; +]> + + &fontset-settings; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +&layer-shapefiles; +&layer-landcover; +&layer-water; +&layer-water_features; + + tunnels-casing + tunnels-fill + + + (select way,highway from &prefix;_line where highway in ('motorway','motorway_link','trunk','trunk_link','primary','primary_link','secondary','secondary_link','tertiary','tertiary_link','residential','unclassified') and tunnel in ('yes','true','1') order by z_order) as roads + + &datasource-settings; + + +&layer-citywall; + + landuse_overlay + + + (select way,landuse,leisure + from &prefix;_polygon + where (landuse = 'military' or leisure='nature_reserve') and building is null + ) as landuse_overlay + + &datasource-settings; + + + + turning_circle-casing + + + (select distinct on (p.way) p.way as way,l.highway as int_tc_type + from &prefix;_point p + join &prefix;_line l + on ST_DWithin(p.way,l.way,&dwithin_node_way;) + join (values + ('tertiary',1), + ('unclassified',2), + ('residential',3), + ('living_street',4), + ('service',5) + ) as v (highway,prio) + on v.highway=l.highway + where p.highway='turning_circle' + order by p.way,v.prio + ) as turning_circle + + &datasource-settings; + + + + footbikecycle-tunnels + + + (select way,highway,horse,foot,bicycle from &prefix;_line where highway in ('bridleway','footway','cycleway','path') and tunnel in ('yes','true','1') order by z_order) as roads + + &datasource-settings; + + + + tracks-tunnels + + + (select way,tracktype from &prefix;_line where highway='track' and tunnel in ('yes','true','1')) as tracks + + &datasource-settings; + + + + cliffs + barriers + + + (select way,barrier,"natural",man_made from &prefix;_line where barrier is not null or "natural" in ('hedge','cliff') or man_made='embankment') as roads + + &datasource-settings; + + + + barriers_area + + + (select way,barrier,"natural" from &prefix;_polygon where barrier is not null or "natural"='hedge') as barriers + + &datasource-settings; + + + + highway-area-casing + + + (select way,highway,railway from &prefix;_polygon + where highway in ('residential','unclassified','pedestrian','service','footway','track','path','platform') + or railway='platform' + order by z_order,way_area desc) as roads + + &datasource-settings; + + + + minor-roads-casing-links + minor-roads-casing + + + (select way,highway, + case when tunnel in ('yes','true','1') then 'yes'::text else tunnel end as tunnel, + case when service in ('parking_aisle','drive-through','driveway') then 'INT-minor'::text else service end as service + from &prefix;_line + where highway in ('motorway','motorway_link','trunk','trunk_link','primary','primary_link','secondary','secondary_link','tertiary','tertiary_link','residential','unclassified','road','service','pedestrian','raceway','living_street') + order by z_order) as roads + + &datasource-settings; + + + + highway-area-fill + + + (select way,highway,railway,aeroway from &prefix;_polygon + where highway in ('residential','unclassified','pedestrian','service','footway','living_street','track','path','platform','services') + or railway='platform' + or aeroway in ('runway','taxiway','helipad') + order by z_order,way_area desc) as roads + + &datasource-settings; + + +&layer-buildings; + + tracks-notunnel-nobridge + + + (select way,tracktype from &prefix;_line where highway='track' and (bridge is null or bridge in ('no','false','0')) and (tunnel is null or tunnel in ('no','false','0'))) as tracks + + &datasource-settings; + + + + minor-roads-fill-links + minor-roads-fill + + + (select way,highway,horse,bicycle,foot,construction,aeroway, + case when tunnel in ('yes','true','1') then 'yes'::text else tunnel end as tunnel, + case when bridge in ('yes','true','1','viaduct') then 'yes'::text else bridge end as bridge, + case when railway in ('spur','siding') + or (railway='rail' and service in ('spur','siding','yard')) + then 'spur-siding-yard'::text else railway end as railway, + case when service in ('parking_aisle','drive-through','driveway') then 'INT-minor'::text else service end as service + from &prefix;_line + where highway is not null + or aeroway in ('runway','taxiway') + or railway in ('light_rail','narrow_gauge','funicular','rail','subway','tram','spur','siding','platform','disused','abandoned','construction','miniature','turntable') + order by z_order) as roads + + &datasource-settings; + + + + turning_circle-fill + + + (select distinct on (p.way) p.way as way,l.highway as int_tc_type + from &prefix;_point p + join &prefix;_line l + on ST_DWithin(p.way,l.way,&dwithin_node_way;) + join (values + ('tertiary',1), + ('unclassified',2), + ('residential',3), + ('living_street',4), + ('service',5) + ) as v (highway,prio) + on v.highway=l.highway + where p.highway='turning_circle' + order by p.way,v.prio + ) as turning_circle + + &datasource-settings; + + +&layer-ferry-routes; +&layer-aerialways; + + roads + + + (select way,highway, + case when tunnel in ('yes','true','1') then 'yes'::text else tunnel end as tunnel, + case when railway='preserved' and service in ('spur','siding','yard') then 'INT-preserved-ssy'::text else railway end as railway + from &prefix;_roads + where highway is not null + or (railway is not null and railway!='preserved' and (service is null or service not in ('spur','siding','yard'))) + or railway='preserved' + order by z_order + ) as roads + + &datasource-settings; + + + + waterway-bridges + + (select way,name from &prefix;_line where waterway='canal' and bridge in ('yes','true','1','aqueduct') order by z_order) as water + &datasource-settings; + + + + access + + + (select way,access,highway, + case when service in ('parking_aisle','drive-through','driveway') then 'INT-minor'::text end as service + from &prefix;_line + where access is not null and highway is not null + and (bridge is null or bridge not in ('yes','true','1','viaduct')) + ) as access + + &datasource-settings; + + + + directions + + + (select way, + case when oneway in ('yes','true','1') then 'yes'::text else oneway end as oneway + from &prefix;_line + where oneway is not null + and (highway is not null or railway is not null or waterway is not null) + and (bridge is null or bridge not in ('yes','true','1','viaduct')) + ) as directions + + &datasource-settings; + + + + bridges_casing + bridges_casing2 + bridges_fill + + + (select way,highway,aeroway,horse,bicycle,foot,tracktype, + case when railway in ('spur','siding') + or (railway='rail' and service in ('spur','siding','yard')) + then 'INT-spur-siding-yard'::text else railway end as railway + from &prefix;_line + where (highway is not null + or aeroway in ('runway','taxiway') + or railway in ('light_rail','subway','narrow_gauge','rail','spur','siding','disused','abandoned','construction')) + and bridge in ('yes','true','1','viaduct') + and (layer is null or layer = '0') + order by z_order + ) as roads + + &datasource-settings; + + + + access + + + (select way,access,highway, + case when service in ('parking_aisle','drive-through','driveway') then 'INT-minor'::text end as service + from &prefix;_line + where access is not null and highway is not null + and bridge in ('yes','true','1','viaduct') + and (layer is null or layer in ('-5','-4','-3','-2','-1','0')) + ) as access + + &datasource-settings; + + + + directions + + + (select way, + case when oneway in ('yes','true','1') then 'yes'::text else oneway end as oneway + from &prefix;_line + where oneway is not null + and (highway is not null or railway is not null or waterway is not null) + and bridge in ('yes','true','1','viaduct') + and (layer is null or layer in ('-5','-4','-3','-2','-1','0')) + ) as directions + + &datasource-settings; + + + + bridges_casing + bridges_casing2 + bridges_fill + + + (select way,highway,aeroway,horse,bicycle,foot,tracktype, + case when railway in ('spur','siding') + or (railway='rail' and service in ('spur','siding','yard')) + then 'INT-spur-siding-yard'::text else railway end as railway + from &prefix;_line + where (highway is not null + or aeroway in ('runway','taxiway') + or railway in ('light_rail','subway','narrow_gauge','rail','spur','siding','disused','abandoned','construction')) + and bridge in ('yes','true','1','viaduct') + and layer = '1' + order by z_order + ) as roads + + &datasource-settings; + + + + access + + + (select way,access,highway, + case when service in ('parking_aisle','drive-through','driveway') then 'INT-minor'::text end as service + from &prefix;_line + where access is not null and highway is not null + and bridge in ('yes','true','1','viaduct') + and layer = '1' + ) as access + + &datasource-settings; + + + + directions + + + (select way, + case when oneway in ('yes','true','1') then 'yes'::text else oneway end as oneway + from &prefix;_line + where oneway is not null + and (highway is not null or railway is not null or waterway is not null) + and bridge in ('yes','true','1','viaduct') + and layer = '1' + ) as directions + + &datasource-settings; + + + + bridges_casing + bridges_casing2 + bridges_fill + + + (select way,highway,aeroway,horse,bicycle,foot,tracktype, + case when railway in ('spur','siding') + or (railway='rail' and service in ('spur','siding','yard')) + then 'INT-spur-siding-yard'::text else railway end as railway + from &prefix;_line + where (highway is not null + or aeroway in ('runway','taxiway') + or railway in ('light_rail','subway','narrow_gauge','rail','spur','siding','disused','abandoned','construction')) + and bridge in ('yes','true','1','viaduct') + and layer = '2' + order by z_order + ) as roads + + &datasource-settings; + + + + access + + + (select way,access,highway, + case when service in ('parking_aisle','drive-through','driveway') then 'INT-minor'::text end as service + from &prefix;_line + where access is not null and highway is not null + and bridge in ('yes','true','1','viaduct') + and layer = '2' + ) as access + + &datasource-settings; + + + + directions + + + (select way, + case when oneway in ('yes','true','1') then 'yes'::text else oneway end as oneway + from &prefix;_line + where oneway is not null + and (highway is not null or railway is not null or waterway is not null) + and bridge in ('yes','true','1','viaduct') + and layer = '2' + ) as directions + + &datasource-settings; + + + + bridges_casing + bridges_casing2 + bridges_fill + + + (select way,highway,aeroway,horse,bicycle,foot,tracktype, + case when railway in ('spur','siding') + or (railway='rail' and service in ('spur','siding','yard')) + then 'INT-spur-siding-yard'::text else railway end as railway + from &prefix;_line + where (highway is not null + or aeroway in ('runway','taxiway') + or railway in ('light_rail','subway','narrow_gauge','rail','spur','siding','disused','abandoned','construction')) + and bridge in ('yes','true','1','viaduct') + and layer = '3' + order by z_order + ) as roads + + &datasource-settings; + + + + access + + + (select way,access,highway, + case when service in ('parking_aisle','drive-through','driveway') then 'INT-minor'::text end as service + from &prefix;_line + where access is not null and highway is not null + and bridge in ('yes','true','1','viaduct') + and layer = '3' + ) as access + + &datasource-settings; + + + + directions + + + (select way, + case when oneway in ('yes','true','1') then 'yes'::text else oneway end as oneway + from &prefix;_line + where oneway is not null + and (highway is not null or railway is not null or waterway is not null) + and bridge in ('yes','true','1','viaduct') + and layer = '3' + ) as directions + + &datasource-settings; + + + + bridges_casing + bridges_casing2 + bridges_fill + + + (select way,highway,aeroway,horse,bicycle,foot,tracktype, + case when railway in ('spur','siding') + or (railway='rail' and service in ('spur','siding','yard')) + then 'INT-spur-siding-yard'::text else railway end as railway + from &prefix;_line + where (highway is not null + or aeroway in ('runway','taxiway') + or railway in ('light_rail','subway','narrow_gauge','rail','spur','siding','disused','abandoned','construction')) + and bridge in ('yes','true','1','viaduct') + and layer = '4' + order by z_order + ) as roads + + &datasource-settings; + + + + access + + + (select way,access,highway, + case when service in ('parking_aisle','drive-through','driveway') then 'INT-minor'::text end as service + from &prefix;_line + where access is not null and highway is not null + and bridge in ('yes','true','1','viaduct') + and layer = '4' + ) as access + + &datasource-settings; + + + + directions + + + (select way, + case when oneway in ('yes','true','1') then 'yes'::text else oneway end as oneway + from &prefix;_line + where oneway is not null + and (highway is not null or railway is not null or waterway is not null) + and bridge in ('yes','true','1','viaduct') + and layer = '4' + ) as directions + + &datasource-settings; + + + + bridges_casing + bridges_casing2 + bridges_fill + + + (select way,highway,aeroway,horse,bicycle,foot,tracktype, + case when railway in ('spur','siding') + or (railway='rail' and service in ('spur','siding','yard')) + then 'INT-spur-siding-yard'::text else railway end as railway + from &prefix;_line + where (highway is not null + or aeroway in ('runway','taxiway') + or railway in ('light_rail','subway','narrow_gauge','rail','spur','siding','disused','abandoned','construction')) + and bridge in ('yes','true','1','viaduct') + and layer = '5' + order by z_order + ) as roads + + &datasource-settings; + + + + access + + + (select way,access,highway, + case when service in ('parking_aisle','drive-through','driveway') then 'INT-minor'::text end as service + from &prefix;_line + where access is not null and highway is not null + and bridge in ('yes','true','1','viaduct') + and layer = '5' + ) as access + + &datasource-settings; + + + + directions + + + (select way, + case when oneway in ('yes','true','1') then 'yes'::text else oneway end as oneway + from &prefix;_line + where oneway is not null + and (highway is not null or railway is not null or waterway is not null) + and bridge in ('yes','true','1','viaduct') + and layer = '5' + ) as directions + + &datasource-settings; + + + + trams + + + (select way,railway,bridge from &prefix;_line where railway='tram' and (tunnel is null or tunnel not in ('yes','true','1'))) as trams + + &datasource-settings; + + + + guideways + + + (select way from &prefix;_line where highway='bus_guideway' and (tunnel is null or tunnel not in ('yes','true','1'))) as guideways + + &datasource-settings; + + +&layer-admin; +&layer-placenames; +&layer-amenity-stations; +&layer-amenity-symbols; +&layer-amenity-points; +&layer-power; + + roads-text-ref-low-zoom + + + (select way,highway,ref,char_length(ref) as length + from &prefix;_roads + where highway in ('motorway','trunk','primary','secondary') + and ref is not null + and char_length(ref) between 1 and 8 + ) as roads + + &datasource-settings; + + + + highway-junctions + + + (select way,ref,name + from &prefix;_point + where highway='motorway_junction' + ) as junctions + + &datasource-settings; + + + + roads-text-ref + + + (select way,highway,aeroway,ref,char_length(ref) as length, + case when bridge in ('yes','true','1') then 'yes'::text else bridge end as bridge + from &prefix;_line + where (highway is not null or aeroway is not null) + and ref is not null + and char_length(ref) between 1 and 8 + ) as roads + + &datasource-settings; + + + + roads-text-name + + + (select way,highway,name + from &prefix;_line + where waterway IS NULL + and leisure IS NULL + and landuse IS NULL + and name is not null + ) as roads + + &datasource-settings; + + + + text + + + (select way,amenity,shop,access,leisure,landuse,man_made,"natural",place,tourism,ele,name,ref,military,aeroway,waterway,historic,'yes'::text as point + from &prefix;_point + where amenity is not null + or shop in ('supermarket','bakery','clothes','fashion','convenience','doityourself','hairdresser','department_store','butcher','car','car_repair','bicycle','florist') + or leisure is not null + or landuse is not null + or tourism is not null + or "natural" is not null + or man_made in ('lighthouse','windmill') + or place='island' + or military='danger_area' + or aeroway='gate' + or waterway='lock' + or historic in ('memorial','archaeological_site') + ) as text + + &datasource-settings; + + + + text + + + (select way,aeroway,shop,access,amenity,leisure,landuse,man_made,"natural",place,tourism,NULL as ele,name,ref,military,waterway,historic,'no'::text as point + from &prefix;_polygon + where amenity is not null + or shop in ('supermarket','bakery','clothes','fashion','convenience','doityourself','hairdresser','department_store', 'butcher','car','car_repair','bicycle') + or leisure is not null + or landuse is not null + or tourism is not null + or "natural" is not null + or man_made in ('lighthouse','windmill') + or place='island' + or military='danger_area' + or historic in ('memorial','archaeological_site') + ) as text + + &datasource-settings; + + + + area-text + + + (select way,way_area,name + from &prefix;_polygon + where name is not null + and (waterway is null or waterway != 'riverbank') + and place is null + order by way_area desc + ) as text + + &datasource-settings; + + +&layer-addressing; + + boundary + + + (select way,way_area,name,boundary from &prefix;_polygon where boundary='national_park' and building is null) as boundary + + &datasource-settings; + + + + theme_park + + + (select way,name,tourism from &prefix;_polygon where tourism='theme_park') as theme_park + + &datasource-settings; + + +