From e6ba7db9ef8f4f02415b6bcc90f0e8acc7c6ba04 Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Wed, 12 Oct 2011 17:07:08 +0200 Subject: Generate distribution maps for keys on way, too Until now distribution maps were only generated for keys on nodes. No there are maps for keys on ways, too. (Not for relations, though). This commit also adds command line options for tagstats to define the area you want the map for. Its no longer necessary to recompile tagstats if you want to change this. This commit does not change the UI/API yet, so you still only get the node map. --- examples/get_distribution_image.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'examples') diff --git a/examples/get_distribution_image.rb b/examples/get_distribution_image.rb index 96500a4..b840a1a 100755 --- a/examples/get_distribution_image.rb +++ b/examples/get_distribution_image.rb @@ -1,17 +1,18 @@ #!/usr/bin/ruby # -# get_distribution_image DB KEY +# get_distribution_image DB KEY nodes|ways # require 'rubygems' require 'sqlite3' filename = ARGV[0] -key = ARGV[1] +key = ARGV[1] +type = ARGV[2] db = SQLite3::Database.new(filename) -db.execute("SELECT png FROM key_distributions WHERE key=?", key) do |row| - puts row[0] +db.execute("SELECT #{type} FROM key_distributions WHERE key=?", key) do |row| + $stdout.write row[0] end -- cgit v1.2.3