Enforce changeset size limit for API calls which make changes

This commit is contained in:
Tom Hughes 2024-06-18 20:45:00 +01:00
parent f61ac2586f
commit c38e3d6144
3 changed files with 27 additions and 0 deletions

View file

@ -88,6 +88,14 @@ class BoundingBox
end
end
def linear_size
if complete?
(max_lon - min_lon) + (max_lat - min_lat)
else
0
end
end
def complete?
to_a.exclude?(nil)
end