forked from hans/Nominatim
simplify use of secondary importance
The values in the raster are already normalized between 0 and 2**16, so a simple conversion to [0, 1] will do. Check for existance of secondary_importance table statically when creating the SQL function. For that to work importance tables need to be created before the functions.
This commit is contained in:
@@ -276,7 +276,7 @@ CREATE SEQUENCE file start 1;
|
||||
|
||||
-- null table so it won't error
|
||||
-- deliberately no drop - importing the table is expensive and static, if it is already there better to avoid removing it
|
||||
CREATE TABLE wikipedia_article (
|
||||
CREATE TABLE IF NOT EXISTS wikipedia_article (
|
||||
language text NOT NULL,
|
||||
title text NOT NULL,
|
||||
langcount integer,
|
||||
@@ -290,15 +290,12 @@ CREATE TABLE wikipedia_article (
|
||||
wd_page_title text,
|
||||
instance_of text
|
||||
);
|
||||
ALTER TABLE ONLY wikipedia_article ADD CONSTRAINT wikipedia_article_pkey PRIMARY KEY (language, title);
|
||||
CREATE INDEX idx_wikipedia_article_osm_id ON wikipedia_article USING btree (osm_type, osm_id);
|
||||
|
||||
CREATE TABLE wikipedia_redirect (
|
||||
CREATE TABLE IF NOT EXISTS wikipedia_redirect (
|
||||
language text,
|
||||
from_title text,
|
||||
to_title text
|
||||
);
|
||||
ALTER TABLE ONLY wikipedia_redirect ADD CONSTRAINT wikipedia_redirect_pkey PRIMARY KEY (language, from_title);
|
||||
|
||||
-- osm2pgsql does not create indexes on the middle tables for Nominatim
|
||||
-- Add one for lookup of associated street relations.
|
||||
|
||||
Reference in New Issue
Block a user