forked from hans/Nominatim
Do not have postcode node appear in addresses directly
Many of the postcode nodes are actually derived from incomplete addresses and are as such not even centroids. Better let them only take part in the address computation via the postcode table.
This commit is contained in:
@@ -864,6 +864,10 @@ BEGIN
|
||||
SELECT * FROM get_postcode_rank(NEW.country_code, NEW.address->'postcode')
|
||||
INTO NEW.rank_search, NEW.rank_address;
|
||||
|
||||
IF NOT ST_GeometryType(NEW.geometry) IN ('ST_Polygon','ST_MultiPolygon') THEN
|
||||
NEW.rank_address := 0;
|
||||
END IF;
|
||||
|
||||
ELSEIF NEW.class = 'place' THEN
|
||||
IF NEW.type in ('continent') THEN
|
||||
NEW.rank_search := 2;
|
||||
|
||||
Reference in New Issue
Block a user