KUMAGAI Kentaro > Geo-Coder-YahooJapan-0.01 > Geo::Coder::YahooJapan

Download:
Geo-Coder-YahooJapan-0.01.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.01   Source   Latest Release: Geo-Coder-YahooJapan-0.04

NAME ^

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

SYNOPSIS ^

  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);

DESCRIPTION ^

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(address)

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.

DEPENDENCIES ^

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

SEE ALSO ^

Location::GeoTool can convert coordination systems.

AUTHOR ^

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