This week we’ll put together what we’ve covered so far in this series by implementing a simple but usable service: looking up the Zip Code Tabulation Area (ZCTA) for a location. This is an actual task I had to do for my job at Pirq, and while I will pare it down for this article, we’ll go through some of the actual trade-offs and optimization decisions I made in our implementation.
In this article, we will cover:
- The goals for the service, and what is a ZCTA anyway
- Obtaining ZCTA data from the U.S. Census
- Developing our own ZCTA database
- Querying the database
- Improving performance using polygon segmentation
This is part 8 of my continuing series of articles on geospatial programming in Ruby and Rails. For a list of the other installments, please visit http://www.daniel-azuma.com/blog/archives/category/tech/georails.