Re: Zip Codes, Long/Lat and LAMP?
On 2/26/06, Scott Webster Wood <[EMAIL PROTECTED]> wrote: > OK, I think I asked something along these lines before, but I am actually > starting to code so I wanted to revise the question(s) a bit. I am looking > for > a good way to keep an up-to-date database (or perhaps use an XML-RPC/SOAP > based > service) to translate back-and-forth between information such as > city/state/county, zip-code, and longitude/latitude. [...] I am going to strongly recommend that you NOT do this yourself. Instead enter into a business relationship with someone who already does this, like mapquest, google, etc. They should not only maintain the up to date data, but they have web APIs, and should have examples of calling them in a variety of languages. Cheers, Ben
Zip Codes, Long/Lat and LAMP?
OK, I think I asked something along these lines before, but I am actually starting to code so I wanted to revise the question(s) a bit. I am looking for a good way to keep an up-to-date database (or perhaps use an XML-RPC/SOAP based service) to translate back-and-forth between information such as city/state/county, zip-code, and longitude/latitude. I am currently writing most of my administrative tools in PHP but will likely build most of my content delivery items in PERL. I am going to be dealing with geocaching on the initial project and thus the locations might be specified by the name of a nearby city, a zipcode, possibly even crossroads (I'll have to work that one out later) or more often by use of GPS or similar Longitude and Latitude coordinates. My desire is to be as thorough as possible with what is actually stored and 'fill in the blanks' for the user only requiring them to fill in an 'either/or' type scenario. (use of an address OR long/lat coordinates) Thus I am looking for some way to translate one to the other and back again. (address/zip/city to long/lat, or long/lat to zip/city/county/state/etc.) Ultimately I want to include at least canada and possibly international locations (although I will likely use different tools for handling those). I've started looking at some of the services available at USPS and zip-codes.com. I'll start looking at map-services next as I would also like to be able to generate maps for people as well as possibly have them select locations on a map rather than enter the specific data. (ugh - I have a feeling that might be a nightmare) Finally, I'm sure if I can get something to work for the above mentioned translations (so I can store at least an approximate long/lat for all locations) then I can find the math myself to calculate distances, but I would be curious to know if any packages for such already exist. I did a quick search of perl but only found one CPAN tool that appeared to do Long/Lat calculations and it's not one included in the standard CPAN supported downloads. All help is appreciated. SW __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com