Skip to content

Commit

Permalink
Merge pull request #3633 from lonvia/restrict-long-ways
Browse files Browse the repository at this point in the history
Ignore overly long ways during import
  • Loading branch information
lonvia authored Jan 10, 2025
2 parents f8337be + 0cf636a commit 8b1cabe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib-lua/themes/nominatim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8b1cabe

Please sign in to comment.