From 8adeaa2c7efc1087bacf6a6212e81c06d7097cc1 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Tue, 1 Aug 2023 12:21:11 +0200 Subject: [PATCH] fix regression with lat/lon in json output lat, lon is returned as strings in the PHP output. Reproduce that in the Python frontend. See #3115. --- nominatim/api/v1/format_json.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nominatim/api/v1/format_json.py b/nominatim/api/v1/format_json.py index 99a3f182..80560c95 100644 --- a/nominatim/api/v1/format_json.py +++ b/nominatim/api/v1/format_json.py @@ -86,8 +86,8 @@ def format_base_json(results: Union[napi.ReverseResults, napi.SearchResults], _write_osm_id(out, result.osm_object) - out.keyval('lat', result.centroid.lat)\ - .keyval('lon', result.centroid.lon)\ + out.keyval('lat', f"{result.centroid.lat}")\ + .keyval('lon', f"{result.centroid.lon}")\ .keyval(class_label, result.category[0])\ .keyval('type', result.category[1])\ .keyval('place_rank', result.rank_search)\ -- 2.39.5