Skip to content

Commit

Permalink
Merge pull request #3781 from pnorman/building_pointonsurface
Browse files Browse the repository at this point in the history
Use ST_PointOnSurface for building labeling
  • Loading branch information
pnorman authored May 15, 2019
2 parents d4f1514 + 1ae7f6c commit e2b8a8f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e2b8a8f

Please sign in to comment.