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

way_area conditions for all ST_PointOnSurface layers #4042

Merged
merged 2 commits into from
Mar 3, 2020
Merged
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
17 changes: 15 additions & 2 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ Layer:
"natural"
FROM planet_osm_polygon
WHERE way && !bbox!
AND way_area < 768000*POW(!scale_denominator!*0.001*0.28,2)
UNION ALL
SELECT
way,
Expand Down Expand Up @@ -1184,7 +1185,8 @@ Layer:
AND boundary = 'administrative'
AND admin_level = '2'
AND name IS NOT NULL
AND way_area > 100*!pixel_width!::real*!pixel_height!::real
AND way_area > 100*POW(!scale_denominator!*0.001*0.28,2)
pnorman marked this conversation as resolved.
Show resolved Hide resolved
pnorman marked this conversation as resolved.
Show resolved Hide resolved
AND way_area < 4000000*POW(!scale_denominator!*0.001*0.28,2)
AND osm_id < 0
ORDER BY way_area DESC
) AS country_names
Expand Down Expand Up @@ -1228,7 +1230,8 @@ Layer:
AND boundary = 'administrative'
AND admin_level = '4'
AND name IS NOT NULL
AND way_area > 100*!pixel_width!::real*!pixel_height!::real
AND way_area > 3000*POW(!scale_denominator!*0.001*0.28,2)
AND way_area < 4000000*POW(!scale_denominator!*0.001*0.28,2)
AND osm_id < 0
ORDER BY way_area DESC
) AS state_names
Expand Down Expand Up @@ -1336,6 +1339,7 @@ Layer:
way_area
FROM planet_osm_polygon
WHERE way && !bbox!
AND way_area < 768000*POW(!scale_denominator!*0.001*0.28,2)
UNION ALL
SELECT
way,
Expand Down Expand Up @@ -1389,6 +1393,7 @@ Layer:
FROM planet_osm_polygon
WHERE way && !bbox!
AND junction = 'yes'
AND way_area < 768000*POW(!scale_denominator!*0.001*0.28,2)
ORDER BY way_pixels DESC NULLS LAST
) AS junctions
properties:
Expand All @@ -1407,6 +1412,8 @@ Layer:
FROM planet_osm_polygon
WHERE way && !bbox!
AND man_made = 'bridge'
AND way_area > 62.5*POW(!scale_denominator!*0.001*0.28,2)
AND way_area < 64000*POW(!scale_denominator!*0.001*0.28,2)
ORDER BY way_area DESC
) AS bridge_text
properties:
Expand Down Expand Up @@ -1794,6 +1801,8 @@ Layer:
OR (place IN ('square')
AND (leisure IS NULL OR NOT leisure IN ('park', 'recreation_ground', 'garden'))))
AND name IS NOT NULL
AND way_area > 3000*POW(!scale_denominator!*0.001*0.28,2)
AND way_area < 768000*POW(!scale_denominator!*0.001*0.28,2)
ORDER BY way_area DESC
) AS roads_area_text_name
properties:
Expand Down Expand Up @@ -1990,6 +1999,7 @@ Layer:
OR leisure IN ('nature_reserve'))
AND building IS NULL
AND name IS NOT NULL
AND way_area > 100*POW(!scale_denominator!*0.001*0.28,2)
AND way_area < 768000*POW(!scale_denominator!*0.001*0.28,2)
ORDER BY way_area DESC
) AS text_poly_low_zoom
Expand Down Expand Up @@ -2045,6 +2055,7 @@ Layer:
AND building IS NOT NULL
AND building NOT IN ('no')
AND name IS NOT NULL
AND way_area < 4000000*POW(!scale_denominator!*0.001*0.28,2)
ORDER BY way_area DESC
) AS building_text
properties:
Expand Down Expand Up @@ -2077,6 +2088,7 @@ Layer:
FROM planet_osm_polygon
WHERE way && !bbox! AND (("addr:housenumber" IS NOT NULL) OR ("addr:housename" IS NOT NULL) OR ((tags->'addr:unit') IS NOT NULL))
AND building IS NOT NULL
AND way_area < 4000000*POW(!scale_denominator!*0.001*0.28,2)
UNION ALL
SELECT
way,
Expand Down Expand Up @@ -2208,6 +2220,7 @@ Layer:
way_area
FROM planet_osm_polygon
WHERE way && !bbox!
AND way_area < 768000*POW(!scale_denominator!*0.001*0.28,2)
UNION ALL
SELECT
way,
Expand Down