# Re: Address search algorithms

**URL:** <https://www.ruby-forum.com/t/re-address-search-algorithms/139103>\
**Category:** Ruby\
**Created:** [May 30, 2008, 7:32pm UTC](https://www.ruby-forum.com/t/re-address-search-algorithms/139103 "2008-05-30T19:32:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![skade](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9a140/32.png) [@skade](https://www.ruby-forum.com/u/skade)\
**Post date:** [May 30, 2008, 7:32pm UTC](https://www.ruby-forum.com/t/re-address-search-algorithms/139103/1 "2008-05-30T19:32:03Z")

</div>

Actually, i had such a problem. You problem is  
the adress normalization. We solved it by using an external resource:  
google maps - they are really good at that.

When someone enters an address, you do a call to google maps to  
retrieve the coodinates of an address and save the together with the  
adress.

When someone enters a search string, you call google again to retrieve  
the  
coordinates and then you search you database for addresses with  
coordinates  
that are within a certain radius.

If you know what your doing and you use a good geocoding-lib, thats  
about 20-30 lines of code for both operations.

Regards,  
Florian G.
