From: Tom Hughes Date: Wed, 1 Aug 2007 14:42:58 +0000 (+0000) Subject: Only count visible objects. X-Git-Tag: live~8846 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/dc09bde7f7b28b275b83349ac2a19c59feff2145?ds=inline Only count visible objects. --- diff --git a/script/statistics b/script/statistics index cd0069f63..13a26592a 100755 --- a/script/statistics +++ b/script/statistics @@ -17,9 +17,9 @@ puts "

OpenStreetMap stats report run at #{start_time.to_s}

" begin user_count = User.count(:conditions => "active = true") tracepoint_count = Tracepoint.count() - node_count = Node.count() # :conditions => "visible = true") - segment_count = Segment.count() # :conditions => "visible = true") - way_count = Way.count() # :conditions => "visible = true") + node_count = Node.count(:conditions => "visible = true") + segment_count = Segment.count(:conditions => "visible = true") + way_count = Way.count(:conditions => "visible = true") tagged_way_count = Way.count(:conditions => "current_ways.visible = true AND current_way_tags.k <> 'created_by'", :joins => "INNER JOIN current_way_tags ON current_way_tags.id = current_ways.id")