forked from hans/Nominatim
normalize postcodes before adding to location tables
This commit is contained in:
@@ -617,10 +617,9 @@ BEGIN
|
|||||||
x := deleteLocationArea(partition, place_id, rank_search);
|
x := deleteLocationArea(partition, place_id, rank_search);
|
||||||
|
|
||||||
-- add postcode only if it contains a single entry, i.e. ignore postcode lists
|
-- add postcode only if it contains a single entry, i.e. ignore postcode lists
|
||||||
IF in_postcode IS NULL OR in_postcode similar to '%(,|;)%' THEN
|
postcode := NULL;
|
||||||
postcode := NULL;
|
IF in_postcode is not null AND in_postcode not similar to '%(,|;)%' THEN
|
||||||
ELSE
|
postcode := upper(trim (both ' ' from in_postcode));
|
||||||
postcode := in_postcode;
|
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
IF ST_GeometryType(geometry) in ('ST_Polygon','ST_MultiPolygon') THEN
|
IF ST_GeometryType(geometry) in ('ST_Polygon','ST_MultiPolygon') THEN
|
||||||
|
|||||||
Reference in New Issue
Block a user