Skip to content

Commit

Permalink
add geometry details for postcode area output
Browse files Browse the repository at this point in the history
  • Loading branch information
lonvia committed Mar 12, 2024
1 parent 4fa3493 commit 9c48726
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nominatim/api/search/db_searches.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,10 @@ async def lookup(self, conn: SearchConnection,
.where(p.c.country_code == row.country_code)\
.where(p.c.postcode == row.postcode)\
.limit(1)

if details.geometry_output:
placex_sql = _add_geometry_columns(placex_sql, p.c.geometry, details)

for prow in await conn.execute(placex_sql, _details_to_bind_params(details)):
result = nres.create_from_placex_row(prow, nres.SearchResult)
break
Expand Down

0 comments on commit 9c48726

Please sign in to comment.