Address Validation Tool using Google Maps API
This package contains python scripts that allow performing address validation process (using the Google Maps Geocoding service). Address validation is a process of checking a mailing address against an authoritative database to see if the address is valid. In the proposed method, a single address that is sent for validation passes through a process called geocoding, after which the input components are compared against the geocoding result.
Geocoding is a method used to assign geographic coordinates to an individual based on their address. The process converts a human-readable address (e.g. "1600 Amphitheatre Parkway, Mountain View, CA, US") into geographic coordinates (e.g. latitude 37.423021 and longitude -122.083739).
The proposed method uses the Google Maps Geocoding API to perform the geocoding. In case the requested address was successfully parsed and at least one address is found, the service returns a geocode result with applicable address components (e.g. street name, city, postal code, ext.).
The proposed method takes the user input and performing a geocoding by calling the Google Maps Geocoding service. In the case at least one address is returned, it iterates over the result and extracts the returned street name, city, zip code, state, and country. Then, it compares each address component with the user's input and displays the matching result.
The user enters a single address for validation:
Street Address:
City:
State/Province:
Zip Code:
Country:In case a valid address is found, the output will look like this:
Found a valid address.
Matched street = True, Matched city = True, Matched zip code = True, Matched state = True, Matched country = True, (lat, lng) = (x, y)In case not valid address is found, the output will look like this:
Unknown address