mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
Merge pull request #3633 from lonvia/restrict-long-ways
Ignore overly long ways during import
This commit is contained in:
@@ -425,7 +425,7 @@ function Place:write_row(k, v)
|
|||||||
if self.geometry == nil then
|
if self.geometry == nil then
|
||||||
self.geometry = self.geom_func(self.object)
|
self.geometry = self.geom_func(self.object)
|
||||||
end
|
end
|
||||||
if self.geometry:is_null() then
|
if self.geometry == nil or self.geometry:is_null() then
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -608,6 +608,9 @@ function module.process_way(object)
|
|||||||
|
|
||||||
if geom:is_null() then
|
if geom:is_null() then
|
||||||
geom = o:as_linestring()
|
geom = o:as_linestring()
|
||||||
|
if geom:is_null() or geom:length() > 30 then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return geom
|
return geom
|
||||||
|
|||||||
Reference in New Issue
Block a user