📄 gridsampledimension.html
字号:
(the name of what looks like the "main" category). This is the value to be returned by <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getDescription()"><CODE>getDescription()</CODE></A>.<DD><CODE>names</CODE> - Sequence of category names for the values contained in a sample dimension, as <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang"><CODE>String</CODE></A> or <CODE>InternationalString</CODE> objects.<DD><CODE>colors</CODE> - Color to assign to each category. This array must have the same length than .<DT><B>Since:</B></DT> <DD>2.3</DD></DL><HR><A NAME="GridSampleDimension(java.lang.CharSequence[], java.awt.Color[])"><!-- --></A><H3>GridSampleDimension</H3><PRE>public <B>GridSampleDimension</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/CharSequence.html" title="class or interface in java.lang">CharSequence</A>[] names, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Color.html" title="class or interface in java.awt">Color</A>[] colors)</PRE><DL><DD><B>Deprecated.</B> <I>Replaced by <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#GridSampleDimension(java.lang.CharSequence, java.lang.CharSequence[], java.awt.Color[])"><CODE>GridSampleDimension(CharSequence, CharSequence[], Color[])</CODE></A>.</I><P><DD>Constructs a sample dimension with a set of qualitative categories and colors. This constructor expects a sequence of category names for the values contained in a 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: [0]="Background", [1]="Water", [2]="Forest", [3]="Urban". The created sample dimension will have no unit and a default set of colors.<P><DT><B>Parameters:</B><DD><CODE>names</CODE> - Sequence of category names for the values contained in a sample dimension, as <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang"><CODE>String</CODE></A> or <CODE>InternationalString</CODE> objects.<DD><CODE>colors</CODE> - Color to assign to each category. This array must have the same length than .</DL><HR><A NAME="GridSampleDimension(java.lang.CharSequence, org.opengis.coverage.SampleDimensionType, org.opengis.coverage.ColorInterpretation, java.awt.Color[], java.lang.CharSequence[], double[], double, double, double, double, javax.units.Unit)"><!-- --></A><H3>GridSampleDimension</H3><PRE>public <B>GridSampleDimension</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/CharSequence.html" title="class or interface in java.lang">CharSequence</A> description, SampleDimensionType type, ColorInterpretation color, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Color.html" title="class or interface in java.awt">Color</A>[] palette, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/CharSequence.html" title="class or interface in java.lang">CharSequence</A>[] categories, double[] nodata, double minimum, double maximum, double scale, double offset, <A HREF="http://jsr-108.sourceforge.net/javadoc/javax/units/Unit.html" title="class or interface in javax.units">Unit</A> unit)</PRE><DL><DD>Constructs a sample dimension with the specified properties. For convenience, any argument which is not a primitive can be , and any <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/CharSequence.html" title="class or interface in java.lang">char sequence</A> can be either a <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang"><CODE>String</CODE></A> or <CODE>InternationalString</CODE> object. <p> This constructor allows the construction of a without explicit construction of <A HREF="../../../org/geotools/coverage/Category.html" title="class in org.geotools.coverage"><CODE>Category</CODE></A> objects. An heuristic approach is used for dispatching the informations into a set of <A HREF="../../../org/geotools/coverage/Category.html" title="class in org.geotools.coverage"><CODE>Category</CODE></A> objects. However, this constructor still less general and provides less fine-grain control than the constructor expecting an array of <A HREF="../../../org/geotools/coverage/Category.html" title="class in org.geotools.coverage"><CODE>Category</CODE></A> objects.<P><DT><B>Parameters:</B><DD><CODE>description</CODE> - The sample dimension title or description, or for the default (the name of what looks like the "main" category). This is the value to be returned by <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getDescription()"><CODE>getDescription()</CODE></A>.<DD><CODE>type</CODE> - The grid value data type (which indicate the number of bits for the data type), or for computing it automatically from the range . This is the value to be returned by <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getSampleDimensionType()"><CODE>getSampleDimensionType()</CODE></A>.<DD><CODE>color</CODE> - The color interpretation, or for a default value (usually <CODE>PALETTE_INDEX</CODE>). This is the value to be returned by <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getColorInterpretation()"><CODE>getColorInterpretation()</CODE></A>.<DD><CODE>palette</CODE> - The color palette associated with the sample dimension, or for a default color palette (usually grayscale). If is non-null, then both arrays usually have the same length. However, this constructor is tolerant on this array length. This is the value to be returned (indirectly) by <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getColorModel()"><CODE>getColorModel()</CODE></A>.<DD><CODE>categories</CODE> - A sequence of category names for the values contained in the sample dimension, or if none. This is the values to be returned by <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getCategoryNames()"><CODE>getCategoryNames()</CODE></A>.<DD><CODE>nodata</CODE> - the values to indicate "no data", or if none. This is the values to be returned by <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getNoDataValues()"><CODE>getNoDataValues()</CODE></A>.<DD><CODE>minimum</CODE> - The lower value, inclusive. The range may or may not includes the values; the range will be adjusted as needed. If was non-null, then is usually 0. This is the value to be returned by <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getMinimumValue()"><CODE>getMinimumValue()</CODE></A>.<DD><CODE>maximum</CODE> - The upper value, <strong>inclusive</strong> as well. The range may or may not includes the values; the range will be adjusted as needed. If was non-null, then is usually equals to . This is the value to be returned by <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getMaximumValue()"><CODE>getMaximumValue()</CODE></A>.<DD><CODE>scale</CODE> - The value which is multiplied to grid values, or 1 if none. This is the value to be returned by <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getScale()"><CODE>getScale()</CODE></A>.<DD><CODE>offset</CODE> - The value to add to grid values, or 0 if none. This is the value to be returned by <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getOffset()"><CODE>getOffset()</CODE></A>.<DD><CODE>unit</CODE> - The unit information for this sample dimension, or if none. This is the value to be returned by <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getUnits()"><CODE>getUnits()</CODE></A>.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the range is not valid.</DL><HR><A NAME="GridSampleDimension(java.lang.CharSequence, org.geotools.coverage.Category[], javax.units.Unit)"><!-- --></A><H3>GridSampleDimension</H3><PRE>public <B>GridSampleDimension</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/CharSequence.html" title="class or interface in java.lang">CharSequence</A> description, <A HREF="../../../org/geotools/coverage/Category.html" title="class in org.geotools.coverage">Category</A>[] categories, <A HREF="http://jsr-108.sourceforge.net/javadoc/javax/units/Unit.html" title="class or interface in javax.units">Unit</A> units) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></PRE><DL><DD>Constructs a sample dimension with an arbitrary set of categories, which may be both quantitative and qualitative. It is possible to specify more than one quantitative categories, providing that their sample value ranges do not overlap. Quantitative categories can map sample values to geophysics values using arbitrary relation (not necessarly linear).<P><DT><B>Parameters:</B><DD><CODE>description</CODE> - The sample dimension title or description, or for the default (the name of what looks like the "main" category). This is the value to be returned by <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getDescription()"><CODE>getDescription()</CODE></A>.<DD><CODE>categories</CODE> - The list of categories.<DD><CODE>units</CODE> - The unit information for this sample dimension. May be if no category has units. This unit apply to values obtained after the <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getSampleToGeophysics()"><CODE>sampleToGeophysics</CODE></A> transformation.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if contains incompatible categories. If may be the case for example if two or more categories have overlapping ranges of sample values.<DT><B>Since:</B></DT> <DD>2.3</DD></DL><HR><A NAME="GridSampleDimension(org.geotools.coverage.Category[], javax.units.Unit)"><!-- --></A><H3>GridSampleDimension</H3><PRE>public <B>GridSampleDimension</B>(<A HREF="../../../org/geotools/coverage/Category.html" title="class in org.geotools.coverage">Category</A>[] categories, <A HREF="http://jsr-108.sourceforge.net/javadoc/javax/units/Unit.html" title="class or interface in javax.units">Unit</A> units) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></PRE><DL><DD><B>Deprecated.</B> <I>Use <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#GridSampleDimension(java.lang.CharSequence, org.geotools.coverage.Category[], javax.units.Unit)"><CODE>GridSampleDimension(CharSequence, Category[], Unit)</CODE></A> instead.</I><P><DD>Constructs a sample dimension with an arbitrary set of categories, which may be both quantitative and qualitative. It is possible to specify more than one quantitative categories, providing that their sample value ranges do not overlap. Quantitative categories can map sample values to geophysics values using arbitrary relation (not necessarly linear).<P><DT><B>Parameters:</B><DD><CODE>categories</CODE> - The list of categories.<DD><CODE>units</CODE> - The unit information for this sample dimension. May be if no category has units. This unit apply to values obtained after the <A HREF="../../../org/geotools/coverage/GridSampleDimension.html#getSampleToGeophysics()"><CODE>sampleToGeophysics</CODE></A> transformation.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if contains incompatible categories. If may be the case for example if two or more categories have overlapping ranges of sample values.</DL><HR><A NAME="GridSampleDimension(org.geotools.coverage.GridSampleDimension)"><!-- --></A><H3>GridSampleDimension</H3><PRE>protected <B>GridSampleDimension</B>(<A HREF="../../../org/geotools/coverage/GridSampleDimension.html" title="class in org.geotools.coverage">GridSampleDimension</A> other)</PRE><DL><DD>Constructs a new sample dimension with the same categories and units than the specified sample dimension.<P><DT><B>Parameters:</B><DD><CODE>other</CODE> - The other sample dimension, or .</DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="wrap(org.opengis.coverage.SampleDimension)"><!-- --></A><H3>wrap</H3><PRE>public static <A HREF="../../../org/geotools/coverage/GridSampleDimension.html" title="class in org.geotools.coverage">GridSampleDimension</A> <B>wrap</B>(SampleDimension sd)</PRE><DL><DD>Wrap the specified OpenGIS's sample dimension into a Geotools's implementation of .<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>sd</CODE> - The sample dimension to wrap into a Geotools implementation.</DL></DD></DL><HR><A NAME="getSampleDimensionType()"><!-- --></A><H3>getSampleDimensionType</H3><PRE>public SampleDimensionType <B>getSampleDimensionType</B>()</PRE><DL><DD>Returns a code value indicating grid value data type. This will also indicate the number of bits for the data type.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getSampleDimensionType</CODE> in interface <CODE>SampleDimension</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a code value indicating grid value data type.</DL></DD></DL><HR><A NAME="getDescription()"><!-- --></A><H3>getDescription</H3><PRE>public InternationalString <B>getDescription</B>()</PRE><DL><DD>Get the sample dimension title or description. This string may be if no description is present.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getDescription</CODE> in interface <CODE>SampleDimension</CODE></DL></DD><DD><DL></DL></DD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -