GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
A "Holy Grail" Geonames-Search Query?  XML
Forum Index -> General
Author Message
nebnitt



Joined: 18/04/2014 17:41:50
Messages: 2
Offline

Hello,

I'm developing a simple web application that will allow users to type in place names and have a list of geonames results returned. I've been playing around with including and excluding various parameters in the API call to try to get the best results possible for all place names entered into the application. The conundrum I have encountered is that it seems that there is not one single API call (using searchJSON) that appears to consistently return good results. Certain parameters work great for certain place names and don't work at all for others.

For example, a basic call for D.C. works:
http://ws.geonames.net/searchJSON?q=D.C.&maxRows=10
But if I add any sort of fuzzy criteria (which improves other results), no results are returned:
http://ws.geonames.net/searchJSON?q=D.C.&fuzzy=0.1&maxRows=10

On the other hand, this basic query fails to grab the State of California in the top 10 results:
http://ws.geonames.net/searchJSON?q=California&maxRows=10
But adding the fuzzy parameter gets me what I'm after, which is California State:
http://ws.geonames.net/searchJSON?q=California&fuzzy=0.1&maxRows=10

I guess my question is twofold.

First, I'm wondering if anyone has come up with a particularly effective API call using the geonames-search API (documentation here: http://www.geonames.org/export/geonames-search.html) that seems like it generally returns correct or expected results in the top handful of answers. A "holy grail" API call, so to speak.

Second, if such a query is difficult or impossible to construct due to the inherent nature of place names and the fuzziness that comes with them, I'm wondering if anyone has developed any other workarounds or nifty ways to help improve the API call on-the-fly, so to speak. For example, if I somehow knew California was in the United States beforehand, I could construct a more appropriate API call using that information, such as by giving it a country parameter.

Finally, I will note that although my examples both refer to places in the United States, I'm looking for a solution that will work for place names across the globe. And I will also note that I understand this may be a difficult question, so any help or assistance is greatly appreciated!

Thanks!

 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team