GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Searching US Cities by name causes confusion due to duplicate entries  XML
Forum Index -> General
Author Message
krnekhelesh



Joined: 11/06/2013 18:52:47
Messages: 3
Offline

The "search city" feature does not differentiate between cities in different states. It is common for a US state to have city/town that shares the name of a city/town in another state. For example, there are at least a dozen states that have a city/town called 'Springfield'. In this situation the list of cities shows multiple identical entries; the user has to guess which one is appropriate

For example searching for "Springfield"
http://api.geonames.org/search?q=Springfield&maxRows=5&username=demo

Expected results:
Search results differentiate between different towns with the same name, e.g. "Springfield, Massachusetts, USA" and "Springfield, Missouri, USA"

Actual results:
Search results contain multiple "Springfield, USA" entries.

How can one distinguish between same city names in different states?
marc



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

use the style=full parameter to get the state and county included in the answer.

Marc

[WWW]
krnekhelesh



Joined: 11/06/2013 18:52:47
Messages: 3
Offline

marc wrote:
use the style=full parameter to get the state and county included in the answer.

Marc 


Ah perfect! Thanks Marc. Just one query though, I see from the XML feedback that I need to use admincode1 to get the state names. Just wondering why it is called admincode1?
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team