Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Rework the tunnel and bridge layers for better performance #66

Merged
merged 1 commit into from
Feb 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ Layer:
<<: *osm2pgsql
table: |-
(
SELECT way, COALESCE(highway, railway) AS type, 0 AS bridge, access, render, layer, 1 as tunnel,
SELECT way, COALESCE(highway, railway) AS type, 0 AS bridge, access, layer, 1 as tunnel,
CASE
WHEN highway IN ('motorway', 'trunk') THEN 'motorway'
WHEN highway IN ('primary', 'secondary') THEN 'mainroad'
Expand All @@ -257,17 +257,9 @@ Layer:
tags->'ramp:stroller' AS ramp_stroller,
tags->'ramp:bicycle' AS ramp_cycle,
tags->'ramp:wheelchair' AS ramp_wheelchair
FROM (
SELECT *, '1_outline' AS render FROM planet_osm_line
WHERE tunnel NOT IN ('', '0', 'no')
UNION ALL
SELECT *, '2_line' AS render FROM planet_osm_line
WHERE tunnel NOT IN ('', '0', 'no')
UNION ALL
SELECT *, '3_inline' AS render FROM planet_osm_line
WHERE tunnel NOT IN ('', '0', 'no')
) AS tunnels
ORDER BY layer ASC, render ASC
FROM planet_osm_line
WHERE tunnel NOT IN ('', '0', 'no')
ORDER BY layer ASC
) AS data
geometry: linestring
properties:
Expand Down
Loading