tags:

views:

76

answers:

3

Hi,

I do not think there is something like this but I give it a go anyway.

Let us say I have a square defined by two points (latitude, longitude combination). Is there a (free) API (gazetteer?) which returns the country/countries in which the square is located and possibly place names, cities, admin area names within the square?

Another useful API would be one which returns the same information as above given a point (latitude, longitude) and a (predefined) radius.

I would prefer the first solution though.

Thanks.

Christian

A: 

Not sure if this would do exactly what you want, but I came across this the other day: SimpleGeo

In their FAQ it says:

SimpleGeo, in its most basic form, indexes data by location using latitude and longitude so that you can easily search for things that are nearby.

They provide a free API for up to 1m calls per month.

Ira Rainey
It would be nicer if you didn't have to register just to see more than the names of what SimpleGeo offers.
Gilbert Le Blanc
Totally agree. Looks interesting though.
Ira Rainey
+2  A: 

I don't think they will meet all your requirements, but GeoNames Web Services are worth a look:

Check the terms for information regarding licence and daily usage.

And of course, you can always have a look at the Google Maps Reverse Geocoder, but I don't think it supports a bounding box or radius parameter:

http://maps.google.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=false

amercader
All this looks very good. Thanks. I guess I can 'just' sample values from [-90 ... 90] and [-180 ...180] in steps of 1 and feed it into, for example, google as suggested. I do not need this in real time but would like to built a little database which associates strings (countries, cities, areas) with areas/points (in terms of lat/long).
csetzkorn
I don't know if I understood what are you after, but you may want to download the GeoNames database and perform this association off-line or, depending on your data volume, you will reach the daily requests limit.
amercader
This is really cool! Thanks!
Ranieri
csetzkorn
A: 

Although not complete for all areas, there is the Openstreetmap (and if it's no complete, you can always add to it!).

Sam