Using GeoNames web services for JSON list of locations

I found a nice web service that provides a JSON array of places based on a latitude and longitude. It is provided by GeoNames and has been very useful supplying locations for my Ruby on Rails app.

Place this URL in your browser or click the link:

Here is a sample JSON output for one location:

{ “geonames” : [ { “countrycode” : “US”,
        “fcl” : “P”,
        “fclName” : “city, village,…”,
        “fcode” : “PPL”,
        “fcodeName” : “populated place”,
        “geonameId” : 4751839,
        “lat” : 38.840390900000003,
        “lng” : -77.428876900000006,
        “name” : “Centreville”,
        “population” : 71135,
        “toponymName” : “Centreville”,
        “wikipedia” : “”
      } ] }

I also found a nice Rub Gem called geonames that provides a nice, easy to use module with classes.

Look here for more information on the GeoNames web service:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.