NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi Olav, > I have some problems to get my data into VisAD. > The data are structured and splited into subdomains. Each subdomain has > different values of lengthX and lengthY like the following 2D example > > _______________________________________________ > | | |subd. | subd. > | > |subd. |subd. |________________|____________________| > |_____|_____| > | subd. | > |___________| > > My first approach was to create DataReferenzImpl, FlatField and > Gridded2DDoubleSet for each subdomain. With a ScalarMap(MathType, > Display.RGB) it works. But now when I try to use a Display.IsoContour I > get a NullPointerException. We would be very interested to see the complete message printed by the NullPointerException, including the stack dump with line numbers. > Second I tryed to use a ProductSet with an array of Gridded2DDoubleSets. > > FunctionType funcDomainTemperature = new FunctionType (domainTuple, > tempType); > > for(i=0; i<axis.size (); i++) > { > double[][] pointValues = (double[][])axis.get (i); > int[] axisLength = (int[]) dimensions.get (i); > > domainSet[i] = new Gridded2DDoubleSet (domainTuple, pointValues, > axisLength[0], > axisLength[1]); > > } > > ProductSet set = new ProductSet (domainSet); > FlatField val_ff = new FlatField (funcDomainTemperature, set); > > But now I get a SetException "set and type dimensions don't match" when > create the FlatField. 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 UnionSet. 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. Good luck, Bill ---------------------------------------------------------- Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI 53706 hibbard@xxxxxxxxxxxxxxxxx 608-263-4427 fax: 608-263-6738 http://www.ssec.wisc.edu/~billh/vis.html
visad
archives: