📄 coveragestack.html
字号:
public final int <B>zDimension</B></PRE><DL><DD>The dimension of the <var>z</var> ordinate (the last value in coordinate points). This is always the <A HREF="../../../org/geotools/coverage/AbstractCoverage.html#getCoordinateReferenceSystem()">coordinate reference system</A> dimension minus 1.<P><DL><DT><B>Since:</B></DT> <DD>2.3</DD></DL></DL><!-- ========= 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="CoverageStack(java.lang.CharSequence, java.util.Collection)"><!-- --></A><H3>CoverageStack</H3><PRE>public <B>CoverageStack</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> name, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A> coverages) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Constructs a new coverage stack with all the supplied elements. All coverages must uses the same coordinate reference system. Additionnaly, all coverages must specify their <var>z</var> value in the last dimension of their envelope. The example below constructs two dimensional grid coverages (to be given as the argument) for the same area, but at different times: <blockquote><pre> GridCoverageFactory factory = ...; CoordinateReferenceSystem crs2D = ...; // Yours horizontal CRS. TemporalCRS timeCRS = ...; // Yours CRS for time measurement. CoordinateReferenceSystem crs3D = new CompoundCRS(crs3D, timeCRS); List<Coverage> coverages = new ArrayList<Coverage>(); GeneralEnvelope envelope = new GeneralEnvelope(3); // A <strong>3-dimensional</strong> envelope. envelope.setRange(...); // Set the horizontal part. for (int i=0; i<...; i++) { envelope.setRange(2, startTime, endTime); coverages.add(factory.create(..., crs, envelope, ...); } </pre></blockquote> This convenience constructor wraps all coverage intos a <A HREF="../../../org/geotools/coverage/CoverageStack.Adapter.html" title="class in org.geotools.coverage"><CODE>Adapter</CODE></A> object. Users with a significant amount of data are encouraged to uses the constructor expecting <A HREF="../../../org/geotools/coverage/CoverageStack.Element.html" title="interface in org.geotools.coverage"><CODE>Element</CODE></A> objects instead, in order to provides their own implementation loading data only when needed.<P><DT><B>Parameters:</B><DD><CODE>name</CODE> - The name for this coverage.<DD><CODE>coverages</CODE> - All <CODE>Coverage</CODE> elements for this stack.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an I/O operation was required and failed.</DL><HR><A NAME="CoverageStack(java.lang.CharSequence, org.opengis.referencing.crs.CoordinateReferenceSystem, java.util.Collection)"><!-- --></A><H3>CoverageStack</H3><PRE>public <B>CoverageStack</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> name, CoordinateReferenceSystem crs, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A> elements) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Constructs a new coverage stack with all the supplied elements.<P><DT><B>Parameters:</B><DD><CODE>name</CODE> - The name for this coverage.<DD><CODE>crs</CODE> - The coordinate reference system for this coverage.<DD><CODE>elements</CODE> - All coverage <A HREF="../../../org/geotools/coverage/CoverageStack.Element.html" title="interface in org.geotools.coverage"><CODE>Element</CODE></A>s for this stack.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an I/O operation was required and failed.</DL><HR><A NAME="CoverageStack(java.lang.CharSequence, org.geotools.coverage.CoverageStack)"><!-- --></A><H3>CoverageStack</H3><PRE>protected <B>CoverageStack</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> name, <A HREF="../../../org/geotools/coverage/CoverageStack.html" title="class in org.geotools.coverage">CoverageStack</A> source)</PRE><DL><DD>Constructs a new coverage using the same elements than the specified coverage stack.<P></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="getEnvelope()"><!-- --></A><H3>getEnvelope</H3><PRE>public Envelope <B>getEnvelope</B>()</PRE><DL><DD>Returns the bounding box for the coverage domain in coordinate system coordinates.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getEnvelope</CODE> in interface <CODE>Coverage</CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../org/geotools/coverage/AbstractCoverage.html#getEnvelope()">getEnvelope</A></CODE> in class <CODE><A HREF="../../../org/geotools/coverage/AbstractCoverage.html" title="class in org.geotools.coverage">AbstractCoverage</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>The bounding box for the coverage domain in coordinate system coordinates.</DL></DD></DL><HR><A NAME="getNumSampleDimensions()"><!-- --></A><H3>getNumSampleDimensions</H3><PRE>public int <B>getNumSampleDimensions</B>()</PRE><DL><DD>Returns the number of sample dimension in this coverage.<P><DD><DL></DL></DD></DL><HR><A NAME="getSampleDimension(int)"><!-- --></A><H3>getSampleDimension</H3><PRE>public SampleDimension <B>getSampleDimension</B>(int index)</PRE><DL><DD>Retrieve sample dimension information for the coverage. For a grid coverage, a sample dimension is a band. The sample dimension information include such things as description, data type of the value (bit, byte, integer...), the no data values, minimum and maximum values and a color table if one is associated with the dimension.<P><DD><DL></DL></DD></DL><HR><A NAME="snap(org.opengis.spatialschema.geometry.DirectPosition)"><!-- --></A><H3>snap</H3><PRE>public void <B>snap</B>(DirectPosition point) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Snaps the specified coordinate point to the coordinate of the nearest voxel available in this coverage. First, this method locate the <A HREF="../../../org/geotools/coverage/CoverageStack.Element.html" title="interface in org.geotools.coverage">coverage element</A> at or near the last ordinate value (the <var>z</var> value). If no coverage is available at the specified <var>z</var> value, then the nearest one is selected. Next, this method locate the pixel under the coordinate in the coverage element. The is then set to the pixel center coordinate and to the <var>z</var> value of the selected coverage element. Consequently, calling any method with snapped coordinates will returns non-interpolated values.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>point</CODE> - The point to snap.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an I/O operation was required but failed.</DL></DD></DL><HR><A NAME="evaluate(org.opengis.spatialschema.geometry.DirectPosition)"><!-- --></A><H3>evaluate</H3><PRE>public <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>evaluate</B>(DirectPosition coord)</PRE><DL><DD>Returns a sequence of values for a given point in the coverage. The default implementation delegates to the <A HREF="../../../org/geotools/coverage/CoverageStack.html#evaluate(org.opengis.spatialschema.geometry.DirectPosition, double[])"><CODE>evaluate(DirectPosition, double[])</CODE></A> method.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>coord</CODE> - The coordinate point where to evaluate.<DT><B>Returns:</B><DD>The value at the specified point.<DT><B>Throws:</B><DD><CODE>PointOutsideCoverageException</CODE> - if is outside coverage.<DD><CODE>CannotEvaluateException</CODE> - if the computation failed for some other reason.</DL></DD></DL><HR><A NAME="evaluate(org.opengis.spatialschema.geometry.DirectPosition, boolean[])"><!-- --></A><H3>evaluate</H3><PRE>public boolean[] <B>evaluate</B>(DirectPosition coord, boolean[] dest) throws CannotEvaluateException</PRE><DL><DD>Returns a sequence of boolean values for a given point in the coverage.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>evaluate</CODE> in interface <CODE>Coverage</CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../org/geotools/coverage/AbstractCoverage.html#evaluate(org.opengis.spatialschema.geometry.DirectPosition, boolean[])">evaluate</A></CODE> in class <CODE><A HREF="../../../org/geotools/coverage/AbstractCoverage.html" title="class in org.geotools.coverage">AbstractCoverage</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>coord</CODE> - The coordinate point where to evaluate.<DD><CODE>dest</CODE> - An array in which to store values, or to create a new array.<DT><B>Returns:</B><DD>The array, or a newly created array if was null.<DT><B>Throws:</B><DD><CODE>PointOutsideCoverageException</CODE> - if is outside coverage.<DD><CODE>CannotEvaluateException</CODE> - if the computation failed for some other reason.</DL></DD></DL><HR><A NAME="evaluate(org.opengis.spatialschema.geometry.DirectPosition, byte[])"><!-- --></A><H3>evaluate</H3><PRE>public byte[] <B>evaluate</B>(DirectPosition coord, byte[] dest) throws CannotEvaluateException</PRE><DL><DD>Returns a sequence of byte values for a given point in the coverage.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>evaluate</CODE> in interface <CODE>Coverage</CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../org/geotools/coverage/AbstractCoverage.html#evaluate(org.opengis.spatialschema.geometry.DirectPosition, byte[])">evaluate</A></CODE> in class <CODE><A HREF="../../../org/geotools/coverage/AbstractCoverage.html" title="class in org.geotools.coverage">AbstractCoverage</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>coord</CODE> - The coordinate point where to evaluate.<DD><CODE>dest</CODE> - An array in which to store values, or to create a new array.<DT><B>Returns:</B><DD>The array, or a newly created array if was null.<DT><B>Throws:</B><DD><CODE>PointOutsideCoverageException</CODE> - if is outside coverage.<DD><CODE>CannotEvaluateException</CODE> - if the computation failed for some other reason.</DL></DD></DL><HR><A NAME="evaluate(org.opengis.spatialschema.geometry.DirectPosition, int[])"><!-- --></A><H3>evaluate</H3><PRE>public int[] <B>evaluate</B>(DirectPosition coord, int[] dest) throws CannotEvaluateException</PRE><DL><DD>Returns a sequence of integer values for a given point in the coverage.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>evaluate</CODE> in interface <CODE>Coverage</CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../org/geotools/coverage/AbstractCoverage.html#evaluate(org.opengis.spatialschema.geometry.DirectPosition, int[])">evaluate</A></CODE> in class <CODE><A HREF="../../../org/geotools/coverage/AbstractCoverage.html" title="class in org.geotools.coverage">AbstractCoverage</A></CODE></DL></DD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -