NAME NEW LEGEND -- create a geometry of a linear scale using color polygons AUTHOR Kathy Pearson, MCNC, kathyp@mcnc.org, (919) 248-9240 SUMMARY Name NEW LEGEND Type mapper Inputs input_color_map (colormap) Data Minimum (float) Data Maximum (float) Map Info (string) Outputs geom_output (geometry) Parameters Name Type Def Min Max ---- ---- --- --- --- Color Bins (int) 8 1 256 Labels (int) 8 1 256 X Scale (float) 1.0 0.0 UNBOUND Y Scale (float) 1.0 0.0 UNBOUND X Offset (float) 0.0 0.0 UNBOUND Y Offset (float) 0.0 0.0 UNBOUND Font Height (float) 0.06 0.0 1.0 Label Format (string) "%7.3f" Border (toggle) 0 0 1 Number line (toggle) 0 0 1 Use Map Info (toggle) 0 0 1 Font (int) 0 0 21 Legend Type (choice) VERTICAL Vertical Label Position (choice) RIGHT Horizontal Label Position (choice) ALTERNATING Line Red (float) 1.0 0.0 1.0 Line Green (float) 1.0 0.0 1.0 Line Blue (float) 1.0 0.0 1.0 Label Red (float) 1.0 0.0 1.0 Label Green (float) 1.0 0.0 1.0 Label Blue (float) 1.0 0.0 1.0 DESCRIPTION The NEW LEGEND module creates a color scale bar of linear bins in either the horizontal or vertical with labeling controlled by C-language formats to give the user more control than that found in the standard AVS "color legend" module. Color bins are selected from the input color map based upon linear increments corresponding to the number of color bins selected. For a typical Newton AVS colormap, the lowest bin will be blue and the highest bin will be red. The bins are labeled according to the Data Minimum and Data Maximum values and the linear increments between. In porting this module to the DEC ALPHA, integer colors did not work properly, so compile-time "ifdef __alpha" statements are included to signal that floating-point colors could be used. The "__alpha" definition, if present, is found in the standard AVS include file, port.h. INPUTS input_color_map standard AVS input color map Data Minimum minimum value for tile legend scale and linear bins Data Maximum maximum value for tile legend scale and linear bins Map Info string of values for initial settings for vertical legend (x offset, y offset, x scale, y scale) or horizontal legend (x offset, yoffset, xscale, yscale); parameters are passed from the ARCMAP module and are optionally used depending on the parameter toggle "Use Map Info"; this Map Info is useful if several different domains are viewed in the same geometry viewer window and default legend scale and offsets are needed for a variety of them OUTPUTS geom_output color tile output geometry with optional colored mesh PARAMETERS Color Bins number of color bins Labels number of labels (may be less than the number of bins) X Scale width of each scale bar with 1.0 = one grid cell in width Y Scale height of each scale bar with 1.0 = one grid cell in height X Offset x coordinate position with reference to the data grid of the lower left hand corner of the legend scale bar Y Offset y coordinate position with reference to the data grid of the lower left hand corner of the legend scale bar Font Height height of the labeling font in normalized coordinates Label Format C-language format in which each label is written Border switch indicating if a color border is requested around the length of the color scale bar Number line switch indicating if a number line is requested at each label position on the color scale bar Use Map Info switch indicating if the Map Info string passed from the ARCMAP module should be used to set legend parameters; if this toggle is on, user selections for offset and scale are ignored Font AVS selected font for labels (range 1-21) Legend Type choice of VERTICAL or HORIZONTAL Vertical Label Position choice of RIGHT or LEFT Horizontal Label Position choice of ALTERNATING, TOP, or BOTTOM Line Red red component of color for lines on and around color scale bar Line Green green component of color for lines on and around color scale bar Line Blue blue component of color for lines on and around color scale bar Label Red red component of color for labels for color scale bar Label Green green component of color for labels for color scale bar Label Blue blue component of color for labels for color scale bar EXAMPLE RELATED MODULES LIMITATIONS SEE ALSO (MCNC Visualization Plan) 11/93 ------------------------------------------------------------------------- The MCNC Environmental Programs Group has created this module as part of a suite of AVS demo modules, networks, and sample data sets to demonstrate the functionality of its visualization prototype for an Environmental Decision Support System (EDSS). This system provides a unified method of analysis and visualization for data output from different environmental air quality models. Remotely, standard output files from the following models can be read into AVS: ROM (Regional Oxidant Model) RADM (Regional Acid Deposition Model), low res and high res RADM (Regional Acid Depostion Model) Emissions, low res UAM (Urban Airshed Model, regulatory version) UAM (Urban Airshed Model, AREAL research version) UAM Wind (Urban Airshed Model, regulatory version) MCNC ALPHA-Prototype netCDF files Alternatively, xdr portable binary AVS fields can be created from these data types and accessed directly from the local workstation. You can download these modules individually from the IAC using anonymous ftp to the appropriate directories /avs_modules at avs.ncsc.org. If you would like to download the entire suite of modules, networks, and sample datasets at the same time, the IAC recommends that you use anonymous ftp to grab the following file from avs.ncsc.org - /sample_data/avs_data/MCNC_Env_Pgms/MCNC_Env_Pgms.tar.Z This contains all source code to all local and remote modules, as well as all of the sample datasets, networks, documentation, installation, and usage notes. -------------------------------------------------------------------------