]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/tools/database_import.py
Use place instead of placex to compute postcodes
[nominatim.git] / nominatim / tools / database_import.py
index 664d3c6b39ed2fafb57e45960c052ccd76401505..28a10ebeb742f907f4b4efc1c3b2abe9925d40fa 100644 (file)
@@ -199,7 +199,7 @@ def load_data(dsn, threads):
         conn.perform("""INSERT INTO placex ({0})
                          SELECT {0} FROM place
                          WHERE osm_id % {1} = {2}
         conn.perform("""INSERT INTO placex ({0})
                          SELECT {0} FROM place
                          WHERE osm_id % {1} = {2}
-                           AND NOT (class='place' and type='houses')
+                           AND NOT (class='place' and (type='houses' or type='postcode'))
                            AND ST_IsValid(geometry)
                      """.format(_COPY_COLUMNS, place_threads, imod))
         sel.register(conn, selectors.EVENT_READ, conn)
                            AND ST_IsValid(geometry)
                      """.format(_COPY_COLUMNS, place_threads, imod))
         sel.register(conn, selectors.EVENT_READ, conn)