Created
June 7, 2012 16:26
-
-
Save aaronlidman/2889878 to your computer and use it in GitHub Desktop.
z10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(SELECT way, highway, railway, | |
(CASE WHEN highway IN ('motorway') THEN 'highway' | |
WHEN highway IN ('trunk', 'primary') THEN 'major_road' | |
ELSE 'minor_road' END) AS kind, | |
'no'::VARCHAR AS is_link, | |
(CASE WHEN tunnel IN ('yes', 'true') THEN 'yes' | |
ELSE 'no' END) AS is_tunnel, | |
(CASE WHEN bridge IN ('yes', 'true') THEN 'yes' | |
ELSE 'no' END) AS is_bridge, | |
(CASE WHEN highway IN ('motorway') THEN 0 | |
WHEN highway IN ('trunk', 'primary') THEN 1 | |
WHEN highway IN ('secondary', 'tertiary') THEN 2 | |
ELSE 99 END) AS priority | |
FROM planet_osm_line | |
WHERE highway IN ('motorway') | |
OR highway IN ('trunk', 'primary') | |
OR highway IN ('secondary')) as roads |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment