mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
places marked as linked should use the address of the link origin
fixes #269
This commit is contained in:
@@ -2241,9 +2241,11 @@ BEGIN
|
|||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
IF for_place_id IS NULL THEN
|
IF for_place_id IS NULL THEN
|
||||||
for_place_id := in_place_id;
|
select coalesce(linked_place_id, place_id), calculated_country_code,
|
||||||
select calculated_country_code, housenumber, rank_search, postcode, null from placex where place_id = for_place_id
|
housenumber, rank_search, postcode, null
|
||||||
INTO searchcountrycode, searchhousenumber, searchrankaddress, searchpostcode, searchhousename;
|
from placex where place_id = in_place_id
|
||||||
|
INTO for_place_id, searchcountrycode, searchhousenumber, searchrankaddress, searchpostcode, searchhousename;
|
||||||
|
RAISE WARNING '% fffff %', in_place_id, for_place_id;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
--RAISE WARNING '% % % %',searchcountrycode, searchhousenumber, searchrankaddress, searchpostcode;
|
--RAISE WARNING '% % % %',searchcountrycode, searchhousenumber, searchrankaddress, searchpostcode;
|
||||||
|
|||||||
13
tests/features/api/reverse_by_id.feature
Normal file
13
tests/features/api/reverse_by_id.feature
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
Feature: Reverse lookup by ID
|
||||||
|
Testing reverse geocoding via OSM ID
|
||||||
|
|
||||||
|
# see github issue #269
|
||||||
|
Scenario: Get address of linked places
|
||||||
|
Given the request parameters
|
||||||
|
| osm_type | osm_id
|
||||||
|
| N | 151421301
|
||||||
|
When sending an API call reverse
|
||||||
|
Then exactly 1 result is returned
|
||||||
|
And result addresses contain
|
||||||
|
| county | state
|
||||||
|
| Pratt County | Kansas
|
||||||
Reference in New Issue
Block a user