Sea polygons get class=sea

pull/1457/head
Brian Sperlongano 2023-01-06 20:00:35 -05:00
rodzic 299f903b1f
commit 9d841cc4f6
2 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -10,6 +10,11 @@ SELECT wp.osm_id,
wp.name,
wp.name_en,
wp.name_de,
CASE
WHEN "natural" = 'bay' THEN 'bay'
WHEN place = 'sea' THEN 'sea'
ELSE 'lake'
END AS class,
update_tags(wp.tags, ST_PointOnSurface(wp.geometry)) AS tags,
-- Area of the feature in square meters
ST_Area(wp.geometry) as area,
@ -27,6 +32,7 @@ SELECT osm_id,
name,
name_en,
name_de,
class,
tags,
-- Percentage of the earth's surface covered by this feature (approximately)
-- The constant below is 111,842^2 * 180 * 180, where 111,842 is the length of one degree of latitude at the equator in meters.

Wyświetl plik

@ -46,7 +46,7 @@ SELECT
COALESCE(NULLIF(name_en, ''), name) AS name_en,
COALESCE(NULLIF(name_de, ''), name, name_en) AS name_de,
tags,
'lake'::text AS class,
class,
is_intermittent::int AS intermittent
FROM osm_water_point
WHERE geometry && bbox