> I have a single file containing information about a river salinity and
> bathymetry(the ground).
> I would like to:
> - read this file and create two different objects (ground and salinity
Most file format adapters (e.g., Plain for netCDF) will
read a file as one Data object, but VisAD includes methods
for splitting data objects. Such as the extract() method
of Field, which lets you split a Field like:
((x, y) -> (salinity, bathymetry))
((x, y) -> salinity)
((x, y) -> bathymetry)
> - construct a scene graph with both;
> - display them together at a spreadsheet cell.
Just pass each Data object to the setData() method of
a different DataReferenceImpl, and pass those to the
addReference() methods of a single DisplayImpl. I am
not sure how to do this with SpreadSheet cells.
> I would also like to be able to manipulate them separately, for example,
> performing clipping at the volume
> representing the salinity, triangulating the bathymetry, or just showing
> one of them at a time, etc.
Clipping applies to the whole Display, not to individual
depicted Data objects. To clip only one, they would have
to be in side-by-side Displays.
Individually enabling and disabling their depiction can be
done with calls to the toggle() methods of their DataRenderers.
> I don't have much experience using VisAD, so don't know how to
> accomplish these tasks exactly.
The first order of business is to spend some time working
through Ugo's excellent tutorial.
> Should I custom a DataRenderer, DisplayRenderer and a ShadowType?
These are very advanced subjects. You can do almost everything
without thinking about such things. First study the tutorial.