Color Gradient Dialog |
Top Previous Next |
|
This dialog is accessed from the Color Selection Palettes that allow picking of color ranges, or gradients, in addition to solid colors. It comes in three variations, one for each kind of vector property the colors can be made to represent. When a map is drawn, the line and/or polygon representing a survey vector can be given a color corresponding to the vector's elevation, assigned date, or a consistency rating (F-ratio). For example, here is what the dialog looks like when the gradient representing elevations is being edited:
The large colored bar in this example represents a color range, which is calculated from the colors you assign to specific positions along the bar. The bar's left edge is at position 0.0 and the right edge is at position 1.0. You can assign colors to intermediate positions by creating one or more color pegs at appropriate points along the bar. The program will then calculate the colors for other positions using one of the interpolation methods described below. The cosine method illustrated here produces smooth color transitions between adjacent pegs. (The default method for depth coloring is HSL long, which can produce a good color range without intermediate pegs.) There is just one intermediate peg in this example, as indicated by the white triangular pointer -- white because that was the color assigned to it. You can create additional pegs in either of three ways:
Whichever way a peg is created, it becomes the selected peg and the controls in the middle section of the dialog allow you to edit its properties. Normally you'll use the color selection button to change the color that was automatically assigned to a newly-created peg. Creating a peg, therefore, is usually a two-step process: fixing its position and editing its color.
You can select an existing peg via the keyboard (tab and arrow keys) or by left-clicking it with the mouse. The peg's properties can then be edited via the controls for the selected peg. Also, by left-dragging an intermediate peg, you can change its position without changing its color. In the above example, the left endpoint peg has been selected. This is indicated by the middle section's title, "Selected Color Peg [Start]", and by the fact that the leftmost small square is outlined.
Mapping Colors to Survey Vector Properties When you use this dialog to define a color gradient, your goal will be to set it up so that the colors used to display survey vectors (or passage polygons) will reflect some vector property. The particular property is determined by the button you use to invoke the dialog and can be one of three types: elevation, date, or F-ratio. (Each of these types will be described in more detail below). In the dialog shown above, labels indicate that the property is elevation. Above the color bar is a histogram that shows the frequency of elevation values for vectors actually present in the data set. Here, the histogram covers elevations in the range -25.65 meters to -16.19 meters which have been linearly mapped to the gradient's position range (0.0 to 1.0). The yellow box with "-25.52 m" is what you see when you move the mouse cursor over a spike in the histogram representing an elevation of -25.52 meters. Every vector whose elevation falls within the color bar's range will correspond to a spike at least one pixel tall. Except for that condition, taller spikes correspond to larger proportions of vectors.
The mapping of gradient (color bar) range to elevation range is shown in the dialog section labeled Range of Color Bar. Displayed above this section, under Elevation Range in Data, is the range of elevations actually present in the survey database. These two ranges are automatically initialized to be the same when you first open this dialog to define a gradient for a compiled data set. Thereafter, the ranges might differ for two reasons. First, recompilations can cause the minimum and maximum values to no longer match the color bar range that's saved as part of the gradient's definition. Second, you can use this dialog to change the range of values represented by the color bar. The direct way of accomplishing this is to select one of the small squares representing an endpoint peg and edit its property value (elevation). In this example, the color bar's extent is smaller than the data extent.
Another way of reducing the bar's range that's easier than a direct edit, is to 1) add a new peg by left-clicking an endpoint box and dragging inward with the left button held down, 2) reselect the corresponding endpoint box and delete it. The peg you added by dragging disappears, but its property value and color are passed on to the "deleted" endpoint peg. The endpoint color doesn't change but the value it represents does. The bar's range is thereby reduced and the resolution of the histogram improves. When the map is drawn, vectors that have values outside the gradient's range will be given the color assigned to the appropriate endpoint peg. A variation on this method is to omit the deletion step (2) that improves the histogram' resolution. More likely, though, you'll be wanting to "zoom in" on the histogram. When choosing colors for a color-by-date gradient, for example, you might need to see separate spikes for two nearby dates.
The Reset to Data Range button will make the color bar limits correspond to the current minimum and maximum property values in the compiled item being reviewed. For all but the statistics gradient, all network components in the item, not just the selected one, will determine those limits. Besides applying to just the selected component, the statistics gradient is different in that this button also restores the default peg configuration, which is illustrated below.
The Apply to Map button updates any screen maps with the gradient you currently have defined -- but without exiting the dialog. This allows you to preview the gradient's effect as you make changes to it. Without this button you would need to commit to your changes by clicking OK, possibly replacing what may have been a more-acceptable gradient definition. If you Cancel the dialog, any changes you may have made to screen maps using this button are retained while the original gradient definition (and whether or not it is assigned to features) is unchanged. If necessary, you can use the Apply to Map button on the Segment page to refresh a map with the visibility attributes assigned to segment branches.
Saving and Restoring Gradients When you assign any customized color gradient to a map feature, the current definitions for all three gradient types are saved in workfile <name>.NTAC, where <name> is the base name of the compiled project branch. Apart from this automatic feature, you can manually save and restore "snapshots" of the dialog's displayed gradient using the Save and Load buttons. That allows you to experiment with different color patterns while being able to quickly restore the gradient you normally use. A snapshot file, which stores both a gradient and the value range it represents, can have any name, but the extension is forced to be NTAE, NTAD, or NTAS, depending on the gradient type. As long as such files are kept in the project's work directory, they are considered part of the NTA file set that's optionally included in a backup archive.
The Default button replaces the displayed gradient and value range with what the program uses by default for a newly compiled data set (or one in which workfiles have been purged). If you never assign a customized gradient, no NTAC workfile is created.
Gradient Types Here are some specifics regarding the three types of gradient coloring supported by this version of Walls:
Second, we're using a global F-ratio, not one specific to the independent loop system containing the traverse. Whereas the system-specific F-ratios shown on the Geometry Page can be misleadingly large when a system has few loops, the global F-ratio measures a vector's consistency with respect to all systems in the connected component. The component possibly contains many loop systems. The histograms of the other gradient types are even more inclusive since they represent all vectors in the compiled data set, not just the selected component.
In statistics gradients, three special values are reserved to represent vectors that don't have F-ratios. Vectors for which both component types (horizontal and vertical) are constrained are assigned value -1.0. Vectors for which both component types are floated are assigned value -2.0. Vectors not contained in any loop are assigned value -3.0. The statistics gradient assigned by default (and which is restored by the Reset to Data Range button) looks like this:
With this gradient selected, non-loop vectors will be colored light blue, floated vectors will be colored green, and constrained vectors will be colored yellow. Normal loop vectors, with F-ratios 0.0 or greater, will have colors ranging from white to red. Here we're using linear, not cosine, interpolation to produce a faster transition to red (see below). Note that the leftmost spike in the histogram, which represents non-loop vectors, is no taller than the tallest of the remaining spikes. The program enforces this to ensure that a large proportion of non-loop vectors doesn't flatten too severely the remaining part of the histogram.
Interpolation Method The program uses one of several interpolation methods to calculate color as a function of position along the bar. To change the appearance of the bar without affecting the current peg colors, you can specify one of the following algorithms:
In designing the gradient dialog, I borrowed from the work of programmer Joel Holdsworth. (See Acknowledgements.)
For more information on selecting gradient coloring for map features, see Color selection Palettes. |