Having been working on the buddy finder thingy to work with Google Maps, the first thing I needed to do was get some sort of Geocoder system together whereby someone could enter in their location and get back reference data that I or they could plug in to Google Maps.
To accomplish this, I downloaded a full set of place names and co-ordinates from the fantastically named National Geospatial-Intelligence Agency. The zipped data set is about 190MB, unzipped the text file comes to about 760MB, 5.6 million place names in total. The MySQL database I loaded the data into moaned a bit, but with some indexing the queries are running quite fast (the table size is 1GB).
This data covers everywhere except the United States and Antartica. Now I know a lot of you are just dying to find the co-ordinates of your favourite places in Antartica, but you will just have to hang on for now. I will try and work in US data when I get a chance, but there are plenty sites that do this already anyway.
If you want to give my free geocoder a try, click here.
You can see the form results are automatically updated using AJAX which seems to work well enough though I need to work in some better error handling and multiple match handling routines. I considered using an onChange action in the country selector to populate a drop down of place names, but the database and traffic overheads were too high. You will have to spell correctly!
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.