Re: Problems to get data into VisAD

Hallo Bill,

sorry, but until now I have some things to do, so there was no time to answer.

Bill Hibbard wrote:

Hi Olav,

We would be very interested to see the complete message
printed by the NullPointerException, including the stack
dump with line numbers.
Here you can see the complete message.

       at visad.Gridded3DSet.makeIsoLines(
       at visad.ShadowType.makeContour(
       at visad.java2d.ShadowTypeJ2D.makeContour(
at visad.ShadowFunctionOrSetType.doTransform( at visad.java2d.ShadowFunctionOrSetTypeJ2D.doTransform( at visad.java2d.DefaultRendererJ2D.doTransform(
       at visad.java2d.RendererJ2D.doAction(
       at visad.DisplayImpl.doAction(
       at visad.java2d.DisplayImplJ2D.doAction(
       at visad.util.ThreadPool$

The ProductSet is the Cartesian product, so given four Sets
with domain dimension = 2, their ProductSet has domain
dimension = 8. But your MathType dimension = 2, so you get
the message.

If your Gridded2DSets do not overlap, then you want their
Thank you for your explanation. I have switched to UnionSet. Still now I have a problem to get my data (e.g. temperature) into the FlatField. When I use this code

UnionSet finalSet = new UnionSet(reader.getCoordinateTuple (),domainSet);
FlatField val_ff = new FlatField (funcDomainTemperature, finalSet);

for(i=0; i<axis.size (); i++)
        double[][] variableValues = (double[][])variable.get (i);
        int y = variableValues.length-1;
double[][] tempSamples = new double[1][variableValues[y].length];
        for(j = 0; j < variableValues[y].length; j++)
           tempSamples[0][j] =  variableValues[y][j];
val_ff.setSamples (tempSamples); }
I get the following message

visad.FieldException: setSamples: bad array length
       at visad.FlatField.setSamples(
       at visad.FlatField.setSamples(
at de.cle.visad.loader.TecPlotAdapterGraphicsTest01.main(

At the documentation I have found nothing about UnionSets and the setSample method.

If they do overlap, then the combined topology will not
be a simple union of gridded topologies, and you will
need to merge arrays of explicit locations for each grid
and pass the merged locations to an Irregular2DSet. You
can either compute the merged topology using a DelaunayCustom
object, or you can let Irregular2DSet compute it using a
Delaunay algorithm, which are slow.

Also, I would avoid using "Double" Set (e.g., Gridded2DDoubleSet),
unless your locations really do need double precision. We
use it for combined dates and times, but it shouldn't be
necessary for most spatial locations.

I hope somebody have an idea how I can solve my problems.



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