From 6feefb414548995a7012fa44e2aeb0bb06ab2708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Rodrigo?= Date: Tue, 26 May 2020 20:44:36 +0200 Subject: [PATCH] Use osm_id as feature id for building layer (#827) Change the feature_id of objects in the tiles from arbitrary number to osm_id. From discussion here https://github.com/openmaptiles/openmaptiles/pull/725#issuecomment-619059931 Note the multiploygon building are load with negative relation osm_id. But the use in feature_id do an overflow (eg -7980888 -> 18446744073701570000). We can keep as is or not. No stats done for yet. Trying to let the CI do it. --- layers/building/building.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/layers/building/building.yaml b/layers/building/building.yaml index 45863915..1bf360b7 100644 --- a/layers/building/building.yaml +++ b/layers/building/building.yaml @@ -5,7 +5,11 @@ layer: this is welcomed. buffer_size: 4 datasource: - query: (SELECT geometry, render_height, render_min_height, colour, hide_3d FROM layer_building(!bbox!, z(!scale_denominator!))) AS t + geometry_field: geometry + key_field: osm_id + key_field_as_attribute: no + srid: 900913 + query: (SELECT osm_id, geometry, render_height, render_min_height, colour, hide_3d FROM layer_building(!bbox!, z(!scale_denominator!))) AS t fields: render_height: | An approximated height from levels and height of the building or building:part after the method of Paul Norman in [OSM Clear](https://github.com/ClearTables/osm-clear). For future 3D rendering of buildings.