Re: BadMappingExceptions

Michelle,

The conditions on ScalarMaps and MathTypes are very complex
and can actually vary between different DataRenderers. You
can just try a set of ScalarMaps with a given MathType,
then get any Exceptions by calling the getExceptionVector()
method of the DataRenderer used for the Data - it returns
a Vector of Strings from the BadMappingExceptions and
UnimplementedExceptions.

You can find a list of most DisplayRealTypes and
DisplayTupleTypes at:

  http://www.ssec.wisc.edu/~billh/guide.html#4.1

A couple simple rules:

  1. Cannot mix ScalarMaps to different spatial DisplayTupleTypes.

  2. ScalarMaps to Animation must be from RealTypes occurring only
     as 1-D FunctionType domains.

Good luck,
Bill

On Fri, 18 Jul 2003, Kam, Michelle C wrote:

> Hello,
>
> I am setting up mappings in my own methods. I'm trying to determine when 
> those mappings will throw BadMappingExceptions after they are set up and 
> before I display them. So I want to find out if the set of mappings I 
> constructed will throw a BadMappingException and still keep those "bad" 
> mappings.
>
> A couple of exceptions I get are :
> "mapped to multiple spatial DisplayTupleType-s: ShadowScalarType"  and
> "DisplayRealType-s occur from multiple spatial DisplayTupleType-s: 
> ShadowType.testIndices";
>
> I was looking through the code before the first exception:
>
>         if (tuple != null) {
>           spatial_count++;
>           if (DisplaySpatialTuple != null) {
>             if (!tuple.equals(DisplaySpatialTuple)) {
>               // this mapped to multiple spatial DisplayTupleType-s
>               ScalarType real = (ScalarType) Type;
>               throw new BadMappingException(real.getName() +
>                          "mapped to multiple spatial DisplayTupleType-s: " +
>                                             "ShadowScalarType");
>             }
>           }
>
> I'm not sure what this section of code is accomplishing  if 
> (!tuple.equals(DisplaySpatialTuple)) {
>
> Also, does the set of spatial display scalars with xaxis, yaxis, zaxis also 
> include latitude, longitude, radius? I thought that if these fields were in 
> the same "set" or "grouping", a  mapping can only map to 1 of those fields 
> without throwing an exception. But it does not throw an excpetion when you 
> map 2 fields to the x and y axis, for example
>
> Similarly, for the flow display scalars, we cannot map input fields to more 
> than 1 of flow1X, flow1Y, and flow1Z, right? Or is it that we can only have 
> *one* field mapped to the group of flow1X, flow1Y, flow1Z, flow1Elevation, 
> flow1Azimuth, and flow1Radial? Basically, are the following the groupings the 
> way that the parameters are grouped? If so, is it true that we can only map 
> our input fields to just one of the fields in each of those groups? (not 
> including x, y, z axis):
>
> Spatial Display Scalars: x,y,zaxis, latitude, longitude, radius
> cylindrical: cylRadius, cylAzimuth, cylZAxis
> color display scalars: red, green, blue, RGB, etc
> another group (that hasn't been throwing exceptions): selectvalue, 
> selectrange, iso contour
> flow scalars: flow1X, Y, Z, flow1elevation, azimuth, radial
> 2nd set flow scalars: flow2X,Y,Z, flow2elevation, azimuth, radial
> spatial offset display scalars: xaxis,y, z offset
>
> Lastly, do you know why I get exceptions complaining about DisplayTupleTypes 
> when I'm not constructing those in the mappings I set up?
>
> Thanks,
> Michelle
>
> Michelle Kam           (408) 742-2881
> Lockheed Martin Space Systems Co. SSM/ATC/MSIS
> B/153 O/L922
> 1111 Lockheed Martin Way, Sunnyvale, CA 94089
>
>
>
>


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