| Creating Lookup Files | Prev | Table of Contents | Next |
Lookup files are lists of the names of the directories which contain SDTS files, and the geographic range of the area covered by each directory. Lookup files are used by xviewsdts to determine which directories to look in when you request it to load a new surface.
The XViewSDTS package contains lookup files which are designed for use with the sample SDTS files which are also included in the XViewSDTS package. When you add new SDTS files to your collection, you will want to create new lookup files to match. Lookup files are created with the invsdts utility.
The invsdts utility is invoked on the command line by typing its name and the name of the directory you wish to inventory. If you wish to also inventory the subdirectories of a certain directory, type -r n after the directory name, where n is the maximum number of directory levels you wish to descend.
For instance, if your sample files are in the default directory, typing
will displayinvsdts /usr/local/share/usgs/dlg2000/nh/bd/
or typing42.000000 -73.000000 46.000000 -70.000000 /usr/local/share/usgs/dlg2000/nh/bd/
will displayinvsdts /usr/local/share/usgs/dlg2000/ -r 2
To create lookup files, you simply redirect the output of invsdts to the lookup file. Executing the following commands will overwrite your current lookup files with new ones:42.000000 -73.000000 46.000000 -70.000000 /usr/local/share/usgs/dlg2000/nh/bd/
42.000000 -73.000000 46.000000 -70.000000 /usr/local/share/usgs/dlg2000/nh/hy/
42.000000 -73.000000 46.000000 -70.000000 /usr/local/share/usgs/dlg2000/nh/tr/
42.000000 -74.000000 46.000000 -71.000000 /usr/local/share/usgs/dlg2000/vt/bd/
42.000000 -74.000000 46.000000 -71.000000 /usr/local/share/usgs/dlg2000/vt/hy/
42.000000 -74.000000 46.000000 -71.000000 /usr/local/share/usgs/dlg2000/vt/tr/
Your lookup files do not need to be named lookup, nor do they have to live in the directories shown above. But if you do change their names or locations, you will also need to change the lookup_2000_pathname, lookup_100_pathname, and lookup_24_pathname items in the appropriate xviewsdtsrc run control files. (See Editing Run Control Files.) It's easiest just to use the default names and directories.invsdts /usr/local/share/usgs/dlg2000/ -r 9 > /usr/local/share/usgs/dlg2000/lookup
invsdts /usr/local/share/usgs/dlg100/ -r 9 > /usr/local/share/usgs/dlg100/lookup
invsdts /usr/local/share/usgs/dlg24/ -r 9 > /usr/local/share/usgs/dlg24/lookup
If you have groups of SDTS files scattered in various locations of your directory tree, you may create lookup files for each group and then concatenate the lookup files for each group using the cat command. Just remember to keep each individual map series (1:2000000, 1:100000, and 1:24000) in its own lookup file.
Lookup files are not absolutely necessary for using xviewsdts. If you go to the Searching item of the xviewsdts file menu, and choose Search all SDTS files, the lookup files will be ignored, and all subdirectories under the directory named by the dlg_directory item in the appropriate xviewsdtsrc run control file (by default, /usr/local/share/usgs/) will be searched for the requested SDTS data. This is handy if you've just added some new SDTS files, but haven't yet updated your lookup files. You will note, however, that loading is slower without using the lookup files, especially if you have many SDTS files.
Copyright © 2002 by
Dapper Mapper
| Creating Lookup Files | Prev | Table of Contents | Next |