]> git.openstreetmap.org Git - nominatim.git/commitdiff
ignore very long ways
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 16 Jun 2024 18:08:21 +0000 (20:08 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 16 Jun 2024 18:08:21 +0000 (20:08 +0200)
settings/flex-base.lua

index 4d960d7267a3cc502c57938a2ebb12057ca95b31..7860737f7e6ef267a9bc8e27094ac1267f64e057 100644 (file)
@@ -227,7 +227,7 @@ function Place:write_row(k, v, save_extra_mains)
     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
 
@@ -408,6 +408,9 @@ function module.process_way(object)
 
         if geom:is_null() then
             geom = o:as_linestring()
+            if not geom:is_null() and geom:length() > 30 then
+              return nil
+            end
         end
 
         return geom