From 09e30b0824caa187f8fb1af7a447f2f2df17d1e6 Mon Sep 17 00:00:00 2001 From: Paul Norman Date: Sat, 12 May 2018 19:24:15 -0700 Subject: [PATCH] Convert springs to use ST_PointOnSurface and reformat SQL --- project.mml | 24 ++++++++++++++++-------- water-features.mss | 1 - 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/project.mml b/project.mml index 1c69ea51ea..c72abecdd0 100644 --- a/project.mml +++ b/project.mml @@ -285,14 +285,22 @@ Layer: <<: *osm2pgsql table: |- (SELECT - way, "natural" - FROM planet_osm_polygon - WHERE "natural" IN ('spring') - UNION ALL - SELECT - way, "natural" - FROM planet_osm_point - WHERE "natural" IN ('spring') + way, + "natural" + FROM + (SELECT + ST_PointOnSurface(way) AS way, + "natural" + FROM planet_osm_polygon + WHERE way && !bbox! + UNION ALL + SELECT + way, + "natural" + FROM planet_osm_point + WHERE way && !bbox! + ) _ + WHERE "natural" IN ('spring') ) AS springs properties: minzoom: 14 diff --git a/water-features.mss b/water-features.mss index f097f81678..e98ff87807 100644 --- a/water-features.mss +++ b/water-features.mss @@ -167,7 +167,6 @@ #springs { [natural = 'spring'][zoom >= 14] { marker-file: url('symbols/spring.svg'); - marker-placement: interior; marker-clip: false; } }