Skip to content

Instantly share code, notes, and snippets.

@damon
Created March 9, 2009 02:50
Show Gist options
  • Save damon/76071 to your computer and use it in GitHub Desktop.
Save damon/76071 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'rubygems'
require 'json'
raise "you fail at this" if !ARGV[0]
data=""
File.open(ARGV[0]).each_line do |line|
data << line
end
result = JSON.parse(data)
result.each do |h|
puts "#{h["place_name"]}"
coordinates = h["Placemark"][0]["Point"]["coordinates"]
address = h["Placemark"][0]["address"]
puts "#{address}"
puts "#{coordinates[0]}"
puts "#{coordinates[1]}"
puts "unknown"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment