]> git.openstreetmap.org Git - rails.git/blobdiff - lib/bounding_box.rb
Merge pull request #4906 from matkoniecz/sotmeu-banner
[rails.git] / lib / bounding_box.rb
index 0cc4c5fd432e3ceae3d388aa5687d927e8773d33..462f45a9f1ca329ecd7c0096557876e9f06ea724 100644 (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