Re: filled contour and labels

Bill/Ben-

Bill Hibbard wrote:

Does anyone know if it is possible to have "filled isocontours" and
labels?


Not currently possible.

In the IDV, we accomplish this by creating two Fields with different
MathType-s and mapping both to IsoContour.  Get the control for one
and call setContourFill(true) for filled contours.  Use the same
contour levels and the lines will line up with the fill breaks.
If you map the second, non-filled MathType to RGB as well, you can
either use the same color table to get the colors to line up with
the filled contours, or set them to a constant color.

If you have a FlatField (f1) with MathType (lat,lon) -> (temp), just
create a new FlatField by calling f1.changeMathType() with a
FunctionType of (lat,lon) -> (temp_1).

You could also use the method that Bill has suggested recently where
you create a new FlatField (f2) of the new FunctionType and call
f2.setSamples(f1.getFloats(false)) to not copy the range value and
save memory.  Please note that if you use this method you will get
a new array of floats if the values in the FlatField are packed, or
if the units of the values are different from the MathType of the
range (e.g., range MathType is "temp" with units of Kelvin, but
values are in Celsius).  Actually, until a couple of changes are
checked into VisAD soon, you will always get a new array of floats
even if copy is false because Unit.convertTuple (which getFloats
uses) always returns a new array even if the input and output units
are the same.  Currently, there is no way to get the actual
stored array from a FlatField (which is probably a good thing. ;-)).

Don
*************************************************************
Don Murray                               UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8628                              Boulder, CO 80307
http://www.unidata.ucar.edu/staff/donm
*************************************************************