CodeIgniter Forums
geocoding - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: geocoding (/showthread.php?tid=53483)



geocoding - El Forum - 07-26-2012

[eluser]ozy123[/eluser]
This has probably been asked before but for some reason I can't figure out the best way to do this.

I'm trying to build a search function where a user can enter an address/postcode and search for any 'stores' that are x miles from the postcode.

The stores addresses have already been geocoded and stored in the datbase. However the postcode the user enters is unknown - do I geocode by making a http request to google api each time? I am going to have 5000+ users and they will carry out anywhere between 5 - 100 searches a day.

The site is UK based initially but eventually opening up to the US. Should I try and get a database of all postcodes/addresses along with coords in the UK and simply do a sql lookup?




geocoding - El Forum - 07-26-2012

[eluser]NotDior[/eluser]
Reading through this post might help shed some light. http://ellislab.com/forums/viewthread/221327/

There is one link in there that goes into how to do searching stuff with GeoCodes and such (thru mysql).

If you actually have the number of users you say you'll have you'll quickly run into Google's Geocoding limit (2,500 requests a day I believe), so I'm thinking a database of postal codes/address's and lat/long is going to get you a lot further.

CD