Just a couple thoughts to consider. We are looking at 16-20,000 airports so we couldn't stuff them all in a single directory. Even splitting them into subdirectories by first letter probably isn't enough. Also, consider that with zillions of tiny files, much space is wasted on the file system which hits people in the windows land the hardest it seems because they often have a very large minimum file size.
Yeah I know, but just don't look at the scenery database structure or the author of this message which you read the above caution. :-) Curt. Andy Ross writes: > It seems to me like the airport database is only searched on two keys: > location and ID. Storing an "index" on location is trivial, as Alex > points out -- store it with the location-specific data structure that > is already indexed. > > So all we need is an index on name. Not to be too glib, but the OS > already provides a rather nice index on named objects -- the > filesystem. So in Scenery/w130n30/airports.xml you will find a simple > list of airport ID's: > > <airports> > <id>KSFO</id> > <id>KOAK</id> > ... > </airports> > > And look up the airport data itself under Airports/KSFO.xml: > > <airport> > <id>KSFO</id> > <name>San Francisco Intl.</name> > <alt>...</alt> > <lat>...</lat> > <lon>...</lon> > <runway> > <name>11</name> > <lat>...</lat> > <lon>...</lon> > <direction>...</direction> > <length>...</length> > <width>...</width> > </runway> > <runway> > ... > </runway> > </airport> > > The astute will point out that not all filesystems actually store > indices on filenames (ext2 and FAT among them, sadly -- NTFS and > reiserfs do have indices). With only a few thousand files, this isn't > likely to be a real performance problem. Nonetheless, storing them > sorted into directories is possible. Use Airports/K/KSFO.xml, for > example, or even Airports/K/S/F/O.xml if you really want. :) > > This strikes me as easy to implement and much easier to maintain than > the current metakit stuff. > > Andy > > -- > Andrew J. Ross NextBus Information Systems > Senior Software Engineer Emeryville, CA > [EMAIL PROTECTED] http://www.nextbus.com > "Men go crazy in conflagrations. They only get better one by one." > - Sting (misquoted) > > > _______________________________________________ > Flightgear-devel mailing list > [EMAIL PROTECTED] > http://mail.flightgear.org/mailman/listinfo/flightgear-devel -- Curtis Olson IVLab / HumanFIRST Program FlightGear Project Twin Cities [EMAIL PROTECTED] [EMAIL PROTECTED] Minnesota http://www.menet.umn.edu/~curt http://www.flightgear.org _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
