I just created a new project for geo-coding addresses: http://github.com/jgsmith/ruby-fabulator-geo.
Combined with the ability to walk through the TEI documents housed on a Radiant site and execute XPath queries against them, we can extract address information and get the latitude and longitude from Yahoo! Maps (only works for US and Canadian addresses — a limitation in the Yahoo! Maps API).
If we encode an address using:
1
2
|
let $a := geo:coding("some address")
|
then we can access the information as child nodes of $a:
1
2
3
4
5
6
7
8
9
|
$a/latitude (: the latitude :)
$a/longitude
$a/precision (: the scope of the location: address, city, state, country :)
$a/street
$a/city
$a/postal
$a/territory
$a/country
|
The string equivalent of $a will be the original address.