It’s so freaking cold in New York right now

And my distance optimizer program is on a fritz after I added an “optimization”.  So I needed to seek an expert opinion in Brooklyn for a few days.

Quote from my expert:

Woof woof woof.  Here’s your problem.

Problem 1. Google geocoding API, which you use to validate the user supplied location, sometimes doesn’t recognize establishment names.  And returns no result.  But does return coordinates if an address is submitted.

Fix for #1. I see you have code to ask the Internet to look up an best guess possible address based what the location the user supplied, which the geocoding api does successfully find.

But problem 2. The street address that google’s geocoding API accepts, google’s distance API doesn’t recognize.

So you need to fix that dissonnance between the 2 API’s.  Best way is to find which of the known location descriptions for what is really the same place, that the distance api will accept.

But at least one location will fail geocoding, even with your Internet address lookup.  Dodger stadium had it’s street recently renamed from Elysium Fields to Vince Scully.  Google’s geocoding API recognizes Elysium Fields, but not Vince Scully.  Your Internet address lookup doesn’t produce enough other viable alternatives to fix this.

You may have to make manual adjustments until you create an algorithm to recognize an address format, and associate it with variations to an location name.

Problem 3. Some locations seem unreachable by distance API, to other locations.  Cumberland National Seashore for instance.  Try expanding the search area just for this session.

I’d like to help you with some code, but I got some carpal tunnel, in these paws lately.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s