2024-10-05 10:43:33 +02:00
|
|
|
CREATE OR REPLACE FUNCTION layer_exploration(bbox geometry, zoom_level int)
|
2024-10-06 23:55:32 +02:00
|
|
|
RETURNS TABLE(osm_id bigint, geometry geometry, class text, subclass text, name text, memorial text) AS $$
|
|
|
|
SELECT osm_id * 10 + 1, geometry, class, subclass, NULLIF(name, '') AS name, NULLIF(memorial, '') AS memorial
|
2024-10-05 10:43:33 +02:00
|
|
|
FROM osm_exploration_point
|
|
|
|
WHERE zoom_level >= 14 AND geometry && bbox;
|
|
|
|
$$ LANGUAGE SQL IMMUTABLE;
|