X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/b207cf78a3e2263c59ae2b43837c2fbe5990d3a7..a05692a3f6f0be293ff73aec04b32fcaf76f97ce:/lib/bounding_box.rb?ds=sidebyside diff --git a/lib/bounding_box.rb b/lib/bounding_box.rb index 0cc4c5fd4..462f45a9f 100644 --- a/lib/bounding_box.rb +++ b/lib/bounding_box.rb @@ -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