Re: Shape question

I started going down the road of adding colors to my VisADGeometryArrays
but I found it much simpler for my needs to use ScalarMaps to RGB, as
Bill suggested, or ConstantMaps.

Doug

Don Murray wrote:
> 
> Hi-
> 
> 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.
> 
> 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?
> 
> Thanks for your help.
> 
> 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
> *************************************************************

-- 
*----------------------------------------------------------------------*
| Doug Lindholm, Software Engineer          |  E-mail: lind@xxxxxxxx   |
| Research Applications Program             |   Phone: 303-497-8374    |
| National Center for Atmospheric Research  |                          |
| P.O. Box 3000                             |     There's no place     |
| Boulder, Colorado 80307-3000              |        like $HOME        |
*----------------------------------------------------------------------*


  • 2001 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: