On Thu, Apr 9, 2009 at 6:42 PM, Kelly Jones <kelly.terry.jo...@gmail.com> wrote: > On 4/9/09, P Kishor <punk.k...@gmail.com> wrote: >> On Thu, Apr 9, 2009 at 6:23 PM, Kelly Jones <kelly.terry.jo...@gmail.com> >> wrote: >>> Given how cool SQLite is, has anyone created SQLite dbs of geonames, >>> tycho2, or other large data sets that are available for download via >>> FTP, HTTP, Torrent or similar mechanism? >>> >>> I realize I could dl the raw data, create tables, import the data, >>> create indexes, etc, but it's much faster just to download a single >>> platform-independant file that does all that for me already! >> >> http://www.geonames.org/export/ >> >> a simple text file. .import it into your sqlite3 db as you wish > > I tried that, and wish it were that simple. Problems: > > % No indexes + indexes take a LONG time to create (it's a lot of data) > > % I know http://download.geonames.org/export/dump/allCountries.zip > has data for all countries, but it doesn't have counties, states, > alternate names, and other info. > > % I downloaded the other text files and created tables from them too, > but that's more tables and more indexes I have to create. > > % I created a view that joins placename to its admin2code to its > admin1code, etc, and indexes to do the joins efficiently, but, again > more work. > > I was going to do even more w/ this: > > http://groups.google.com/group/geonames/browse_thread/thread/417555edd150f839/4\ > 4ef4238d41b2cb1 > > but why re-invent the wheel. SQLite is the perfect tool to allow > people to share true databases (indexes, view, etc), not just data. >
I did make the db once but then blew it away. The problem is, if one were to make an all encompassing database with all the indexes and all, then, as you said, it would become way too big to offer it as a download. Besides, the geonames dump keeps on refreshing every day. Isn't it better to use the freshest copy possible via a web service? Well, you can http://www.geonames.org/export/ws-overview.html I would probably use something like Geo::GeoNames from CPAN in my code http://search.cpan.org/~perhenrik/Geo-GeoNames/lib/Geo/GeoNames.pm -- Puneet Kishor http://www.punkish.org/ Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/ Carbon Model http://carbonmodel.org/ Open Source Geospatial Foundation http://www.osgeo.org/ Sent from Madison, WI, United States _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users