📄 operationjai.html
字号:
</DL><HR><A NAME="postProcessResult(java.lang.Boolean, org.geotools.coverage.grid.GridCoverage2D)"><!-- --></A><H3>postProcessResult</H3><PRE>protected <A HREF="../../../../org/geotools/coverage/grid/GridCoverage2D.html" title="class in org.geotools.coverage.grid">GridCoverage2D</A> <B>postProcessResult</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Boolean.html" title="class or interface in java.lang">Boolean</A> requireGeophysicsType, <A HREF="../../../../org/geotools/coverage/grid/GridCoverage2D.html" title="class in org.geotools.coverage.grid">GridCoverage2D</A> coverage)</PRE><DL><DD><DL><DT><B>Parameters:</B><DD><CODE>requireGeophysicsType</CODE> - is a <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Boolean.html" title="class or interface in java.lang"><CODE>Boolean</CODE></A> that tells me if I have to change the "geo-view" for the provided <A HREF="../../../../org/geotools/coverage/grid/GridCoverage2D.html" title="class in org.geotools.coverage.grid"><CODE>GridCoverage2D</CODE></A>.<DD><CODE>coverage</CODE> - <A HREF="../../../../org/geotools/coverage/grid/GridCoverage2D.html" title="class in org.geotools.coverage.grid"><CODE>GridCoverage2D</CODE></A> which we have prepare for a successive operation or for the final user.<DT><B>Returns:</B><DD>the prepared <A HREF="../../../../org/geotools/coverage/grid/GridCoverage2D.html" title="class in org.geotools.coverage.grid"><CODE>GridCoverage2D</CODE></A>.<DT><B>Since:</B></DT> <DD>2.3.1</DD></DL></DD></DL><HR><A NAME="extractSources(org.opengis.parameter.ParameterValueGroup, java.lang.String[], org.geotools.coverage.grid.GridCoverage2D[])"><!-- --></A><H3>extractSources</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Boolean.html" title="class or interface in java.lang">Boolean</A> <B>extractSources</B>(ParameterValueGroup parameters, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] sourceNames, <A HREF="../../../../org/geotools/coverage/grid/GridCoverage2D.html" title="class in org.geotools.coverage.grid">GridCoverage2D</A>[] sources) throws ParameterNotFoundException</PRE><DL><DD>Extracts and prepares ths sources for this <A HREF="../../../../org/geotools/coverage/processing/OperationJAI.html" title="class in org.geotools.coverage.processing"><CODE>OperationJAI</CODE></A>, taking into account the ned for going to the geophysics view of the data in case this operation requires so. <p> The side effect of this method is to fill the array of neede source as well as to change their "geo-view".<P><DD><DL><DT><B>Parameters:</B><DD><CODE>parameters</CODE> - that will control this operation.<DD><CODE>sourceNames</CODE> - names of the parameters that compose the provided <CODE>ParameterValueGroup</CODE>.<DD><CODE>sources</CODE> - is an array that contains all the <A HREF="../../../../org/geotools/coverage/grid/GridCoverage2D.html" title="class in org.geotools.coverage.grid"><CODE>GridCoverage2D</CODE></A> to be used as sources for this operation.<DT><B>Returns:</B><DD>a <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Boolean.html" title="class or interface in java.lang"><CODE>Boolean</CODE></A> that tells me if I have to change the "geo-view" for this coverage.<DT><B>Throws:</B><DD><CODE>ParameterNotFoundException</CODE><DT><B>Since:</B></DT> <DD>2.3.1</DD></DL></DD></DL><HR><A NAME="copyParameters(org.opengis.parameter.ParameterValueGroup)"><!-- --></A><H3>copyParameters</H3><PRE>protected <A HREF="http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/ParameterBlockJAI.html" title="class or interface in javax.media.jai">ParameterBlockJAI</A> <B>copyParameters</B>(ParameterValueGroup parameters)</PRE><DL><DD>Copies parameter values from the ParameterValues object to the ParameterBlockJAI, except the sources. Note: it would be possible to use the ParameterBlockJAI in the user-supplied parameters. However, we peform an unconditional copy instead because some operations (e.g. "GradientMagnitude") may change the values.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>parameters</CODE> - the <CODE>ParameterValueGroup</CODE> to be copied<DT><B>Returns:</B><DD>a clone of the provided <CODE>ParameterValueGroup</CODE>.<DT><B>Since:</B></DT> <DD>2.3.1</DD></DL></DD></DL><HR><A NAME="resampleToCommonGeometry(org.geotools.coverage.grid.GridCoverage2D[], org.opengis.referencing.crs.CoordinateReferenceSystem, org.opengis.referencing.operation.MathTransform2D, org.geotools.factory.Hints)"><!-- --></A><H3>resampleToCommonGeometry</H3><PRE>protected void <B>resampleToCommonGeometry</B>(<A HREF="../../../../org/geotools/coverage/grid/GridCoverage2D.html" title="class in org.geotools.coverage.grid">GridCoverage2D</A>[] sources, CoordinateReferenceSystem crs2D, MathTransform2D gridToCrs2D, <A HREF="../../../../org/geotools/factory/Hints.html" title="class in org.geotools.factory">Hints</A> hints) throws <A HREF="../../../../org/geotools/coverage/grid/InvalidGridGeometryException.html" title="class in org.geotools.coverage.grid">InvalidGridGeometryException</A>, <A HREF="../../../../org/geotools/coverage/processing/CannotReprojectException.html" title="class in org.geotools.coverage.processing">CannotReprojectException</A></PRE><DL><DD>Resamples all sources grid coverages to the same <A HREF="../../../../org/geotools/coverage/grid/GridGeometry2D.html" title="class in org.geotools.coverage.grid">two-dimensional geometry</A> before to apply the <A HREF="../../../../org/geotools/coverage/processing/OperationJAI.html#operation">operation</A>. This method is invoked automatically by the <A HREF="../../../../org/geotools/coverage/processing/OperationJAI.html#doOperation(org.opengis.parameter.ParameterValueGroup, org.geotools.factory.Hints)"><CODE>doOperation</CODE></A> method. Only the two-dimensional part is reprojected (usually the spatial component of a CRS). Extra dimension (if any) are left unchanged. Extra dimensions are typically time axis or depth. Note that extra dimensions are <strong>not</strong> forced to a common geometry; only the two dimensions that apply to a <A HREF="http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/PlanarImage.html" title="class or interface in javax.media.jai"><CODE>PlanarImage</CODE></A> are. This is because the extra dimensions don't need to be compatible for all operations. For example if a source image is a slice in a time series, a second source image could be a slice in the frequency representation of this time series. <p> Subclasses should override this method if they want to specify target <A HREF="../../../../org/geotools/coverage/grid/GridGeometry2D.html" title="class in org.geotools.coverage.grid">grid geometry</A> and coordinate reference system different than the default ones. For example if a subclass wants to force all images to be referenced in a <A HREF="../../../../org/geotools/referencing/crs/DefaultGeographicCRS.html#WGS84">WGS 84</A> CRS, then it may overrides this method as below: <blockquote><pre> protected void resampleToCommonGeometry(...) { crs2D = DefaultGeographicCRS.WGS84; super.resampleToCommonGeometry(sources, crs2D, gridToCrs2D, hints); }</pre></blockquote><P><DD><DL><DT><B>Parameters:</B><DD><CODE>sources</CODE> - The source grid coverages to resample. This array is updated in-place as needed (for example if a grid coverage is replaced by a projected one).<DD><CODE>crs2D</CODE> - The target coordinate reference system to use, or for a default one.<DD><CODE>gridToCrs2D</CODE> - The target "grid to coordinate reference system" transform, or for a default one.<DD><CODE>hints</CODE> - The rendering hints, or if none.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/geotools/coverage/grid/InvalidGridGeometryException.html" title="class in org.geotools.coverage.grid">InvalidGridGeometryException</A></CODE> - if a source coverage has an unsupported grid geometry.<DD><CODE><A HREF="../../../../org/geotools/coverage/processing/CannotReprojectException.html" title="class in org.geotools.coverage.processing">CannotReprojectException</A></CODE> - if a grid coverage can't be resampled for some other reason.</DL></DD></DL><HR><A NAME="deriveGridCoverage(org.geotools.coverage.grid.GridCoverage2D[], org.geotools.coverage.processing.OperationJAI.Parameters)"><!-- --></A><H3>deriveGridCoverage</H3><PRE>protected <A HREF="../../../../org/geotools/coverage/grid/GridCoverage2D.html" title="class in org.geotools.coverage.grid">GridCoverage2D</A> <B>deriveGridCoverage</B>(<A HREF="../../../../org/geotools/coverage/grid/GridCoverage2D.html" title="class in org.geotools.coverage.grid">GridCoverage2D</A>[] sources, <A HREF="../../../../org/geotools/coverage/processing/OperationJAI.Parameters.html" title="class in org.geotools.coverage.processing">OperationJAI.Parameters</A> parameters)</PRE><DL><DD>Applies a JAI operation to a grid coverage. This method is invoked automatically by <A HREF="../../../../org/geotools/coverage/processing/OperationJAI.html#doOperation(org.opengis.parameter.ParameterValueGroup, org.geotools.factory.Hints)"><CODE>doOperation(org.opengis.parameter.ParameterValueGroup, org.geotools.factory.Hints)</CODE></A>. The default implementation performs the following steps: <ul> <li>Gets the <A HREF="../../../../org/geotools/coverage/GridSampleDimension.html" title="class in org.geotools.coverage">sample dimensions</A> for the target images by invoking the <A HREF="../../../../org/geotools/coverage/processing/OperationJAI.html#deriveSampleDimension(org.geotools.coverage.GridSampleDimension[][], org.geotools.coverage.processing.OperationJAI.Parameters)"><CODE>deriveSampleDimension(...)</CODE></A> method.</li> <li>Applied the JAI operation using <A HREF="../../../../org/geotools/coverage/processing/OperationJAI.html#createRenderedImage(javax.media.jai.ParameterBlockJAI, java.awt.RenderingHints)"><CODE>createRenderedImage(javax.media.jai.ParameterBlockJAI, java.awt.RenderingHints)</CODE></A>.</li> <li>Wraps the result in a <A HREF="../../../../org/geotools/coverage/grid/GridCoverage2D.html" title="class in org.geotools.coverage.grid"><CODE>GridCoverage2D</CODE></A> object.</li> </ul><P><DD><DL><DT><B>Parameters:</B><DD><CODE>sources</CODE> - The source coverages.<DD><CODE>parameters</CODE> - Parameters, rendering hints and coordinate reference system to use.<DT><B>Returns:</B><DD>The result as a grid coverage.<DT><B>See Also:</B><DD><A HREF="../../../../org/geotools/coverage/processing/OperationJAI.html#doOperation(org.opengis.parameter.ParameterValueGroup, org.geotools.factory.Hints)"><CODE>doOperation(org.opengis.parameter.ParameterValueGroup, org.geotools.factory.Hints)</CODE></A>, <A HREF="../../../../org/geotools/coverage/processing/OperationJAI.html#deriveSampleDimension(org.geotools.coverage.GridSampleDimension[][], org.geotools.coverage.processing.OperationJAI.Parameters)"><CODE>deriveSampleDimension(org.geotools.coverage.GridSampleDimension[][], org.geotools.coverage.processing.OperationJAI.Parameters)</CODE></A>, <A HREF="http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/JAI.html#createNS(java.lang.String, java.awt.image.renderable.ParameterBlock, java.awt.RenderingHints)" title="class or interface in javax.media.jai"><CODE>JAI.createNS(java.lang.String, java.awt.image.renderable.ParameterBlock, java.awt.RenderingHints)</CODE></A></DL></DD></DL><HR><A NAME="getProperties(java.awt.image.RenderedImage, org.opengis.referencing.crs.CoordinateReferenceSystem, org.opengis.util.InternationalString, org.opengis.referencing.operation.MathTransform, org.geotools.coverage.grid.GridCoverage2D[], org.geotools.coverage.processing.OperationJAI.Parameters)"><!-- --></A><H3>getProperties</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A> <B>getProperties</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> data, CoordinateReferenceSystem crs, InternationalString name, MathTransform toCRS, <A HREF="../../../../org/geotools/coverage/grid/GridCoverage2D.html" title="class in org.geotools.coverage.grid">GridCoverage2D</A>[] sources, <A HREF="../../../../org/geotools/coverage/processing/OperationJAI.Parameters.html" title="class in org.geotools.coverage.processing">OperationJAI.Parameters</A> parameters)</PRE><DL><DD>This method provides a hook for subclasses to set properties on the <A HREF="../../../../org/geotools/coverage/grid/GridCoverage2D.html" title="class in org.geotools.coverage.grid"><CODE>GridCoverage2D</CODE></A> we create during the <A HREF="../../../../org/geotools/coverage/processing/OperationJAI.html#doOperation(org.opengis.parameter.ParameterValueGroup, org.geotools.factory.Hints)"><CODE>doOperation(ParameterValueGroup, Hints)</CODE></A> method. <p> An example of this is provided byt the <A HREF="../../../../org/geotools/coverage/processing/operation/Extrema.html" title="class in org.geotools.coverage.processing.operation"><CODE>Extrema</CODE></A> operation which which provides its results as properties of the produced coverage.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - should be a <A HREF="http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/RenderedOp.html" title="class or interface in javax.media.jai"><CODE>RenderedOp</CODE></A> which is the results of an <CODE>Operation</CODE>.<DD><CODE>crs</CODE> - is the <CODE>CoordinateReferenceSystem</CODE> for the result.<DD><CODE>name</COD
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -