From 1ae7f6c3969be3b48cec67ab5f7dd8289446f8c6 Mon Sep 17 00:00:00 2001 From: Paul Norman Date: Fri, 10 May 2019 20:14:52 -0700 Subject: [PATCH] Use ST_PointOnSurface for building labeling --- project.mml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/project.mml b/project.mml index bb6f64daad..cc4b6d7fd4 100644 --- a/project.mml +++ b/project.mml @@ -2094,10 +2094,11 @@ Layer: table: |- (SELECT name, - way, + ST_PointOnSurface(way) AS way, way_area/NULLIF(POW(!scale_denominator!*0.001*0.28,2),0) AS way_pixels FROM planet_osm_polygon - WHERE building IS NOT NULL + WHERE way && !bbox! + AND building IS NOT NULL AND building NOT IN ('no') AND name IS NOT NULL ORDER BY way_area DESC