From fbb0fb049f55fd8b4f3fe803eaa85737869c2159 Mon Sep 17 00:00:00 2001 From: dch0ph Date: Wed, 16 Oct 2024 14:04:56 +0100 Subject: [PATCH] Rendering specific access tags (#4952) * Interpret additional access tags mode specific access tags relevant to primary mode of highway interpreted to determine access marking for: Road types (motorcar > motor_vehicle > vehicle) Footway (foot) Cycleway (bicycle) Bridleway (horse) * Function load in CI * Add carto_path_primary_path * Moving customers, permit Following discussion moving: access=customers -> "restricted" marking access=permit -> "no" marking * Major changes in response to comments Functions renamed for clarity Changed logic for mode-specific tags, only ignoring 'unknown' values unknown access type return for unknown/uninterpretable path promoted to cycleway/bridleway in SQL rather than MSS * Use foot primary mode for highway=pedestrian * Typo fix * Remove incorrect END statements * Fix regression on introducing explicit unknown * Fix regression for highway=path * Alter 'destination' outcome for 2-state access 'destination' on path / footway etc. interpreted as 'yes' (matching current behaviour) * Simplify functions.sql Reduce number of functions Tidy comments * Tidy access functions Consistent formatting of CASE/WHEN Use more idiomatic COALESCE(NULLIF(...),) * Update functions.sql Change argument name accesstag -> accessvalue Improve documentation Simplify logic for promoted paths * Remove obsolete comment from MML * Avoid unknown overload Return "unrecognised" rather than "unknown" if access restriction is not one of recognised values * Extend code comments Note on short-circuiting logic in carto_highway_int_access * Fix broken bridge on path Bridge not being rendered on highway=path --- .github/workflows/ci.yml | 2 + INSTALL.md | 7 +++ functions.sql | 74 +++++++++++++++++++++++++++ project.mml | 81 +++++++----------------------- style/roads.mss | 106 +++++++++++++++++---------------------- 5 files changed, 147 insertions(+), 123 deletions(-) create mode 100644 functions.sql diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb8a37cab..02cbbdf38 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,6 +65,8 @@ jobs: osm2pgsql -G --hstore --style openstreetmap-carto.style --tag-transform-script openstreetmap-carto.lua -d gis -r xml <(echo '') - name: Create indexes run: psql -1Xq -v ON_ERROR_STOP=1 -d gis -f indexes.sql + - name: Load functions + run: psql -1Xq -v ON_ERROR_STOP=1 -d gis -f functions.sql - name: Load empty shapefiles run: scripts/get-external-data.py --no-update --cache -D scripts/empty_files - name: Test queries are valid diff --git a/INSTALL.md b/INSTALL.md index 74029fb1a..7bbfb282d 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -47,6 +47,13 @@ The indexes can be created in parallel with scripts/indexes.py -0 | xargs -0 -P0 -I{} psql -d gis -c "{}" ``` +### Database functions +Some functions need to be loaded into the database for current versions. These can be added / re-loaded at any point using: + +```sh +psql -d gis -f functions.sql +``` + ## Scripted download Some features are rendered using preprocessed shapefiles. diff --git a/functions.sql b/functions.sql new file mode 100644 index 000000000..8b0d62176 --- /dev/null +++ b/functions.sql @@ -0,0 +1,74 @@ +/* Additional database functions for openstreetmap-carto */ + +/* Access functions below adapted from https://github.com/imagico/osm-carto-alternative-colors/tree/591c861112b4e5d44badd108f4cd1409146bca0b/sql/roads.sql */ + +/* Simplified 'yes', 'destination', 'no', 'unrecognised', NULL scale for access restriction + 'no' is returned if the rendering for highway category does not support 'restricted'. + NULL is functionally equivalent to 'yes', but indicates the absence of a restriction + rather than a positive access = yes. 'unrecognised' corresponds to an uninterpretable + access restriction e.g. access=unknown or motorcar=occasionally */ +CREATE OR REPLACE FUNCTION carto_int_access(accessvalue text, allow_restricted boolean) + RETURNS text + LANGUAGE SQL + IMMUTABLE PARALLEL SAFE +AS $$ +SELECT + CASE + WHEN accessvalue IN ('yes', 'designated', 'permissive') THEN 'yes' + WHEN accessvalue IN ('destination', 'delivery', 'customers') THEN + CASE WHEN allow_restricted = TRUE THEN 'restricted' ELSE 'yes' END + WHEN accessvalue IN ('no', 'permit', 'private', 'agricultural', 'forestry', 'agricultural;forestry') THEN 'no' + WHEN accessvalue IS NULL THEN NULL + ELSE 'unrecognised' + END +$$; + +/* Try to promote path to cycleway (if bicycle allowed), then bridleway (if horse) + This duplicates existing behaviour where designated access is required */ +CREATE OR REPLACE FUNCTION carto_path_type(bicycle text, horse text) + RETURNS text + LANGUAGE SQL + IMMUTABLE PARALLEL SAFE +AS $$ +SELECT + CASE + WHEN bicycle IN ('designated') THEN 'cycleway' + WHEN horse IN ('designated') THEN 'bridleway' + ELSE 'path' + END +$$; + +/* Return int_access value which will be used to determine access marking. + Return values are documented above for carto_int_access function. + + Note that the code handling the promotion of highway=path assumes that + promotion to cycleway or bridleway is based on the value of bicycle or + horse respectively. A more general formulation would be, for example, + WHEN 'cycleway' THEN carto_int_access(COALESCE(NULLIF(bicycle, 'unknown'), "access"), FALSE) */ +CREATE OR REPLACE FUNCTION carto_highway_int_access(highway text, "access" text, foot text, bicycle text, horse text, motorcar text, motor_vehicle text, vehicle text) + RETURNS text + LANGUAGE SQL + IMMUTABLE PARALLEL SAFE +AS $$ +SELECT + CASE + WHEN highway IN ('motorway', 'motorway_link', 'trunk', 'trunk_link', 'primary', 'primary_link', 'secondary', + 'secondary_link', 'tertiary', 'tertiary_link', 'residential', 'unclassified', 'living_street', 'service', 'road') THEN + carto_int_access( + COALESCE( + NULLIF(motorcar, 'unknown'), + NULLIF(motor_vehicle, 'unknown'), + NULLIF(vehicle, 'unknown'), + "access"), TRUE) + WHEN highway = 'path' THEN + CASE carto_path_type(bicycle, horse) + WHEN 'cycleway' THEN carto_int_access(bicycle, FALSE) + WHEN 'bridleway' THEN carto_int_access(horse, FALSE) + ELSE carto_int_access(COALESCE(NULLIF(foot, 'unknown'), "access"), FALSE) + END + WHEN highway IN ('pedestrian', 'footway', 'steps') THEN carto_int_access(COALESCE(NULLIF(foot, 'unknown'), "access"), FALSE) + WHEN highway = 'cycleway' THEN carto_int_access(COALESCE(NULLIF(bicycle, 'unknown'), "access"), FALSE) + WHEN highway = 'bridleway' THEN carto_int_access(COALESCE(NULLIF(horse, 'unknown'), "access"), FALSE) + ELSE carto_int_access("access", TRUE) + END +$$; diff --git a/project.mml b/project.mml index fe1348816..aac61b040 100644 --- a/project.mml +++ b/project.mml @@ -444,12 +444,9 @@ Layer: (SELECT way, (CASE WHEN feature IN ('highway_motorway_link', 'highway_trunk_link', 'highway_primary_link', 'highway_secondary_link', 'highway_tertiary_link') THEN substr(feature, 0, length(feature)-4) ELSE feature END) AS feature, - horse, - foot, - bicycle, tracktype, int_surface, - access, + int_access, construction, service, link, @@ -458,19 +455,14 @@ Layer: FROM ( -- subselect that contains both roads and rail SELECT way, - 'highway_' || highway AS feature, --only motorway to tertiary links are accepted later on - horse, - foot, - bicycle, + 'highway_' || (CASE WHEN highway = 'path' THEN carto_path_type(bicycle, horse) ELSE highway END) AS feature, tracktype, CASE WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'ground', 'mud', 'pebblestone', 'salt', 'sand', 'woodchips', 'clay', 'ice', 'snow') THEN 'unpaved' WHEN surface IN ('paved', 'asphalt', 'cobblestone', 'cobblestone:flattened', 'sett', 'concrete', 'concrete:lanes', 'concrete:plates', 'paving_stones', 'metal', 'wood', 'unhewn_cobblestone') THEN 'paved' END AS int_surface, - CASE WHEN access IN ('destination') THEN 'destination'::text - WHEN access IN ('no', 'private') THEN 'no'::text - END AS access, + carto_highway_int_access(highway, access, foot, bicycle, horse, tags->'motorcar', tags->'motor_vehicle', tags->'vehicle') AS int_access, construction, CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text @@ -493,15 +485,9 @@ Layer: WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' WHEN (railway = 'tram' AND service IN ('spur', 'siding', 'yard')) THEN 'tram-service' ELSE railway END) AS feature, - horse, - foot, - bicycle, tracktype, 'null', - CASE - WHEN access IN ('destination') THEN 'destination'::text - WHEN access IN ('no', 'private') THEN 'no'::text - END AS access, + NULL, construction, CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service, 'no' AS link, @@ -520,7 +506,7 @@ Layer: z_order, CASE WHEN substring(feature for 8) = 'railway_' THEN 2 ELSE 1 END, CASE WHEN feature IN ('railway_INT-spur-siding-yard', 'railway_tram-service') THEN 0 ELSE 1 END, - CASE WHEN access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END, + CASE int_access WHEN 'no' THEN 0 WHEN 'restricted' THEN 1 ELSE 2 END, CASE WHEN int_surface IN ('unpaved') THEN 0 ELSE 1 END ) AS tunnels properties: @@ -687,12 +673,9 @@ Layer: (SELECT way, (CASE WHEN feature IN ('highway_motorway_link', 'highway_trunk_link', 'highway_primary_link', 'highway_secondary_link', 'highway_tertiary_link') THEN substr(feature, 0, length(feature)-4) ELSE feature END) AS feature, - horse, - foot, - bicycle, tracktype, int_surface, - access, + int_access, construction, service, link, @@ -701,19 +684,14 @@ Layer: FROM ( -- subselect that contains both roads and rail/aero SELECT way, - ('highway_' || highway) AS feature, --only motorway to tertiary links are accepted later on - horse, - foot, - bicycle, + 'highway_' || (CASE WHEN highway = 'path' THEN carto_path_type(bicycle, horse) ELSE highway END) AS feature, tracktype, CASE WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'ground', 'mud', 'pebblestone', 'salt', 'sand', 'woodchips', 'clay', 'ice', 'snow') THEN 'unpaved' WHEN surface IN ('paved', 'asphalt', 'cobblestone', 'cobblestone:flattened', 'sett', 'concrete', 'concrete:lanes', 'concrete:plates', 'paving_stones', 'metal', 'wood', 'unhewn_cobblestone') THEN 'paved' END AS int_surface, - CASE WHEN access IN ('destination') THEN 'destination'::text - WHEN access IN ('no', 'private') THEN 'no'::text - END AS access, + carto_highway_int_access(highway, access, foot, bicycle, horse, tags->'motorcar', tags->'motor_vehicle', tags->'vehicle') AS int_access, construction, CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') OR leisure IN ('slipway') THEN 'INT-minor'::text @@ -739,9 +717,6 @@ Layer: WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' WHEN (railway = 'tram' AND service IN ('spur', 'siding', 'yard')) THEN 'tram-service' ELSE railway END) AS feature, - horse, - foot, - bicycle, tracktype, CASE WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'ground', 'mud', 'pebblestone', 'salt', 'sand', 'woodchips', 'clay', 'ice', 'snow') THEN 'unpaved' @@ -749,10 +724,7 @@ Layer: 'concrete:plates', 'paving_stones', 'metal', 'wood', 'unhewn_cobblestone') THEN 'paved' ELSE NULL END AS int_surface, - CASE - WHEN access IN ('destination') THEN 'destination'::text - WHEN access IN ('no', 'private') THEN 'no'::text - END AS access, + NULL, construction, CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') OR leisure IN ('slipway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service, 'no' AS link, @@ -775,7 +747,7 @@ Layer: z_order, CASE WHEN substring(feature for 8) = 'railway_' THEN 2 ELSE 1 END, CASE WHEN feature IN ('railway_INT-spur-siding-yard', 'railway_tram-service') THEN 0 ELSE 1 END, - CASE WHEN access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END, + CASE int_access WHEN 'no' THEN 0 WHEN 'restricted' THEN 1 ELSE 2 END, CASE WHEN int_surface IN ('unpaved') THEN 0 ELSE 1 END, osm_id ) AS roads_sql @@ -925,12 +897,9 @@ Layer: (SELECT way, (CASE WHEN feature IN ('highway_motorway_link', 'highway_trunk_link', 'highway_primary_link', 'highway_secondary_link', 'highway_tertiary_link') THEN substr(feature, 0, length(feature)-4) ELSE feature END) AS feature, - horse, - foot, - bicycle, tracktype, int_surface, - access, + int_access, construction, service, link, @@ -939,19 +908,14 @@ Layer: FROM ( -- subselect that contains both roads and rail/aero SELECT way, - 'highway_' || highway AS feature, --only motorway to tertiary links are accepted later on - horse, - foot, - bicycle, + 'highway_' || (CASE WHEN highway = 'path' THEN carto_path_type(bicycle, horse) ELSE highway END) AS feature, tracktype, CASE WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'ground', 'mud', 'pebblestone', 'salt', 'sand', 'woodchips', 'clay', 'ice', 'snow') THEN 'unpaved' WHEN surface IN ('paved', 'asphalt', 'cobblestone', 'cobblestone:flattened', 'sett', 'concrete', 'concrete:lanes', 'concrete:plates', 'paving_stones', 'metal', 'wood', 'unhewn_cobblestone') THEN 'paved' END AS int_surface, - CASE WHEN access IN ('destination') THEN 'destination'::text - WHEN access IN ('no', 'private') THEN 'no'::text - END AS access, + carto_highway_int_access(highway, access, foot, bicycle, horse, tags->'motorcar', tags->'motor_vehicle', tags->'vehicle') AS int_access, construction, CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text @@ -974,15 +938,9 @@ Layer: WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' WHEN (railway = 'tram' AND service IN ('spur', 'siding', 'yard')) THEN 'tram-service' ELSE railway END) AS feature, - horse, - foot, - bicycle, tracktype, 'null', - CASE - WHEN access IN ('destination') THEN 'destination'::text - WHEN access IN ('no', 'private') THEN 'no'::text - END AS access, + NULL, construction, CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service, 'no' AS link, @@ -1001,7 +959,7 @@ Layer: z_order, CASE WHEN substring(feature for 8) = 'railway_' THEN 2 ELSE 1 END, CASE WHEN feature IN ('railway_INT-spur-siding-yard', 'railway_tram-service') THEN 0 ELSE 1 END, - CASE WHEN access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END, + CASE int_access WHEN 'no' THEN 0 WHEN 'restricted' THEN 1 ELSE 2 END, CASE WHEN int_surface IN ('unpaved') THEN 0 ELSE 1 END ) AS bridges properties: @@ -1941,8 +1899,7 @@ Layer: CASE WHEN oneway IN ('yes', '-1') THEN oneway WHEN junction IN ('roundabout') AND (oneway IS NULL OR NOT oneway IN ('no', 'reversible')) THEN 'yes' - END AS oneway, - horse, bicycle + END AS oneway FROM planet_osm_line l 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', 'construction') @@ -1967,15 +1924,13 @@ Layer: table: |- (SELECT way, - highway, + CASE WHEN highway = 'path' THEN carto_path_type(bicycle, horse) ELSE highway END AS highway, construction, name, CASE WHEN oneway IN ('yes', '-1') THEN oneway WHEN junction IN ('roundabout') AND (oneway IS NULL OR NOT oneway IN ('no', 'reversible')) THEN 'yes' - END AS oneway, - horse, - bicycle + END AS oneway FROM planet_osm_line WHERE highway IN ('bridleway', 'footway', 'cycleway', 'path', 'track', 'steps', 'construction') AND (name IS NOT NULL diff --git a/style/roads.mss b/style/roads.mss index a1ba5f44f..84da2dba0 100644 --- a/style/roads.mss +++ b/style/roads.mss @@ -644,7 +644,7 @@ [feature = 'highway_steps'] { #bridges { - [zoom >= 14][access != 'no'], + [zoom >= 14][int_access != 'no'], [zoom >= 15] { line-width: @steps-width-z14 + 2 * (@paths-background-width + @paths-bridge-casing-width); [zoom >= 15] { line-width: @steps-width-z15 + 2 * (@paths-background-width + @paths-bridge-casing-width); } @@ -653,7 +653,7 @@ } } #tunnels { - [zoom >= 14][access != 'no'], + [zoom >= 14][int_access != 'no'], [zoom >= 15] { line-width: @steps-width-z14 + 2 * (@paths-background-width + @paths-tunnel-casing-width); [zoom >= 15] { line-width: @steps-width-z15 + 2 * (@paths-background-width + @paths-tunnel-casing-width); } @@ -663,10 +663,9 @@ } } - [feature = 'highway_bridleway'], - [feature = 'highway_path'][horse = 'designated'] { + [feature = 'highway_bridleway'] { #bridges { - [zoom >= 14][access != 'no'], + [zoom >= 14][int_access != 'no'], [zoom >= 15] { line-width: @bridleway-width-z13 + 2 * (@paths-background-width + @paths-bridge-casing-width); [zoom >= 15] { line-width: @bridleway-width-z15 + 2 * (@paths-background-width + @paths-bridge-casing-width); } @@ -675,7 +674,7 @@ } } #tunnels { - [zoom >= 13][access != 'no'], + [zoom >= 13][int_access != 'no'], [zoom >= 15] { line-width: @bridleway-width-z13 + 2 * (@paths-background-width + @paths-tunnel-casing-width); [zoom >= 15] { line-width: @bridleway-width-z15 + 2 * (@paths-background-width + @paths-tunnel-casing-width); } @@ -686,9 +685,9 @@ } [feature = 'highway_footway'], - [feature = 'highway_path'][bicycle != 'designated'][horse != 'designated'] { + [feature = 'highway_path'] { #bridges { - [zoom >= 14][access != 'no'], + [zoom >= 14][int_access != 'no'], [zoom >= 15] { line-width: @footway-width-z14 + 2 * (@paths-background-width + @paths-bridge-casing-width); [zoom >= 15] { line-width: @footway-width-z15 + 2 * (@paths-background-width + @paths-bridge-casing-width); } @@ -700,7 +699,7 @@ } } #tunnels { - [zoom >= 14][access != 'no'], + [zoom >= 14][int_access != 'no'], [zoom >= 15] { line-width: @footway-width-z14 + 2 * (@paths-background-width + @paths-tunnel-casing-width); [zoom >= 15] { line-width: @footway-width-z15 + 2 * (@paths-background-width + @paths-tunnel-casing-width); } @@ -713,10 +712,9 @@ } } - [feature = 'highway_cycleway'], - [feature = 'highway_path'][bicycle = 'designated'] { + [feature = 'highway_cycleway'] { #bridges { - [zoom >= 14][access != 'no'], + [zoom >= 14][int_access != 'no'], [zoom >= 15] { line-width: @cycleway-width-z13 + 2 * (@paths-background-width + @paths-bridge-casing-width); [zoom >= 15] { line-width: @cycleway-width-z15 + 2 * (@paths-background-width + @paths-bridge-casing-width); } @@ -728,7 +726,7 @@ } } #tunnels { - [zoom >= 13][access != 'no'], + [zoom >= 13][int_access != 'no'], [zoom >= 15] { line-width: @cycleway-width-z13 + 2 * (@paths-background-width + @paths-tunnel-casing-width); [zoom >= 15] { line-width: @cycleway-width-z15 + 2 * (@paths-background-width + @paths-tunnel-casing-width); } @@ -743,7 +741,7 @@ [feature = 'highway_track'] { #bridges { - [zoom >= 13][access != 'no'] { + [zoom >= 13][int_access != 'no'] { line-color: @bridge-casing; line-join: round; line-width: @track-width-z13 + 2 * (@paths-background-width + @paths-bridge-casing-width); @@ -767,7 +765,7 @@ } } #tunnels { - [zoom >= 13][access != 'no'], + [zoom >= 13][int_access != 'no'], [zoom >= 15] { line-color: @tunnel-casing; line-dasharray: 4,2; @@ -865,10 +863,9 @@ } ::bridges_and_tunnels_background { - [feature = 'highway_bridleway'], - [feature = 'highway_path'][horse = 'designated'] { + [feature = 'highway_bridleway'] { #bridges { - [zoom >= 14][access != 'no'], + [zoom >= 14][int_access != 'no'], [zoom >= 15] { line-width: @bridleway-width-z13 + 2 * @paths-background-width; [zoom >= 15] { line-width: @bridleway-width-z15 + 2 * @paths-background-width; } @@ -877,7 +874,7 @@ } } #tunnels { - [zoom >= 13][access != 'no'], + [zoom >= 13][int_access != 'no'], [zoom >= 15] { line-color: @bridleway-casing; line-cap: round; @@ -889,9 +886,9 @@ } [feature = 'highway_footway'], - [feature = 'highway_path'][bicycle != 'designated'][horse != 'designated'] { + [feature = 'highway_path'] { #bridges { - [zoom >= 14][access != 'no'], + [zoom >= 14][int_access != 'no'], [zoom >= 15] { line-width: @footway-width-z14 + 2 * @paths-background-width; [zoom >= 15] { line-width: @footway-width-z15 + 2 * @paths-background-width; } @@ -903,7 +900,7 @@ } } #tunnels { - [zoom >= 14][access != 'no'], + [zoom >= 14][int_access != 'no'], [zoom >= 15] { line-color: @footway-casing; line-cap: round; @@ -917,10 +914,9 @@ } } - [feature = 'highway_cycleway'], - [feature = 'highway_path'][bicycle = 'designated'] { + [feature = 'highway_cycleway'] { #bridges { - [zoom >= 14][access != 'no'], + [zoom >= 14][int_access != 'no'], [zoom >= 15] { line-width: @cycleway-width-z13 + 2 * @paths-background-width; [zoom >= 15] { line-width: @cycleway-width-z15 + 2 * @paths-background-width; } @@ -932,7 +928,7 @@ } } #tunnels { - [zoom >= 13][access != 'no'], + [zoom >= 13][int_access != 'no'], [zoom >= 15] { line-color: @cycleway-casing; line-cap: round; @@ -948,7 +944,7 @@ [feature = 'highway_steps'] { #bridges { - [zoom >= 14][access != 'no'], + [zoom >= 14][int_access != 'no'], [zoom >= 15] { line-width: @steps-width-z14 + 2 * @paths-background-width; [zoom >= 15] { line-width: @steps-width-z15 + 2 * @paths-background-width; } @@ -957,7 +953,7 @@ } } #tunnels { - [zoom >= 14][access != 'no'], + [zoom >= 14][int_access != 'no'], [zoom >= 15] { line-color: @steps-casing; line-cap: round; @@ -971,7 +967,7 @@ [feature = 'highway_track'] { /* We don't set opacity here, so it's 1.0. Aside from that, it's basically a copy of roads-fill::background in the track part of ::fill */ #bridges { - [zoom >= 13][access != 'no'] { + [zoom >= 13][int_access != 'no'] { line-color: @track-casing; line-join: round; line-width: @track-width-z13 + 2 * @paths-background-width; @@ -995,7 +991,7 @@ } } #tunnels { - [zoom >= 13][access != 'no'], + [zoom >= 13][int_access != 'no'], [zoom >= 15] { line-color: @track-casing; line-join: round; @@ -2254,7 +2250,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ } [feature = 'highway_steps'] { - [zoom >= 14][access != 'no'], + [zoom >= 14][int_access != 'no'], [zoom >= 15] { #roads-fill[zoom >= 15] { background/line-color: @steps-casing; @@ -2264,16 +2260,15 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ background/line-opacity: 0.4; } line/line-color: @steps-fill; - [access = 'no'] { line/line-color: @steps-fill-noaccess; } + [int_access = 'no'] { line/line-color: @steps-fill-noaccess; } line/line-dasharray: 2,1; line/line-width: @steps-width-z14; [zoom >= 15] { line/line-width: @steps-width-z15; } } } - [feature = 'highway_bridleway'], - [feature = 'highway_path'][horse = 'designated'] { - [zoom >= 13][access != 'no'], + [feature = 'highway_bridleway'] { + [zoom >= 13][int_access != 'no'], [zoom >= 15] { #roads-fill[zoom >= 15] { background/line-color: @bridleway-casing; @@ -2283,7 +2278,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ background/line-opacity: 0.4; } line/line-color: @bridleway-fill; - [access = 'no'] { line/line-color: @bridleway-fill-noaccess; } + [int_access = 'no'] { line/line-color: @bridleway-fill-noaccess; } line/line-dasharray: 4,2; line/line-width: @bridleway-width-z13; [zoom >= 15] { line/line-width: @bridleway-width-z15; } @@ -2295,8 +2290,8 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ } [feature = 'highway_footway'], - [feature = 'highway_path'][bicycle != 'designated'][horse != 'designated'] { - [zoom >= 14][access != 'no'], + [feature = 'highway_path'] { + [zoom >= 14][int_access != 'no'], [zoom >= 15] { #roads-fill[zoom >= 15] { background/line-color: @footway-casing; @@ -2315,7 +2310,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ } } line/line-color: @footway-fill; - [access = 'no'] { line/line-color: @footway-fill-noaccess; } + [int_access = 'no'] { line/line-color: @footway-fill-noaccess; } line/line-dasharray: 1,3; line/line-join: round; line/line-cap: round; @@ -2339,7 +2334,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ } [zoom >= 15][int_surface = null] { line/line-color: @footway-fill; - [access = 'no'] { line/line-color: @footway-fill-noaccess; } + [int_access = 'no'] { line/line-color: @footway-fill-noaccess; } line/line-dasharray: 1,3,2,4; line/line-join: round; line/line-cap: round; @@ -2357,7 +2352,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ } [zoom >= 15][int_surface = 'unpaved'] { line/line-color: @footway-fill; - [access = 'no'] { line/line-color: @footway-fill-noaccess; } + [int_access = 'no'] { line/line-color: @footway-fill-noaccess; } line/line-dasharray: 1,4; line/line-join: round; line/line-cap: round; @@ -2375,9 +2370,8 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ } } - [feature = 'highway_cycleway'], - [feature = 'highway_path'][bicycle = 'designated'] { - [zoom >= 13][access != 'no'], + [feature = 'highway_cycleway'] { + [zoom >= 13][int_access != 'no'], [zoom >= 15] { #roads-fill[zoom >= 15] { background/line-color: @cycleway-casing; @@ -2396,7 +2390,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ } } line/line-color: @cycleway-fill; - [access = 'no'] { line/line-color: @cycleway-fill-noaccess; } + [int_access = 'no'] { line/line-color: @cycleway-fill-noaccess; } line/line-dasharray: 1,3; line/line-join: round; line/line-cap: round; @@ -2420,7 +2414,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ } [zoom >= 15][int_surface = null] { line/line-color: @cycleway-fill; - [access = 'no'] { line/line-color: @cycleway-fill-noaccess; } + [int_access = 'no'] { line/line-color: @cycleway-fill-noaccess; } line/line-dasharray: 1,3,2,4; line/line-join: round; line/line-cap: round; @@ -2438,7 +2432,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ } [zoom >= 15][int_surface = 'unpaved'] { line/line-color: @cycleway-fill; - [access = 'no'] { line/line-color: @cycleway-fill-noaccess; } + [int_access = 'no'] { line/line-color: @cycleway-fill-noaccess; } line/line-dasharray: 1,4; line/line-join: round; line/line-cap: round; @@ -2457,7 +2451,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ } [feature = 'highway_track'] { - [zoom >= 13][access != 'no'], + [zoom >= 13][int_access != 'no'], [zoom >= 15] { /* The white casing that you mainly see against forests and other dark features */ #roads-fill[zoom >= 15] { @@ -2477,7 +2471,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ /* Set the properties of the brown inside */ line/line-color: @track-fill; - [access = 'no'] { line/line-color: @track-fill-noaccess; } + [int_access = 'no'] { line/line-color: @track-fill-noaccess; } line/line-dasharray: 5,4,2,4; line/line-cap: round; line/line-join: round; @@ -3402,7 +3396,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ #tunnels::fill, #roads-fill::fill, #bridges::fill { - [access = 'destination'] { + [int_access = 'restricted'] { [feature = 'highway_secondary'], [feature = 'highway_tertiary'], [feature = 'highway_unclassified'], @@ -3465,7 +3459,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ } } } - [access = 'no'] { + [int_access = 'no'] { [feature = 'highway_motorway'], [feature = 'highway_trunk'], [feature = 'highway_primary'], @@ -4176,18 +4170,10 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ text-upright: left; text-dy: -3; } + [highway = 'path'], [highway = 'footway'] { text-fill: @footway-oneway-arrow-color; } - [highway = 'path'] { - text-fill: @footway-oneway-arrow-color; - [horse = 'designated'] { - text-fill: @bridleway-oneway-arrow-color; - } - [bicycle = 'designated'] { - text-fill: @cycleway-oneway-arrow-color; - } - } [highway = 'steps'] { text-fill: @steps-oneway-arrow-color; }