tags:

views:

112

answers:

2

Hello, I'm using Maxmind's free DAT file to calculate latitude and longitudes from IP addresses - that much works fine and was very straightforward to implement.

However, I've run into an issue where I would like the user to enter their zipcode and automatically calculate the latitude and longitude for that zipcode.

Does anyone have any experience doing this with Maxmind's database? If so, how did you achieve it.

Thanks in advance

JP

A: 

If you are doing this only in the US, you can build this information from Census or Postal data. I do not have experience with MaxMind.

TheSteve0
Yeah, thanks. I've seen other solutions but was hoping I could take an all-in-one approach. The last thing I want is to have multiple datastores for geospatial data and, since MaxMind is about the easiest (free) approach to geospatial lookups based on IP I was hoping it would have this capability.
JP
+3  A: 

I use MaxMind's GeoLite City database, in CSV format. The DAT format is great for IP geolocation, but the CSV can be imported into any relational database for quick zip code lookups. It contains most of the US zip codes, Canada and many other countries' postal codes mapped to their corresponding city and latitude/longitude.

If you need additional precision, buy their commercial database.

Mauricio Scheffer
Thanks for the feedback, after exhausting all other possibilities i'm going to load only the location csv into my database and pull zipcode ips from there!
JP