Import more ocean and sea labels

Related to #434
This commit is contained in:
jirik 2018-04-11 16:46:52 +02:00 committed by Jiri Kozel
parent fce0ba1ce1
commit 24caa53b92

View File

@ -14,7 +14,10 @@ BEGIN
WITH important_marine_point AS ( WITH important_marine_point AS (
SELECT osm.geometry, osm.osm_id, osm.name, osm.name_en, ne.scalerank SELECT osm.geometry, osm.osm_id, osm.name, osm.name_en, ne.scalerank
FROM ne_10m_geography_marine_polys AS ne, osm_marine_point AS osm FROM ne_10m_geography_marine_polys AS ne, osm_marine_point AS osm
WHERE ne.name ILIKE osm.name WHERE trim(regexp_replace(ne.name, '\\s+', ' ', 'g')) ILIKE osm.name
OR trim(regexp_replace(ne.name, '\\s+', ' ', 'g')) ILIKE osm.tags->'name:en'
OR trim(regexp_replace(ne.name, '\\s+', ' ', 'g')) ILIKE osm.tags->'name:es'
OR osm.name ILIKE trim(regexp_replace(ne.name, '\\s+', ' ', 'g')) || ' %'
) )
UPDATE osm_marine_point AS osm UPDATE osm_marine_point AS osm
SET "rank" = scalerank SET "rank" = scalerank