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.
> > for example, what do these lines of code (from Test47.java) do? > > > > ScalarMap shape_map = (ScalarMap )display.getMapVector().lastElement(); > > RealType count = (RealType )shape_map.getScalar(); > > float[][] counts = new float[][] {{0.0f, 1.0f, 2.0f, 3.0f}}; > > Gridded1DSet count_set = new Gridded1DSet(count, counts, counts[0].length); > > This gets the last ScalarMap in the display (which the app knows is > to Shape), gets its RealType, creates a float[][] array, and creates > a Gridded1DSet. I should add that this Gridded1DSet is probably pass to the setShapeSet() method of the ShapeControl, used to quantize 'count' values to the discrete array of VisADGeometryArrays passed the the setShapes() method of the ShapeControl.
visad
archives: