Returns a view of the specified type. Valid types are:
{@link ViewType#GEOPHYSICS GEOPHYSICS}: all sample values are equals to geophysics ("real world") values without the need for any transformation. The {@linkplain SampleDimension#getSampleToGeophysics sample to geophysics} transform{@linkplain org.opengis.referencing.operation.MathTransform1D#isIdentity is identity}for all sample dimensions. "No data" values (if any) are expressed as {@linkplain Float#NaN NaN} numbers. This view is suitable for computation, but usuallynot for rendering.
{@link ViewType#PACKED PACKED}: sample values are typically integers. A {@linkplain SampleDimension#getSampleToGeophysics sample to geophysics} transform mayexists for converting them to "real world" values.
{@link ViewType#RENDERED RENDERED}: synonymous of {@code PACKED} for now. Will beimproved in a future version.
{@link ViewType#PHOTOGRAPHIC PHOTOGRAPHIC}: synonymous of {@code RENDERED} for now.Will be improved in a future version.
{@link ViewType#SAME SAME}: returns {@code this} coverage unchanged.
This method may be understood as applying the JAI's {@linkplain javax.media.jai.operator.PiecewiseDescriptor piecewise} operation withbreakpoints specified by the {@link org.geotools.coverage.Category} objects in eachsample dimension. However, it is more general in that the transformation specified with each breakpoint doesn't need to be linear. On an implementation note, this method tries to use the first of the following operations which is found applicable:
identity, {@linkplain javax.media.jai.operator.LookupDescriptor lookup}, {@linkplain javax.media.jai.operator.RescaleDescriptor rescale}, {@linkplain javax.media.jai.operator.PiecewiseDescriptor piecewise} and inlast ressort a more general (but slower)
sample transcoding algorithm.
@param type The kind of view wanted.
@return The grid coverage. Never {@code null}, but may be {@code this}.
@see GridSampleDimension#geophysics
@see org.geotools.coverage.Category#geophysics
@see javax.media.jai.operator.LookupDescriptor
@see javax.media.jai.operator.RescaleDescriptor
@see javax.media.jai.operator.PiecewiseDescriptor
@since 2.5