]> git.openstreetmap.org Git - nominatim.git/blobdiff - settings/flex-base.lua
ignore very long ways
[nominatim.git] / 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