📄 gridsampledimension.html
字号:
</DL><HR><A NAME="getCategoryNames()"><!-- --></A><H3>getCategoryNames</H3><PRE>public InternationalString[] <B>getCategoryNames</B>() throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE><DL><DD>Returns a sequence of category names for the values contained in this sample dimension. This allows for names to be assigned to numerical values. The first entry in the sequence relates to a cell value of zero. For example: <blockquote><pre> [0] Background [1] Water [2] Forest [3] Urban </pre></blockquote><P><DD><DL><DT><B>Specified by:</B><DD><CODE>getCategoryNames</CODE> in interface <CODE>SampleDimension</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>The sequence of category names for the values contained in this sample dimension, or if there is no category in this sample dimension.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if a sequence can't be mapped because some category use negative or non-integer sample values.<DT><B>See Also:</B><DD><A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getCategories()"><CODE>getCategories()</CODE></A>, <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getCategory(double)"><CODE>getCategory(double)</CODE></A></DL></DD></DL><HR><A NAME="getCategories()"><!-- --></A><H3>getCategories</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/List.html" title="class or interface in java.util">List</A> <B>getCategories</B>()</PRE><DL><DD>Returns all categories in this sample dimension. Note that a <A HREF="../../../org/geotools/coverage/Category.html" title="class in org.geotools.coverage"><CODE>Category</CODE></A> object may apply to an arbitrary range of sample values. Consequently, the first element in this collection may not be directly related to the sample value .<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>The list of categories in this sample dimension, or if none.<DT><B>See Also:</B><DD><A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getCategoryNames()"><CODE>getCategoryNames()</CODE></A>, <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getCategory(double)"><CODE>getCategory(double)</CODE></A></DL></DD></DL><HR><A NAME="getCategory(double)"><!-- --></A><H3>getCategory</H3><PRE>public <A HREF="../../../org/geotools/coverage/Category.html" title="class in org.geotools.coverage">Category</A> <B>getCategory</B>(double sample)</PRE><DL><DD>Returns the category for the specified sample value. If this method can't maps a category to the specified value, then it returns .<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>sample</CODE> - The value (can be one of values).<DT><B>Returns:</B><DD>The category for the supplied value, or if none.<DT><B>See Also:</B><DD><A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getCategories()"><CODE>getCategories()</CODE></A>, <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getCategoryNames()"><CODE>getCategoryNames()</CODE></A></DL></DD></DL><HR><A NAME="getBackground()"><!-- --></A><H3>getBackground</H3><PRE>public <A HREF="../../../org/geotools/coverage/Category.html" title="class in org.geotools.coverage">Category</A> <B>getBackground</B>()</PRE><DL><DD>Returns a default category to use for background. A background category is used when an image is <A HREF="../gp/package-summary.html#Resample">resampled</A> (for example reprojected in an other coordinate system) and the resampled image do not fit in a rectangular area. It can also be used in various situation where a raisonable "no data" category is needed. The default implementation try to returns one of the <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getNoDataValues()">no data values</A>. If no suitable category is found, then a <A HREF="../../../org/geotools/coverage/Category.html#NODATA">default</A> one is returned.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>A category to use as background for the "Resample" operation. Never .</DL></DD></DL><HR><A NAME="getNoDataValues()"><!-- --></A><H3>getNoDataValues</H3><PRE>public double[] <B>getNoDataValues</B>() throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE><DL><DD>Returns the values to indicate "no data" for this sample dimension. The default implementation deduces the "no data" values from the list of categories supplied at construction time. The rules are: <ul> <li>If <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getSampleToGeophysics()"><CODE>getSampleToGeophysics()</CODE></A> returns , then returns as well. This means that this sample dimension contains no category or contains only qualitative categories (e.g. a band from a classified image).</li> <li>If <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getSampleToGeophysics()"><CODE>getSampleToGeophysics()</CODE></A> returns an identity transform, then returns . This means that sample value in this sample dimension are already expressed in geophysics values and that all "no data" values (if any) have already been converted into values.</li> <li>Otherwise, if there is at least one quantitative category, returns the sample values of all non-quantitative categories. For example if "Temperature" is a quantitative category and "Land" and "Cloud" are two qualitative categories, then sample values for "Land" and "Cloud" will be considered as "no data" values. "No data" values that are already will be ignored.</li> </ul> Together with <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getOffset()"><CODE>getOffset()</CODE></A> and <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getScale()"><CODE>getScale()</CODE></A>, this method provides a limited way to transform sample values into geophysics values. However, the recommended way is to use the <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getSampleToGeophysics()"><CODE>sampleToGeophysics</CODE></A> transform instead, which is more general and take care of converting automatically "no data" values into .<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getNoDataValues</CODE> in interface <CODE>SampleDimension</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>The values to indicate no data values for this sample dimension, or if not applicable.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if some qualitative categories use a range of non-integer values.<DT><B>See Also:</B><DD><A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getSampleToGeophysics()"><CODE>getSampleToGeophysics()</CODE></A></DL></DD></DL><HR><A NAME="getMinimumValue()"><!-- --></A><H3>getMinimumValue</H3><PRE>public double <B>getMinimumValue</B>()</PRE><DL><DD>Returns the minimum value occurring in this sample dimension. The default implementation fetch this value from the categories supplied at construction time. If the minimum value can't be computed, then this method returns <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Double.html#NEGATIVE_INFINITY" title="class or interface in java.lang"><CODE>Double.NEGATIVE_INFINITY</CODE></A>.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getMinimumValue</CODE> in interface <CODE>SampleDimension</CODE></DL></DD><DD><DL><DT><B>See Also:</B><DD><A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getRange()"><CODE>getRange()</CODE></A></DL></DD></DL><HR><A NAME="getMaximumValue()"><!-- --></A><H3>getMaximumValue</H3><PRE>public double <B>getMaximumValue</B>()</PRE><DL><DD>Returns the maximum value occurring in this sample dimension. The default implementation fetch this value from the categories supplied at construction time. If the maximum value can't be computed, then this method returns <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Double.html#POSITIVE_INFINITY" title="class or interface in java.lang"><CODE>Double.POSITIVE_INFINITY</CODE></A>.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getMaximumValue</CODE> in interface <CODE>SampleDimension</CODE></DL></DD><DD><DL><DT><B>See Also:</B><DD><A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getRange()"><CODE>getRange()</CODE></A></DL></DD></DL><HR><A NAME="getRange()"><!-- --></A><H3>getRange</H3><PRE>public <A HREF="../../../org/geotools/util/NumberRange.html" title="class in org.geotools.util">NumberRange</A> <B>getRange</B>()</PRE><DL><DD>Returns the range of values in this sample dimension. This is the union of the range of values of every categories, excluding values. A <A HREF="../../../org/geotools/util/NumberRange.html" title="class in org.geotools.util"><CODE>NumberRange</CODE></A> object gives more informations than <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getMinimumValue()"><CODE>getMinimumValue()</CODE></A> and <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getMaximumValue()"><CODE>getMaximumValue()</CODE></A> methods since it contains also the data type (integer, float, etc.) and inclusion/exclusion informations.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>The range of values. May be if this sample dimension has no quantitative category.<DT><B>See Also:</B><DD><A HREF="../../../org/geotools/coverage/Category.html#getRange()"><CODE>Category.getRange()</CODE></A>, <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getMinimumValue()"><CODE>getMinimumValue()</CODE></A>, <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getMaximumValue()"><CODE>getMaximumValue()</CODE></A></DL></DD></DL><HR><A NAME="getLabel(double, java.util.Locale)"><!-- --></A><H3>getLabel</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getLabel</B>(double value, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Locale.html" title="class or interface in java.util">Locale</A> locale)</PRE><DL><DD>Returns a string representation of a sample value. This method try to returns a representation of the geophysics value; the transformation is automatically applied when necessary. Mor
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -