maptiles/layers/kct/layer.sql

7 lines
305 B
MySQL
Raw Normal View History

2024-10-05 10:43:33 +02:00
CREATE OR REPLACE FUNCTION layer_kct(bbox geometry, zoom_level int)
RETURNS TABLE(geometry geometry, name text, waycolor text) AS $$
SELECT geometry, NULLIF(name, '') AS name, SPLIT_PART(osmc_symbol, ':', 1) as waycolor
FROM osm_kct_relation
WHERE geometry && bbox;
$$ LANGUAGE SQL IMMUTABLE;