GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Missing alternatename in alternatenames dump file?  XML
Forum Index -> General
Author Message
vmirage



Joined: 04/09/2007 10:53:12
Messages: 3
Offline

Hi,

Just want to confirm is all the Alternatenames inside the Geonames dumpfile copied into the Alternatenames dumpfile?

For example,

I can't find Duesseldorf inside alternatenames dump file which is inside Geonames (geonameid : 2934246)

Thanks.
marc



Joined: 08/12/2005 07:39:47
Messages: 4472
Online

Hi

'Duesserdorf' is in the file alternatenames.txt in the column asciiname for all alternatenames 'Düsseldorf'.

Cheers

Marc

[WWW]
vmirage



Joined: 04/09/2007 10:53:12
Messages: 3
Offline

i'm sorry but i'm unable to find it inside the alternatenames.txt file. You sure you checked it? The exact word 'duesseldorf' not 'duesserdorf'. It is in the geonames dumpfile but not in alternatenames dumpfile.

Thanks.
marc



Joined: 08/12/2005 07:39:47
Messages: 4472
Online

You are right the column asciiname is not exported in the dump file. I completely forgot about this. I think we cannot just add the column like this without forewarning since a couple of GeoNames users have daily import scripts to import the daily dump.

Regards

Marc

[WWW]
vmirage



Joined: 04/09/2007 10:53:12
Messages: 3
Offline

You mean the alternatename column in the alternatenames dumpfile is not a copy of the splited comma delimited alternatename column in geonames dumpfile?
marc



Joined: 08/12/2005 07:39:47
Messages: 4472
Online

The ascii names are included in the alternatenames column but have been forgotten to be included in the alternatenames.txt dump

Marc

[WWW]
orxor



Joined: 21/03/2008 12:48:32
Messages: 6
Offline

Hi,
I can't find "Russia" inside alternatenames dump with isoLanguage = 'it' but I find it in webservices http://ws.geonames.org/countryInfo?lang=it .
Why are there those differences?

I do a script to trace difference between webservices and dump file.
This is a result of city lost in dump file (always for isoLanguage = 'it'):

Anguilla
Antille Olandesi
Aruba
Azerbaigian
Bermuda
Bosnia-Erzegovina
Bouvet, isola
Cayman, isole
Cook, isole
Corea (Repubblica)
Corea, Repubblica Popolare Democratica
Costa d'Avorio
Falkland, isole
Faroe, isole
Georgia Meridionale e isole Sandwich del Sud
Guadalupa
Guam
Guernsey
Guiana Francese
Hong-Kong
Iran (Repubblica Islamica)
Isole Cocos (Keeling)
Isole Heard e McDonald
Isole Vergini (americane)
Isole Vergini (britanniche)
Isole del Natale
Isole minori degli Stati Uniti
Jersey
Libia, Repubblica Araba
Lichtenstein
Macedonia, Ex Repubblica Jugoslava
Marianne Settentrionali, isole
Marshall, isole
Martinica
Mayotte
Micronesia, Stati Federati
Monaco
Montenegro
Myanmar
Norfolk, isola
Nuova Caledonia
Palestina
Panama
Pitcairn
Polinesia Francese
Portorico
Russia
Réunion
Sahara Occidentale
Saint Martin
Saint Pierre e Miquelon
Saint Vincent e Grenadine
Saint-Barthelemy
Salomone, isole
Samoa Americane
San Marino
Sant'Elena
Santa Lucia
Santa Sede (Città del Vaticano)
Sao Tomè e Principe
Slovacchia (Repubblica Slovacca)
Svalbard e Jan Mayen
Tailandia
Territori Britannici dell'Oceano Indiano
Territori Francesi Meridionali
Tokelau
Turks e Caicos
Zaire

marc



Joined: 08/12/2005 07:39:47
Messages: 4472
Online

Thanks. I was not aware of this. Should be fixed with the next dump.

Marc

[WWW]
xiborg


[Avatar]

Joined: 24/08/2009 16:43:18
Messages: 2
Offline

orxor wrote:
Hi,
I can't find "Russia" inside alternatenames dump with isoLanguage = 'it' but I find it in webservices http://ws.geonames.org/countryInfo?lang=it .
Why are there those differences?

I do a script to trace difference between webservices and dump file.
This is a result of city lost in dump file (always for isoLanguage = 'it'):

...
 


Hi,
I, too, can't find alternatenames (isolanguage='de') for some countries, where the webservice finds them:

Norway -> Norwegen
Netherlands -> Niederlande
France -> Frankreich

I am pretty sure there are more.

greetz
Xiborg
marc



Joined: 08/12/2005 07:39:47
Messages: 4472
Online

Please look again, it is there.

Marc

[WWW]
xiborg


[Avatar]

Joined: 24/08/2009 16:43:18
Messages: 2
Offline

Hi Marc

Yes, you are right. It is there now.

Thank you very much.

greetz
Xiborg
JOJOSANATOMY



Joined: 26/11/2024 12:01:38
Messages: 2
Offline

Hi!

When I use the Geonames API to get the alternatenames of a city, the returned list of alternatenames are in complete. It only covers some of the alternatenames that I search in the webservice, but not all of them. Especially the ones I added on the webpage by myself.

How can I solve this problem?

Thank you!
marc



Joined: 08/12/2005 07:39:47
Messages: 4472
Online

Hi

How do you query the alternate names? Example of a feature with missing alternate names?


Best Regards

Marc

[WWW]
JOJOSANATOMY



Joined: 26/11/2024 12:01:38
Messages: 2
Offline

Hi! Here is my code:

----------------------------------------------------------------------
import requests
import pandas as pd


GEONAMES_USERNAME = "jojosanatomy"
BASE_URL = "http://api.geonames.org/searchJSON"

def get_cities_in_guangdong(username):

base_url = "http://api.geonames.org/searchJSON"
params = {
"q": "Guangdong",
"adminCode1": "30",
"featureClass": "P",
"maxRows": 1000,
"username": GEONAMES_USERNAME,
#"lang": "zh",
"style": "FULL"
}


response = requests.get(base_url, params=params)
if response.status_code != 200:
raise Exception(f"Failed to fetch data: {response.status_code}")


data = response.json()
if "geonames" not in data:
raise Exception("No geonames data found.")


cities = []
for item in data["geonames"]:
city_name = item.get("name", "")
alternate_names = item.get("alternateNames", [])
alternate_names_str = ", ".join([alt["name"] for alt in alternate_names if "name" in alt])
cities.append({"City": city_name, "Alternate Names": alternate_names_str})


return pd.DataFrame(cities)


guangdong_cities_alternatenames = get_cities_in_guangdong(GEONAMES_USERNAME)


guangdong_cities_alternatenames.to_csv("guangdong_cities.csv", index=False, encoding="utf-8-sig")
print(guangdong_cities_alternatenames)

--------------------------------------------------------------------------
In the retuned file, for example, in the city of "Taishan", there should be an alternate name "Toi San" (I add it and several others by myself on the website), but there's no such alternate name. Meanwhile, it also returns several wikipedia links.
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team