blob: 26a2f77f3773d678680ecf75a9344b805b8388a4 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) on Thu Oct 05 19:54:57 CEST 2023 -->
<title>CoverageAggregator (Apache SIS 1.4 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2023-10-05">
<meta name="description" content="declaration: module: org.apache.sis.storage, package: org.apache.sis.storage.aggregate, class: CoverageAggregator">
<meta name="generator" content="javadoc/ClassWriterImpl">
<meta name="keywords" content="org.apache.sis.storage.aggregate.CoverageAggregator class">
<meta name="keywords" content="add()">
<meta name="keywords" content="addComponents()">
<meta name="keywords" content="addAll()">
<meta name="keywords" content="addRangeAggregate()">
<meta name="keywords" content="getColorizer()">
<meta name="keywords" content="setColorizer()">
<meta name="keywords" content="getMergeStrategy()">
<meta name="keywords" content="setMergeStrategy()">
<meta name="keywords" content="build()">
<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="../../../../../../script-dir/jquery-ui.min.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../../script-dir/jquery-3.6.1.min.js"></script>
<script type="text/javascript" src="../../../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var pathtoroot = "../../../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span></button>
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../../../index.html">Overview</a></li>
<li><a href="../../../../../module-summary.html">Module</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</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#class">Help</a></li>
</ul>
<ul class="sub-nav-list-small">
<li>
<p>Summary:</p>
<ul>
<li>Nested</li>
<li>Field</li>
<li><a href="#constructor-summary">Constr</a></li>
<li><a href="#method-summary">Method</a></li>
</ul>
</li>
<li>
<p>Detail:</p>
<ul>
<li>Field</li>
<li><a href="#constructor-detail">Constr</a></li>
<li><a href="#method-detail">Method</a></li>
</ul>
</li>
</ul>
</div>
<div class="sub-nav">
<div id="navbar-sub-list">
<ul class="sub-nav-list">
<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="sub-nav-list">
<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>
<div class="nav-list-search"><a href="../../../../../../search.html">SEARCH</a>
<input type="text" id="search-input" disabled placeholder="Search">
<input type="reset" id="reset-button" disabled value="reset">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="module-label-in-type">Module</span>&nbsp;<a href="../../../../../module-summary.html">org.apache.sis.storage</a></div>
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.sis.storage.aggregate</a></div>
<h1 title="Class CoverageAggregator" class="title">Class CoverageAggregator</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>
<div class="inheritance">CoverageAggregator</div>
</div>
<section class="class-description" id="class-description">
<hr>
<div class="type-signature"><span class="modifiers">public final class </span><span class="element-name type-name-label">CoverageAggregator</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div>
<div class="block">Creates a grid coverage resource from an aggregation of an arbitrary number of other resources.
This class accepts heterogeneous resources (a <cite>data lake</cite>), organizes them in a tree
of resources as described in the next section, then performs different kinds of aggregation:
<ul class="verbose">
<li><b>Creation of a data cube from a collection of slices:</b>
If a collection of <a href="../GridCoverageResource.html" title="interface in org.apache.sis.storage"><code>Grid­Coverage­Resource</code></a> instances represent the same phenomenon
(for example Sea Surface Temperature) over the same geographic area but at different dates and times.
<code>Coverage­Aggregator</code> can be used for building a single data cube with a time axis.</li>
<li><b>Aggregation of bands:</b>
Resources having different sample dimensions can be combined in a single resource.</li>
</ul>
<h2 id="generated-resource-tree-heading">Generated resource tree</h2>
All source coverages should share the same CRS and have the same ranges (sample dimensions).
If this is not the case, then the source coverages will be grouped in different aggregates
with an uniform CRS and set of ranges in each sub-aggregates.
More specifically, <code>Coverage­Aggregator</code> organizes resources as below,
except that parent nodes having only one child are omitted:
<pre class="text">
Root aggregate
├─ All coverages with same sample dimensions #1
│ └─ ...
└─ All coverages with same sample dimensions #2
├─ Coverages with equivalent reference systems #1
│ └─ ...
└─ Coverages with equivalent reference systems #2
├─ Slices with compatible "grid to CRS" #1
├─ Slices with compatible "grid to CRS" #2
└─ ...</pre>
Where:
<ul>
<li><dfn>Equivalent reference systems</dfn> means two <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/CoordinateReferenceSystem.html" title="class or interface in org.opengis.referencing.crs" class="external-link"><code>Coordinate­Reference­System</code></a> instances
for which <a href="../../../../../../org.apache.sis.util/org/apache/sis/util/Utilities.html#equalsIgnoreMetadata(java.lang.Object,java.lang.Object)"><code>Utilities​.equals­Ignore­Metadata(Object, Object)</code></a> returns <code>true</code>.</li>
<li><dfn>Compatible grid to CRS</dfn> means two <a href="../../../../../../org.apache.sis.feature/org/apache/sis/coverage/grid/GridGeometry.html#getGridToCRS(org.opengis.referencing.datum.PixelInCell)">grid to CRS</a>
transforms which are identical (with small tolerance for rounding errors) except for the translation terms,
with the additional condition that the translations, when expressed in units of grid cell indices,
can differ only by integer amounts of cells.</li>
<li><dfn>Slices</dfn> means source coverages declared to this aggregator by calls to <code>add(…)</code> methods,
after they have been incorporated in a data cube by this aggregator.
Above tree does not contain the individual slices, but data cubes containing all slices that can fit.</li>
</ul>
<h2 id="multi-threading-and-concurrency-heading">Multi-threading and concurrency</h2>
All <code>add(…)</code> methods can be invoked concurrently from arbitrary threads.
It is okay to load <a href="../GridCoverageResource.html" title="interface in org.apache.sis.storage"><code>Grid­Coverage­Resource</code></a> instances in parallel threads
and add those resources to <code>Coverage­Aggregator</code> without synchronization.
However, the final <a href="#build()"><code>build()</code></a> method is <em>not</em> thread-safe;
that method shall be invoked from a single thread after all sources have been added
and no more addition are in progress.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>1.3</dd>
</dl>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">Coverage­Aggregator</a>()</code></div>
<div class="col-last even-row-color">
<div class="block">Creates an initially empty aggregator with no listeners.</div>
</div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(org.apache.sis.storage.event.StoreListeners)" class="member-name-link">Coverage­Aggregator</a><wbr>(<a href="../event/StoreListeners.html" title="class in org.apache.sis.storage.event">Store­Listeners</a>&nbsp;listeners)</code></div>
<div class="col-last odd-row-color">
<div class="block">Creates an initially empty aggregator with the given listeners.</div>
</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button><button id="method-summary-table-tab6" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab6', 3)" class="table-tab">Deprecated Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#add(org.apache.sis.coverage.grid.GridCoverage)" class="member-name-link">add</a><wbr>(<a href="../../../../../../org.apache.sis.feature/org/apache/sis/coverage/grid/GridCoverage.html" title="class in org.apache.sis.coverage.grid">Grid­Coverage</a>&nbsp;coverage)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Adds the given coverage.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#add(org.apache.sis.storage.GridCoverageResource)" class="member-name-link">add</a><wbr>(<a href="../GridCoverageResource.html" title="interface in org.apache.sis.storage">Grid­Coverage­Resource</a>&nbsp;resource)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Adds the given resource.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addAll(java.util.stream.Stream)" class="member-name-link">add­All</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/stream/Stream.html" title="class or interface in java.util.stream" class="external-link">Stream</a>&lt;? extends <a href="../GridCoverageResource.html" title="interface in org.apache.sis.storage">Grid­Coverage­Resource</a>&gt;&nbsp;resources)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Adds all grid resources provided by the given stream.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addComponents(org.apache.sis.storage.Aggregate)" class="member-name-link">add­Components</a><wbr>(<a href="../Aggregate.html" title="interface in org.apache.sis.storage">Aggregate</a>&nbsp;resource)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Adds all components of the given aggregate.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addRangeAggregate(org.apache.sis.storage.GridCoverageResource...)" class="member-name-link">add­Range­Aggregate</a><wbr>(<a href="../GridCoverageResource.html" title="interface in org.apache.sis.storage">Grid­Coverage­Resource</a>...&nbsp;sources)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Adds a resource whose range is the aggregation of the ranges of a sequence of resources.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addRangeAggregate(org.apache.sis.storage.GridCoverageResource%5B%5D,int%5B%5D%5B%5D)" class="member-name-link">add­Range­Aggregate</a><wbr>(<a href="../GridCoverageResource.html" title="interface in org.apache.sis.storage">Grid­Coverage­Resource</a>[]&nbsp;sources,
int[][]&nbsp;bands­Per­Source)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Adds a resource whose range is the aggregation of the specified bands of a sequence of resources.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code><a href="../Resource.html" title="interface in org.apache.sis.storage">Resource</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code><a href="#build()" class="member-name-link">build</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6">
<div class="block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">Replaced by <a href="#build(org.opengis.util.GenericName)"><code>build(Generic­Name)</code></a>.</div>
</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../Resource.html" title="interface in org.apache.sis.storage">Resource</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#build(org.opengis.util.GenericName)" class="member-name-link">build</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/GenericName.html" title="class or interface in org.opengis.util" class="external-link">Generic­Name</a>&nbsp;identifier)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Builds a resource which is the aggregation or concatenation of all components added to this aggregator.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../../../../../../org.apache.sis.feature/org/apache/sis/image/Colorizer.html" title="interface in org.apache.sis.image">Colorizer</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getColorizer()" class="member-name-link">get­Colorizer</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the colorization algorithm to apply on computed images.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="MergeStrategy.html" title="class in org.apache.sis.storage.aggregate">Merge­Strategy</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMergeStrategy()" class="member-name-link">get­Merge­Strategy</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the algorithm to apply when more than one grid coverage can be found at the same grid index.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setColorizer(org.apache.sis.image.Colorizer)" class="member-name-link">set­Colorizer</a><wbr>(<a href="../../../../../../org.apache.sis.feature/org/apache/sis/image/Colorizer.html" title="interface in org.apache.sis.image">Colorizer</a>&nbsp;colorizer)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the colorization algorithm to apply on computed images.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setMergeStrategy(org.apache.sis.storage.aggregate.MergeStrategy)" class="member-name-link">set­Merge­Strategy</a><wbr>(<a href="MergeStrategy.html" title="class in org.apache.sis.storage.aggregate">Merge­Strategy</a>&nbsp;strategy)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the algorithm to apply when more than one grid coverage can be found at the same grid index.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toString()" class="member-name-link">to­String</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a string representation for debugging purposes.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-Object">Methods inherited from class&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">get­Class</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hash­Code</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notify­All</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;()">
<h3>CoverageAggregator</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">CoverageAggregator</span>()</div>
<div class="block">Creates an initially empty aggregator with no listeners.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>1.4</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(org.apache.sis.storage.event.StoreListeners)">
<h3>CoverageAggregator</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">CoverageAggregator</span><wbr><span class="parameters">(<a href="../event/StoreListeners.html" title="class in org.apache.sis.storage.event">StoreListeners</a>&nbsp;listeners)</span></div>
<div class="block">Creates an initially empty aggregator with the given listeners.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>listeners</code> - listeners of the parent resource, or <code>null</code> if none.
This is usually the listeners of the <a href="../DataStore.html" title="class in org.apache.sis.storage"><code>Data­Store</code></a>.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="add(org.apache.sis.coverage.grid.GridCoverage)">
<h3>add</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">add</span><wbr><span class="parameters">(<a href="../../../../../../org.apache.sis.feature/org/apache/sis/coverage/grid/GridCoverage.html" title="class in org.apache.sis.coverage.grid">GridCoverage</a>&nbsp;coverage)</span></div>
<div class="block">Adds the given coverage. This method can be invoked from any thread.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>coverage</code> - coverage to add.</dd>
<dt>Since:</dt>
<dd>1.4</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="add(org.apache.sis.storage.GridCoverageResource)">
<h3>add</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">add</span><wbr><span class="parameters">(<a href="../GridCoverageResource.html" title="interface in org.apache.sis.storage">GridCoverageResource</a>&nbsp;resource)</span>
throws <span class="exceptions"><a href="../DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></span></div>
<div class="block">Adds the given resource. This method can be invoked from any thread.
This method does <em>not</em> recursively decomposes an <a href="../Aggregate.html" title="interface in org.apache.sis.storage"><code>Aggregate</code></a> into its component.
If such decomposition is desired, see <a href="#addComponents(org.apache.sis.storage.Aggregate)"><code>add­Components(Aggregate)</code></a> instead.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>resource</code> - resource to add.</dd>
<dt>Throws:</dt>
<dd><code><a href="../DataStoreException.html" title="class in org.apache.sis.storage">Data­Store­Exception</a></code> - if the resource cannot be used.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="addComponents(org.apache.sis.storage.Aggregate)">
<h3>addComponents</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">addComponents</span><wbr><span class="parameters">(<a href="../Aggregate.html" title="interface in org.apache.sis.storage">Aggregate</a>&nbsp;resource)</span>
throws <span class="exceptions"><a href="../DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></span></div>
<div class="block">Adds all components of the given aggregate. This method can be invoked from any thread.
It delegates to <a href="#add(org.apache.sis.storage.GridCoverageResource)"><code>add(Grid­Coverage­Resource)</code></a> for each component in the aggregate
which is an instance of <a href="../GridCoverageResource.html" title="interface in org.apache.sis.storage"><code>Grid­Coverage­Resource</code></a>.
Components that are themselves instance of <a href="../Aggregate.html" title="interface in org.apache.sis.storage"><code>Aggregate</code></a> are decomposed recursively.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>resource</code> - resource to add.</dd>
<dt>Throws:</dt>
<dd><code><a href="../DataStoreException.html" title="class in org.apache.sis.storage">Data­Store­Exception</a></code> - if a component of the resource cannot be used.</dd>
<dt>"TODO:"</dt>
<dd>Instead of ignoring non-coverage instances, we should put them in a separated aggregate.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="addAll(java.util.stream.Stream)">
<h3>addAll</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">addAll</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/stream/Stream.html" title="class or interface in java.util.stream" class="external-link">Stream</a>&lt;? extends <a href="../GridCoverageResource.html" title="interface in org.apache.sis.storage">GridCoverageResource</a>&gt;&nbsp;resources)</span>
throws <span class="exceptions"><a href="../DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></span></div>
<div class="block">Adds all grid resources provided by the given stream. This method can be invoked from any thread.
It delegates to <a href="#add(org.apache.sis.storage.GridCoverageResource)"><code>add(Grid­Coverage­Resource)</code></a> for each element in the stream.
<a href="../Aggregate.html" title="interface in org.apache.sis.storage"><code>Aggregate</code></a> instances are added as-is (not decomposed in their components).</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>resources</code> - resources to add.</dd>
<dt>Throws:</dt>
<dd><code><a href="../DataStoreException.html" title="class in org.apache.sis.storage">Data­Store­Exception</a></code> - if a resource cannot be used.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="#add(org.apache.sis.storage.GridCoverageResource)"><code>add(Grid­Coverage­Resource)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="addRangeAggregate(org.apache.sis.storage.GridCoverageResource...)">
<h3>addRangeAggregate</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">addRangeAggregate</span><wbr><span class="parameters">(<a href="../GridCoverageResource.html" title="interface in org.apache.sis.storage">GridCoverageResource</a>...&nbsp;sources)</span>
throws <span class="exceptions"><a href="../DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></span></div>
<div class="block">Adds a resource whose range is the aggregation of the ranges of a sequence of resources.
This method combines homogeneous grid coverage resources by "stacking" their sample dimensions (bands).
The grid geometry is typically the same for all resources, but some variations described below are allowed.
The number of sample dimensions in the aggregated coverage is the sum of the number of sample dimensions in
each individual resource.
<p>This convenience method delegates to <a href="#addRangeAggregate(org.apache.sis.storage.GridCoverageResource%5B%5D,int%5B%5D%5B%5D)"><code>add­Range­Aggregate(Grid­Coverage­Resource[], int[][])</code></a>.
See that method for more information on restrictions.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>sources</code> - resources whose bands shall be aggregated, in order.</dd>
<dt>Throws:</dt>
<dd><code><a href="../DataStoreException.html" title="class in org.apache.sis.storage">Data­Store­Exception</a></code> - if an error occurred while fetching the grid geometry or sample dimensions from a resource.</dd>
<dd><code><a href="../../../../../../org.apache.sis.feature/org/apache/sis/coverage/grid/IllegalGridGeometryException.html" title="class in org.apache.sis.coverage.grid">Illegal­Grid­Geometry­Exception</a></code> - if a grid geometry is not compatible with the others.</dd>
<dt>Since:</dt>
<dd>1.4</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="#getColorizer()"><code>get­Colorizer()</code></a></li>
<li><a href="../../../../../../org.apache.sis.feature/org/apache/sis/coverage/grid/GridCoverageProcessor.html#aggregateRanges(org.apache.sis.coverage.grid.GridCoverage...)"><code>Grid­Coverage­Processor​.aggregate­Ranges(Grid­Coverage...)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="addRangeAggregate(org.apache.sis.storage.GridCoverageResource[],int[][])">
<h3>addRangeAggregate</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">addRangeAggregate</span><wbr><span class="parameters">(<a href="../GridCoverageResource.html" title="interface in org.apache.sis.storage">GridCoverageResource</a>[]&nbsp;sources,
int[][]&nbsp;bandsPerSource)</span>
throws <span class="exceptions"><a href="../DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></span></div>
<div class="block">Adds a resource whose range is the aggregation of the specified bands of a sequence of resources.
This method performs the same work than <a href="#addRangeAggregate(org.apache.sis.storage.GridCoverageResource...)"><code>add­Range­Aggregate(Grid­Coverage­Resource...)</code></a>,
but with the possibility to specify the sample dimensions to retain in each source coverage.
The <code>bands­Per­Source</code> argument specifies the sample dimensions to keep, in order.
That array can be <code>null</code> for selecting all sample dimensions in all source coverages,
or may contain <code>null</code> elements for selecting all sample dimensions of the corresponding coverage.
An empty array element (i.e. zero sample dimension to select) discards the corresponding source coverage.
<h4 id="restrictions-heading">Restrictions</h4>
<ul>
<li>All resources shall use the same coordinate reference system (CRS).</li>
<li>All resources shall have the same <a href="../GridCoverageResource.html#getGridGeometry()">domain</a>, except
for the grid extent and the translation terms which can vary by integer numbers of grid cells.</li>
<li>All grid extents shall intersect and the intersection area shall be non-empty.</li>
<li>If coverage data are stored in <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/java/awt/image/RenderedImage.html" title="class or interface in java.awt.image" class="external-link"><code>Rendered­Image</code></a> instances,
then all images shall use the same data type.</li>
</ul>
Some of those restrictions may be relaxed in future Apache SIS versions.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>sources</code> - resources whose bands shall be aggregated, in order.</dd>
<dd><code>bands­Per­Source</code> - sample dimensions for each source. May be <code>null</code> or may contain <code>null</code> elements.</dd>
<dt>Throws:</dt>
<dd><code><a href="../DataStoreException.html" title="class in org.apache.sis.storage">Data­Store­Exception</a></code> - if an error occurred while fetching the grid geometry or sample dimensions from a resource.</dd>
<dd><code><a href="../../../../../../org.apache.sis.feature/org/apache/sis/coverage/grid/IllegalGridGeometryException.html" title="class in org.apache.sis.coverage.grid">Illegal­Grid­Geometry­Exception</a></code> - if a grid geometry is not compatible with the others.</dd>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">Illegal­Argument­Exception</a></code> - if some band indices are duplicated or outside their range of validity.</dd>
<dt>Since:</dt>
<dd>1.4</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="#getColorizer()"><code>get­Colorizer()</code></a></li>
<li><a href="../../../../../../org.apache.sis.feature/org/apache/sis/coverage/grid/GridCoverageProcessor.html#aggregateRanges(org.apache.sis.coverage.grid.GridCoverage%5B%5D,int%5B%5D%5B%5D)"><code>Grid­Coverage­Processor​.aggregate­Ranges(Grid­Coverage[], int[][])</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getColorizer()">
<h3>getColorizer</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../../../../../../org.apache.sis.feature/org/apache/sis/image/Colorizer.html" title="interface in org.apache.sis.image">Colorizer</a></span>&nbsp;<span class="element-name">getColorizer</span>()</div>
<div class="block">Returns the colorization algorithm to apply on computed images.
This algorithm is used for all resources added by <a href="#addRangeAggregate(org.apache.sis.storage.GridCoverageResource%5B%5D,int%5B%5D%5B%5D)"><code>add­Range­Aggregate(Grid­Coverage­Resource[], int[][])</code></a>,</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>colorization algorithm to apply on computed image, or <code>null</code> for default.</dd>
<dt>Since:</dt>
<dd>1.4</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setColorizer(org.apache.sis.image.Colorizer)">
<h3>setColorizer</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setColorizer</span><wbr><span class="parameters">(<a href="../../../../../../org.apache.sis.feature/org/apache/sis/image/Colorizer.html" title="interface in org.apache.sis.image">Colorizer</a>&nbsp;colorizer)</span></div>
<div class="block">Sets the colorization algorithm to apply on computed images.
This algorithm applies to all resources added by <a href="#addRangeAggregate(org.apache.sis.storage.GridCoverageResource%5B%5D,int%5B%5D%5B%5D)"><code>add­Range­Aggregate(Grid­Coverage­Resource[], int[][])</code></a>,
including resources already added before this method is invoked.
If this method is never invoked, the default value is <code>null</code>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>colorizer</code> - colorization algorithm to apply on computed image, or <code>null</code> for default.</dd>
<dt>Since:</dt>
<dd>1.4</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getMergeStrategy()">
<h3>getMergeStrategy</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="MergeStrategy.html" title="class in org.apache.sis.storage.aggregate">MergeStrategy</a></span>&nbsp;<span class="element-name">getMergeStrategy</span>()</div>
<div class="block">Returns the algorithm to apply when more than one grid coverage can be found at the same grid index.
This is the most recent value set by a call to <a href="#setMergeStrategy(org.apache.sis.storage.aggregate.MergeStrategy)"><code>set­Merge­Strategy(Merge­Strategy)</code></a>,
or <code>null</code> if no strategy has been specified. In the latter case,
a <a href="../../../../../../org.apache.sis.feature/org/apache/sis/coverage/SubspaceNotSpecifiedException.html" title="class in org.apache.sis.coverage"><code>Subspace­Not­Specified­Exception</code></a> will be thrown by <a href="../../../../../../org.apache.sis.feature/org/apache/sis/coverage/grid/GridCoverage.html#render(org.apache.sis.coverage.grid.GridExtent)"><code>Grid­Coverage​.render(Grid­Extent)</code></a>
if more than one source coverage (slice) is found for a specified grid index.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>algorithm to apply for merging source coverages at the same grid index, or <code>null</code> if none.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setMergeStrategy(org.apache.sis.storage.aggregate.MergeStrategy)">
<h3>setMergeStrategy</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setMergeStrategy</span><wbr><span class="parameters">(<a href="MergeStrategy.html" title="class in org.apache.sis.storage.aggregate">MergeStrategy</a>&nbsp;strategy)</span></div>
<div class="block">Sets the algorithm to apply when more than one grid coverage can be found at the same grid index.
The new strategy applies to the <em>next</em> coverages to be added;
previously added coverage may or may not be impacted by this change (see below).
For avoiding hard-to-predict behavior, this method should be invoked before to add the first coverage.
<h4 id="effect-on-previously-added-coverages-heading">Effect on previously added coverages</h4>
The merge strategy of previously added coverages is not modified by this method call, except
for coverages (slices) that become part of the same aggregated <a href="../GridCoverageResource.html" title="interface in org.apache.sis.storage"><code>Grid­Coverage­Resource</code></a>
(data cube) than a coverage added after this method call.
In such case, the strategy set by this call to <code>set­Merge­Strategy(…)</code> prevails.
Said otherwise, the merge strategy of a data cube is the strategy which was active
at the time of the most recently added slice for that data cube.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>strategy</code> - new algorithm to apply for merging source coverages at the same grid index,
or <code>null</code> if none.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="build(org.opengis.util.GenericName)">
<h3>build</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../Resource.html" title="interface in org.apache.sis.storage">Resource</a></span>&nbsp;<span class="element-name">build</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/GenericName.html" title="class or interface in org.opengis.util" class="external-link">GenericName</a>&nbsp;identifier)</span></div>
<div class="block">Builds a resource which is the aggregation or concatenation of all components added to this aggregator.
The returned resource will be an instance of <a href="../GridCoverageResource.html" title="interface in org.apache.sis.storage"><code>Grid­Coverage­Resource</code></a> if possible,
or an instance of <a href="../Aggregate.html" title="interface in org.apache.sis.storage"><code>Aggregate</code></a> if some heterogeneity in grid geometries or sample dimensions
prevents the concatenation of all coverages in a single resource.
<p>An identifier can optionally be specified for the resource.
This identifier will be used if this method creates an aggregated or concatenated resource,
but it will be ignored if this method returns directly one of the resource specified to the
<code>add(…)</code> methods.</p>
<h4 id="multi-threading-heading">Multi-threading</h4>
If the <code>add(…)</code> and <code>add­All(…)</code> methods were invoked in background threads,
then all additions must be finished before this method is invoked.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>identifier</code> - identifier to assign to the aggregated resource, or <code>null</code> if none.</dd>
<dt>Returns:</dt>
<dd>the aggregation or concatenation of all components added to this aggregator.</dd>
<dt>Since:</dt>
<dd>1.4</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="build()">
<h3>build</h3>
<div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link">@Deprecated</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../Resource.html" title="interface in org.apache.sis.storage">Resource</a></span>&nbsp;<span class="element-name">build</span>()</div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">Replaced by <a href="#build(org.opengis.util.GenericName)"><code>build(Generic­Name)</code></a>.</div>
</div>
</section>
</li>
<li>
<section class="detail" id="toString()">
<h3>toString</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">toString</span>()</div>
<div class="block">Returns a string representation for debugging purposes.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">to­String</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</div>
</body>
</html>