views:

116

answers:

4

I have a dataset of thousands of full addresses of business (specifically in the netherlands, but I guess the question can apply everywhere).

I want to find the lat/lng so I can do distance calculation, but because of the size of the dataset I'm worried it's not a wise idea to do this using for example google maps.

Is there a webservice I could query to find all this info?

+2  A: 

The Google Geocoder web service is available for this:

http://code.google.com/apis/maps/documentation/geocoding/index.html

It's free (unless you abuse it, or volumes get too big), and returns JSON or XML.

skaffman
Problem is this:Note: the geocoding service may only be used in conjunction with displaying results on a Google map; geocoding results without displaying them on a map is prohibited. For complete details on allowed usage, consult the Maps API Terms of Service License Restrictions.
Evert
@Evert: you could always display them in an admin interface somewhere, just to oblige.. :)
chelmertz
+1  A: 

I've been using Google but it misses many (Scandinavian) addresses which are caught by Yahoo. See http://developer.yahoo.com/maps/rest/V1/geocode.html and at least compare the two for your needs. If I were you I would have every miss returned by Google to be geocoded by Yahoo as fallback (or the other way around.)

chelmertz
A: 

Accurate postcode information is owned by someone in most jurisdictions and they charge for supplying the lat/lng information. In the UK it is the Post Office, I don't know about the Netherlands, but this looks quite promising. Even Google's geocoder is not that accurate outside the US.

One thing I should mention is that the lat/lng will not be sufficient for you to calculate distances (unless you are going everywhere by crow). One of the real advantages of Google's service is that GDirections uses knowledge of the road system and estimates journey time. If you are solving some sort of travelling salesman problem, lat/lng alone is not going to give you a very good estimate of actual distance, especially in cities.

HTH

Simon
A: 

Not sure of the quality/accuracy of the geocode but this could be an option, http://www.opengeocoding.org/geocoding/geocod.html

Jonathan