X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/1ceb4ab9ba10d97333414bf66ae2c9d553668903..621a144cfc7d48fd267d54509ca76419e99cc7b5:/app/models/changeset.rb

diff --git a/app/models/changeset.rb b/app/models/changeset.rb
index a1162b323..5c961a064 100644
--- a/app/models/changeset.rb
+++ b/app/models/changeset.rb
@@ -89,6 +89,16 @@ class Changeset < ActiveRecord::Base
   def has_valid_bbox?
     not bbox.include? nil
   end
+  
+  ##
+  # returns area of the changset bbox as a rough comparitive quantity for use of changset displays
+  def area
+     if has_valid_bbox?
+	     (max_lon - min_lon) * (max_lat - min_lat)
+     else
+	     0
+     end
+  end
 
   ##
   # expand the bounding box to include the given bounding box. also,