Re: What makes 2 ScalarMaps the same?

  • To: Paul Gifford <pgg@xxxxxxxxxxxxx>
  • Subject: Re: What makes 2 ScalarMaps the same?
  • From: Doug Lindholm <lind@xxxxxxxx>
  • Date: Fri, 29 Sep 2000 12:29:10 -0600
I was going to reply, but I figured someone would beat me to it since I
get these messages later than most. Just watch, someone will beat me to
this one. :-)

A Display keeps track of the ScalarMaps that have been added to it. If
you have already mapped Time to the XAxis, not only are you not allowed
to add the same (logical) mapping again, you don't NEED to. Once that
Map has been added to the Display, ANY Data that you have added to the
Display that has Time as part of its MathType will be mapped
automagically!

The other issue is how to avoid adding the same map twice. See if you
can do that in your program logic. Otherwise, you could try and catch a
BadMappingException.

Regards,
Doug

Paul Gifford wrote:
> 
> Hi,
> 
>   I asked this as a followup question but maybe it was overlooked.  I'm
> getting this exception:
> 
> visad.BadMappingException: Display.addMap: two ScalarMaps with the same
> RealType & DisplayRealType
> 
>   I have a loop that is going through a vector of data sets.  Each pass
> new ScalarMaps are being created...the maps are local to the loop.  I
> know you can't reuse a ScalarMap but I though creating new ones each
> pass would do the trick.  I guess I thought wrong...any suggestions?
> 
> p
> 
> ------------------------
> Paul Gifford, Capt, USAF
> NOAA/NGDC
> 325 S Broadway EGC2
> Boulder CO 80303
> 
> 303-497-6556 voice
> 303-497-6513 fax

-- 
*----------------------------------------------------------------------*
| 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        |
*----------------------------------------------------------------------*