Re: RealType problem

Hi Omar-

Omar Bennani wrote:
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 :

domain_tuple=new RealTupleType(latitude,longitude);

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

Good luck!

Don Murray                               UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8628                              Boulder, CO 80307
        "Time makes everyone interesting, even YOU!"