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 Hao Bo, Please send all questions to visad@xxxxxxxxxxxxxxxx rather than directly to me. If your data are not organized in a grid, then you should construct an Irregular2DSet rather than a Gridded2DSet. But from the image attached to your previous message it looked like you have a 2-D grid. Somehow you'll need to figure out the number of rows and number of columns. Perhaps by closely inspecting the data, by factoring the number of samples into the products of primes, and by experiment. Good luck, Bill On Sun, 7 Aug 2005, Nakatayo wrote: > hi, bill > > thanks for your help, i put the data into the database, it is a table > likes this > > latitude longitude depth > 63.6733 -27.6191 -3756 > 63.6742 -27.6191 -3768.7 > 63.675 -27.6191 -3768.76 > 63.6758 -27.6191 -3783.42 > 63.6767 -27.6191 -3783.55 > 63.6775 -27.6191 -3802.97 > .................. > > and i use getLatitude(), getLongitude(), getDepth() to return a double[], > double[] latNaN = db.getLatitude(); > double[] lonNaN = db.getlongitude(); > double[] depthNaN = db.getdepth(); > > double[][] coords = new double[2][latNaN.length]; > for (int i=0;i<(nCols*nRows);i++) { > coords[0][i]=latNaN[i]; > coords[1][i]=lonNaN[i]; > } > domain_set = new Gridded2DDoubleSet(domain_tuple,coords,nRows,nCols); > actually I don't know exactly here Cols and Rows represent what? I only > know there are latNaN.length records in the database, and it's my first > time to do these visualization stuff, could u give me more detail > information, thanks again for your help. > > hao bo > > > > > > > > Bill Hibbard wrote: > > >Hi Hao Bo, > > > >I suspect your problem is caused by "nRows = 1". Your grid > >is probably really the product of numbers of rows and columns > >both significantly larger than 1. You need to use these values, > >rather than setting nRows = 1 and nCols = the number of points > >in your grid. Rather, you need to factor the number of grid > >points into nRows * nCols where both are > 1. > > > >Good luck, > >Bill > > > > > > > > > >
visad
archives: