Google maps lets you obtain a valid address by clicking on houses or buildings one by one, but it would be much easier if you could draw a polygon on the map and get a list of all valid addresses within it.
Here's some pseudo code:
- Draw a rectangular polygon on google maps.
- Generate a fine grid of lat/lon coordinates/points inside of the polygon (or retrieve if a function/algorithm exists).
- Reverse geocode all the points inside the polygon that were generated to obtain addresses for each and store the data (could be a db, array, xml, text file etc...).
- Read the data and filter duplicate addresses and anything that's not a valid address.
- Store the filtered results.