📄 generalgridrange.html
字号:
Returns the valid minimum inclusive grid coordinates along all dimensions.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../org/geotools/coverage/grid/GeneralGridRange.html" title="class in org.geotools.coverage.grid">GeneralGridRange</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/coverage/grid/GeneralGridRange.html#getSubGridRange(int, int)">getSubGridRange</A></B>(int lower, int upper)</CODE><BR> Returns a new grid range that encompass only some dimensions of this grid range. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> GridCoordinates</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/coverage/grid/GeneralGridRange.html#getUpper()">getUpper</A></B>()</CODE><BR> Returns the valid maximum exclusive grid coordinate. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/coverage/grid/GeneralGridRange.html#getUpper(int)">getUpper</A></B>(int dimension)</CODE><BR> Returns the valid maximum exclusive grid coordinate along the specified dimension.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/coverage/grid/GeneralGridRange.html#getUppers()">getUppers</A></B>()</CODE><BR> Returns the valid maximum exclusive grid coordinates along all dimensions.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/coverage/grid/GeneralGridRange.html#hashCode()">hashCode</A></B>()</CODE><BR> Returns a hash value for this grid range. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Rectangle.html" title="class or interface in java.awt">Rectangle</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/coverage/grid/GeneralGridRange.html#toRectangle()">toRectangle</A></B>()</CODE><BR> Returns a <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Rectangle.html" title="class or interface in java.awt"><CODE>Rectangle</CODE></A> with the same bounds as this . </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/coverage/grid/GeneralGridRange.html#toString()">toString</A></B>()</CODE><BR> Returns a string repr閟entation of this grid range. </TD></TR></TABLE> <A NAME="methods_inherited_from_class_Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="GeneralGridRange(int, int)"><!-- --></A><H3>GeneralGridRange</H3><PRE>public <B>GeneralGridRange</B>(int lower, int upper)</PRE><DL><DD>Constructs one-dimensional grid range.<P><DT><B>Parameters:</B><DD><CODE>lower</CODE> - The minimal inclusive value.<DD><CODE>upper</CODE> - The maximal exclusive value.</DL><HR><A NAME="GeneralGridRange(int[], int[])"><!-- --></A><H3>GeneralGridRange</H3><PRE>public <B>GeneralGridRange</B>(int[] lower, int[] upper)</PRE><DL><DD>Constructs a new grid range.<P><DT><B>Parameters:</B><DD><CODE>lower</CODE> - The valid minimum inclusive grid coordinate. The array contains a minimum value for each dimension of the grid coverage. The lowest valid grid coordinate is zero.<DD><CODE>upper</CODE> - The valid maximum exclusive grid coordinate. The array contains a maximum value for each dimension of the grid coverage.<DT><B>See Also:</B><DD><A HREF="../../../../org/geotools/coverage/grid/GeneralGridRange.html#getLowers()"><CODE>getLowers()</CODE></A>, <A HREF="../../../../org/geotools/coverage/grid/GeneralGridRange.html#getUppers()"><CODE>getUppers()</CODE></A></DL><HR><A NAME="GeneralGridRange(java.awt.Rectangle)"><!-- --></A><H3>GeneralGridRange</H3><PRE>public <B>GeneralGridRange</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Rectangle.html" title="class or interface in java.awt">Rectangle</A> rect)</PRE><DL><DD>Constructs two-dimensional range defined by a <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Rectangle.html" title="class or interface in java.awt"><CODE>Rectangle</CODE></A>.<P></DL><HR><A NAME="GeneralGridRange(java.awt.image.Raster)"><!-- --></A><H3>GeneralGridRange</H3><PRE>public <B>GeneralGridRange</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/image/Raster.html" title="class or interface in java.awt.image">Raster</A> raster)</PRE><DL><DD>Constructs two-dimensional range defined by a <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/image/Raster.html" title="class or interface in java.awt.image"><CODE>Raster</CODE></A>.<P></DL><HR><A NAME="GeneralGridRange(java.awt.image.RenderedImage)"><!-- --></A><H3>GeneralGridRange</H3><PRE>public <B>GeneralGridRange</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/image/RenderedImage.html" title="class or interface in java.awt.image">RenderedImage</A> image)</PRE><DL><DD>Constructs two-dimensional range defined by a <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/image/RenderedImage.html" title="class or interface in java.awt.image"><CODE>RenderedImage</CODE></A>.<P></DL><HR><A NAME="GeneralGridRange(org.opengis.spatialschema.geometry.Envelope)"><!-- --></A><H3>GeneralGridRange</H3><PRE>public <B>GeneralGridRange</B>(Envelope envelope)</PRE><DL><DD>Cast the specified envelope into a grid range. This is sometime useful after an envelope has been transformed from "real world" coordinates to grid coordinates using the "grid to CRS" transform. The floating point values are rounded toward the nearest integers. <p> <strong>Note about rounding mode:</strong><br> It would have been possible to round the minimal value toward <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Math.html#floor(double)" title="class or interface in java.lang">floor</A> and the maximal value toward <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Math.html#ceil(double)" title="class or interface in java.lang">ceil</A> in order to make sure that the grid range encompass all the envelope (something similar to what <cite>Java2D</cite> does when casting <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/Rectangle2D.html" title="class or interface in java.awt.geom"><CODE>Rectangle2D</CODE></A> to <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Rectangle.html" title="class or interface in java.awt"><CODE>Rectangle</CODE></A>). But this approach has an undesirable side effect: it may changes the image <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/image/RenderedImage.html#getWidth()" title="class or interface in java.awt.image">width</A> or <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/image/RenderedImage.html#getHeight()" title="class or interface in java.awt.image">height</A>. For example the range would be casted to , which leads to unexpected result when using grid range with image operations like "<A HREF="http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/AffineDescriptor.html" title="class or interface in javax.media.jai.operator"><CODE>Affine</CODE></A>". For avoiding such changes in size, it is necessary to use the same rounding mode for both minimal and maximal values. The selected rounding mode is <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Math.html#round(double)" title="class or interface in java.lang">nearest integer</A> in this implementation.<P><DT><B>Since:</B></DT> <DD>2.2</DD></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="getDimension()"><!-- --></A><H3>getDimension</H3><PRE>public int <B>getDimension</B>()</PRE><DL><DD>Returns the number of dimensions.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getDimension</CODE> in interface <CODE>GridRange</CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getLower()"><!-- --></A><H3>getLower</H3><PRE>public GridCoordinates <B>getLower</B>()</PRE><DL><DD>Returns the valid minimum inclusive grid coordinate. The sequence contains a minimum value for each dimension of the grid coverage.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getLower</CODE> in interface <CODE>GridRange</CODE></DL></DD><DD><DL><DT><B>Since:</B></DT> <DD>2.4</DD></DL></DD></DL><HR><A NAME="getLower(int)"><!-- --></A><H3>getLower</H3><PRE>public int <B>getLower</B>(int dimension)</PRE><DL><DD>Returns the valid minimum inclusive grid coordinate along the specified dimension.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getLower</CODE> in interface <CODE>GridRange</CODE></DL></DD><DD><DL><DT><B>See Also:</B><DD><A HREF="../../../../org/geotools/coverage/grid/GeneralGridRange.html#getLowers()"><CODE>getLowers()</CODE></A></DL></DD></DL><HR><A NAME="getUpper()"><!-- --></A><H3>getUpper</H3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -