Geo::Coder::US is a Perl module with geocode (estimate latitude and longitude) for any US address.
SYNOPSIS
use Geo::Coder::US;
Geo::Coder::US->set_db( "geocoder.db" );
my @matches = Geo::Coder::US->geocode(
"1600 Pennsylvania Ave., Washington, DC" );
my @matches = Geo::Coder::US->geocode(
"42nd & Broadway New York NY" )
my ($ora) = Geo::Coder::US->geocode(
"1005 Gravenstein Hwy N, 95472" );
print "O'Reilly is located at $ora->{lat} degrees north, "
"$ora->{long} degrees east.
";
Geo::Coder::US provides a complete facility for geocoding US addresses, that is, estimating the latitude and longitude of any street address or intersection in the United States, using the TIGER/Line data set from the US Census Bureau. Geo::Coder::US uses Geo::TigerLine to parse this data, and DB_File to store a highly compressed distillation of it, and Geo::StreetAddress::US to parse addresses into normalized components suitable for looking up in its database.
You can find a live demo of this code at http://geocoder.us/. The demo.cgi script is included in eg/ directory distributed with this module, along with a whole bunch of other goodies. See Geo::Coder::US::Import for how to build your own Geo::Coder::US database.
Consider using a web service to access this geocoder over the Internet, rather than going to all the trouble of building a database yourself. See eg/soap-client.pl, eg/xmlrpc-client.pl, and eg/rest-client.pl for different examples of working clients for the rpc.geocoder.us geocoder web service.
Product's homepage
Requirements:
· Perl