RE: DisplayRealType

Also when I said are there any examples that use this class, I mean the
MapProjectionDisplay class.

-----Original Message-----
From: Luke A. Catania (TEC) [mailto:lcatania@xxxxxxxxxxxx]
Sent: Wednesday, June 05, 2002 6:00 PM
To: Don Murray; Bill Hibbard
Subject: RE: DisplayRealType

Looks like I may have been reinventing what already exists and I should just
use ucar.unidata.view.geoloc.MapProjectionDisplay, since it also supports

When I try to use it I get a message:

java.lang.NoClassDefFoundError: org/w3c/dom/Node

What jar file contains this???

Also are there any examples that use this class.


-----Original Message-----
From: owner-visad-list@xxxxxxxxxxxxx
[mailto:owner-visad-list@xxxxxxxxxxxxx]On Behalf Of Don Murray
Sent: Wednesday, June 05, 2002 10:10 AM
To: Bill Hibbard
Subject: Re: DisplayRealType


Bill Hibbard wrote:

> Sorry to say your can't do this. RealTypes and DisplayRealTypes are
> immutable (and for a good reason - tracking the events for all the
> consequences of a RealTyoe change would be prohibitively complex).
> You can deal with changing DisplayRealType bounds esily enough by a
> calculation of appropriate new arguments to ScalarMap.setRange().
> But if you want to change the CoordinateSystem then you need to
> create completely new DisplayRealTypes (with new unique String
> names), new DisplayTupleType, completely clear your Display, and
> rebuild your Display. By rebuilding your Display you are essentially
> tracking the event consequences of your DisplayRealType changes.

If you look at the ucar.unidata.view.geoloc.MapProjectionDisplay,
you will see that every time I switch projections, I have to
create a new DisplayRealTupleType (in the setDisplayTypes
method).  I do this by creating a new DisplayRealType with
a name base and an appended incremented counter:

                new DisplayRealType(
                    "ProjectionLat" + instance,
                    true, -90.0, 90.0, 0.0,
                new DisplayRealType(
                    "ProjectionLon" + instance,
                    true, -180.0, 180.0, 0.0,
                new DisplayRealType(
                    "ProjectionAlt" + instance,
                    true, -1.0, 1.0, -1.0, null);
                new DisplayTupleType(
                    new DisplayRealType[] {

After that, you have to remap latitude to the new displayLatitudeType,
RealType.Longitude to the new displayLongitudeType and
(if 3D) RealType.Altitude to the new displayAltitudeType.  Note in
this class displayAltitudeType is really a passthrough to
Display.ZAxis (bounds -1.0 to 1.0) and the coordinateSystem
just passes through the values directly.

Since DisplayRealTypes can't occur in more than one
DisplayRealTupleType, this was all necessary.

Don Murray                               UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8628                              Boulder, CO 80307