Add building layer

This commit is contained in:
lukasmartinelli
2016-10-06 08:36:00 +02:00
parent 4ec7016608
commit 217d5015c2
4 changed files with 47 additions and 1 deletions

View File

@@ -51,6 +51,43 @@ Layer:
properties:
"buffer-size": 4
srs: +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over
- id: building
Datasource:
dbname: osm
extent: -20037508.34,-20037508.34,20037508.34,20037508.34
geometry_field: way
geometry_table: ''
host: db
key_field: ''
key_field_as_attribute: ''
max_size: 512
password: osm
port: 5432
srid: ''
table: |-
( SELECT
osm_id,
way,
least(greatest(3, COALESCE(height, levels*3.66,5)),400)^.7 AS render_height
FROM (
SELECT osm_id, ST_Simplify(way, 10) AS way, height, levels FROM building_z13
WHERE z(!scale_denominator!) = 13
UNION ALL
SELECT * FROM building_z14
WHERE z(!scale_denominator!) >= 14
) AS water
WHERE way && !bbox!
ORDER BY render_height, ST_YMin(way) DESC
) AS data
type: postgis
user: osm
description: Buildings
fields:
osm_id: Number
render_height: Number
properties:
"buffer-size": 4
srs: +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over
maxzoom: 14
minzoom: 0
name: OSM2VectorTiles v3.0