GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Alternate names in web services  XML
Forum Index -> General
Author Message
hakan



Joined: 13/03/2008 19:21:16
Messages: 11
Offline

Hi,

another alternateNames question

Using the web service "get" [1], I get the alternate names in one line, concatenated like in the main dump files.

Is it possible to return the constituent parts of the names, adding a parameter "lang" where this is known for an alternate name (the blue id would be the alternateNameID)? Possibly additional to the concatenated version, to have a fall back for people using the old version?

e.g., instead of:

<geoname>
<name>Antalya</name>
<geonameId>323777</geonameId>
...
<alternateNames>
Adalia,Antal'ja,Antalia,Antaliyah,Antalya,Antayla,Antália,Attalia,Olbia,Satalia,Αττάλεια,Анталия,Анталья,אנטליה,アンタルヤ,安塔利亞
</alternateNames>
...
</geoname>

return the following:

<geoname>
<name>Antalya</name>
<geonameId>323777</geonameId>
...
<alternateNames>
Adalia,Antal'ja,Antalia,Antaliyah,Antalya,Antayla,Antália,Attalia,Olbia,Satalia,Αττάλεια,Анталия,Анталья,אנטליה,アンタルヤ,安塔利亞
<alternateName id="1211" lang="foo">Antal'ja</alternateName>
<alternateName id="1231" lang="bar">Antália</alternateName>
<alternateName id="3231">安塔利亞</alternateName>
<alternateName id="2341">Анталия</alternateName>
...
</alternateNames>
...
</geoname>



[1]: http://ws.geonames.org/get?geonameId=323777&style=full


Regards,
Hakan
marc



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

You are right, this was missing.

Marc

[WWW]
hakan



Joined: 13/03/2008 19:21:16
Messages: 11
Offline

Thanks for the quick fix

Could you add the alternateNameId as well? That way, I could easily update a local cache. The "lang" attribute is neither guaranteed to be unique nor to exist at all (as you can see in the Antalya case, we have multiple empty language codes and twice "tr" and "hu")


Regards,
Hakan
marc



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

The duplicates have been an error. I have removed them from the database.

For the get service it would be easy to add the alternateNameId, but we would like to have the same information in all services and this would requires some changes. To update your local database it might be better to download the database dump.

Marc

[WWW]
teoulas


[Avatar]
Joined: 17/10/2013 17:41:34
Messages: 3
Location: Greece
Offline

Sorry for bumping such and old thread, but including the alternateNameId would be great. I'd also volunteer to submit a patch for the web service, but as far as I can tell, there is no intention of releasing the server code as open source.
[WWW]
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team