Whereami is a project mainly written in Ruby, it's free.
Command line utility that reports your machine's latitude and longitude.
Command line utility that reports your machine's latitude and longitude. Requires MacRuby.
$ bin/whereami
40.0000 -82.0000