]> git.0d.be Git - hdm-toner-cartocss.git/commitdiff
select only polygons matching some landfill criteria
authorChristian Quest <cquest@openstreetmap.fr>
Thu, 2 Nov 2017 03:18:43 +0000 (04:18 +0100)
committerGitHub <noreply@github.com>
Thu, 2 Nov 2017 03:18:43 +0000 (04:18 +0100)
project.yml

index 13ce104cdd1d794e679aa83569724f5408a3c377..1fea0326dd80cafef619d1ac36fa2daf3987056b 100644 (file)
@@ -87,9 +87,9 @@ Layer:
       table: >-
         ( SELECT way, way_area AS area, COALESCE(landuse, leisure, "natural",
         highway, amenity, tourism) AS type, tags->'landfill:type' as
-        landfill_type FROM planet_osm_polygon WHERE way_area > 10000 ORDER BY
-        way_area DESC
-
+        landfill_type FROM planet_osm_polygon WHERE way_area > 10000 AND
+        COALESCE(landuse, leisure, "natural", highway, amenity, tourism) IS NOT NULL
+        ORDER BY way_area DESC
         ) AS data
     advanced:
       extent_from_subquery: 'true'
@@ -99,7 +99,10 @@ Layer:
     Datasource:
       <<: *osm2pgsql
       table: |-
-        ( SELECT way, way_area AS area, COALESCE(landuse, leisure, "natural", highway, amenity, tourism) AS type, tags->'landfill:type' as landfill_type FROM planet_osm_polygon ORDER BY way_area DESC) AS data
+        ( SELECT way, way_area AS area, COALESCE(landuse, leisure, "natural", highway, amenity, tourism) AS type, tags->'landfill:type' as landfill_type
+        FROM planet_osm_polygon
+        WHERE COALESCE(landuse, leisure, "natural", highway, amenity, tourism) IS NOT NULL
+        ORDER BY way_area DESC) AS data
     advanced:
       extent_from_subquery: 'true'