/** * Returns the value which is multiplied to grid values for this sample dimension. * This attribute is typically used when the sample dimension represents elevation * data. The transformation equation is: * * <blockquote><pre>offset + scale*sample</pre></blockquote> * * Together with {@link #getOffset()} and {@link #getNoDataValues()}, this method provides a * limited way to transform sample values into geophysics values. However, the recommended * way is to use the {@link #getSampleToGeophysics sampleToGeophysics} transform instead, * which is more general and take care of converting automatically "no data" values * into {@code NaN}. * * @return The scale to multiply to grid value. * @throws IllegalStateException if the transform from sample to geophysics values * is not a linear relation. * * @see #getSampleToGeophysics * @see #rescale */ public double getScale() { return getCoefficient(1); }
/** * Returns the value to add to grid values for this sample dimension. * This attribute is typically used when the sample dimension represents * elevation data. The transformation equation is: * * <blockquote><pre>offset + scale*sample</pre></blockquote> * * Together with {@link #getScale()} and {@link #getNoDataValues()}, this method provides a * limited way to transform sample values into geophysics values. However, the recommended * way is to use the {@link #getSampleToGeophysics sampleToGeophysics} transform instead, * which is more general and take care of converting automatically "no data" values * into {@code NaN}. * * @return The offset to add to grid values. * @throws IllegalStateException if the transform from sample to geophysics values * is not a linear relation. * * @see #getSampleToGeophysics * @see #rescale */ public double getOffset() throws IllegalStateException { return getCoefficient(0); }
/** * Returns the value which is multiplied to grid values for this sample dimension. * This attribute is typically used when the sample dimension represents elevation * data. The transformation equation is: * * <blockquote><pre>offset + scale*sample</pre></blockquote> * * Together with {@link #getOffset()} and {@link #getNoDataValues()}, this method provides a * limited way to transform sample values into geophysics values. However, the recommended * way is to use the {@link #getSampleToGeophysics sampleToGeophysics} transform instead, * which is more general and take care of converting automatically "no data" values * into {@code NaN}. * * @return The scale to multiply to grid value. * @throws IllegalStateException if the transform from sample to geophysics values * is not a linear relation. * * @see #getSampleToGeophysics * @see #rescale */ public double getScale() { return getCoefficient(1); }
/** * Returns the value to add to grid values for this sample dimension. * This attribute is typically used when the sample dimension represents * elevation data. The transformation equation is: * * <blockquote><pre>offset + scale*sample</pre></blockquote> * * Together with {@link #getScale()} and {@link #getNoDataValues()}, this method provides a * limited way to transform sample values into geophysics values. However, the recommended * way is to use the {@link #getSampleToGeophysics sampleToGeophysics} transform instead, * which is more general and take care of converting automatically "no data" values * into {@code NaN}. * * @return The offset to add to grid values. * @throws IllegalStateException if the transform from sample to geophysics values * is not a linear relation. * * @see #getSampleToGeophysics * @see #rescale */ public double getOffset() throws IllegalStateException { return getCoefficient(0); }