]> git.openstreetmap.org Git - nominatim.git/commitdiff
add optional output of extratags to geocodejson
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 16 Feb 2025 09:16:40 +0000 (10:16 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 16 Feb 2025 09:16:40 +0000 (10:16 +0100)
src/nominatim_api/v1/format_json.py

index b397e702cec09ec5a791762dba0fdd4422ec918e..00c953da644f087b662126a360dae0e5f6f5320f 100644 (file)
@@ -249,6 +249,9 @@ def format_base_geocodejson(results: Union[ReverseResults, SearchResults],
                         out.keyval(f"level{line.admin_level}", line.local_name)
             out.end_object().next()
 
+        if options.get('extratags', False):
+            out.keyval('extra', result.extratags)
+
         out.end_object().next().end_object().next()
 
         out.key('geometry').raw(result.geometry.get('geojson')