Hi Don,
> I'm starting to look into using Shapes for station plots, etc.
> Doug Lindholm has given me some code snippets that help, but
> I need some help beyond that. I figured I'd ask for help from
> the group instead of just bothering Doug. ;-)
>
> Let's say I have a two VisADLineArrays that represents a plus
> sign (+) and a minus sign (-). I create a VisADGeometryArray[]
> array of {plus, minus}. I get a slug of lightning
> observations in a FieldImpl with type (index -> (lat, lon, signal)).
> I modify this to be a new field (index -> (lat, lon, shape)). The
> values for shape will depend on whether signal is positive or
> negative and be set to 0 or 1 as the index into the
> VisADGeometryArray[]. I set up the ScalarMap(shape, Display.Shape),
> set the ShapeSet as an Integer1DSet from 0,1, and set the Shape
> in the shapeControl to be the array of two items. This all works
> fine.
Great.
> What I'd like to do next is to color code the shapes based on
> the strength of the signal, or maybe on some other basis (ex: grey
> out older lightning flashes). Should I create a VisADGeometryArray[]
> that has the same length as my FieldImpl and have each element be
> a clone of the plus or minus, with the appropriate color set in
> each one? What are the overhead (memory usage) issues related
> to this?
You can just ScalarMap signal or some other RealType to RGB,
set up an appropriate color table in your ColorControl, and
your shapes should be colored the way you want.
Cheers,
Bill