Skip to content

Commit

Permalink
Fixing addr:unit database style
Browse files Browse the repository at this point in the history
  • Loading branch information
kocio-pl committed Sep 16, 2017
1 parent 664609c commit 27f0618
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion openstreetmap-carto.style
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ node,way access text linear
node,way addr:housename text linear
node,way addr:housenumber text linear
way addr:interpolation text linear
node,way addr:unit text linear
node,way admin_level text linear
node,way aerialway text linear
node,way aeroway text polygon
Expand Down
8 changes: 4 additions & 4 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -2168,20 +2168,20 @@ Layer:
way,
"addr:housenumber" AS addr_housenumber,
"addr:housename" AS addr_housename,
"addr:unit" AS addr_unit,
tags->'addr:unit' AS addr_unit,
way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels
FROM planet_osm_polygon
WHERE (("addr:housenumber" IS NOT NULL) OR ("addr:housename" IS NOT NULL) OR ("addr:unit" IS NOT NULL))
WHERE (("addr:housenumber" IS NOT NULL) OR ("addr:housename" IS NOT NULL) OR (tags->'addr:unit' IS NOT NULL))
AND building IS NOT NULL
UNION ALL
SELECT
way,
"addr:housenumber" AS addr_housenumber,
"addr:housename" AS addr_housename,
"addr:unit" AS addr_unit,
tags->'addr:unit' AS addr_unit,
NULL AS way_pixels
FROM planet_osm_point
WHERE ("addr:housenumber" IS NOT NULL) OR ("addr:housename" IS NOT NULL) OR ("addr:unit" IS NOT NULL)
WHERE ("addr:housenumber" IS NOT NULL) OR ("addr:housename" IS NOT NULL) OR (tags->'addr:unit' IS NOT NULL)
ORDER BY way_pixels DESC NULLS LAST
) AS addresses
properties:
Expand Down

0 comments on commit 27f0618

Please sign in to comment.