]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/clicmd/export.py
add missing space in taginfo listing
[nominatim.git] / nominatim / clicmd / export.py
index 5d1e7fef77974d7d5f34b40e4e2d08b9c8bd8ccf..f935a5579b70ae94814cd7e9aa0a42471935fcbb 100644 (file)
@@ -102,7 +102,8 @@ async def export(args: NominatimArgs) -> int:
         async with api.begin() as conn, api.begin() as detail_conn:
             t = conn.t.placex
 
         async with api.begin() as conn, api.begin() as detail_conn:
             t = conn.t.placex
 
-            sql = sa.select(t.c.place_id, t.c.osm_type, t.c.osm_id, t.c.name,
+            sql = sa.select(t.c.place_id, t.c.parent_place_id,
+                        t.c.osm_type, t.c.osm_id, t.c.name,
                         t.c.class_, t.c.type, t.c.admin_level,
                         t.c.address, t.c.extratags,
                         t.c.housenumber, t.c.postcode, t.c.country_code,
                         t.c.class_, t.c.type, t.c.admin_level,
                         t.c.address, t.c.extratags,
                         t.c.housenumber, t.c.postcode, t.c.country_code,
@@ -153,17 +154,15 @@ async def dump_results(conn: napi.SearchConnection,
                        results: List[ReverseResult],
                        writer: 'csv.DictWriter[str]',
                        lang: Optional[str]) -> None:
                        results: List[ReverseResult],
                        writer: 'csv.DictWriter[str]',
                        lang: Optional[str]) -> None:
+    locale = napi.Locales([lang] if lang else None)
     await add_result_details(conn, results,
     await add_result_details(conn, results,
-                             LookupDetails(address_details=True))
-
+                             LookupDetails(address_details=True, locales=locale))
 
 
-    locale = napi.Locales([lang] if lang else None)
 
     for result in results:
         data = {'placeid': result.place_id,
                 'postcode': result.postcode}
 
 
     for result in results:
         data = {'placeid': result.place_id,
                 'postcode': result.postcode}
 
-        result.localize(locale)
         for line in (result.address_rows or []):
             if line.isaddress and line.local_name:
                 if line.category[1] == 'postcode':
         for line in (result.address_rows or []):
             if line.isaddress and line.local_name:
                 if line.category[1] == 'postcode':