Feature File Format |
Top Previous |
Feature Files are used by some Compass programs to specify additional information about the cave. It is the basic format that is used to export DDE data to the Viewer. The file format is described here so people can understand how to import it to other programs.
The format of a feature list file is very simple, and it can be created with almost any editor that will produce an ASCII formatted file. For example, you could use Notepad to produce a Feature file by entering the data and saving it to a text file.
An example of a simple feature file is listed below:
#WATER,A2,A3,A27; #FIRE,B1,C1,D3; #CLAY,B27,C91,X8; %ROUTE,A1,A2,A3,A4,B2,B3,B4,B5,C19;
As you can see, the file contains a list of features and the stations associated with those features. Each line begins with a pound sign "#" or a percent sign "%". Each line ends with a semicolon ";". All other lines are ignored by the program and can be used for notes or comments.
After the pound sign or percent sign, a feature name must appear. The feature name can only be eight characters long. Stations associated with the feature follow. Each station in the list is separated by commas. Spaces, tabs, carriage returns, line feeds and all "white space" characters are ignored. Comments are enclosed by a pair of forward slashes "/" or a forward slash and the end of a line.
The percent sign and pound sign indicate the type of feature:
# = Features associated with individual stations. % = Features associated with shots or lines.
Features associated with the pound sign are features that exist at a specific station location. They are not used to show a line through the cave. For example, you might want to show that there is calcite at or near station A16.
Features associated with the precent sign are features that represent a line through the cave. For example, it could be a trade route through the cave or the tourist trail through a commercial cave. The line doesn't have to be along normal survey lines. It doesn't have to follow the normal shot order. It can even connect stations so that the line goes through solid rock. The program simply connects all the stations in the list in the order specified.
The "feature list" format allows a great deal of freedom in the way you can lay out the file. Here is an example of a more complex feature file:
#MAMMALS, C41,F12,P9,C41,C40,UG30,NFP1,C39,SA'12,PP3, /Along the old passage JF65,JF109,L*6,JF10, /At the lake area KX37R,KY258R,JW1R,KY357, /By the trail CR1,KK32,SA9R,BX21,KK32; /Under the stairs
%TRAIL,X1,X2,X3,X4,Y2,Y3,Y4,Y5,Z19; /Tourist trail
#INSECTS, JF65,JF109,L*6,JF10, /Along the old passage KX37R,KY258R,JW1R,KY357, /Near the entrance CR1,KK32,SA9R,BX21,KK32;
With a small amount of programming, feature files can be generated by any data base program. The file should be standard ASCII format. COMPASS expects feature files to have the extension "FET". For example: BONES.FET or MINERALS.FET
COMPILING FEATURE FILES. Once a feature file has been created, it must be combined with the ".PLT" file for the cave you are working on. If you working with the DOS version of Compass, this would be done with a special "feature" compiler called FCOMPILE. (The Feature Compiler is a part of the DOS package and must be downloaded separately from the Compass website.)
The feature compiler reads the feature file and then matches each station in the feature file with the locations of the stations in the plot file. The feature compiler then creates pseudo-surveys for each feature and adds them to the end of the plot file. The new plot file is written to the disk with extension ".PLF" to indicate that the file contains feature information. The following diagram illustrates the process:
Feature File (.FET) + Plot File (.PLT) ----> Combined File (.PLF)
If you are working with the Windows version of Compass, Viewer can read and generate PLF files. Generally, under the Windows version, the feature information is created using CaveBase, the database tool and the Compass Viewer.
SURFACE DATA FILE FORMAT. Normally, you generate terrain model information using the DEMReader and link it directly to a plot (PLT) file. However there are some instances where may want to export the DEM information to a different program. The FET export option allows you to do this. The following is a description of the data contained in an FET file. You should be able to use this information to import the data into another program:
Like other feature file items, surface data is presented in a simple text format. The surface data consists of a series of text and numerical items separated by commas. Here is the format of surface feature items:
TAG,NAME,STATION,UNITS,INTERVAL,EASTDIM,NORTHDIM, SPACING,EASTCON,NORTHCON,EASTOFF,NORTHOFF,VERTOFF, DATA,DATA,DATA....;
Here is the definition of each item:
1. TAG. This a single character that defines the type of feature item. In the case of surface data, there are two possible tags:
$ - This tag instructs the feature compiler to generate a gridded surface model.
! - This tag instructs the feature compiler to contour line type surface model.
& - This tag instructs the feature compiler to create a combined grid and contour surface model.
2. NAME. This item is a name of your choosing. It can be no more than eight characters in length. This name normally reflects what the data is. For example, the name could be something like "Valley" indicating that data is the terrain for a valley. The name is displayed by programs various programs so you can tell what the feature is and color it or turn it on or off.
3. STATION. This is the name of the survey station in the cave that is the connection between the cave data and the surface data. This is usually a station on the surface such as the entrance. It can, however be any station in the cave. This is because the software can make a "through the rock" connect between any point on the grid and any point in the cave using the "Offset" data items described below. In the example below, the entrance of Groaning Cave is CSU1. It is also the connection between the cave data and the surface data.
4. UNITS. Units specifies the unit of measure for all the information in the surface data. Units can be "FEET or "METERS". The compiler only looks at the first character of the Units specification. As a result, you can specify the units with one or more characters. For example, feet could be specified by "FEET", "feet", "ft." or "f".
5. INTERVAL. This items specifies the spacing or interval between contour lines. This is the number of vertical feet or meters between contour lines. Contour lines always fall on even multiples of the interval. For example, if the interval is 50 feet, the lines will fall at 50, 100, 150 feet etc. The interval setting only applies to contour data.
6. EASTDIM,NORTHDIM. This item gives the dimension of the grid. In other words, it gives number of points in the East/West and North/South directions. The grid as whole can be rectangular. In other words, the EASTDIM and the NORTHDIM do not have to be equal.
7. SPACING. This gives the linear distance between each point in the grid. Each cell the grid is square, so the spacing is the same for North/South and East/West.
8 EASTCON,NORTHCON. This item specifies which point in the grid is connected to the "Connection" survey station. Each point in the grid is identified by a coordinate. The point in the upper lefthand corner has the coordinate 0,0. Coordinates increase as you go down or right. As an example, the surface data for Groaning Cave connects to point 7,1. Here is the layout of the coordinates for 9 by 5 grid:
[0,0] [1,0] [2,0] [3,0] [4,0] [5,0] [6,0] [7,0] [8,0] [9,0] [0,1] [1,1] [2,1] [3,1] [4,1] [5,1] [6,1] [7,1] [8,1] [9,1] [0,2] [1,2] [2,2] [3,2] [4,2] [5,2] [6,2] [7,2] [8,2] [9,2] [0,3] [1,3] [2,3] [3,3] [4,3] [5,3] [6,3] [7,3] [8,3] [9,3] [0,4] [1,4] [2,4] [3,4] [4,4] [5,4] [6,4] [7,4] [8,4] [9,4]
9. EASTOFF,NORTHOFF,VERTOFF. This is an offset between the connecting cave survey station (item 3) and the connecting point in the grid (item 9). This very useful if data points in your grid do not fall precisely on top a survey station. For example, if the entrance station is at the bottom of a pit. It is also useful if there is no survey station on the surface. For example, in the case where the cave is entered by an elevator or a mine.
The offset is added to all the points in the grid. Positive numbers move the grid in the North, East or Up direction. Negative numbers move the grid South, West or Down. In other words, the offset has the effect of move the cave or grid relative to each other.
10. DATA. The rest of the data contains the elevations of each point in the grid. The elevations can absolute elevations based on sea level or relative altitude from entrance or some other point. The compiler converts all elevations so they are relative to the connecting station. For example, if the connecting station in the cave has an elevation of zero and the corresponding point in grid has an elevation 10,000 feet, 10,000 will be subtracted from every point in the grid. If you want the all the points on the grid and in the cave to reflect the real absolute elevation above sea level, you should use the "fixed station" feature to set the elevation of the entrance station. The "fixed station" feature is described in section 13.4 of this manual.
The data items for a grid are organized as a list of elevation points. Points can be any fixed or floating point number. For example, some valid numbers are 123, 123.012 or 1.23E6. The list starts in the upper left corner (northwest) of the grid and move right (east) to the end of the row. The points continue start with the west end of the next row south. The total number of points is equal to the product of EASTDIM and NORTHDIM. The list is terminated with a semicolon. The following diagram illustrates the order data items should be entered in a nine by five list:
1, 2, 3, 4, 5, 6, 7, 8, 9 10,11,12,13,14,15,16,17,18 19,20,21,22,23,24,25,26,27 28,29,30,31,32,33,34,35,36 37,38,39,40,41,42,43,44,45
Here is an example data block that creates a grid above Groaning Cave in Colorado:
$SURFACE,CSU1,FEET,100,9,5,500,7,1, 10320,10210,10150,10050,9950,9760,9640,9540,9400, 10320,10220,10160,10080,10040,10000,9970,9990,9440, 10310,10280,10245,10200,10125,10020,9995,10000,9600, 10300,10250,10235,10200,10130,10040,9950,10020,9800, 10210,10200,10195,10190,10155,10100,10000,9940,9990; . |