blob: 0248770a6df033e7c5a67d125964e1ef9d2d8116 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.4) on Fri Sep 20 12:10:30 CEST 2019 -->
<title>GridCoverage (Apache SIS 1.0 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2019-09-20">
<meta name="keywords" content="org.apache.sis.coverage.grid.GridCoverage class">
<meta name="keywords" content="getCoordinateReferenceSystem()">
<meta name="keywords" content="getGridGeometry()">
<meta name="keywords" content="getSampleDimensions()">
<meta name="keywords" content="forConvertedValues()">
<meta name="keywords" content="render()">
<meta name="keywords" content="toString()">
<meta name="keywords" content="toTree()">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../sis.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="GridCoverage (Apache SIS 1.0 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":6,"i1":10,"i2":10,"i3":10,"i4":6,"i5":10,"i6":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/GridCoverage.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.sis.coverage.grid</a></div>
<h2 title="Class GridCoverage" class="title">Class GridCoverage</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></li>
<li>
<ul class="inheritance">
<li>GridCoverage</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public abstract class <span class="typeNameLabel">GridCoverage</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></pre>
<div class="block">Base class of coverages with domains defined as a set of grid points.
The essential property of coverage is to be able to generate a value for any point within its domain.
Since a grid coverage is represented by a grid of values, the value returned by the coverage for a point
is that of the grid value whose location is nearest the point.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
<p><font size="-1">Defined in the <code>sis-feature</code> module</font></p>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colSecond" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.sis.coverage.grid.GridGeometry,java.util.Collection)">GridCoverage</a></span>&#8203;(<a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">GridGeometry</a>&nbsp;grid,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;? extends <a href="../SampleDimension.html" title="class in org.apache.sis.coverage">SampleDimension</a>&gt;&nbsp;bands)</code></th>
<td class="colLast">
<div class="block">Constructs a grid coverage using the specified grid geometry and sample dimensions.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>abstract <a href="GridCoverage.html" title="class in org.apache.sis.coverage.grid">GridCoverage</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#forConvertedValues(boolean)">forConvertedValues</a></span>&#8203;(boolean&nbsp;converted)</code></th>
<td class="colLast">
<div class="block">Returns a grid coverage that contains real values or sample values, depending if <code>converted</code> is <code>true</code>
or <code>false</code> respectively.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/crs/CoordinateReferenceSystem.html?is-external=true" title="class or interface in org.opengis.referencing.crs" class="externalLink">CoordinateReferenceSystem</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCoordinateReferenceSystem()">getCoordinateReferenceSystem</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the coordinate reference system to which the values in grid domain are referenced.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">GridGeometry</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getGridGeometry()">getGridGeometry</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns information about the <cite>domain</cite> of this grid coverage.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="../SampleDimension.html" title="class in org.apache.sis.coverage">SampleDimension</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSampleDimensions()">getSampleDimensions</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns information about the <cite>range</cite> of this grid coverage.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>abstract <a href="https://docs.oracle.com/javase/8/docs/api/java/awt/image/RenderedImage.html?is-external=true" title="class or interface in java.awt.image" class="externalLink">RenderedImage</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#render(org.apache.sis.coverage.grid.GridExtent)">render</a></span>&#8203;(<a href="GridExtent.html" title="class in org.apache.sis.coverage.grid">GridExtent</a>&nbsp;sliceExtent)</code></th>
<td class="colLast">
<div class="block">Returns a two-dimensional slice of grid data as a rendered image.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString()">toString</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a string representation of this grid coverage for debugging purpose.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="../../util/collection/TreeTable.html" title="interface in org.apache.sis.util.collection">TreeTable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toTree(java.util.Locale,int)">toTree</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util" class="externalLink">Locale</a>&nbsp;locale,
int&nbsp;bitmask)</code></th>
<td class="colLast">
<div class="block">Returns a tree representation of some elements of this grid coverage.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">get­Class</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hash­Code</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notify­All</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(org.apache.sis.coverage.grid.GridGeometry,java.util.Collection)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>GridCoverage</h4>
<pre>protected&nbsp;GridCoverage&#8203;(<a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">GridGeometry</a>&nbsp;grid,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;? extends <a href="../SampleDimension.html" title="class in org.apache.sis.coverage">SampleDimension</a>&gt;&nbsp;bands)</pre>
<div class="block">Constructs a grid coverage using the specified grid geometry and sample dimensions.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>grid</code> - the grid extent, CRS and conversion from cell indices to CRS.</dd>
<dd><code>bands</code> - sample dimensions for each image band.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="getCoordinateReferenceSystem()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCoordinateReferenceSystem</h4>
<pre class="methodSignature">public&nbsp;<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/crs/CoordinateReferenceSystem.html?is-external=true" title="class or interface in org.opengis.referencing.crs" class="externalLink">CoordinateReferenceSystem</a>&nbsp;getCoordinateReferenceSystem()</pre>
<div class="block">Returns the coordinate reference system to which the values in grid domain are referenced.
This is the CRS used when accessing a coverage with the <code>evaluate(…)</code> methods.
This coordinate reference system is usually different than the coordinate system of the grid.
It is the target coordinate reference system of the <a href="GridGeometry.html#getGridToCRS(org.opengis.referencing.datum.PixelInCell)"><code>grid­To­CRS</code></a>
math transform.
<p>The default implementation delegates to <a href="GridGeometry.html#getCoordinateReferenceSystem()"><code>Grid­Geometry​.get­Coordinate­Reference­System()</code></a>.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the CRS used when accessing a coverage with the <code>evaluate(…)</code> methods.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="IncompleteGridGeometryException.html" title="class in org.apache.sis.coverage.grid">Incomplete­Grid­Geometry­Exception</a></code> - if the grid geometry has no CRS.</dd>
</dl>
</li>
</ul>
<a id="getGridGeometry()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getGridGeometry</h4>
<pre class="methodSignature">public&nbsp;<a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">GridGeometry</a>&nbsp;getGridGeometry()</pre>
<div class="block">Returns information about the <cite>domain</cite> of this grid coverage.
Information includes the grid extent, CRS and conversion from cell indices to CRS.
<code>Grid­Geometry</code> can also provide derived information like bounding box and resolution.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>grid extent, CRS and conversion from cell indices to CRS.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../storage/GridCoverageResource.html#getGridGeometry()"><code>Grid­Coverage­Resource​.get­Grid­Geometry()</code></a></dd>
</dl>
</li>
</ul>
<a id="getSampleDimensions()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSampleDimensions</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="../SampleDimension.html" title="class in org.apache.sis.coverage">SampleDimension</a>&gt;&nbsp;getSampleDimensions()</pre>
<div class="block">Returns information about the <cite>range</cite> of this grid coverage.
Information include names, sample value ranges, fill values and transfer functions for all bands in this grid coverage.
The length of the returned list should be equal to the <a href="https://docs.oracle.com/javase/8/docs/api/java/awt/image/SampleModel.html?is-external=true#getNumBands()" title="class or interface in java.awt.image" class="externalLink">number of
bands</a> in the rendered image.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>names, value ranges, fill values and transfer functions for all bands in this grid coverage.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../storage/GridCoverageResource.html#getSampleDimensions()"><code>Grid­Coverage­Resource​.get­Sample­Dimensions()</code></a></dd>
</dl>
</li>
</ul>
<a id="forConvertedValues(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>forConvertedValues</h4>
<pre class="methodSignature">public abstract&nbsp;<a href="GridCoverage.html" title="class in org.apache.sis.coverage.grid">GridCoverage</a>&nbsp;forConvertedValues&#8203;(boolean&nbsp;converted)</pre>
<div class="block">Returns a grid coverage that contains real values or sample values, depending if <code>converted</code> is <code>true</code>
or <code>false</code> respectively. If there is no <a href="../SampleDimension.html#getTransferFunction()">transfer function</a>
defined by the <a href="#getSampleDimensions()">sample dimensions</a>, then this method returns <code>this</code>.
In all cases, the returned grid coverage <var>r</var> has the following properties:
<ul>
<li>The list returned by <code>r​.get­Sample­Dimensions()</code> is equal to the list returned by
<code>this.<a href="#getSampleDimensions()">get­Sample­Dimensions()</a></code> with each element <var>e</var> replaced by
<code>e.<a href="../SampleDimension.html#forConvertedValues(boolean)">for­Converted­Values</a>(converted)</code>.</li>
<li>The <a href="https://docs.oracle.com/javase/8/docs/api/java/awt/image/RenderedImage.html?is-external=true" title="class or interface in java.awt.image" class="externalLink"><code>Rendered­Image</code></a> produced by <code>r​.render(extent)</code> is equivalent to the image returned by
<code>this.<a href="#render(org.apache.sis.coverage.grid.GridExtent)">render</a>(extent)</code> with all sample values converted
using the transfer function if <code>converted</code> is <code>true</code>, or the inverse of transfer function
if <code>converted</code> is <code>false</code>.</li>
</ul></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>converted</code> - <code>true</code> for a coverage containing converted values,
or <code>false</code> for a coverage containing packed values.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a coverage containing converted or packed values, depending on <code>converted</code> argument value.
May be <code>this</code> but never <code>null</code>.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../SampleDimension.html#forConvertedValues(boolean)"><code>Sample­Dimension​.for­Converted­Values(boolean)</code></a></dd>
</dl>
</li>
</ul>
<a id="render(org.apache.sis.coverage.grid.GridExtent)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>render</h4>
<pre class="methodSignature">public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/awt/image/RenderedImage.html?is-external=true" title="class or interface in java.awt.image" class="externalLink">RenderedImage</a>&nbsp;render&#8203;(<a href="GridExtent.html" title="class in org.apache.sis.coverage.grid">GridExtent</a>&nbsp;sliceExtent)</pre>
<div class="block">Returns a two-dimensional slice of grid data as a rendered image. The given <code>slice­Extent</code> argument specifies
the coordinates of the slice in all dimensions that are not in the two-dimensional image. For example if this grid
coverage has <i>(<var>x</var>,<var>y</var>,<var>z</var>,<var>t</var>)</i> dimensions and we want to render an image
of data in the <i>(<var>x</var>,<var>y</var>)</i> dimensions, then the given <code>slice­Extent</code> shall contain the
<i>(<var>z</var>,<var>t</var>)</i> coordinates of the desired slice. Those coordinates are specified in a grid extent
where <a href="GridExtent.html#getLow(int)">low coordinate</a> = <a href="GridExtent.html#getHigh(int)">high coordinate</a> in the
<var>z</var> and <var>t</var> dimensions. The two dimensions of the data to be shown (<var>x</var> and <var>y</var>
in our example) shall be the only dimensions having a <a href="GridExtent.html#getSize(int)">size</a> greater than 1 cell.
<p>If the <code>slice­Extent</code> argument is <code>null</code>, then the default value is
<code><a href="#getGridGeometry()">get­Grid­Geometry()</a>.<a href="GridGeometry.html#getExtent()">get­Extent()</a></code>.
This means that <code>grid­Extent</code> is optional for two-dimensional grid coverages or grid coverages where all dimensions
except two have a size of 1 cell. If the grid extent contains more than 2 dimensions with a size greater than one cell,
then a <a href="../SubspaceNotSpecifiedException.html" title="class in org.apache.sis.coverage"><code>Subspace­Not­Specified­Exception</code></a> is thrown.</p>
<div class="note"><p><b>How to compute a slice extent from a slice point in "real world" coordinates</b></p>
The <code>slice­Extent</code> is specified to this method as grid indices. If the <var>z</var> and <var>t</var> values
are not grid indices but are relative to some Coordinate Reference System (CRS) instead, then the slice extent can
be computed as below. First, a <cite>slice point</cite> containing the <var>z</var> and <var>t</var> coordinates
should be constructed as a <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/DirectPosition.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink"><code>Direct­Position</code></a> in one of the following ways:
<ul>
<li>The <code>slice­Point</code> has a CRS with two dimensions less than this grid coverage CRS.</li>
<li>The <code>slice­Point</code> has the same CRS than this grid coverage, but the two coordinates to
exclude are set to <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#NaN" title="class or interface in java.lang" class="externalLink"><code>Double​.Na­N</code></a>.</li>
</ul>
Then:
<blockquote><code>slice­Extent = <a href="#getGridGeometry()">get­Grid­Geometry()</a>.<a href="GridGeometry.html#derive()"><code>derive()</code></a>.<a href="GridDerivation.html#slice(org.opengis.geometry.DirectPosition)">slice</a>(slicePoint).<a href="GridDerivation.html#getIntersection()">getIntersection()</a>;</code></blockquote>
If the <code>slice­Point</code> CRS is different than this grid coverage CRS (except for the number of dimensions),
a coordinate transformation will be applied as needed.</div>
<div class="section">Characteristics of the returned image</div>
Image dimensions <var>x</var> and <var>y</var> map to the first and second dimension respectively of
the two-dimensional <code>slice­Extent</code> <a href="GridExtent.html#getSubspaceDimensions(int)">subspace</a>.
The coordinates given by <a href="https://docs.oracle.com/javase/8/docs/api/java/awt/image/RenderedImage.html?is-external=true#getMinX()" title="class or interface in java.awt.image" class="externalLink"><code>Rendered­Image​.get­Min­X()</code></a> and <a href="https://docs.oracle.com/javase/8/docs/api/java/awt/image/RenderedImage.html?is-external=true#getMinY()" title="class or interface in java.awt.image" class="externalLink"><code>get­Min­Y()</code></a>
will be the image location <em>relative to</em> the location specified in <code>slice­Extent</code>
<a href="GridExtent.html#getLow(int)">low coordinates</a>.
For example in the case of image <a href="https://docs.oracle.com/javase/8/docs/api/java/awt/image/RenderedImage.html?is-external=true#getMinX()" title="class or interface in java.awt.image" class="externalLink">minimum X coordinate</a>:
<ul class="verbose">
<li>A value of 0 means that the image left border is exactly where requested by <code>slice­Extent​.get­Low(x­Dimension)</code>.</li>
<li>A positive value means that the returned image is shifted to the right compared to specified extent.
This implies that the image has less data than requested on left side.
It may happen if the specified extent is partially outside grid coverage extent.</li>
<li>A negative value means that the returned image is shifted to the left compared to specified extent.
This implies that the image has more data than requested on left side. It may happen if the image is tiled,
the specified <code>slice­Extent</code> covers many tiles, and expanding the specified extent is necessary
for returning an integer amount of tiles.</li>
</ul>
Similar discussion applies to the <a href="https://docs.oracle.com/javase/8/docs/api/java/awt/image/RenderedImage.html?is-external=true#getMinY()" title="class or interface in java.awt.image" class="externalLink">minimum Y coordinate</a>.
The <a href="https://docs.oracle.com/javase/8/docs/api/java/awt/image/RenderedImage.html?is-external=true#getWidth()" title="class or interface in java.awt.image" class="externalLink">image width</a> and <a href="https://docs.oracle.com/javase/8/docs/api/java/awt/image/RenderedImage.html?is-external=true#getHeight()" title="class or interface in java.awt.image" class="externalLink">height</a> will be
the <code>slice­Extent</code> <a href="GridExtent.html#getSize(int)">sizes</a> if this method can honor exactly the request,
or otherwise may be adjusted for the same reasons than <var>x</var> and <var>y</var> location discussed above.
<p>Implementations should return a view as much as possible, without copying sample values.
<code>Grid­Coverage</code> subclasses can use the <a href="ImageRenderer.html" title="class in org.apache.sis.coverage.grid"><code>Image­Renderer</code></a> class as a helper tool for that purpose.
This method does not mandate any behavior regarding tiling (size of tiles, their numbering system, <i>etc.</i>).
Some implementations may defer data loading until <a href="https://docs.oracle.com/javase/8/docs/api/java/awt/image/RenderedImage.html?is-external=true#getTile(int,int)" title="class or interface in java.awt.image" class="externalLink">a tile is requested</a>.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>slice­Extent</code> - a subspace of this grid coverage extent where all dimensions except two have a size of 1 cell.
May be <code>null</code> if this grid coverage has only two dimensions with a size greater than 1 cell.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the grid slice as a rendered image. Image location is relative to <code>slice­Extent</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../SubspaceNotSpecifiedException.html" title="class in org.apache.sis.coverage">Subspace­Not­Specified­Exception</a></code> - if the given argument is not sufficient for reducing the grid to a two-dimensional slice.</dd>
<dd><code><a href="DisjointExtentException.html" title="class in org.apache.sis.coverage.grid">Disjoint­Extent­Exception</a></code> - if the given extent does not intersect this grid coverage.</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/RuntimeException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Runtime­Exception</a></code> - if this method can not produce the rendered image for another reason.</dd>
</dl>
</li>
</ul>
<a id="toString()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;toString()</pre>
<div class="block">Returns a string representation of this grid coverage for debugging purpose.
The returned string is implementation dependent and may change in any future version.
Current implementation is equivalent to the following, where <code>&lt;default flags&gt;</code>
is the same set of flags than <a href="GridGeometry.html#toString()"><code>Grid­Geometry​.to­String()</code></a>.
<blockquote><pre><font color="green">return</font> <b>toTree</b>(Locale.<b>getDefault</b>(), &lt;<font color="green">default</font> flags&gt;).<b>toString</b>();</pre></blockquote></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">to­String</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a string representation of this grid coverage for debugging purpose.</dd>
</dl>
</li>
</ul>
<a id="toTree(java.util.Locale,int)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toTree</h4>
<pre class="methodSignature"><a href="../../util/Debug.html" title="annotation in org.apache.sis.util">@Debug</a>
public&nbsp;<a href="../../util/collection/TreeTable.html" title="interface in org.apache.sis.util.collection">TreeTable</a>&nbsp;toTree&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util" class="externalLink">Locale</a>&nbsp;locale,
int&nbsp;bitmask)</pre>
<div class="block">Returns a tree representation of some elements of this grid coverage.
The tree representation is for debugging purpose only and may change
in any future SIS version.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>locale</code> - the locale to use for textual labels.</dd>
<dd><code>bitmask</code> - combination of <a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid"><code>Grid­Geometry</code></a> flags.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a tree representation of the specified elements.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="GridGeometry.html#toTree(java.util.Locale,int)"><code>Grid­Geometry​.to­Tree(Locale, int)</code></a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/GridCoverage.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2010&#x2013;2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>