Re: RealType problem

Hi Omar-

Omar Bennani wrote:
Hi
In my application sometimes I display a 2D chart and
sometimes a 3D chart, when for example I display a 2D
chart with :

time = RealType.getRealType("time", SI.second, null);
height = RealType.getRealType("height");

but if after I want to display a 3D chart (in another
procedure and declaring a nex display) with :

latitude=RealType.getRealType("boucle",SI.meter,null);
longitude=RealType.getRealType("time",SI.meter,null);
domain_tuple=new RealTupleType(latitude,longitude);
altitude=RealType.getRealType("height",SI.meter,null);

RealTypes are immutable - you can't have a RealType with
the same name and different (non-convertable) units.
You have already defined a RealType "time" with name
"time" and unit SI.second.  The RealType.getRealType call
for longitude will be null because SI.meter is not
convertible with SI.second.  Use a different name for
the longitude RealType instead of "time".

Also, in the first case you get a RealType for height
that has null units and when you try this for altitude,
you will get null, because SI.meter is not convertible
with null.  Either pass in a unit for the height declaration,
or no unit for the altitude.

It doesn't work, I have a for latitude and longitude a
null value
And it's the same when I display first a 3D and after
a 2D chart
thanks

Good luck!

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
        "Time makes everyone interesting, even YOU!"
*************************************************************



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