Tools for estimating nearby locations without calling external API (i.e Google Maps)

In my rails application i have some model Location that holds the address and corresponding latitude and longitude.
At the main page, user can search for a location from which he wants to find the nearest places in location table.

I use JavaScript Google API for geocoding on the client side. Since the
limit per user is 25000 req/day i guess i do not need to worry about it
cause no one will want to search for a location so many times. I use
Ajax for sending geocoded latitude and longitude from client to the
server.

Now i’m on the sever side and have a reference point and table of
locations. But at this moment, i guess i cannot use geocoder gem which
use Google API for estimating some nearby locations, cause from the
server side there is a limit of 2500 requests per day and i expect to
exceed it(don’t want to pay either).

What tool can i use to easily return some nearby locations without
calling external API? I know that there are other API’s but all of them
have either limitations or obligations and since it’s more like
mathematical calculation i can’t see the reason to play around with API
at this point.