From bd811762b143abad26d29df4f14d0775d1f3803c Mon Sep 17 00:00:00 2001 From: Lukas Sommer Date: Tue, 10 Mar 2015 20:28:53 +0000 Subject: [PATCH] Render implied oneways (roundabout, motorway, motorway_link) --- project.mml | 8 ++++---- project.yaml | 20 ++++++++++++++++---- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/project.mml b/project.mml index 36eb35824f..defdaf25a3 100644 --- a/project.mml +++ b/project.mml @@ -491,7 +491,7 @@ "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", "Datasource": { "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT *\n FROM (\n (SELECT\n way, prio,\n ('highway_' || (CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN substr(highway, 0, length(highway)-4) ELSE highway END)) AS feature,\n horse, foot, bicycle, tracktype,\n CASE WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction,\n CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text\n ELSE 'INT-normal'::text\n END AS service,\n CASE WHEN oneway IN ('yes', '-1') THEN oneway ELSE NULL END AS oneway,\n CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes'\n ELSE 'no' END AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n JOIN (VALUES\n ('highway_motorway', 380),\n ('highway_trunk', 370),\n ('highway_primary', 360),\n ('highway_secondary', 350),\n ('highway_tertiary', 340),\n ('highway_residential', 330),\n ('highway_unclassified', 330),\n ('highway_road', 330),\n ('highway_living_street', 320),\n ('highway_pedestrian', 310),\n ('highway_raceway', 300),\n ('highway_motorway_link', 240),\n ('highway_trunk_link', 230),\n ('highway_primary_link', 220),\n ('highway_secondary_link', 210),\n ('highway_tertiary_link', 200),\n ('highway_service', 150),\n ('highway_track', 110),\n ('highway_path', 100),\n ('highway_footway', 100),\n ('highway_bridleway', 100),\n ('highway_cycleway', 100),\n ('highway_steps', 100),\n ('highway_platform', 90),\n ('highway_proposed', 20),\n ('highway_construction', 10)\n ) AS ordertable (feature, prio)\n ON ('highway_' || planet_osm_line.highway) = ordertable.feature\n WHERE (tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes'))\n UNION ALL\n (SELECT\n way, prio,\n COALESCE(('railway_' || (CASE WHEN railway = 'preserved' AND service IN ('spur', 'siding', 'yard') THEN 'INT-preserved-ssy'::text WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' ELSE railway END)),\n ('aeroway_' || aeroway)) AS feature,\n horse, foot, bicycle, tracktype,\n CASE WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction,\n CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service,\n NULL AS oneway,\n 'no' AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n JOIN (VALUES\n ('railway_rail', 430),\n ('railway_spur', 430),\n ('railway_siding', 430),\n ('railway_subway', 420),\n ('railway_narrow_gauge', 420),\n ('railway_light_rail', 420),\n ('railway_preserved', 420),\n ('railway_funicular', 420),\n ('railway_monorail', 420),\n ('railway_miniature', 420),\n ('railway_turntable', 420),\n ('railway_tram', 410),\n ('railway_disused', 400),\n ('railway_construction', 400),\n ('aeroway_runway', 60),\n ('aeroway_taxiway', 50),\n ('railway_platform', 90)\n ) AS ordertable (feature, prio)\n ON COALESCE(('railway_' || planet_osm_line.railway), ('aeroway_' || planet_osm_line.aeroway)) = ordertable.feature\n WHERE (tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes')\n )) AS features\n ORDER BY layernotnull, prio, CASE WHEN access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END\n) AS tunnels", + "table": "(SELECT *\n FROM (\n (SELECT\n way, prio,\n ('highway_' || (CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN substr(highway, 0, length(highway)-4) ELSE highway END)) AS feature,\n horse, foot, bicycle, tracktype,\n CASE WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction,\n CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text\n ELSE 'INT-normal'::text\n END AS service,\n CASE WHEN oneway IN ('yes', '-1') THEN oneway\n WHEN (highway IN ('motorway', 'motorway_link') OR junction IN ('roundabout')) AND (oneway <> 'no' OR oneway IS NULL) THEN 'yes'\n ELSE NULL\n END AS oneway,\n CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes'\n ELSE 'no' END AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n JOIN (VALUES\n ('highway_motorway', 380),\n ('highway_trunk', 370),\n ('highway_primary', 360),\n ('highway_secondary', 350),\n ('highway_tertiary', 340),\n ('highway_residential', 330),\n ('highway_unclassified', 330),\n ('highway_road', 330),\n ('highway_living_street', 320),\n ('highway_pedestrian', 310),\n ('highway_raceway', 300),\n ('highway_motorway_link', 240),\n ('highway_trunk_link', 230),\n ('highway_primary_link', 220),\n ('highway_secondary_link', 210),\n ('highway_tertiary_link', 200),\n ('highway_service', 150),\n ('highway_track', 110),\n ('highway_path', 100),\n ('highway_footway', 100),\n ('highway_bridleway', 100),\n ('highway_cycleway', 100),\n ('highway_steps', 100),\n ('highway_platform', 90),\n ('highway_proposed', 20),\n ('highway_construction', 10)\n ) AS ordertable (feature, prio)\n ON ('highway_' || planet_osm_line.highway) = ordertable.feature\n WHERE (tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes'))\n UNION ALL\n (SELECT\n way, prio,\n COALESCE(('railway_' || (CASE WHEN railway = 'preserved' AND service IN ('spur', 'siding', 'yard') THEN 'INT-preserved-ssy'::text WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' ELSE railway END)),\n ('aeroway_' || aeroway)) AS feature,\n horse, foot, bicycle, tracktype,\n CASE WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction,\n CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service,\n NULL AS oneway,\n 'no' AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n JOIN (VALUES\n ('railway_rail', 430),\n ('railway_spur', 430),\n ('railway_siding', 430),\n ('railway_subway', 420),\n ('railway_narrow_gauge', 420),\n ('railway_light_rail', 420),\n ('railway_preserved', 420),\n ('railway_funicular', 420),\n ('railway_monorail', 420),\n ('railway_miniature', 420),\n ('railway_turntable', 420),\n ('railway_tram', 410),\n ('railway_disused', 400),\n ('railway_construction', 400),\n ('aeroway_runway', 60),\n ('aeroway_taxiway', 50),\n ('railway_platform', 90)\n ) AS ordertable (feature, prio)\n ON COALESCE(('railway_' || planet_osm_line.railway), ('aeroway_' || planet_osm_line.aeroway)) = ordertable.feature\n WHERE (tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes')\n )) AS features\n ORDER BY layernotnull, prio, CASE WHEN access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END\n) AS tunnels", "geometry_field": "way", "type": "postgis", "key_field": "", @@ -774,7 +774,7 @@ "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", "Datasource": { "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n *\n FROM\n (\n (SELECT\n way, prio,\n ('highway_' || (CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN substr(highway, 0, length(highway)-4) ELSE highway END)) AS feature,\n horse, foot, bicycle, tracktype,\n CASE WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction,\n CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service,\n CASE WHEN oneway IN ('yes', '-1') THEN oneway ELSE NULL END AS oneway,\n CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes' ELSE 'no' END AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n JOIN (VALUES\n ('highway_motorway',380),\n ('highway_trunk',370),\n ('highway_primary',360),\n ('highway_secondary',350),\n ('highway_tertiary',340),\n ('highway_residential',330),\n ('highway_unclassified',330),\n ('highway_road',330),\n ('highway_living_street',320),\n ('highway_pedestrian',310),\n ('highway_raceway',300),\n ('highway_motorway_link',240),\n ('highway_trunk_link',230),\n ('highway_primary_link',220),\n ('highway_secondary_link',210),\n ('highway_tertiary_link',200),\n ('highway_service',150),\n ('highway_track',110),\n ('highway_path',100),\n ('highway_footway',100),\n ('highway_bridleway',100),\n ('highway_cycleway',100),\n ('highway_steps',100),\n ('highway_platform',90),\n ('highway_proposed',20),\n ('highway_construction',10)\n ) AS ordertable (feature, prio)\n ON ('highway_' || planet_osm_line.highway) = ordertable.feature\n WHERE (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage'))\n AND (covered IS NULL OR NOT covered = 'yes')\n AND (bridge IS NULL OR NOT bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct')))\n UNION ALL\n (SELECT\n way, prio,\n COALESCE(('railway_' ||(CASE WHEN railway = 'preserved' AND service IN ('spur', 'siding', 'yard') THEN 'INT-preserved-ssy'::text WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' ELSE railway end)), ('aeroway_' || aeroway)) AS feature,\n horse, foot, bicycle, tracktype,\n CASE WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction, CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service,\n NULL AS oneway, 'no' AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n JOIN (VALUES\n ('railway_rail', 430),\n ('railway_spur', 430),\n ('railway_siding', 430),\n ('railway_subway', 420),\n ('railway_narrow_gauge', 420),\n ('railway_light_rail', 420),\n ('railway_preserved', 420),\n ('railway_funicular', 420),\n ('railway_monorail', 420),\n ('railway_miniature', 420),\n ('railway_turntable', 420),\n ('railway_tram', 410),\n ('railway_disused', 400),\n ('railway_construction', 400),\n ('aeroway_runway', 60),\n ('aeroway_taxiway', 50),\n ('railway_platform', 90)\n ) AS ordertable (feature, prio)\n ON COALESCE(('railway_' || planet_osm_line.railway), ('aeroway_' || planet_osm_line.aeroway)) = ordertable.feature\n WHERE (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage'))\n AND (covered IS NULL OR NOT covered = 'yes')\n AND (bridge IS NULL OR NOT bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct'))\n )\n ) AS features\n ORDER BY prio\n) AS roads_casing", + "table": "(SELECT\n *\n FROM\n (\n (SELECT\n way, prio,\n ('highway_' || (CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN substr(highway, 0, length(highway)-4) ELSE highway END)) AS feature,\n horse, foot, bicycle, tracktype,\n CASE WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction,\n CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service,\n CASE WHEN oneway IN ('yes', '-1') THEN oneway\n WHEN (highway IN ('motorway', 'motorway_link') OR junction IN ('roundabout')) AND (oneway <> 'no' OR oneway IS NULL) THEN 'yes'\n ELSE NULL\n END AS oneway,\n CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes' ELSE 'no' END AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n JOIN (VALUES\n ('highway_motorway',380),\n ('highway_trunk',370),\n ('highway_primary',360),\n ('highway_secondary',350),\n ('highway_tertiary',340),\n ('highway_residential',330),\n ('highway_unclassified',330),\n ('highway_road',330),\n ('highway_living_street',320),\n ('highway_pedestrian',310),\n ('highway_raceway',300),\n ('highway_motorway_link',240),\n ('highway_trunk_link',230),\n ('highway_primary_link',220),\n ('highway_secondary_link',210),\n ('highway_tertiary_link',200),\n ('highway_service',150),\n ('highway_track',110),\n ('highway_path',100),\n ('highway_footway',100),\n ('highway_bridleway',100),\n ('highway_cycleway',100),\n ('highway_steps',100),\n ('highway_platform',90),\n ('highway_proposed',20),\n ('highway_construction',10)\n ) AS ordertable (feature, prio)\n ON ('highway_' || planet_osm_line.highway) = ordertable.feature\n WHERE (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage'))\n AND (covered IS NULL OR NOT covered = 'yes')\n AND (bridge IS NULL OR NOT bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct')))\n UNION ALL\n (SELECT\n way, prio,\n COALESCE(('railway_' ||(CASE WHEN railway = 'preserved' AND service IN ('spur', 'siding', 'yard') THEN 'INT-preserved-ssy'::text WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' ELSE railway end)), ('aeroway_' || aeroway)) AS feature,\n horse, foot, bicycle, tracktype,\n CASE WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction, CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service,\n NULL AS oneway, 'no' AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n JOIN (VALUES\n ('railway_rail', 430),\n ('railway_spur', 430),\n ('railway_siding', 430),\n ('railway_subway', 420),\n ('railway_narrow_gauge', 420),\n ('railway_light_rail', 420),\n ('railway_preserved', 420),\n ('railway_funicular', 420),\n ('railway_monorail', 420),\n ('railway_miniature', 420),\n ('railway_turntable', 420),\n ('railway_tram', 410),\n ('railway_disused', 400),\n ('railway_construction', 400),\n ('aeroway_runway', 60),\n ('aeroway_taxiway', 50),\n ('railway_platform', 90)\n ) AS ordertable (feature, prio)\n ON COALESCE(('railway_' || planet_osm_line.railway), ('aeroway_' || planet_osm_line.aeroway)) = ordertable.feature\n WHERE (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage'))\n AND (covered IS NULL OR NOT covered = 'yes')\n AND (bridge IS NULL OR NOT bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct'))\n )\n ) AS features\n ORDER BY prio\n) AS roads_casing", "geometry_field": "way", "type": "postgis", "key_field": "", @@ -826,7 +826,7 @@ "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", "Datasource": { "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n *\n FROM\n (\n (SELECT\n way, prio,\n ('highway_' || (CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN substr(highway, 0, length(highway)-4) ELSE highway end)) AS feature,\n horse, foot, bicycle, tracktype,\n CASE WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction,\n CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service,\n CASE WHEN oneway IN ('yes', '-1') THEN oneway ELSE NULL END AS oneway,\n CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes' ELSE 'no' END AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n JOIN (VALUES\n ('highway_motorway',380),\n ('highway_trunk',370),\n ('highway_primary',360),\n ('highway_secondary',350),\n ('highway_tertiary',340),\n ('highway_residential',330),\n ('highway_unclassified',330),\n ('highway_road',330),\n ('highway_living_street',320),\n ('highway_pedestrian',310),\n ('highway_raceway',300),\n ('highway_motorway_link',240),\n ('highway_trunk_link',230),\n ('highway_primary_link',220),\n ('highway_secondary_link',210),\n ('highway_tertiary_link',200),\n ('highway_service',150),\n ('highway_track',110),\n ('highway_path',100),\n ('highway_footway',100),\n ('highway_bridleway',100),\n ('highway_cycleway',100),\n ('highway_steps',100),\n ('highway_platform',90),\n ('highway_proposed',20),\n ('highway_construction',10)\n ) AS ordertable (feature, prio)\n on ('highway_' || planet_osm_line.highway) = ordertable.feature\n WHERE (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage'))\n AND (covered IS NULL OR NOT covered = 'yes')\n AND (bridge IS NULL OR NOT bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct')))\n UNION ALL\n (SELECT\n way, prio,\n COALESCE(\n ('railway_' || (CASE WHEN railway = 'preserved' AND service IN ('spur', 'siding', 'yard') THEN 'INT-preserved-ssy'::text WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' ELSE railway END)),\n ('aeroway_' || aeroway)\n ) AS feature,\n horse, foot, bicycle, tracktype,\n CASE WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction,\n CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text\n ELSE 'INT-normal'::text\n END AS service,\n NULL AS oneway,\n 'no' AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n JOIN (VALUES\n ('railway_rail',430),\n ('railway_spur',430),\n ('railway_siding',430),\n ('railway_subway',420),\n ('railway_narrow_gauge',420),\n ('railway_light_rail',420),\n ('railway_preserved',420),\n ('railway_funicular',420),\n ('railway_monorail',420),\n ('railway_miniature',420),\n ('railway_turntable',420),\n ('railway_tram',410),\n ('railway_disused',400),\n ('railway_construction',400),\n ('aeroway_runway',60),\n ('aeroway_taxiway',50),\n ('railway_platform',90)) AS ordertable (feature, prio)\n ON COALESCE(('railway_' || planet_osm_line.railway), ('aeroway_' || planet_osm_line.aeroway)) = ordertable.feature\n WHERE (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage'))\n AND (covered IS NULL OR NOT covered = 'yes')\n AND (bridge IS NULL OR NOT bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct'))\n )\n ) AS features\n ORDER BY prio, CASE WHEN access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END\n) AS roads_fill", + "table": "(SELECT\n *\n FROM\n (\n (SELECT\n way, prio,\n ('highway_' || (CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN substr(highway, 0, length(highway)-4) ELSE highway end)) AS feature,\n horse, foot, bicycle, tracktype,\n CASE WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction,\n CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service,\n CASE WHEN oneway IN ('yes', '-1') THEN oneway\n WHEN (highway IN ('motorway', 'motorway_link') OR junction IN ('roundabout')) AND (oneway <> 'no' OR oneway IS NULL) THEN 'yes'\n ELSE NULL\n END AS oneway,\n CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes' ELSE 'no' END AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n JOIN (VALUES\n ('highway_motorway',380),\n ('highway_trunk',370),\n ('highway_primary',360),\n ('highway_secondary',350),\n ('highway_tertiary',340),\n ('highway_residential',330),\n ('highway_unclassified',330),\n ('highway_road',330),\n ('highway_living_street',320),\n ('highway_pedestrian',310),\n ('highway_raceway',300),\n ('highway_motorway_link',240),\n ('highway_trunk_link',230),\n ('highway_primary_link',220),\n ('highway_secondary_link',210),\n ('highway_tertiary_link',200),\n ('highway_service',150),\n ('highway_track',110),\n ('highway_path',100),\n ('highway_footway',100),\n ('highway_bridleway',100),\n ('highway_cycleway',100),\n ('highway_steps',100),\n ('highway_platform',90),\n ('highway_proposed',20),\n ('highway_construction',10)\n ) AS ordertable (feature, prio)\n on ('highway_' || planet_osm_line.highway) = ordertable.feature\n WHERE (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage'))\n AND (covered IS NULL OR NOT covered = 'yes')\n AND (bridge IS NULL OR NOT bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct')))\n UNION ALL\n (SELECT\n way, prio,\n COALESCE(\n ('railway_' || (CASE WHEN railway = 'preserved' AND service IN ('spur', 'siding', 'yard') THEN 'INT-preserved-ssy'::text WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' ELSE railway END)),\n ('aeroway_' || aeroway)\n ) AS feature,\n horse, foot, bicycle, tracktype,\n CASE WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction,\n CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text\n ELSE 'INT-normal'::text\n END AS service,\n NULL AS oneway,\n 'no' AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n JOIN (VALUES\n ('railway_rail',430),\n ('railway_spur',430),\n ('railway_siding',430),\n ('railway_subway',420),\n ('railway_narrow_gauge',420),\n ('railway_light_rail',420),\n ('railway_preserved',420),\n ('railway_funicular',420),\n ('railway_monorail',420),\n ('railway_miniature',420),\n ('railway_turntable',420),\n ('railway_tram',410),\n ('railway_disused',400),\n ('railway_construction',400),\n ('aeroway_runway',60),\n ('aeroway_taxiway',50),\n ('railway_platform',90)) AS ordertable (feature, prio)\n ON COALESCE(('railway_' || planet_osm_line.railway), ('aeroway_' || planet_osm_line.aeroway)) = ordertable.feature\n WHERE (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage'))\n AND (covered IS NULL OR NOT covered = 'yes')\n AND (bridge IS NULL OR NOT bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct'))\n )\n ) AS features\n ORDER BY prio, CASE WHEN access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END\n) AS roads_fill", "geometry_field": "way", "type": "postgis", "key_field": "", @@ -957,7 +957,7 @@ "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", "Datasource": { "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT *\n FROM (\n (SELECT\n way, prio,\n ('highway_' || (CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN substr(highway, 0, length(highway)-4) ELSE highway END)) AS feature,\n horse, foot, bicycle, tracktype,\n CASE WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction,\n CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text\n ELSE 'INT-normal'::text\n END AS service,\n CASE WHEN oneway IN ('yes', '-1') THEN oneway ELSE NULL END AS oneway,\n CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes'\n ELSE 'no' END AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n JOIN (VALUES\n ('highway_motorway', 380),\n ('highway_trunk', 370),\n ('highway_primary', 360),\n ('highway_secondary', 350),\n ('highway_tertiary', 340),\n ('highway_residential', 330),\n ('highway_unclassified', 330),\n ('highway_road', 330),\n ('highway_living_street', 320),\n ('highway_pedestrian', 310),\n ('highway_raceway', 300),\n ('highway_motorway_link', 240),\n ('highway_trunk_link', 230),\n ('highway_primary_link', 220),\n ('highway_secondary_link', 210),\n ('highway_tertiary_link', 200),\n ('highway_service', 150),\n ('highway_track', 110),\n ('highway_path', 100),\n ('highway_footway', 100),\n ('highway_bridleway', 100),\n ('highway_cycleway', 100),\n ('highway_steps', 100),\n ('highway_platform', 90),\n ('highway_proposed', 20),\n ('highway_construction', 10)\n ) AS ordertable (feature, prio)\n ON ('highway_' || planet_osm_line.highway) = ordertable.feature\n WHERE bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct')\n )\n UNION ALL\n (SELECT\n way, prio,\n COALESCE(('railway_' || (CASE WHEN railway = 'preserved' AND service IN ('spur', 'siding', 'yard') THEN 'INT-preserved-ssy'::text WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' ELSE railway END)),\n ('aeroway_' || aeroway)) AS feature,\n horse, foot, bicycle, tracktype,\n CASE WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction,\n CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service,\n NULL AS oneway,\n 'no' AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n JOIN (VALUES\n ('railway_rail', 430),\n ('railway_spur', 430),\n ('railway_siding', 430),\n ('railway_subway', 420),\n ('railway_narrow_gauge', 420),\n ('railway_light_rail', 420),\n ('railway_preserved', 420),\n ('railway_funicular', 420),\n ('railway_monorail', 420),\n ('railway_miniature', 420),\n ('railway_turntable', 420),\n ('railway_tram', 410),\n ('railway_disused', 400),\n ('railway_construction', 400),\n ('aeroway_runway', 60),\n ('aeroway_taxiway', 50),\n ('railway_platform', 90)\n ) AS ordertable (feature, prio)\n ON COALESCE(('railway_' || planet_osm_line.railway), ('aeroway_' || planet_osm_line.aeroway)) = ordertable.feature\n WHERE bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct')\n )) AS features\n ORDER BY layernotnull, prio, CASE WHEN access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END\n) AS bridges", + "table": "(SELECT *\n FROM (\n (SELECT\n way, prio,\n ('highway_' || (CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN substr(highway, 0, length(highway)-4) ELSE highway END)) AS feature,\n horse, foot, bicycle, tracktype,\n CASE WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction,\n CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text\n ELSE 'INT-normal'::text\n END AS service,\n CASE WHEN oneway IN ('yes', '-1') THEN oneway\n WHEN (highway IN ('motorway', 'motorway_link') OR junction IN ('roundabout')) AND (oneway <> 'no' OR oneway IS NULL) THEN 'yes'\n ELSE NULL\n END AS oneway,\n CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes'\n ELSE 'no' END AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n JOIN (VALUES\n ('highway_motorway', 380),\n ('highway_trunk', 370),\n ('highway_primary', 360),\n ('highway_secondary', 350),\n ('highway_tertiary', 340),\n ('highway_residential', 330),\n ('highway_unclassified', 330),\n ('highway_road', 330),\n ('highway_living_street', 320),\n ('highway_pedestrian', 310),\n ('highway_raceway', 300),\n ('highway_motorway_link', 240),\n ('highway_trunk_link', 230),\n ('highway_primary_link', 220),\n ('highway_secondary_link', 210),\n ('highway_tertiary_link', 200),\n ('highway_service', 150),\n ('highway_track', 110),\n ('highway_path', 100),\n ('highway_footway', 100),\n ('highway_bridleway', 100),\n ('highway_cycleway', 100),\n ('highway_steps', 100),\n ('highway_platform', 90),\n ('highway_proposed', 20),\n ('highway_construction', 10)\n ) AS ordertable (feature, prio)\n ON ('highway_' || planet_osm_line.highway) = ordertable.feature\n WHERE bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct')\n )\n UNION ALL\n (SELECT\n way, prio,\n COALESCE(('railway_' || (CASE WHEN railway = 'preserved' AND service IN ('spur', 'siding', 'yard') THEN 'INT-preserved-ssy'::text WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' ELSE railway END)),\n ('aeroway_' || aeroway)) AS feature,\n horse, foot, bicycle, tracktype,\n CASE WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction,\n CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service,\n NULL AS oneway,\n 'no' AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n JOIN (VALUES\n ('railway_rail', 430),\n ('railway_spur', 430),\n ('railway_siding', 430),\n ('railway_subway', 420),\n ('railway_narrow_gauge', 420),\n ('railway_light_rail', 420),\n ('railway_preserved', 420),\n ('railway_funicular', 420),\n ('railway_monorail', 420),\n ('railway_miniature', 420),\n ('railway_turntable', 420),\n ('railway_tram', 410),\n ('railway_disused', 400),\n ('railway_construction', 400),\n ('aeroway_runway', 60),\n ('aeroway_taxiway', 50),\n ('railway_platform', 90)\n ) AS ordertable (feature, prio)\n ON COALESCE(('railway_' || planet_osm_line.railway), ('aeroway_' || planet_osm_line.aeroway)) = ordertable.feature\n WHERE bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct')\n )) AS features\n ORDER BY layernotnull, prio, CASE WHEN access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END\n) AS bridges", "geometry_field": "way", "type": "postgis", "key_field": "", diff --git a/project.yaml b/project.yaml index a20b279fcb..7e3ad883a2 100644 --- a/project.yaml +++ b/project.yaml @@ -420,7 +420,10 @@ Layer: CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service, - CASE WHEN oneway IN ('yes', '-1') THEN oneway ELSE NULL END AS oneway, + CASE WHEN oneway IN ('yes', '-1') THEN oneway + WHEN (highway IN ('motorway', 'motorway_link') OR junction IN ('roundabout')) AND (oneway <> 'no' OR oneway IS NULL) THEN 'yes' + ELSE NULL + END AS oneway, CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes' ELSE 'no' END AS link, CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull @@ -700,7 +703,10 @@ Layer: END AS access, construction, CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service, - CASE WHEN oneway IN ('yes', '-1') THEN oneway ELSE NULL END AS oneway, + CASE WHEN oneway IN ('yes', '-1') THEN oneway + WHEN (highway IN ('motorway', 'motorway_link') OR junction IN ('roundabout')) AND (oneway <> 'no' OR oneway IS NULL) THEN 'yes' + ELSE NULL + END AS oneway, CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes' ELSE 'no' END AS link, CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull FROM planet_osm_line @@ -825,7 +831,10 @@ Layer: END AS access, construction, CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service, - CASE WHEN oneway IN ('yes', '-1') THEN oneway ELSE NULL END AS oneway, + CASE WHEN oneway IN ('yes', '-1') THEN oneway + WHEN (highway IN ('motorway', 'motorway_link') OR junction IN ('roundabout')) AND (oneway <> 'no' OR oneway IS NULL) THEN 'yes' + ELSE NULL + END AS oneway, CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes' ELSE 'no' END AS link, CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull FROM planet_osm_line @@ -1011,7 +1020,10 @@ Layer: CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service, - CASE WHEN oneway IN ('yes', '-1') THEN oneway ELSE NULL END AS oneway, + CASE WHEN oneway IN ('yes', '-1') THEN oneway + WHEN (highway IN ('motorway', 'motorway_link') OR junction IN ('roundabout')) AND (oneway <> 'no' OR oneway IS NULL) THEN 'yes' + ELSE NULL + END AS oneway, CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes' ELSE 'no' END AS link, CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull