Fix #315: Prevent OSM valndalism on buildings
This commit is contained in:
parent
183f730814
commit
1195126c90
@ -83,15 +83,16 @@ RETURNS TABLE(geometry geometry, osm_id bigint, render_height int, render_min_he
|
|||||||
WHERE zoom_level = 13 AND geometry && bbox
|
WHERE zoom_level = 13 AND geometry && bbox
|
||||||
UNION ALL
|
UNION ALL
|
||||||
-- etldoc: osm_building_polygon -> layer_building:z14_
|
-- etldoc: osm_building_polygon -> layer_building:z14_
|
||||||
SELECT DISTINCT ON (osm_id)
|
SELECT DISTINCT ON (osm_id)
|
||||||
osm_id, geometry,
|
osm_id, geometry,
|
||||||
ceil( COALESCE(height, levels*3.66,5))::int AS render_height,
|
ceil( COALESCE(height, levels*3.66,5))::int AS render_height,
|
||||||
floor(COALESCE(min_height, min_level*3.66,0))::int AS render_min_height FROM
|
floor(COALESCE(min_height, min_level*3.66,0))::int AS render_min_height FROM
|
||||||
osm_all_buildings
|
osm_all_buildings
|
||||||
WHERE zoom_level >= 14 AND geometry && bbox
|
WHERE
|
||||||
|
levels < 1000 AND
|
||||||
|
zoom_level >= 14 AND geometry && bbox
|
||||||
) AS zoom_levels
|
) AS zoom_levels
|
||||||
ORDER BY render_height ASC, ST_YMin(geometry) DESC;
|
ORDER BY render_height ASC, ST_YMin(geometry) DESC;
|
||||||
$$ LANGUAGE SQL IMMUTABLE;
|
$$ LANGUAGE SQL IMMUTABLE;
|
||||||
|
|
||||||
-- not handled: where a building outline covers building parts
|
-- not handled: where a building outline covers building parts
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user