mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-15 02:47:59 +00:00
always compute guessed postcode for POIs from centroid
When guessing postcodes from the area, only postcodes within that area are accepted. For POIs that is usually not what we want as the postcode would have to be within a house for example. Fixes #2301.
This commit is contained in:
@@ -911,7 +911,7 @@ BEGIN
|
||||
-- determine postcode
|
||||
NEW.postcode := coalesce(token_normalized_postcode(NEW.address->'postcode'),
|
||||
location.postcode,
|
||||
get_nearest_postcode(NEW.country_code, NEW.geometry));
|
||||
get_nearest_postcode(NEW.country_code, NEW.centroid));
|
||||
|
||||
IF NEW.name is not NULL THEN
|
||||
NEW.name := add_default_place_name(NEW.country_code, NEW.name);
|
||||
|
||||
Reference in New Issue
Block a user