Why Geocoding Fails
A lookup that fails often looks like one that worked. The pin lands, the list fills, and nothing reports a problem. The address text and the way a service scores a match explain most of these results.
The batch comes back with most pins in the right city and a few on the wrong street. Nothing looks broken. The map is full of pins, the list is full of addresses, and someone has already sent the link to a client.
That is the failure worth worrying about. An empty result is obvious. A wrong pin that looks reasonable survives until a reader tries to visit the place.
A lookup returns a candidate
Turning an address into a coordinate is a matching problem. The search service reads the text you gave it, compares that text against a large index of places, and returns the best candidate it has. Best means the closest match for the string.
Two things follow. The service cannot know that a shop moved last month, and it cannot know that your row meant the other Main Street. It can only match what the row says against what the index contains.
So the question to ask of every failure is simple: what did the service receive, and what did it decide that string meant?
Four ways the query goes wrong
The address is incomplete. A street without a city, a city without a region, a region without a country. Every level you omit widens the search. The service still returns something, usually the most prominent match, which can be a different town with the same street name. USPS Publication 28 defines the parts of a delivery address, including the last line and the street suffix abbreviations it accepts. If your file spans several countries, a country column removes most of this risk.
The row names a business where an address belongs. A venue name in front of a street address is common in exports, and it confuses the parse. A pub called The Bridge can read as a street. Google's geocoding documentation asks callers to leave business names and unit, suite or floor numbers out of the address. Name in one column, address in another.
The place has no street address. Markets, parks, trailheads and buildings inside a campus often have a name and nothing else. Lookups for these land on a gate, a car park, or the centre of a large polygon. That is acceptable for a regional overview and wrong for directions.
The value changed before the lookup. A postal code that lost its leading zero, a column truncated on export, a coordinate with a comma decimal separator, an address split across two rows by a line break. The lookup answers the string it received. If a whole neighbourhood fails at once, suspect the file before suspecting the service.
How to tell a good pin from a plausible one
Zoom in. A pin in the middle of a block, away from any entrance, is usually a street level match with no house number. A pin in the exact centre of a city is usually a city level match wearing the address as a label.
Some services say which kind of match they returned. Google's geocoder reports a location type: ROOFTOP for a precise street address, RANGE_INTERPOLATED when the point is estimated along a road between two known points, GEOMETRIC_CENTER for the middle of a street or a polygon, and APPROXIMATE when the result is loose. The U.S. Census Geocoder works the same way at a different scale: coordinates are interpolated along address ranges, and those ranges include structure numbers that may not exist.
Look at the pattern as well as the individual pin. Ten failures scattered at random are usually ten different problems. Ten failures lined up along one road, or all sitting in one square, point to a single cause: a missing city, a postal code that resolves to a district, a street that exists in several towns.
Check a few rows you know by heart. Your own office, a venue you have visited, the address of the client who commissioned the map. If those are right, you have ruled out a formatting problem across the file, though single rows can still be wrong. If your own office is wrong, stop and fix the query format before looking at anything else.
Open the pin that landed wrong and read the place content against the row. A different postal code, a neighbouring municipality, a street type that does not exist in your region: the text often says what the geometry does not.
Check before you spend
Put ten hard rows in a small file and import that first: the newest address, the rural one, the one with a unit number, the one in another script. Read the results, then decide whether the rest of the file needs a change.
The map focus area is the other lever, because the import range defaults to it. Tighten the area before a local batch and distant rows come back in the problem list, which is easier to read than a map full of pins in the wrong region. Add the city to a street name when the file has it; a bare street name is still a risky query.
When the answer does not exist
Some rows cannot be resolved, and accepting a nearby pin is worse than leaving them out. A building that opened this year may not be in the index. A rural route number may be recorded differently by every service. A venue inside a shopping centre is easier to find by the centre's address than by its own.
Try the complex, the street, or the junction, and put the unit number in the description where a reader will see it. When nothing works, copy the coordinates from a source that knows the location, such as the venue's own contact page, and paste them into the latitude and longitude columns. If every row in the file carries coordinates, set the position source to coordinates and the batch skips the lookup.
Rows that still fail are listed in the problem summary with the reason, and they are left off the map. Keep that list. It records what the map does not contain, and the next person to update the file will need it.
References
- Geocoding request and response, Google Maps Platform. Location types, partial matches, and the advice to leave business names and unit numbers out of an address.
- Census Geocoder Documentation, U.S. Census Bureau. Coordinates are interpolated along address ranges that include structure numbers that may not exist.
- Publication 28 - Postal Addressing Standards, United States Postal Service. The defined parts of a delivery address and the accepted street suffix abbreviations.
Related reading
Even after these checks, some rows will fail. Tasmap lists the ones it could not place.