]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge pull request #3631 from lonvia/avoid-transactions
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 10 Jan 2025 15:44:18 +0000 (16:44 +0100)
committerGitHub <noreply@github.com>
Fri, 10 Jan 2025 15:44:18 +0000 (16:44 +0100)
Creating tables and indexes in autocommit mode

lib-lua/themes/nominatim/init.lua

index dacaaae8ecce047436202b9920cd96ee54da27a0..fef86f919eb8611136d08d5cf6e2c96afc930f31 100644 (file)
@@ -425,7 +425,7 @@ function Place:write_row(k, v)
     if self.geometry == nil then
         self.geometry = self.geom_func(self.object)
     end
-    if self.geometry:is_null() then
+    if self.geometry == nil or self.geometry:is_null() then
         return 0
     end
 
@@ -608,6 +608,9 @@ function module.process_way(object)
 
         if geom:is_null() then
             geom = o:as_linestring()
+            if geom:is_null() or geom:length() > 30 then
+                return nil
+            end
         end
 
         return geom