How Does That Work #1

How Does That Work #1

How does searching for a photographer by Zip Code work?
The USPS introduced Zip Codes in 1963 as a way to expedite mail delivery. Every address was coded with a five-digit code, where the numbers themselves had geographic logic. If you’ve ever looked at overlays of Zip Codes, you’ll realize that they don’t correspond too any recognizable shape (with maybe the exception of Manhattan’s rectangular grid). They are amorphously shaped based on parameters like demographics, country lines, etc.

This poses a slight challenge. When you search for photographers within 10 miles of 68046 (Omaha), what are you really doing? The USPS provides longitude and latitude coordinates for each Zip Code, which represents the center point of the Zip. Obviously, depending on the shape of the area which the Zip Code represents, the center point might be a bit ambiguous.

So when you try to find that photographer within a certain radius, we determine a “bounding box” of half the search distance in the upper left, and half the distance in the lower right. Still with me?

When you execute a search for a photographer within 10 miles of 68046 and include photographers willing to travel, we are plotting the union of two bounding boxes. The first is the bounding box that you define with the Zip Code. The second is the bounding box of all photographers and their travel radiuses. When we overlap these two boxes, the union represents the set of matching results, which we feed back to you.

Another problem is that we’re dealing with non-Euclidean geometry. When we map things on a globe we get different results than if we plotted points on a flat piece of paper (i.e. parallel lines intersect). Why? Because longitudes are a function of cosine, and not absolute distances.

If you’re experiencing bad flashbacks from high school geometry, it’s ok. This description is merely illustrative of the fact that things that we take for granted as end users can often involve quite a bit of engineering.

Of course, none of this will work if photographers don’t enter their zip code in the first place.

So why no international support for postal code based searching? Because many countries don’t have structured data for their postal codes, or they don’t have that data available for licensing.

Next Post:
Previous Post:
This article was written by

Allen Murabayashi is the co-founder of PhotoShelter.

Leave a Reply

Your email address will not be published. Required fields are marked *