kopia lustrzana https://github.com/openmaptiles/openmaptiles
For important marine points distance between NE and OSM with the same name must by under 50km.pull/1619/head
rodzic
e29827d76c
commit
bb154f4ee8
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue