Our editor, Jason Gilmore, has written two excellent articles (1 and 2) about using perl’s Geo::Coder::US module to build a home-grown geocoder. It uses the TIGER/Line data and the code behind the Geocoder.us service to build something very quickly and robustly.
These articles inspired Chapter 11 of our new book, so they get a BIG thank you here. We didn’t cover this perl module in the book because we wanted to keep it 100% PHP-based. We decided that since there was no equivalent to Geo::Coder::US in the PECL or PEAR repositories we’d explore building a work-alike from the ground up in PHP. Thus Chapter 11 was born.
However, Chapter 11 is large, involved, very detailed and not for the faint of heart. It is truly on the “professional” end of the spectrum in terms of content. For those of you in a hurry or with basic perl experience might want to consider playing with the Geo::Coder::US stuff first, and Jason’s articles will get you started in a hurry.
Side Note: In the process of digging through the documentation on TIGER/Line to determine how we could go about building a geocoder from scratch we discovered a whole array of amazing data that can be used for mapping, so learning the internals is well worth the effort in Chapter 11. We highlight some of the coolest parts of this in Appendix A.