GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Multi-Word Names  XML
Forum Index -> Administrative Divisions
Author Message
FredZone



Joined: 25/05/2007 19:41:15
Messages: 4
Location: Boulder, CO USA
Offline

I am working on an application where I often have the name of a US county (ADM2), but need to confirm that it is spelled correctly and also retrieve its adminCode2 in order to get a list of its population centers (PPL). The following request works great:

http://ws.geonames.org/search?q=Kerr&adminCode1=CA&country=US&featureClass=A&featureCode=ADM2&style=full&fuzzy=0.3

It returns the correct county name (Kern) and adminCode2 (029).

However, the following request fails completely:

http://ws.geonames.org/search?q=Santa+Barbara&adminCode1=CA&country=US&featureClass=A&featureCode=ADM2&style=full&fuzzy=0.3

Why? I have noticed that this request format reliably fails with any US county that has a multi-word name. I'm using a kludge now that forms the request with only the last word in the county name which is hopefully unique within a state (although I haven't checked them all). For example:

http://ws.geonames.org/search?q=Obispo&adminCode1=CA&country=US&featureClass=A&featureCode=ADM2&style=full&fuzzy=0.3

This returns the correct county name (San Luis Obispo) and adminCode2 (079). I'd rather not take such chances, but it's OK for now. How could I do this differently? Thanks.
[WWW]
FredZone



Joined: 25/05/2007 19:41:15
Messages: 4
Location: Boulder, CO USA
Offline

Whoops -- same problem with populated places! The following request works fine (returning the best match first):

http://ws.geonames.org/search?q=Lufton&adminCode1=CO&country=US&featureClass=P&featureCode=PPL&style=full&fuzzy=0.3

This request (using the correct city name) fails:

http://ws.geonames.org/search?q=Fort+Lupton&adminCode1=CO&country=US&featureClass=P&featureCode=PPL&style=full&fuzzy=0.3

There must be something wrong here somewhere... Any ideas?

[WWW]
marc



Joined: 08/12/2005 07:39:47
Messages: 3993
Offline

Hi Fred

Only the parts of composite names were previously indexed in the search index. As of now the parts as well as the full composite names are indexed and fuzzy search on composite names are now supported.

Regards

Marc

[WWW]
 
Forum Index -> Administrative Divisions
Go to:   
Powered by JForum 2.1.5 © JForum Team