blob: 5e311262f04b61a597ed32b58d80e70329160648 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) on Thu Oct 05 19:54:57 CEST 2023 -->
<title>AxisFilter (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.referencing, package: org.apache.sis.referencing.cs, interface: AxisFilter">
<meta name="generator" content="javadoc/ClassWriterImpl">
<meta name="keywords" content="org.apache.sis.referencing.cs.AxisFilter interface">
<meta name="keywords" content="accept()">
<meta name="keywords" content="getDirectionReplacement()">
<meta name="keywords" content="getUnitReplacement()">
<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>Constr</li>
<li><a href="#method-summary">Method</a></li>
</ul>
</li>
<li>
<p>Detail:</p>
<ul>
<li>Field</li>
<li>Constr</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>Constr&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>Constr&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.referencing</a></div>
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.sis.referencing.cs</a></div>
<h1 title="Interface AxisFilter" class="title">Interface AxisFilter</h1>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="AxesConvention.html" title="enum class in org.apache.sis.referencing.cs">Axes­Convention</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public interface </span><span class="element-name type-name-label">AxisFilter</span></div>
<div class="block">Modifications to apply on the axes of a coordinate system in order to produce a new coordinate system.
<code>Axis­Filter</code> can specify the axes to exclude in the new coordinate system, or specify different
units and directions associated to the axes.
<div class="note"><b>Terminology note</b>
the word <cite>“filter”</cite> is understood here as <cite>“a computer program or subroutine to process a stream,
producing another stream”</cite> (<a href="https://en.wikipedia.org/wiki/Filter_%28software%29">Wikipedia</a>).
</div>
<p>Note that filtering one or more axes may result in a change of coordinate system type.
For example, excluding the <var>z</var> axis of a <a href="DefaultCylindricalCS.html" title="class in org.apache.sis.referencing.cs">cylindrical</a> coordinate system
results in a <a href="DefaultPolarCS.html" title="class in org.apache.sis.referencing.cs">polar</a> coordinate system.</p>
<h2 id="default-implementation-heading">Default implementation</h2>
All methods in this interface have a default implementation equivalent to <i>no-operation</i>.
Implementers need to override only the methods for the aspects to change.
<h2 id="limitations-heading">Limitations</h2>
This interface is not for changing axis order.
For changing axis order in addition to axis directions or units, see <a href="AxesConvention.html" title="enum class in org.apache.sis.referencing.cs"><code>Axes­Convention</code></a>.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>0.6</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="CoordinateSystems.html#replaceAxes(org.opengis.referencing.cs.CoordinateSystem,org.apache.sis.referencing.cs.AxisFilter)"><code>Coordinate­Systems​.replace­Axes(Coordinate­System, Axis­Filter)</code></a></li>
</ul>
</dd>
</dl>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ========== 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-tab5" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab5', 3)" class="table-tab">Default 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-tab5"><code>default boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#accept(org.opengis.referencing.cs.CoordinateSystemAxis)" class="member-name-link">accept</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystemAxis.html" title="class or interface in org.opengis.referencing.cs" class="external-link">Coordinate­System­Axis</a>&nbsp;axis)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Returns <code>true</code> if the given axis shall be included in the new coordinate system.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/AxisDirection.html" title="class or interface in org.opengis.referencing.cs" class="external-link">Axis­Direction</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#getDirectionReplacement(org.opengis.referencing.cs.CoordinateSystemAxis,org.opengis.referencing.cs.AxisDirection)" class="member-name-link">get­Direction­Replacement</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystemAxis.html" title="class or interface in org.opengis.referencing.cs" class="external-link">Coordinate­System­Axis</a>&nbsp;axis,
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/AxisDirection.html" title="class or interface in org.opengis.referencing.cs" class="external-link">Axis­Direction</a>&nbsp;direction)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Returns a replacement for the given axis direction.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default <a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a><wbr>&lt;?&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#getUnitReplacement(org.opengis.referencing.cs.CoordinateSystemAxis,javax.measure.Unit)" class="member-name-link">get­Unit­Replacement</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystemAxis.html" title="class or interface in org.opengis.referencing.cs" class="external-link">Coordinate­System­Axis</a>&nbsp;axis,
<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a>&lt;?&gt;&nbsp;unit)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Returns a replacement for the given axis unit.</div>
</div>
</div>
</div>
</div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="accept(org.opengis.referencing.cs.CoordinateSystemAxis)">
<h3>accept</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">accept</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystemAxis.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystemAxis</a>&nbsp;axis)</span></div>
<div class="block">Returns <code>true</code> if the given axis shall be included in the new coordinate system.
The default implementation unconditionally returns <code>true</code>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>axis</code> - the axis to test.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the given axis shall be included in the new coordinate system.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getDirectionReplacement(org.opengis.referencing.cs.CoordinateSystemAxis,org.opengis.referencing.cs.AxisDirection)">
<h3>getDirectionReplacement</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/AxisDirection.html" title="class or interface in org.opengis.referencing.cs" class="external-link">AxisDirection</a></span>&nbsp;<span class="element-name">getDirectionReplacement</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystemAxis.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystemAxis</a>&nbsp;axis,
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/AxisDirection.html" title="class or interface in org.opengis.referencing.cs" class="external-link">AxisDirection</a>&nbsp;direction)</span></div>
<div class="block">Returns a replacement for the given axis direction.
The default implementation unconditionally returns the given <code>direction</code> unchanged.
<h4 id="example-heading">Example</h4>
For forcing the direction of the <var>z</var> axis toward up while leaving other axes unchanged,
one can write:
<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"> @Override
public getDirectionReplacement(CoordinateSystemAxis axis, AxisDirection direction) {
if (direction == AxisDirection.DOWN) {
direction = AxisDirection.UP;
}
return direction;
}
</code></pre>
</div>
</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>axis</code> - the axis for which to change axis direction, if desired.</dd>
<dd><code>direction</code> - the original axis direction.</dd>
<dt>Returns:</dt>
<dd>the new axis direction, or <code>direction</code> if there is no change.</dd>
<dt>Since:</dt>
<dd>0.7</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getUnitReplacement(org.opengis.referencing.cs.CoordinateSystemAxis,javax.measure.Unit)">
<h3>getUnitReplacement</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type"><a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a>&lt;?&gt;</span>&nbsp;<span class="element-name">getUnitReplacement</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystemAxis.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystemAxis</a>&nbsp;axis,
<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a>&lt;?&gt;&nbsp;unit)</span></div>
<div class="block">Returns a replacement for the given axis unit.
The default implementation unconditionally returns the given <code>unit</code> unchanged.
<h4 id="example-heading1">Example</h4>
For replacing all angular units of a coordinate system to degrees (regardless what the original
angular units were) while leaving other kinds of units unchanged, one can write:
<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"> @Override
public Unit&lt;?&gt; getUnitReplacement(CoordinateSystemAxis axis, Unit&lt;?&gt; unit) {
if (Units.isAngular(unit)) {
unit = Units.DEGREE;
}
return unit;
}
</code></pre>
</div>
</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>axis</code> - the axis for which to change unit, if desired.</dd>
<dd><code>unit</code> - the original axis unit.</dd>
<dt>Returns:</dt>
<dd>the new axis unit, or <code>unit</code> if there is no change.</dd>
<dt>Since:</dt>
<dd>0.7</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</div>
</body>
</html>