GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
search city region - return state  XML
Forum Index -> Administrative Divisions
Author Message
fabian71



Joined: 23/12/2007 15:42:39
Messages: 1
Offline

Hi,

I would like to make a consultation, thus;

search for Clearfield city

the correct result would be;

Clearfield UT
Clearfield IA
Clearfield KY


But my search return 232 result

http://ws.geonames.org/search?q=Clearfield&country=US&&style=full&fclass=P
marc



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

The search parameter 'q' is searching on all data fields for a location. The result is you find all populated places in the county of 'Clearfield'.

If you only want to get locations with the name of 'Clearfield', then you should use the "name" or the "name_equals" parameters. See the GeoNames Search Documentation for details.


The search with the 'name' parameter will return 14 results including 'Clearfield Villa' :
http://ws.geonames.org/search?name=Clearfield&country=US&&style=full&fclass=P


whereas the 'name_equals' paramter will only return in 9 results :
http://ws.geonames.org/search?name_equals=Clearfield&country=US&&style=full&fclass=P

Marc

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