Skip to content

Commit

Permalink
Merge pull request #3898 from jeisenbe/addr-st_pointonsurface
Browse files Browse the repository at this point in the history
Switch addresses to use ST_PointOnSurface
  • Loading branch information
pnorman authored Sep 24, 2019
2 parents b85e71c + c98d93a commit 870d530
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion addressing.mss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
}
}
}
text-placement: interior;
text-face-name: @book-fonts;
text-fill: @address-color;
text-halo-radius: @standard-halo-radius;
Expand Down
6 changes: 3 additions & 3 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -2079,13 +2079,13 @@ Layer:
<<: *osm2pgsql
table: |-
(SELECT
way,
ST_PointOnSurface(way) AS way,
"addr:housenumber" AS addr_housenumber,
"addr:housename" AS addr_housename,
tags->'addr:unit' AS addr_unit,
way_area/NULLIF(POW(!scale_denominator!*0.001*0.28,2),0) AS way_pixels
FROM planet_osm_polygon
WHERE (("addr:housenumber" IS NOT NULL) OR ("addr:housename" IS NOT NULL) OR ((tags->'addr:unit') IS NOT NULL))
WHERE way && !bbox! AND (("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
Expand All @@ -2095,7 +2095,7 @@ Layer:
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 ((tags->'addr:unit') IS NOT NULL)
WHERE way && !bbox! AND ("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 870d530

Please sign in to comment.