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.
There is an error in my code for reconstructing an irregular topology using the non-missing points. A more accurate version is: float[][] set_samples = domainSet.getSamples(); // count non-missing samples int len = 0; for (int i=0; i<LengthX*LengthY; i++) { if (samples[0][i] == samples[0][i]) len++; // not missing } FlatField new_ff = null; if (len > 0) { float[][] new_set_samples = new float[2][len]; double[][] new_samples = new double[2][len]; len = 0; for (int i=0; i<LengthX*LengthY; i++) { if (samples[0][i] == samples[0][i]) { new_set_samples[0][len] = set_samples[0][i]; new_set_samples[1][len] = set_samples[1][i]; new_samples[0][len] = samples[0][i]; new_samples[1][len] = samples[1][i]; len++; } } Set new_domainSet = new Irregular2DSet( Domain, new_set_samples ); new_ff = new FlatField( overfunc, new_domainSet ); new_ff.setSamples(new_samples); } // now new_ff can be used in place of ff // if all points are missing, new_ff == null > Since I don't have your data or ArcGridReader I was not able to test > my code examples, so there may be a few bugs. I was right. ---------------------------------------------------------- Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI 53706 whibbard@xxxxxxxxxxxxx 608-263-4427 fax: 608-263-6738 http://www.ssec.wisc.edu/~billh/vis.html
visad
archives: