Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'rubygems'
- require 'ruby-opengeodb'
- # Verbindung zur Datenbank aufbauen
- Location.db_connect(adapter="mysql",
- host="localhost",
- username="root",
- password="xxxx",
- database="opengeodb",
- socket="/var/run/mysqld/mysqld.sock"
- )
- locations = %w(13359 67059 90459 56068 69115)
- # = Berlin, Ludwigshafen, Nuernberg, Koblenz, Heidelberg
- locations.each { |plz|
- location = Location.new(plz)
- puts "PLZ: #{plz} Ort: #{location.ort} Lat: #{location.lat} Lon: #{location.lon}
- "
- }
Add Comment
Please, Sign In to add comment