
Geo::Coder::YahooJapan - a simple wrapper for Yahoo Japan Geocoder API

use Geo::Coder::YahooJapan;
my $r = lookup("ç¥å¥å·çå·å´å¸ä¸ååºäºç°2-21-6");
my ($lat, $lng) = ( $r->{latitude}, $r->{longitude} ); # coordinate in TOKYO.
use Location::GeoTool;
my $tokyo = Location::GeoTool->create_coord($lat, $lng, 'tokyo', 'degree');
my $wgs = $tokyo->datum_wgs84;
my $wgs->format_degree;
# coordinate in WGS87.
($lat, $lng) = ($wgs->lat, #wgs->long);

Geo::Coder::YahooJapan is a wrapper for Yahoo Japan Geocoder API that is used by the official Yahoo Japan's local search widget http://widgets.yahoo.co.jp/gallery/detail.html?wid=10 . The API returns coordinates in TOKYO datum. if you need the coordinates in WGS84, you need to convert them with Location::GeoTool etc.
lookup is an only method in this package that returns coordinate information in an hash reference. Maybe you can specify the address in any character set you like. The API server accepts UTF8, SHIFT_JIS, EUC_JP.

using LWP::Simple to make a request to the API server.

Location::GeoTool can convert coordination systems.

KUMAGAI Kentaro <lt>ku0522a+cpan@gmail.com>