fix for problem with "James Bay" in water_name (water label) #1595 (#1621)

For important marine points distance between NE and OSM with the same name must by under 50km.
pull/1619/head
Peter Hanecak 2024-01-25 16:01:39 +01:00 zatwierdzone przez GitHub
rodzic e29827d76c
commit bb154f4ee8
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -18,8 +18,11 @@ $$
SELECT osm.osm_id, ne.scalerank
FROM osm_marine_point AS osm
LEFT JOIN ne_10m_geography_marine_polys AS ne ON
lower(trim(regexp_replace(ne.name, '\\s+', ' ', 'g'))) IN (lower(osm.name), lower(osm.tags->'name:en'), lower(osm.tags->'name:es'))
OR substring(lower(trim(regexp_replace(ne.name, '\\s+', ' ', 'g'))) FROM 1 FOR length(lower(osm.name))) = lower(osm.name)
(
lower(trim(regexp_replace(ne.name, '\\s+', ' ', 'g'))) IN (lower(osm.name), lower(osm.tags->'name:en'), lower(osm.tags->'name:es'))
OR substring(lower(trim(regexp_replace(ne.name, '\\s+', ' ', 'g'))) FROM 1 FOR length(lower(osm.name))) = lower(osm.name)
)
AND ST_DWithin(ne.geometry, osm.geometry, 50000)
)
UPDATE osm_marine_point AS osm
SET "rank" = scalerank