blob: 2da8b38ef3af918943f553d7c499f4f08c3febc4 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) on Thu Oct 05 19:54:57 CEST 2023 -->
<title>DimensionalityReduction (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.feature, package: org.apache.sis.coverage.grid, class: DimensionalityReduction">
<meta name="generator" content="javadoc/ClassWriterImpl">
<meta name="keywords" content="org.apache.sis.coverage.grid.DimensionalityReduction class">
<meta name="keywords" content="select()">
<meta name="keywords" content="select2D()">
<meta name="keywords" content="remove()">
<meta name="keywords" content="reduce()">
<meta name="keywords" content="isIdentity()">
<meta name="keywords" content="isSlice()">
<meta name="keywords" content="isReduced()">
<meta name="keywords" content="getReducedGridGeometry()">
<meta name="keywords" content="getSourceGridGeometry()">
<meta name="keywords" content="getSelectedDimensions()">
<meta name="keywords" content="getSliceCoordinates()">
<meta name="keywords" content="apply()">
<meta name="keywords" content="reverse()">
<meta name="keywords" content="withSlicePoint()">
<meta name="keywords" content="withSliceByRatio()">
<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.feature</a></div>
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.sis.coverage.grid</a></div>
<h1 title="Class DimensionalityReduction" class="title">Class DimensionalityReduction</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">DimensionalityReduction</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/Serializable.html" title="class or interface in java.io" class="external-link">Serializable</a></code>, <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Function.html" title="class or interface in java.util.function" class="external-link">Function</a>&lt;<a href="GridCoverage.html" title="class in org.apache.sis.coverage.grid">Grid­Coverage</a>,<wbr><a href="GridCoverage.html" title="class in org.apache.sis.coverage.grid">Grid­Coverage</a>&gt;</code>, <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/UnaryOperator.html" title="class or interface in java.util.function" class="external-link">Unary­Operator</a>&lt;<a href="GridCoverage.html" title="class in org.apache.sis.coverage.grid">Grid­Coverage</a>&gt;</code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">DimensionalityReduction</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>
implements <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/UnaryOperator.html" title="class or interface in java.util.function" class="external-link">UnaryOperator</a>&lt;<a href="GridCoverage.html" title="class in org.apache.sis.coverage.grid">GridCoverage</a>&gt;, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/Serializable.html" title="class or interface in java.io" class="external-link">Serializable</a></span></div>
<div class="block">Description about how to reduce the number of dimensions of the domain of a grid coverage.
This is a reduction in the number of dimensions of the grid extent, which usually implies
a reduction in the number of dimensions of the CRS but not necessarily at the same indices
(the relationship between grid dimensions and CRS dimensions is not necessarily straightforward).
The sample dimensions (coverage range) are unmodified.
<p><code>Dimensionality­Reduction</code> specifies which dimensions to keep, and which grid
values to use for the omitted dimensions. This information allows the conversion from
a source <a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid"><code>Grid­Geometry</code></a> to a reduced grid geometry, and conversely.</p>
<p>Instances of <code>Dimensionality­Reduction</code> are immutable and thread-safe.</p>
<h2 id="assumptions-heading">Assumptions</h2>
The current implementation assumes that removing <var>n</var> dimensions in the grid extent
causes the removal of exactly <var>n</var> dimensions in the Coordinate Reference System.
However, the removed dimensions do not need to be at the same indices or in same order.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>1.4</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="../../../../../../serialized-form.html#org.apache.sis.coverage.grid.DimensionalityReduction">Serialized Form</a></li>
</ul>
</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 three-column-summary">
<div class="table-header col-first">Modifier</div>
<div class="table-header col-second">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>protected </code></div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(org.apache.sis.coverage.grid.GridGeometry,java.util.BitSet,org.opengis.referencing.operation.MathTransformFactory)" class="member-name-link">Dimensionality­Reduction</a><wbr>(<a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">Grid­Geometry</a>&nbsp;source,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/BitSet.html" title="class or interface in java.util" class="external-link">Bit­Set</a>&nbsp;grid­Axes,
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/operation/MathTransformFactory.html" title="class or interface in org.opengis.referencing.operation" class="external-link">Math­Transform­Factory</a>&nbsp;factory)</code></div>
<div class="col-last even-row-color">
<div class="block">Reduces the dimension of the specified grid geometry by retaining the axes specified in the given bitset.</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-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static 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></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><a href="GridCoverage.html" title="class in org.apache.sis.coverage.grid">Grid­Coverage</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#apply(org.apache.sis.coverage.grid.GridCoverage)" class="member-name-link">apply</a><wbr>(<a href="GridCoverage.html" title="class in org.apache.sis.coverage.grid">Grid­Coverage</a>&nbsp;source)</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 grid coverage on which dimensionality reduction of the domain has been applied.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="GridExtent.html" title="class in org.apache.sis.coverage.grid">Grid­Extent</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#apply(org.apache.sis.coverage.grid.GridExtent)" class="member-name-link">apply</a><wbr>(<a href="GridExtent.html" title="class in org.apache.sis.coverage.grid">Grid­Extent</a>&nbsp;source)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a grid extent on which dimensionality reduction has been applied.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">Grid­Geometry</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#apply(org.apache.sis.coverage.grid.GridGeometry)" class="member-name-link">apply</a><wbr>(<a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">Grid­Geometry</a>&nbsp;source)</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 grid geometry on which dimensionality reduction of the grid extent has been applied.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/DirectPosition.html" title="class or interface in org.opengis.geometry" class="external-link">Direct­Position</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#apply(org.opengis.geometry.DirectPosition)" class="member-name-link">apply</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/DirectPosition.html" title="class or interface in org.opengis.geometry" class="external-link">Direct­Position</a>&nbsp;source)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a coordinate tuple on which dimensionality reduction has been applied.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">Grid­Geometry</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getReducedGridGeometry()" class="member-name-link">get­Reduced­Grid­Geometry</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 grid geometry with only the retained grid axis dimension.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int[]</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getSelectedDimensions()" class="member-name-link">get­Selected­Dimensions</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 indices of the source dimensions that are kept in the reduced grid geometry.</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/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><wbr>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link">Integer</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Long.html" title="class or interface in java.lang" class="external-link">Long</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getSliceCoordinates()" class="member-name-link">get­Slice­Coordinates</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 grid coordinates used in <code>reverse(…)</code> method calls for reconstituting some removed dimensions.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">Grid­Geometry</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getSourceGridGeometry()" class="member-name-link">get­Source­Grid­Geometry</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 grid geometry with all grid axis dimension.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isIdentity()" class="member-name-link">is­Identity</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 <code>true</code> if this object does not reduce any dimension.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isReduced(org.apache.sis.coverage.grid.GridGeometry)" class="member-name-link">is­Reduced</a><wbr>(<a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">Grid­Geometry</a>&nbsp;candidate)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns <code>true</code> if the given grid geometry is likely to be already reduced.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isSlice()" class="member-name-link">is­Slice</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 <code>true</code> if this dimensionality reduction is a slice in the source coverage.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="DimensionalityReduction.html" title="class in org.apache.sis.coverage.grid">Dimensionality­Reduction</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#reduce(org.apache.sis.coverage.grid.GridGeometry)" class="member-name-link">reduce</a><wbr>(<a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">Grid­Geometry</a>&nbsp;source)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Automatically reduces a grid geometry by removing all grid dimensions with an extent size of 1.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="DimensionalityReduction.html" title="class in org.apache.sis.coverage.grid">Dimensionality­Reduction</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#remove(org.apache.sis.coverage.grid.GridGeometry,int...)" class="member-name-link">remove</a><wbr>(<a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">Grid­Geometry</a>&nbsp;source,
int...&nbsp;grid­Axes­To­Remove)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Reduces the dimension of the specified grid geometry by removing the specified axes.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="GridExtent.html" title="class in org.apache.sis.coverage.grid">Grid­Extent</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#reverse(org.apache.sis.coverage.grid.GridExtent)" class="member-name-link">reverse</a><wbr>(<a href="GridExtent.html" title="class in org.apache.sis.coverage.grid">Grid­Extent</a>&nbsp;reduced)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a grid extent on which dimensionality reduction has been reverted.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">Grid­Geometry</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#reverse(org.apache.sis.coverage.grid.GridGeometry)" class="member-name-link">reverse</a><wbr>(<a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">Grid­Geometry</a>&nbsp;reduced)</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 grid geometry on which dimensionality reduction has been reverted.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="DimensionalityReduction.html" title="class in org.apache.sis.coverage.grid">Dimensionality­Reduction</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#select(org.apache.sis.coverage.grid.GridGeometry,int...)" class="member-name-link">select</a><wbr>(<a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">Grid­Geometry</a>&nbsp;source,
int...&nbsp;grid­Axes­To­Pass)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Reduces the dimension of the specified grid geometry by retaining only the specified axes.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="DimensionalityReduction.html" title="class in org.apache.sis.coverage.grid">Dimensionality­Reduction</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#select2D(org.apache.sis.coverage.grid.GridGeometry)" class="member-name-link">select2D</a><wbr>(<a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">Grid­Geometry</a>&nbsp;source)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">A convenience method for selecting the two first dimensions of the specified grid geometry.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="DimensionalityReduction.html" title="class in org.apache.sis.coverage.grid">Dimensionality­Reduction</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#withSliceByRatio(double)" class="member-name-link">with­Slice­By­Ratio</a><wbr>(double&nbsp;ratio)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a dimensional reduction with a relative slice position
for every grid dimensions that have been removed.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="DimensionalityReduction.html" title="class in org.apache.sis.coverage.grid">Dimensionality­Reduction</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#withSlicePoint(long%5B%5D)" class="member-name-link">with­Slice­Point</a><wbr>(long[]&nbsp;point)</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 dimensional reduction which will use the given source grid indices for <code>reverse(…)</code> operations.</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#toString()" title="class or interface in java.lang" class="external-link">to­String</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>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-Function">Methods inherited from interface&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Function.html" title="class or interface in java.util.function" class="external-link">Function</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Function.html#andThen(java.util.function.Function)" title="class or interface in java.util.function" class="external-link">and­Then</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Function.html#compose(java.util.function.Function)" title="class or interface in java.util.function" class="external-link">compose</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;(org.apache.sis.coverage.grid.GridGeometry,java.util.BitSet,org.opengis.referencing.operation.MathTransformFactory)">
<h3>DimensionalityReduction</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="element-name">DimensionalityReduction</span><wbr><span class="parameters">(<a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">GridGeometry</a>&nbsp;source,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/BitSet.html" title="class or interface in java.util" class="external-link">BitSet</a>&nbsp;gridAxes,
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/operation/MathTransformFactory.html" title="class or interface in org.opengis.referencing.operation" class="external-link">MathTransformFactory</a>&nbsp;factory)</span>
throws <span class="exceptions"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/FactoryException.html" title="class or interface in org.opengis.util" class="external-link">FactoryException</a></span></div>
<div class="block">Reduces the dimension of the specified grid geometry by retaining the axes specified in the given bitset.
Axes in the reduced grid geometry will be in the same order than in the source geometry:</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>source</code> - the grid geometry on which to select a subset of its grid dimensions.</dd>
<dd><code>grid­Axes</code> - bitmask of indices of source grid dimensions to keep in the reduced grid.
Will be modified by this constructor for internal purpose.</dd>
<dd><code>factory</code> - the factory to use for creating new math transforms, or <code>null</code> if none.</dd>
<dt>Throws:</dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/FactoryException.html" title="class or interface in org.opengis.util" class="external-link">Factory­Exception</a></code> - if the dimensions to keep cannot be separated from the dimensions to omit.</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="select(org.apache.sis.coverage.grid.GridGeometry,int...)">
<h3>select</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="DimensionalityReduction.html" title="class in org.apache.sis.coverage.grid">DimensionalityReduction</a></span>&nbsp;<span class="element-name">select</span><wbr><span class="parameters">(<a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">GridGeometry</a>&nbsp;source,
int...&nbsp;gridAxesToPass)</span></div>
<div class="block">Reduces the dimension of the specified grid geometry by retaining only the specified axes.
Axes in the reduced grid geometry will be in the same order than in the source geometry:
change of axis order and duplicated values in the <code>grid­Axes­To­Pass</code> argument are ignored.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>source</code> - the grid geometry to reduce.</dd>
<dd><code>grid­Axes­To­Pass</code> - the grid axes to retain, ignoring order and duplicated values.</dd>
<dt>Returns:</dt>
<dd>reduced grid geometry together with other information.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">Index­Out­Of­Bounds­Exception</a></code> - if a grid axis index is out of bounds.</dd>
<dd><code><a href="IllegalGridGeometryException.html" title="class in org.apache.sis.coverage.grid">Illegal­Grid­Geometry­Exception</a></code> - if the dimensions to keep cannot be separated from the dimensions to omit.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="select2D(org.apache.sis.coverage.grid.GridGeometry)">
<h3>select2D</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="DimensionalityReduction.html" title="class in org.apache.sis.coverage.grid">DimensionalityReduction</a></span>&nbsp;<span class="element-name">select2D</span><wbr><span class="parameters">(<a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">GridGeometry</a>&nbsp;source)</span></div>
<div class="block">A convenience method for selecting the two first dimensions of the specified grid geometry.
This method can be used as a lambda function in resources query. Example:
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../../copy.svg" alt="Copy snippet"></button>
<pre class="snippet"><code class="language-java">CoverageQuery query = new CoverageQuery();
query.setAxisSelection(DimensionalityReduction::select2D);
</code></pre>
</div>
</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>source</code> - the grid geometry to reduce.</dd>
<dt>Returns:</dt>
<dd>reduced grid geometry together with other information.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">Index­Out­Of­Bounds­Exception</a></code> - if the grid geometry does not have at least two dimensions.</dd>
<dd><code><a href="IllegalGridGeometryException.html" title="class in org.apache.sis.coverage.grid">Illegal­Grid­Geometry­Exception</a></code> - if the dimensions to keep cannot be separated from the dimensions to omit.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="../../../../../../org.apache.sis.storage/org/apache/sis/storage/CoverageQuery.html#setAxisSelection(java.util.function.Function)"><code>Coverage­Query​.set­Axis­Selection(Function)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="remove(org.apache.sis.coverage.grid.GridGeometry,int...)">
<h3>remove</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="DimensionalityReduction.html" title="class in org.apache.sis.coverage.grid">DimensionalityReduction</a></span>&nbsp;<span class="element-name">remove</span><wbr><span class="parameters">(<a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">GridGeometry</a>&nbsp;source,
int...&nbsp;gridAxesToRemove)</span></div>
<div class="block">Reduces the dimension of the specified grid geometry by removing the specified axes.
Axes in the reduced grid geometry will be in the same order than in the source geometry:
axis order and duplicated values in the <code>grid­Axes­To­Remove</code> argument are not significant.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>source</code> - the grid geometry to reduce.</dd>
<dd><code>grid­Axes­To­Remove</code> - the grid axes to remove, ignoring order and duplicated values.</dd>
<dt>Returns:</dt>
<dd>reduced grid geometry together with other information.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">Index­Out­Of­Bounds­Exception</a></code> - if a grid axis index is out of bounds.</dd>
<dd><code><a href="IllegalGridGeometryException.html" title="class in org.apache.sis.coverage.grid">Illegal­Grid­Geometry­Exception</a></code> - if the dimensions to keep cannot be separated from the dimensions to omit.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="reduce(org.apache.sis.coverage.grid.GridGeometry)">
<h3>reduce</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="DimensionalityReduction.html" title="class in org.apache.sis.coverage.grid">DimensionalityReduction</a></span>&nbsp;<span class="element-name">reduce</span><wbr><span class="parameters">(<a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">GridGeometry</a>&nbsp;source)</span></div>
<div class="block">Automatically reduces a grid geometry by removing all grid dimensions with an extent size of 1.
Axes in the reduced grid geometry will be in the same order than in the source geometry.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>source</code> - the grid geometry to reduce.</dd>
<dt>Returns:</dt>
<dd>reduced grid geometry together with other information.</dd>
<dt>Throws:</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 extent.</dd>
<dd><code><a href="IllegalGridGeometryException.html" title="class in org.apache.sis.coverage.grid">Illegal­Grid­Geometry­Exception</a></code> - if the dimensions to keep cannot be separated from the dimensions to omit.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="#select2D(org.apache.sis.coverage.grid.GridGeometry)"><code>select2D(Grid­Geometry)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isIdentity()">
<h3>isIdentity</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isIdentity</span>()</div>
<div class="block">Returns <code>true</code> if this object does not reduce any dimension.
It may happen if <code>select(…)</code> has been invoked with all axes to keep,
or if <code>remove(…)</code> has been invoked with no axis to remove.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>whether this <code>Dimensionality­Reduction</code> does nothing.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isSlice()">
<h3>isSlice</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isSlice</span>()</div>
<div class="block">Returns <code>true</code> if this dimensionality reduction is a slice in the source coverage.
This is true if all removed dimensions either have a <a href="GridExtent.html#getSize(int)">grid size</a> of one cell, or have a <a href="#getSliceCoordinates()">slice coordinate</a> specified.
<p>If this method returns <code>false</code>, then the results of <code>reverse(…)</code> method calls
are potentially ambiguous and may cause a <a href="../SubspaceNotSpecifiedException.html" title="class in org.apache.sis.coverage"><code>Subspace­Not­Specified­Exception</code></a> to be thrown
at <a href="GridCoverage.html#render(org.apache.sis.coverage.grid.GridExtent)">rendering</a> time.</p></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>whether this dimensionality reduction is a slice in the source coverage.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="#getSliceCoordinates()"><code>get­Slice­Coordinates()</code></a></li>
<li><a href="#withSlicePoint(long%5B%5D)"><code>with­Slice­Point(long[])</code></a></li>
<li><a href="#withSliceByRatio(double)"><code>with­Slice­By­Ratio(double)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isReduced(org.apache.sis.coverage.grid.GridGeometry)">
<h3>isReduced</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isReduced</span><wbr><span class="parameters">(<a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">GridGeometry</a>&nbsp;candidate)</span></div>
<div class="block">Returns <code>true</code> if the given grid geometry is likely to be already reduced.
Current implementation checks only the number of dimensions.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>candidate</code> - the grid geometry to test.</dd>
<dt>Returns:</dt>
<dd>whether the given grid geometry is likely to be already reduced.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getReducedGridGeometry()">
<h3>getReducedGridGeometry</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">GridGeometry</a></span>&nbsp;<span class="element-name">getReducedGridGeometry</span>()</div>
<div class="block">Returns the grid geometry with only the retained grid axis dimension.
The number of CRS dimensions should be reduced as well,
but not necessarily in a one-to-one relationship.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the grid geometry with retained grid dimensions.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getSourceGridGeometry()">
<h3>getSourceGridGeometry</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">GridGeometry</a></span>&nbsp;<span class="element-name">getSourceGridGeometry</span>()</div>
<div class="block">Returns the grid geometry with all grid axis dimension.
This is the <code>source</code> argument given to factory methods.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the grid geometry with all grid dimensions.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getSelectedDimensions()">
<h3>getSelectedDimensions</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int[]</span>&nbsp;<span class="element-name">getSelectedDimensions</span>()</div>
<div class="block">Returns the indices of the source dimensions that are kept in the reduced grid geometry.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>indices of source grid dimensions that are retained in the reduced grid geometry.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getSliceCoordinates()">
<h3>getSliceCoordinates</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/util/Map.html" title="class or interface in java.util" class="external-link">Map</a>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link">Integer</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Long.html" title="class or interface in java.lang" class="external-link">Long</a>&gt;</span>&nbsp;<span class="element-name">getSliceCoordinates</span>()</div>
<div class="block">Returns the grid coordinates used in <code>reverse(…)</code> method calls for reconstituting some removed dimensions.
Keys are indices of grid dimensions in the source that are <em>not</em> retained in the reduced grid geometry.
Values are grid coordinates to assign to those dimensions when a <code>reverse(…)</code> method is executed.
<p>This map does not need to contain an entry for all removed dimensions.
If no slice point is specified for a given dimension, then the <code>reverse(…)</code> methods will use the
full range of grid coordinates specified in the <a href="#getSourceGridGeometry()">source geometry</a>.
Often, those ranges have a <a href="GridExtent.html#getSize(int)">size</a> of 1,
in which case methods such as <a href="GridCoverage.html#render(org.apache.sis.coverage.grid.GridExtent)"><code>Grid­Coverage​.render(Grid­Extent)</code></a> will work anyway.
If a removed source grid dimension had a size greater than 1 and no slice coordinates is specified;
then the <code>reverse(…)</code> methods in this class will still work but an
<a href="../SubspaceNotSpecifiedException.html" title="class in org.apache.sis.coverage"><code>Subspace­Not­Specified­Exception</code></a> may be thrown later by other classes.</p>
<p>This map is initially empty. Slice coordinates can be specified by calls
to <a href="#withSlicePoint(long%5B%5D)"><code>with­Slice­Point(long[])</code></a> or <a href="#withSliceByRatio(double)"><code>with­Slice­By­Ratio(double)</code></a>.</p></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>source grid coordinates of the slice point used in <code>reverse(…)</code> method calls.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="#withSlicePoint(long%5B%5D)"><code>with­Slice­Point(long[])</code></a></li>
<li><a href="#withSliceByRatio(double)"><code>with­Slice­By­Ratio(double)</code></a></li>
<li><a href="GridExtent.html#getSliceCoordinates()"><code>Grid­Extent​.get­Slice­Coordinates()</code></a></li>
<li><a href="GridCoverage.Evaluator.html#setDefaultSlice(java.util.Map)"><code>Grid­Coverage​.Evaluator​.set­Default­Slice(Map)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="apply(org.opengis.geometry.DirectPosition)">
<h3>apply</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/DirectPosition.html" title="class or interface in org.opengis.geometry" class="external-link">DirectPosition</a></span>&nbsp;<span class="element-name">apply</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/DirectPosition.html" title="class or interface in org.opengis.geometry" class="external-link">DirectPosition</a>&nbsp;source)</span></div>
<div class="block">Returns a coordinate tuple on which dimensionality reduction has been applied.
The coordinate reference system of the given <code>source</code> should be either
null or equal (ignoring metadata) to the CRS of the source grid geometry.
For performance reason, this is not verified unless assertions are enabled.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>source</code> - the source coordinate tuple, or <code>null</code>.</dd>
<dt>Returns:</dt>
<dd>the reduced coordinate tuple, or <code>null</code> if the given source was null.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="apply(org.apache.sis.coverage.grid.GridExtent)">
<h3>apply</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="GridExtent.html" title="class in org.apache.sis.coverage.grid">GridExtent</a></span>&nbsp;<span class="element-name">apply</span><wbr><span class="parameters">(<a href="GridExtent.html" title="class in org.apache.sis.coverage.grid">GridExtent</a>&nbsp;source)</span></div>
<div class="block">Returns a grid extent on which dimensionality reduction has been applied.
If the given source is <code>null</code>, then this method returns <code>null</code>.
Nulls are accepted because they are valid argument values in calls to
<a href="GridCoverage.html#render(org.apache.sis.coverage.grid.GridExtent)"><code>Grid­Coverage​.render(Grid­Extent)</code></a>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>source</code> - the grid extent to reduce, or <code>null</code>.</dd>
<dt>Returns:</dt>
<dd>the reduced grid extent. May be <code>source</code>, which may be null.</dd>
<dt>Throws:</dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/MismatchedDimensionException.html" title="class or interface in org.opengis.geometry" class="external-link">Mismatched­Dimension­Exception</a></code> - if the given source does not have the expected number of dimensions.</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 axis types are specified but inconsistent in at least one dimension.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="GridExtent.html#selectDimensions(int...)"><code>Grid­Extent​.select­Dimensions(int...)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="apply(org.apache.sis.coverage.grid.GridGeometry)">
<h3>apply</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">GridGeometry</a></span>&nbsp;<span class="element-name">apply</span><wbr><span class="parameters">(<a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">GridGeometry</a>&nbsp;source)</span></div>
<div class="block">Returns a grid geometry on which dimensionality reduction of the grid extent has been applied.
It usually implies a reduction in the number of dimensions of the CRS as well,
but not necessarily in same order.
<p>If the given source is <code>null</code>, then this method returns <code>null</code>.
Nulls are accepted because they are valid argument values in calls to
<a href="../../../../../../org.apache.sis.storage/org/apache/sis/storage/GridCoverageResource.html#read(org.apache.sis.coverage.grid.GridGeometry,int...)"><code>Grid­Coverage­Resource​.read(Grid­Geometry, int...)</code></a>.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>source</code> - the grid geometry to reduce, or <code>null</code>.</dd>
<dt>Returns:</dt>
<dd>the reduced grid geometry. May be <code>source</code>, which may be null.</dd>
<dt>Throws:</dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/MismatchedDimensionException.html" title="class or interface in org.opengis.geometry" class="external-link">Mismatched­Dimension­Exception</a></code> - if the given source does not have the expected number of dimensions.</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 axis types are specified but inconsistent in at least one dimension.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="GridGeometry.html#selectDimensions(int...)"><code>Grid­Geometry​.select­Dimensions(int...)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="apply(org.apache.sis.coverage.grid.GridCoverage)">
<h3>apply</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="GridCoverage.html" title="class in org.apache.sis.coverage.grid">GridCoverage</a></span>&nbsp;<span class="element-name">apply</span><wbr><span class="parameters">(<a href="GridCoverage.html" title="class in org.apache.sis.coverage.grid">GridCoverage</a>&nbsp;source)</span></div>
<div class="block">Returns a grid coverage on which dimensionality reduction of the domain has been applied.
This is a reduction in the number of dimensions of the grid extent. It usually implies a
reduction in the number of dimensions of the CRS as well, but not necessarily in same order.
The sample dimensions (coverage range) are unmodified.
<p>The returned coverage is a <em>view</em>: changes in the source coverage
are reflected immediately in the reduced coverage, and conversely.</p>
<h4 id="reversibility-heading">Reversibility</h4>
If <a href="#isSlice()"><code>is­Slice()</code></a> returns <code>false</code>,
then the results of <a href="#reverse(org.apache.sis.coverage.grid.GridExtent)"><code>reverse(Grid­Extent)</code></a> are ambiguous
and calls to <a href="GridCoverage.html#render(org.apache.sis.coverage.grid.GridExtent)"><code>Grid­Coverage​.render(Grid­Extent)</code></a> may cause
an <a href="../SubspaceNotSpecifiedException.html" title="class in org.apache.sis.coverage"><code>Subspace­Not­Specified­Exception</code></a> to be thrown.
Unless the specified <code>source</code> grid coverage knows how to handle those cases.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Function.html#apply(T)" title="class or interface in java.util.function" class="external-link">apply</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Function.html" title="class or interface in java.util.function" class="external-link">Function</a>&lt;<a href="GridCoverage.html" title="class in org.apache.sis.coverage.grid">Grid­Coverage</a>,<wbr><a href="GridCoverage.html" title="class in org.apache.sis.coverage.grid">Grid­Coverage</a>&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>source</code> - the grid coverage to reduce.</dd>
<dt>Returns:</dt>
<dd>the reduced grid coverage, or <code>source</code> if this object <a href="#isIdentity()">is identity</a>.</dd>
<dt>Throws:</dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/MismatchedDimensionException.html" title="class or interface in org.opengis.geometry" class="external-link">Mismatched­Dimension­Exception</a></code> - if the given source does not have the expected number of dimensions.</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 axis types are specified but inconsistent in at least one dimension.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="GridCoverageProcessor.html#selectGridDimensions(org.apache.sis.coverage.grid.GridCoverage,int...)"><code>Grid­Coverage­Processor​.select­Grid­Dimensions(Grid­Coverage, int...)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="reverse(org.apache.sis.coverage.grid.GridExtent)">
<h3>reverse</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="GridExtent.html" title="class in org.apache.sis.coverage.grid">GridExtent</a></span>&nbsp;<span class="element-name">reverse</span><wbr><span class="parameters">(<a href="GridExtent.html" title="class in org.apache.sis.coverage.grid">GridExtent</a>&nbsp;reduced)</span></div>
<div class="block">Returns a grid extent on which dimensionality reduction has been reverted.
For all dimensions that were removed, grid coordinates will be set to the
<a href="#getSliceCoordinates()">slice coordinates</a> if specified,
or to the original source grid coordinates otherwise.
In the latter case, the reconstituted grid coordinates will be a single value
if <a href="#isSlice()"><code>is­Slice()</code></a> returns <code>true</code> (in which case the returned extent
is unambiguous), or may be a (potentially ambiguous) range of values otherwise.
<h4 id="handling-of-null-grid-geometry-heading">Handling of null grid geometry</h4>
If the given extent is <code>null</code>, then this method returns an extent
with <a href="#getSliceCoordinates()">slice coordinates</a> if they are known.
If no slice coordinate has been specified, then this method returns <code>null</code>.
Nulls are accepted because they are valid argument values
in calls to <a href="GridCoverage.html#render(org.apache.sis.coverage.grid.GridExtent)"><code>Grid­Coverage​.render(Grid­Extent)</code></a>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>reduced</code> - the reduced grid extent to revert, or <code>null</code>.</dd>
<dt>Returns:</dt>
<dd>the source grid extent. May be <code>reduced</code>, which may be null.</dd>
<dt>Throws:</dt>
<dd><code><a href="IncompleteGridGeometryException.html" title="class in org.apache.sis.coverage.grid">Incomplete­Grid­Geometry­Exception</a></code> - if the source grid geometry has no extent.</dd>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/MismatchedDimensionException.html" title="class or interface in org.opengis.geometry" class="external-link">Mismatched­Dimension­Exception</a></code> - if the given extent does not have the expected number of dimensions.</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 axis types are specified but inconsistent in at least one dimension.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="reverse(org.apache.sis.coverage.grid.GridGeometry)">
<h3>reverse</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">GridGeometry</a></span>&nbsp;<span class="element-name">reverse</span><wbr><span class="parameters">(<a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">GridGeometry</a>&nbsp;reduced)</span></div>
<div class="block">Returns a grid geometry on which dimensionality reduction has been reverted.
For all dimensions that were removed, grid coordinates will be set to the
<a href="#getSliceCoordinates()">slice coordinates</a> if specified,
or to the original source grid coordinates otherwise.
In the latter case, the reconstituted dimensions will map a single coordinate value
if <a href="#isSlice()"><code>is­Slice()</code></a> returns <code>true</code> (in which case the returned grid geometry
is unambiguous), or may map a (potentially ambiguous) range of grid coordinate values otherwise.
<h4 id="handling-of-null-grid-geometry-heading1">Handling of null grid geometry</h4>
If the given geometry is <code>null</code>, then this method returns a grid geometry
with the <a href="#getSliceCoordinates()">slice coordinates</a> if they are known.
If no slice coordinate has been specified, then this method returns <code>null</code>.
Nulls are accepted because they are valid argument values in calls to
<a href="../../../../../../org.apache.sis.storage/org/apache/sis/storage/GridCoverageResource.html#read(org.apache.sis.coverage.grid.GridGeometry,int...)"><code>Grid­Coverage­Resource​.read(Grid­Geometry, int...)</code></a>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>reduced</code> - the reduced grid geometry to revert, or <code>null</code>.</dd>
<dt>Returns:</dt>
<dd>the source grid geometry. May be <code>reduced</code>, which may be null.</dd>
<dt>Throws:</dt>
<dd><code><a href="IncompleteGridGeometryException.html" title="class in org.apache.sis.coverage.grid">Incomplete­Grid­Geometry­Exception</a></code> - if the source grid geometry has no extent.</dd>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/MismatchedDimensionException.html" title="class or interface in org.opengis.geometry" class="external-link">Mismatched­Dimension­Exception</a></code> - if the given geometry does not have the expected number of dimensions.</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 axis types are specified but inconsistent in at least one dimension.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="withSlicePoint(long[])">
<h3>withSlicePoint</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="DimensionalityReduction.html" title="class in org.apache.sis.coverage.grid">DimensionalityReduction</a></span>&nbsp;<span class="element-name">withSlicePoint</span><wbr><span class="parameters">(long[]&nbsp;point)</span></div>
<div class="block">Returns a dimensional reduction which will use the given source grid indices for <code>reverse(…)</code> operations.
The length of the given <code>slice­Point</code> array shall be the number of dimensions of the source grid geometry.
All given coordinate values shall be inside the source grid extent.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>point</code> - grid coordinates of a point located on the slice.</dd>
<dt>Returns:</dt>
<dd>the dimensionality reduction with the given slice point used for reverse operations.</dd>
<dt>Throws:</dt>
<dd><code><a href="IncompleteGridGeometryException.html" title="class in org.apache.sis.coverage.grid">Incomplete­Grid­Geometry­Exception</a></code> - if the source grid geometry has no extent.</dd>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/MismatchedDimensionException.html" title="class or interface in org.opengis.geometry" class="external-link">Mismatched­Dimension­Exception</a></code> - if the given point does not have the expected number of dimensions.</dd>
<dd><code><a href="../PointOutsideCoverageException.html" title="class in org.apache.sis.coverage">Point­Outside­Coverage­Exception</a></code> - if the given point is outside the source grid extent.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="withSliceByRatio(double)">
<h3>withSliceByRatio</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="DimensionalityReduction.html" title="class in org.apache.sis.coverage.grid">DimensionalityReduction</a></span>&nbsp;<span class="element-name">withSliceByRatio</span><wbr><span class="parameters">(double&nbsp;ratio)</span></div>
<div class="block">Returns a dimensional reduction with a relative slice position
for every grid dimensions that have been removed.
The relative position is specified by a ratio between 0 and 1 where
0 maps to <a href="GridExtent.html#getLow(int)">low</a> grid coordinates,
1 maps to <a href="GridExtent.html#getHigh(int)">high grid coordinates</a> and
0.5 maps to the median position.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>ratio</code> - the ratio to apply on all removed grid dimensions.</dd>
<dt>Returns:</dt>
<dd>the dimensionality reduction with the given slice ratio applied.</dd>
<dt>Throws:</dt>
<dd><code><a href="IncompleteGridGeometryException.html" title="class in org.apache.sis.coverage.grid">Incomplete­Grid­Geometry­Exception</a></code> - if the source grid geometry has no extent.</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 the given ratio is not between 0 and 1 inclusive.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="GridExtent.html#getRelative(int,double)"><code>Grid­Extent​.get­Relative(int, double)</code></a></li>
<li><a href="GridDerivation.html#sliceByRatio(double,int...)"><code>Grid­Derivation​.slice­By­Ratio(double, int...)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</div>
</body>
</html>