#Prefix Directives |
Top Previous Next |
|
If our project area contained many caves connected, for example, by surface surveys or GPS positions, it would be nice if we could compile the complete data set without having to revise the original station names simply to make them globally unique. Also, if we wanted to insure that some arbitrary collection of SRV files is truly self-contained, we would need some way to say whether or not station S1 in file A and station S1 in file B, for example, are physically the same station. To satisfy such requirements, the SRV format provides the following directive for creating qualifying name prefixes:
#Prefix <name> or #Prefix
The first form assigns an implied name prefix to all stations following it in the file whose prefix is not explicitly overridden. The second form reassigns the default empty prefix. For example, PEP:A123, BRINCO:A123, and :A123 are station names with explicit prefixes. These stations are assumed to be physically different, although they all could have originally appeared in survey books as simply A123. A colon is used to separate the prefix from the original name portion. (The override :A123 is equivalent to a non-prefixed A123.) Notice that in the Hackberry Cave illustration (see SRV Files - Overview), all stations are assigned prefix "HACK", except for the surface tie-in, SUR:S1.
Here is another example. Note that the following two sequences of data lines are equivalent:
#Prefix A:1 A:2 . . . A:2 PEP:A123 . . . A:2 ENT . . .
#Prefix A 1 2 . . . 2 PEP:A123 . . . 2 :ENT . . .
So that a default prefix can be assigned to an entire project tree branch, the #Units directive supports a "PREFIX=<name>" argument. The effect is identical to a separate #Prefix directive, except that you can place the assignment in the "Compile Options" edit box of the Properties Dialog. The program looks for prefix assignments in all tree nodes leading from the project root to the SRV file.
Higher Level Prefixes A recent enhancement to the program is provision for two more levels of name prefixing via directives #Prefix2 and #Prefix3. (#Prefix1, a synonym for #Prefix, is also available.) Their usage is exactly analogous to #Prefix, with special attention given to colon separators. Within data files the prefixes at different levels can be overridden individually when necessary. For example,
#UNITS PREFIX3=P3 PREFIX2=P2 PREFIX=P1 ;any order #FIX NAM1 . . . #FIX P1A:NAM2 . . . #FIX P2A:P1:NAM3 . . . #FIX :P2B::NAM4 . . . #FIX :::DATUM . . .
will produce the following fully-qualified station names: P3:P2:P1:NAM1, P3:P2:P1A:NAM2, P3:P2A:P1:NAM3, :P2B::NAM4, and :::DATUM. Here we've nullified (made empty) some prefix components while replacing others. DATUM might be a globally unique station name, one that doesn't need qualifying prefixes. In the context of prefix assignments, however, we've had to prepend to it an appropriate number of colons. The maximum number of colons we'll need when referencing a station is the number of prefix levels our project uses.
The program will use the fully-qualified names for station identification during compilation. Prefixes beyond a specified level can be left off of map labels when you believe the context is sufficient to distinguish between duplicates. This is a setting in the Map Format Options dialog. Leading empty prefix components are never actually displayed, however. A station label, for example, will never begin with a colon.
Prefix Length Restrictions Unlike station names, which are restricted to 8 characters in length and are optionally subject to case conversion, prefixes can be longer than 8 characters and are always case sensitive. Otherwise, prefixes have the same restrictions as names (e.g., no embedded spaces). The total length of the three prefix components combined, including any embedded colon separators, is 127 characters. Even though long prefixes are legal, it's recommended that prefix components be chosen so that their first 8 characters are unique. This way they will be distinguishable in the coordinate listings and maps currently produced by Walls. Within name labels, the individual prefix components are truncated to 8 characters in length.
It's not the purpose of the prefix feature to encourage use of a multitude of separate 1,2,3,... station sequences in one cave survey. You can, however, be quite liberal in the use of prefixes; they will not slow processing significantly.
|