| Author |
Message |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 21/07/2010 18:20:16
|
CharlesKakiDCM
Joined: 21/07/2010 13:52:44
Messages: 4
Offline
|
First, I'd like to congratulate everyone who help build this incredible database. It really is a brilliant example of the kind of community creation only the Internet can produce.
I've been searching for a long time for a database with countries, provinces, states, (etc.) and cities, to feed any interface requiring a location. GeoNames have all that and more... and that's the problem.
I'm finding it hard to isolate only what I would need.
I started by downloading only the Cities<1000.txt, the countryInfo, admin1 and admin2. Database size: 14,3Mb.
Fearing it would be enough, I took a look at the forum and uploaded everything to my MySQL database. I've already ripped all but the A and P fclasses from the `geoname` table. After that, I kept only those fcode which seems to be useful. Database size: 410Mb.
I can't use a database of 410Mb in the websites I build. It would need to be much smaller than that.
Does anyone have a suggestion on how to take all that I need, but nothing more?
|
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 22/07/2010 22:00:29
|
CharlesKakiDCM
Joined: 21/07/2010 13:52:44
Messages: 4
Offline
|
I'm uping the thread and I want to prove I'm not just waiting for the answers to fall in my plate.
Would I have everything I need with allcountries.zip and hierarchy.zip?
If I delete entries based on fclasses and fcodes, I would normally be left with only cities and administrative regions.
DELETE FROM `geoname` (and then `hierachy`) WHERE `fcode` NOT IN ('ADM1','ADM2','ADM3','ADM4', 'PPL','PPLA','PPLA2','PPLA3','PPLA4', 'PPLC','PPLG','PPLL','PPLS','PCL', 'PCLD','PCLF','PCLI','PCLIX','PCLS','TERR');
Normally, I THINK I would be able to get all the countries, provinces, states and cities with that, right? This is how I would have built a database.
But if so, what is the use of the admin1, admin2 and country tables.
Also, many entries have population 0. Is it safe to assume there is really no one there, or is it dangerous to remove important populated cities for which nobody entered any population?
Could I safely remove all entries with population <1000?
Please, help me understand a little. (Marc?)
|
|
|
 |
|
|
|
|