GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Different results with XML and JSON  XML
Forum Index -> General
Author Message
julj



Joined: 26/11/2009 12:49:31
Messages: 1
Offline

hi,

a given search returns different results when returned as XML or JSON.
What's wrong?

For instance:

http://ws.geonames.org/search?name_startsWith=roch&country=fr&featureClass=P

returns as a first result

Code:
<geoname>
 <name>Rochefort-des-Vignes</name>
 <lat>46.7833333</lat>
 <lng>4.85</lng>
 <geonameId>3027484</geonameId>
 <countryCode>FR</countryCode>
 <countryName>France</countryName>
 <fcl>P</fcl>
 <fcode>PPL</fcode>
 </geoname>


while

http://ws.geonames.org/search?name_startsWith=roch&country=fr&featureClass=P&type=json

returns (same geonamesID but different data)

Code:
{u'fcode': u'PPL', u'name': u'Chalon-sur-Sa\xf4ne', u'countryCode': u'FR',
 u'geonameId': 3027484, u'fclName': u'city, village,...', u'adminCode1': u'A1',
 u'countryName': u'France', u'lat': 46.783333300000002, u'lng': 4.8499999999999996, u'adminName1': u'Bourgogne',
 u'fcl': u'P', u'fcodeName': u'populated place', u'population': 47251}
 


thanks
marc



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

Thanks for reporting the inconsistency. It has been fixed.
The place was the same in both service. The XML service has returned the alternatename that triggered the startsWith rule in the name field whereas the json service returned the main name. Both services now return the name that corresponds to the startsWith search.


Best

Marc

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