mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
remove unused functions
This commit is contained in:
@@ -474,31 +474,6 @@ END;
|
|||||||
$$
|
$$
|
||||||
LANGUAGE plpgsql IMMUTABLE;
|
LANGUAGE plpgsql IMMUTABLE;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION get_word_score(wordscores wordscore[], words text[]) RETURNS integer
|
|
||||||
AS $$
|
|
||||||
DECLARE
|
|
||||||
idxword integer;
|
|
||||||
idxscores integer;
|
|
||||||
result integer;
|
|
||||||
BEGIN
|
|
||||||
IF (wordscores is null OR words is null) THEN
|
|
||||||
RETURN 0;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
result := 0;
|
|
||||||
FOR idxword in 1 .. array_upper(words, 1) LOOP
|
|
||||||
FOR idxscores in 1 .. array_upper(wordscores, 1) LOOP
|
|
||||||
IF wordscores[idxscores].word = words[idxword] THEN
|
|
||||||
result := result + wordscores[idxscores].score;
|
|
||||||
END IF;
|
|
||||||
END LOOP;
|
|
||||||
END LOOP;
|
|
||||||
|
|
||||||
RETURN result;
|
|
||||||
END;
|
|
||||||
$$
|
|
||||||
LANGUAGE plpgsql IMMUTABLE;
|
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION get_country_code(place geometry) RETURNS TEXT
|
CREATE OR REPLACE FUNCTION get_country_code(place geometry) RETURNS TEXT
|
||||||
AS $$
|
AS $$
|
||||||
DECLARE
|
DECLARE
|
||||||
@@ -1248,8 +1223,6 @@ DECLARE
|
|||||||
search_maxdistance FLOAT[];
|
search_maxdistance FLOAT[];
|
||||||
search_mindistance FLOAT[];
|
search_mindistance FLOAT[];
|
||||||
address_havelevel BOOLEAN[];
|
address_havelevel BOOLEAN[];
|
||||||
-- search_scores wordscore[];
|
|
||||||
-- search_scores_pos INTEGER;
|
|
||||||
|
|
||||||
i INTEGER;
|
i INTEGER;
|
||||||
iMax FLOAT;
|
iMax FLOAT;
|
||||||
@@ -2321,29 +2294,6 @@ END;
|
|||||||
$$
|
$$
|
||||||
LANGUAGE plpgsql IMMUTABLE;
|
LANGUAGE plpgsql IMMUTABLE;
|
||||||
|
|
||||||
--CREATE OR REPLACE FUNCTION get_connected_ways(way_ids INTEGER[]) RETURNS SETOF planet_osm_ways
|
|
||||||
-- AS $$
|
|
||||||
--DECLARE
|
|
||||||
-- searchnodes INTEGER[];
|
|
||||||
-- location RECORD;
|
|
||||||
-- j INTEGER;
|
|
||||||
--BEGIN
|
|
||||||
--
|
|
||||||
-- searchnodes := '{}';
|
|
||||||
-- FOR j IN 1..array_upper(way_ids, 1) LOOP
|
|
||||||
-- FOR location IN
|
|
||||||
-- select nodes from planet_osm_ways where id = way_ids[j] LIMIT 1
|
|
||||||
-- LOOP
|
|
||||||
-- IF not (ARRAY[location.nodes] <@ searchnodes) THEN
|
|
||||||
-- searchnodes := searchnodes || location.nodes;
|
|
||||||
-- END IF;
|
|
||||||
-- END LOOP;
|
|
||||||
-- END LOOP;
|
|
||||||
--
|
|
||||||
-- RETURN QUERY select * from planet_osm_ways where nodes && searchnodes and NOT ARRAY[id] <@ way_ids;
|
|
||||||
--END;
|
|
||||||
--$$
|
|
||||||
--LANGUAGE plpgsql IMMUTABLE;
|
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION get_address_postcode(for_place_id BIGINT) RETURNS TEXT
|
CREATE OR REPLACE FUNCTION get_address_postcode(for_place_id BIGINT) RETURNS TEXT
|
||||||
AS $$
|
AS $$
|
||||||
|
|||||||
Reference in New Issue
Block a user