I\'m using Google Maps V3 api. I am submitting an address search to return the proper geocoded result including the address, name of establishment, and lat/lngs.
My prob
Why not have your DB mirror only the following keys?
street_number -> address street number
route -> the street name
locality -> the city/town
administrative_area_level_3 -> the city/town
administrative_area_level_1 -> the state
postal_code -> zip/postal code
Where a locality
exists, use that in your request (as it appears to deliver the more detailed info - http://code.google.com/apis/maps/documentation/geocoding/#JSON )
Where no street name
or locality
exists, request administrative_area_level_3
and administrative_area_level_1
This would provide you with a full human-readable postal address when the info exists or just the city/state for a sublocality (e.g. beach), as you mentioned in one of the comments.
**I'm assuming you only care about the US.
Addresses are very much a 'human' thing. I think the reason Google's data is so messy is because their source data is messy, but likely similar for one area.
Which parts of the address are relevant to you? If you're just feeding this to a human just give him whatever you have?