]> git.openstreetmap.org Git - nominatim.git/commitdiff
return bbox of full country for country searches
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 13 Aug 2023 12:37:28 +0000 (14:37 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 13 Aug 2023 12:37:28 +0000 (14:37 +0200)
Fixes #3149.

nominatim/api/search/db_searches.py

index 638f5b834900fc5d8d0d702b31b7832b010414c9..115f32fad4d7e307eada70cd02080901fbcacbd6 100644 (file)
@@ -427,6 +427,7 @@ class CountrySearch(AbstractSearch):
             result = nres.create_from_placex_row(row, nres.SearchResult)
             assert result
             result.accuracy = self.penalty + self.countries.get_penalty(row.country_code, 5.0)
             result = nres.create_from_placex_row(row, nres.SearchResult)
             assert result
             result.accuracy = self.penalty + self.countries.get_penalty(row.country_code, 5.0)
+            result.bbox = Bbox.from_wkb(row.bbox)
             results.append(result)
 
         return results or await self.lookup_in_country_table(conn, details)
             results.append(result)
 
         return results or await self.lookup_in_country_table(conn, details)