Re: Positioning with Display side CoordinateSystem.

Hi Bill-

Bill Hibbard wrote:

The ScalarMap (Pressure -> SkewTPressure) overrides the
ConstantMap to XAxis for the MathType (Pressure -> (U, V)).
You could use the Data.changeMathType() method to change
the type to something like (dummy_real -> (U, V)), so
your ConstantMap will work.

The pressure ScalarMap postions the data vertically and
I wanted the ConstantMap to position it horizontally.  So
if I used the dummy_real, I lose the vertical positioning
info, unless I have values that correspond to the YAxis.
(It's confusing because the DisplayTupleType is
(SkewTPressure, SkewTTemp, SkewTZAxis) -> (XYZ), but
Y is actually more related to SkewTPressure than SkewTTemp
(i.e. XY look like they are reversed)).

Anyway, the quick solution I've come up with is to get
the CS from the display, pass my Pressure domainSet values
through the toReference (using dummy temps), extract the
Y values from the return, create a new domainset with
RealType.YAxis for type and y values, then create a new
FlatField with (Y -> (U, V)) and add in a ConstantMap of
(1.0 -> X).  Now I just have to figure out how to cut
down on the number of barbs displayed (actually, I can
just resample on specific P (before CS) or Y (after)

Would creating a DomainSet of (Pressure, XAxis) where
XAxis are all 1.0 work or do I still have the
(Temperature -> SkewTTemperature) default coming into
play (or the fact that they are from two different
DisplayTupleTypes).  (I tried creating a Tuple of
(RealType.XAxis, (P -> (U,V))) where the first
component was a Real(RealType.XAxis, 1.0), but
I get an error "DisplayRealType-s occur from
multiple spatial DisplayTupleType-s: ShadowType.

Anyway, if there is no simple way, I'll go ahead
and convert the domain to YAxis and use a ConstantMap
for the XAxis position.

Thanks again.

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

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