GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Messages posted by: zeman  XML
Profile for zeman -> Messages posted by zeman [2]
Author Message
I had much better luck using the mysqlimport tool.

mysqlimport -h host -u username -ppassword --fields-terminated-by='\t' --lines-terminated-by='\n' --columns='geonameid, name, ansiname, alternames, latitude, longitude, feature_class, feature_code, country_code, cc2, admin1_code, admin2_code, population, elevation, gtopo30, timezone, modification_date' --local database /path/geonames.txt

Use ftp or wget on the server to grab the dump file, upload it to your server, uncompress and rename to match your table.

Replace the following with your info:
host
username
password (no space between the -p option and password)
database
/path/geonames.txt (path to your file on server)

Important: double check via phpmyadmin that both the collation of the whole database and the table is set to "utf8_general_ci" via the "operations" tab before you import.
I'm using utf8_encode in php to encode strings. It works fine most of the time but I'm getting the occasional odd results like the following when searching for Ryūō Japan...

http://ws.geonames.org/search?name_equals=Ry%u016B%u014D&country=JP&fcode=ppl&fcode=pplc&fcode=ppla&style=full

<status message="missing parameter" value="12"/>
 
Profile for zeman -> Messages posted by zeman [2]
Go to:   
Powered by JForum 2.1.5 © JForum Team