| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (21) on Thu Oct 05 19:54:57 CEST 2023 --> |
| <title>CoordinateSystems (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, class: CoordinateSystems"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <meta name="keywords" content="org.apache.sis.referencing.cs.CoordinateSystems class"> |
| <meta name="keywords" content="isGeodetic()"> |
| <meta name="keywords" content="parseAxisDirection()"> |
| <meta name="keywords" content="directionAlongMeridian()"> |
| <meta name="keywords" content="isAlongMeridian()"> |
| <meta name="keywords" content="angle()"> |
| <meta name="keywords" content="swapAndScaleAxes()"> |
| <meta name="keywords" content="replaceAxes()"> |
| <meta name="keywords" content="replaceLinearUnit()"> |
| <meta name="keywords" content="replaceAngularUnit()"> |
| <meta name="keywords" content="getAxisDirections()"> |
| <meta name="keywords" content="getShortName()"> |
| <meta name="keywords" content="getEpsgCode()"> |
| <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"> </span><span class="nav-bar-toggle-icon"> </span><span class="nav-bar-toggle-icon"> </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: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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> <a href="../../../../../module-summary.html">org.apache.sis.referencing</a></div> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">org.apache.sis.referencing.cs</a></div> |
| <h1 title="Class CoordinateSystems" class="title">Class CoordinateSystems</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"><a href="../../../../../../org.apache.sis.util/org/apache/sis/util/Static.html" title="class in org.apache.sis.util">Static</a> |
| <div class="inheritance">CoordinateSystems</div> |
| </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">CoordinateSystems</span> |
| <span class="extends-implements">extends <a href="../../../../../../org.apache.sis.util/org/apache/sis/util/Static.html" title="class in org.apache.sis.util">Static</a></span></div> |
| <div class="block">Utility methods working on <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystem.html" title="class or interface in org.opengis.referencing.cs" class="external-link"><code>CoordinateSystem</code></a> objects and their axes. |
| Those methods allow for example to <a href="#angle(org.opengis.referencing.cs.AxisDirection,org.opengis.referencing.cs.AxisDirection)">estimate an angle between two axes</a> |
| or <a href="#swapAndScaleAxes(org.opengis.referencing.cs.CoordinateSystem,org.opengis.referencing.cs.CoordinateSystem)">determining the change of axis directions and units</a> |
| between two coordinate systems.</div> |
| <dl class="notes"> |
| <dt>Since:</dt> |
| <dd>0.4</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-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-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-tab1 method-summary-table-tab4"><code>static <a href="../../../../../../org.apache.sis.util/org/apache/sis/measure/Angle.html" title="class in org.apache.sis.measure">Angle</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#angle(org.opengis.referencing.cs.AxisDirection,org.opengis.referencing.cs.AxisDirection)" class="member-name-link">angle</a><wbr>(<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> source, |
| <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> target)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns the arithmetic (counterclockwise) angle from the first axis direction to the second direction.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <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></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#directionAlongMeridian(org.opengis.referencing.cs.AxisDirection,double)" class="member-name-link">directionAlongMeridian</a><wbr>(<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> baseDirection, |
| double meridian)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns an axis direction from a pole along a meridian.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <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>[]</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getAxisDirections(org.opengis.referencing.cs.CoordinateSystem)" class="member-name-link">getAxisDirections</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystem.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystem</a> cs)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns the axis directions for the specified coordinate system.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <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></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getEpsgCode(java.lang.Class,org.opengis.referencing.cs.CoordinateSystemAxis...)" class="member-name-link">getEpsgCode</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><? extends <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystem.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystem</a>> type, |
| <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>... axes)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns the EPSG code of a coordinate system using the units and directions of given 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="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></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getEpsgCode(javax.measure.Unit,org.opengis.referencing.cs.AxisDirection...)" class="member-name-link">getEpsgCode</a><wbr>(<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><?> unit, |
| <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>... directions)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns the EPSG code of a coordinate system using the given unit and axis directions.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <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 odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getShortName(org.opengis.referencing.cs.CoordinateSystemAxis,java.util.Locale)" class="member-name-link">getShortName</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">CoordinateSystemAxis</a> axis, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Locale.html" title="class or interface in java.util" class="external-link">Locale</a> locale)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns a short (if possible) localized name for the given axis.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#isAlongMeridian(org.opengis.referencing.cs.AxisDirection)" class="member-name-link">isAlongMeridian</a><wbr>(<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> direction)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns <code>true</code> if the given axis direction seems to be a direction along a meridian.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#isGeodetic(org.opengis.referencing.cs.CoordinateSystem)" class="member-name-link">isGeodetic</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystem.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystem</a> cs)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns whether the given coordinate system can be associated to a <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/GeodeticCRS.html" title="class or interface in org.opengis.referencing.crs" class="external-link"><code>GeodeticCRS</code></a>.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <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></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#parseAxisDirection(java.lang.String)" class="member-name-link">parseAxisDirection</a><wbr>(<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> name)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns an axis direction code from the given direction name.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystem.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystem</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#replaceAngularUnit(org.opengis.referencing.cs.CoordinateSystem,javax.measure.Unit)" class="member-name-link">replaceAngularUnit</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystem.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystem</a> cs, |
| <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><<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/quantity/Angle.html" title="class or interface in javax.measure.quantity" class="external-link">Angle</a>> newUnit)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns a coordinate system derived from the given one but with all angular units replaced by the given unit.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystem.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystem</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#replaceAxes(org.opengis.referencing.cs.CoordinateSystem,org.apache.sis.referencing.cs.AxisFilter)" class="member-name-link">replaceAxes</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystem.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystem</a> cs, |
| <a href="AxisFilter.html" title="interface in org.apache.sis.referencing.cs">AxisFilter</a> filter)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns a coordinate system derived from the given one but with a modified list of axes.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystem.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystem</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#replaceLinearUnit(org.opengis.referencing.cs.CoordinateSystem,javax.measure.Unit)" class="member-name-link">replaceLinearUnit</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystem.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystem</a> cs, |
| <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><<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/quantity/Length.html" title="class or interface in javax.measure.quantity" class="external-link">Length</a>> newUnit)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns a coordinate system derived from the given one but with all linear units replaced by the given unit.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/operation/Matrix.html" title="class or interface in org.opengis.referencing.operation" class="external-link">Matrix</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#swapAndScaleAxes(org.opengis.referencing.cs.CoordinateSystem,org.opengis.referencing.cs.CoordinateSystem)" class="member-name-link">swapAndScaleAxes</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystem.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystem</a> sourceCS, |
| <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystem.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystem</a> targetCS)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns an affine transform between two coordinate systems.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-Object">Methods inherited from class <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">getClass</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">hashCode</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">notifyAll</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">toString</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"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method-detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="isGeodetic(org.opengis.referencing.cs.CoordinateSystem)"> |
| <h3>isGeodetic</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">boolean</span> <span class="element-name">isGeodetic</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystem.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystem</a> cs)</span></div> |
| <div class="block">Returns whether the given coordinate system can be associated to a <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/GeodeticCRS.html" title="class or interface in org.opengis.referencing.crs" class="external-link"><code>GeodeticCRS</code></a>. |
| This is true for instances of <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/EllipsoidalCS.html" title="class or interface in org.opengis.referencing.cs" class="external-link"><code>EllipsoidalCS</code></a>, <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CartesianCS.html" title="class or interface in org.opengis.referencing.cs" class="external-link"><code>CartesianCS</code></a> and <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/SphericalCS.html" title="class or interface in org.opengis.referencing.cs" class="external-link"><code>SphericalCS</code></a>, |
| and false for all other types of coordinate system.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>cs</code> - the coordinate system to test (can be <code>null</code>).</dd> |
| <dt>Returns:</dt> |
| <dd>whether the given coordinate system can be associated to a geodetic CRS.</dd> |
| <dt>Since:</dt> |
| <dd>1.3</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="parseAxisDirection(java.lang.String)"> |
| <h3>parseAxisDirection</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <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> <span class="element-name">parseAxisDirection</span><wbr><span class="parameters">(<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> name)</span> |
| throws <span class="exceptions"><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">IllegalArgumentException</a></span></div> |
| <div class="block">Returns an axis direction code from the given direction name. |
| Names are case-insensitive. They may be: |
| |
| <ul> |
| <li>Cardinal directions like <cite>"north"</cite> and <cite>"east"</cite>.</li> |
| <li>Inter-cardinal directions <cite>"north-east"</cite> and <cite>"south-south-east"</cite>, |
| using either <code>'-'</code>, <code>'_'</code> or spaces as separator between the cardinal points.</li> |
| <li>Directions from a pole like <cite>"South along 180 deg"</cite> and <cite>"South along 90° East"</cite>, |
| using either the <code>"deg"</code> or <code>"°"</code> symbol. Note that the meridian is not necessarily relative |
| to Greenwich (see <a href="#directionAlongMeridian(org.opengis.referencing.cs.AxisDirection,double)"><code>directionAlongMeridian(…)</code></a> for more information).</li> |
| </ul></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - the direction name (e.g. "north", "north-east", <i>etc.</i>).</dd> |
| <dt>Returns:</dt> |
| <dd>the axis direction for the given name.</dd> |
| <dt>Throws:</dt> |
| <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">IllegalArgumentException</a></code> - if the given name is not a known axis direction.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="directionAlongMeridian(org.opengis.referencing.cs.AxisDirection,double)"> |
| <h3>directionAlongMeridian</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <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> <span class="element-name">directionAlongMeridian</span><wbr><span class="parameters">(<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> baseDirection, |
| double meridian)</span></div> |
| <div class="block">Returns an axis direction from a pole along a meridian. |
| The given meridian is usually, but not necessarily, relative to the Greenwich meridian. |
| |
| <h4 id="reference-meridian-heading">Reference meridian</h4> |
| The reference meridian depends on the context. It is usually the prime meridian of the |
| <a href="../datum/DefaultGeodeticDatum.html" title="class in org.apache.sis.referencing.datum">geodetic datum</a> of the |
| <a href="../crs/DefaultGeographicCRS.html" title="class in org.apache.sis.referencing.crs">geographic CRS</a> instance |
| that contains (through its coordinate system) the axes having those directions. |
| This policy is consistent with |
| <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#40">WKT 2 specification §7.5.4(iv)</a>. |
| |
| <h4 id="example-heading">Example</h4> |
| <code>directionAlongMeridian(AxisDirection.SOUTH, -90)</code> returns an axis direction for |
| <cite>“South along 90°W”</cite>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>baseDirection</code> - the base direction, which must be <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/AxisDirection.html#NORTH" title="class or interface in org.opengis.referencing.cs" class="external-link"><code>AxisDirection.NORTH</code></a> or <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/AxisDirection.html#SOUTH" title="class or interface in org.opengis.referencing.cs" class="external-link"><code>AxisDirection.SOUTH</code></a>.</dd> |
| <dd><code>meridian</code> - the meridian in degrees, relative to a unspecified (usually Greenwich) prime meridian. |
| Meridians in the East hemisphere are positive and meridians in the West hemisphere are negative.</dd> |
| <dt>Returns:</dt> |
| <dd>the axis direction along the given meridian.</dd> |
| <dt>Since:</dt> |
| <dd>0.6</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isAlongMeridian(org.opengis.referencing.cs.AxisDirection)"> |
| <h3>isAlongMeridian</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">boolean</span> <span class="element-name">isAlongMeridian</span><wbr><span class="parameters">(<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> direction)</span></div> |
| <div class="block">Returns <code>true</code> if the given axis direction seems to be a direction along a meridian. |
| |
| <table class="sis"> |
| <caption>Examples</caption> |
| <tr><th>Axis name</th> <th>Return value</th></tr> |
| <tr><td>North along 90 deg East</td> <td><code>true</code></td></tr> |
| <tr><td>South along 90 deg East</td> <td><code>true</code></td></tr> |
| <tr><td>South</td> <td><code>false</code></td></tr> |
| <tr><td>East</td> <td><code>false</code></td></tr> |
| </table> |
| |
| Note that <code>true</code> is not a guarantee that <a href="#parseAxisDirection(java.lang.String)"><code>parseAxisDirection(String)</code></a> will succeed. |
| But it means that there is reasonable chances of success based on brief inspection of axis name.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>direction</code> - the direction to test. Can be null.</dd> |
| <dt>Returns:</dt> |
| <dd>if the given direction is non-null and seems to be a direction along a meridian.</dd> |
| <dt>Since:</dt> |
| <dd>1.2</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="angle(org.opengis.referencing.cs.AxisDirection,org.opengis.referencing.cs.AxisDirection)"> |
| <h3>angle</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="../../../../../../org.apache.sis.util/org/apache/sis/measure/Angle.html" title="class in org.apache.sis.measure">Angle</a></span> <span class="element-name">angle</span><wbr><span class="parameters">(<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> source, |
| <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> target)</span></div> |
| <div class="block">Returns the arithmetic (counterclockwise) angle from the first axis direction to the second direction. |
| This method returns a value between -180° and +180°, or <code>null</code> if no angle can be computed. |
| |
| <h4 id="horizontal-directions-heading">Horizontal directions</h4> |
| For any pair of compass directions which are not opposite directions, a positive angle denotes |
| a right-handed system while a negative angle denotes a left-handed system. Examples: |
| |
| <ul> |
| <li>The angle from <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/AxisDirection.html#EAST" title="class or interface in org.opengis.referencing.cs" class="external-link"><code>EAST</code></a> to <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/AxisDirection.html#NORTH" title="class or interface in org.opengis.referencing.cs" class="external-link"><code>NORTH</code></a> is 90°</li> |
| <li>The angle from <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/AxisDirection.html#SOUTH" title="class or interface in org.opengis.referencing.cs" class="external-link"><code>SOUTH</code></a> to <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/AxisDirection.html#WEST" title="class or interface in org.opengis.referencing.cs" class="external-link"><code>WEST</code></a> is -90°</li> |
| <li>The angle from <cite>"North along 90° East"</cite> to <cite>"North along 0°"</cite> is 90°.</li> |
| </ul> |
| |
| In the case of directions like <cite>“South along 90°W”</cite>, the caller is responsible to make sure |
| that the meridians are relative to the same prime meridian. This is the case if the axes are part of |
| the same <code>CoordinateSystem</code> instance. |
| |
| <h4 id="horizontal-and-vertical-directions-heading">Horizontal and vertical directions</h4> |
| By convention this method defines the angle from any compass direction to the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/AxisDirection.html#UP" title="class or interface in org.opengis.referencing.cs" class="external-link"><code>UP</code></a> |
| vertical direction as 90°, and the angle of any compass direction to the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/AxisDirection.html#DOWN" title="class or interface in org.opengis.referencing.cs" class="external-link"><code>DOWN</code></a> |
| vertical direction as -90°. The sign of those angles gives no indication about whether the coordinate system |
| is right-handed or left-handed. Those angles are returned as instances of <a href="../../../../../../org.apache.sis.util/org/apache/sis/measure/ElevationAngle.html" title="class in org.apache.sis.measure"><code>ElevationAngle</code></a>. |
| |
| <p>All angles are approximations since this method does not take the Earth ellipsoidal or geoidal shape in |
| account.</p> |
| |
| <h4 id="invariants-heading">Invariants</h4> |
| For any non-null return value: |
| <ul> |
| <li><code>angle(A, A) = 0°</code></li> |
| <li><code>angle(A, opposite(A)) = ±180°</code></li> |
| <li><code>angle(A, B) = -angle(B, A)</code></li> |
| </ul></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>source</code> - the source axis direction.</dd> |
| <dd><code>target</code> - the target axis direction.</dd> |
| <dt>Returns:</dt> |
| <dd>the arithmetic angle (in degrees) of the rotation to apply on a line pointing toward |
| the source direction in order to make it point toward the target direction, or |
| <code>null</code> if this value cannot be computed.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="swapAndScaleAxes(org.opengis.referencing.cs.CoordinateSystem,org.opengis.referencing.cs.CoordinateSystem)"> |
| <h3>swapAndScaleAxes</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/operation/Matrix.html" title="class or interface in org.opengis.referencing.operation" class="external-link">Matrix</a></span> <span class="element-name">swapAndScaleAxes</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystem.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystem</a> sourceCS, |
| <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystem.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystem</a> targetCS)</span> |
| throws <span class="exceptions"><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">IllegalArgumentException</a>, |
| <a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/IncommensurableException.html" title="class or interface in javax.measure" class="external-link">IncommensurableException</a></span></div> |
| <div class="block">Returns an affine transform between two coordinate systems. |
| Only units and axes order (e.g. transforming from |
| (<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/AxisDirection.html#NORTH" title="class or interface in org.opengis.referencing.cs" class="external-link">North</a>, <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/AxisDirection.html#WEST" title="class or interface in org.opengis.referencing.cs" class="external-link">West</a>) to |
| (<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/AxisDirection.html#EAST" title="class or interface in org.opengis.referencing.cs" class="external-link">East</a>, <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/AxisDirection.html#NORTH" title="class or interface in org.opengis.referencing.cs" class="external-link">North</a>) |
| are taken in account by this method. |
| |
| <h4 id="conditions-heading">Conditions</h4> |
| The two coordinate systems must implement the same GeoAPI coordinate system interface. |
| For example if <code>sourceCS</code> is a <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CartesianCS.html" title="class or interface in org.opengis.referencing.cs" class="external-link"><code>CartesianCS</code></a>, |
| then <code>targetCS</code> must be a <code>CartesianCS</code> too. |
| |
| <h4 id="example-heading1">Example</h4> |
| If coordinates in <code>sourceCS</code> are (<var>x</var>,<var>y</var>) tuples in metres |
| and coordinates in <code>targetCS</code> are (<var>-y</var>,<var>x</var>) tuples in centimetres, |
| then the transformation can be performed as below: |
| |
| <pre class="math"> |
| ┌ ┐ ┌ ┐ ┌ ┐ |
| │-y(cm)│ │ 0 -100 0 │ │ x(m)│ |
| │ x(cm)│ = │ 100 0 0 │ │ y(m)│ |
| │ 1 │ │ 0 0 1 │ │ 1 │ |
| └ ┘ └ ┘ └ ┘</pre></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>sourceCS</code> - the source coordinate system.</dd> |
| <dd><code>targetCS</code> - the target coordinate system.</dd> |
| <dt>Returns:</dt> |
| <dd>the conversion from <code>sourceCS</code> to <code>targetCS</code> as an affine transform. |
| Only axis direction and units are taken in account.</dd> |
| <dt>Throws:</dt> |
| <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">IllegalArgumentException</a></code> - if the CS are not of the same type, or axes do not match.</dd> |
| <dd><code><a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/IncommensurableException.html" title="class or interface in javax.measure" class="external-link">IncommensurableException</a></code> - if the units are not compatible, or the conversion is non-linear.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="../operation/matrix/Matrices.html#createTransform(org.opengis.referencing.cs.AxisDirection%5B%5D,org.opengis.referencing.cs.AxisDirection%5B%5D)"><code>Matrices.createTransform(AxisDirection[], AxisDirection[])</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="replaceAxes(org.opengis.referencing.cs.CoordinateSystem,org.apache.sis.referencing.cs.AxisFilter)"> |
| <h3>replaceAxes</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystem.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystem</a></span> <span class="element-name">replaceAxes</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystem.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystem</a> cs, |
| <a href="AxisFilter.html" title="interface in org.apache.sis.referencing.cs">AxisFilter</a> filter)</span></div> |
| <div class="block">Returns a coordinate system derived from the given one but with a modified list of axes. |
| The axes may be filtered (excluding some axes), reordered or have their unit and direction modified. |
| |
| <h4 id="example-heading2">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">CoordinateSystem cs = ...; |
| cs = CoordinateSystems.replaceAxes(cs, new AxisFilter() { |
| @Override |
| public Unit<?> getUnitReplacement(CoordinateSystemAxis axis, Unit<?> unit) { |
| if (Units.isAngular(unit)) { |
| unit = Units.DEGREE; |
| } |
| return unit; |
| } |
| }); |
| </code></pre> |
| </div> |
| |
| |
| <h4 id="coordinate-system-normalization-heading">Coordinate system normalization</h4> |
| This method is often used together with <a href="#swapAndScaleAxes(org.opengis.referencing.cs.CoordinateSystem,org.opengis.referencing.cs.CoordinateSystem)"><code>swapAndScaleAxes(…)</code></a> for normalizing the |
| coordinate values given to a <a href="../operation/transform/AbstractMathTransform.html" title="class in org.apache.sis.referencing.operation.transform">math transform</a>. For 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">CoordinateSystem sourceCS = ...; |
| CoordinateSystem targetCS = ...; |
| Matrix step1 = swapAndScaleAxes(sourceCS, replaceAxes(sourceCS, AxisConvention.NORMALIZED)); |
| Matrix step2 = ...; // some transform working on coordinates with standard axis order and unit. |
| Matrix step3 = swapAndScaleAxes(replaceAxes(targetCS, AxisConvention.NORMALIZED), targetCS); |
| </code></pre> |
| </div> |
| </div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>cs</code> - the coordinate system, or <code>null</code>.</dd> |
| <dd><code>filter</code> - the modifications to apply on coordinate system axes.</dd> |
| <dt>Returns:</dt> |
| <dd>the modified coordinate system as a new instance, |
| or <code>cs</code> if the given coordinate system was null or does not need any change.</dd> |
| <dt>Throws:</dt> |
| <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">IllegalArgumentException</a></code> - if the specified coordinate system cannot be filtered. |
| It may be because the coordinate system would contain an illegal number of axes, |
| or because an axis would have an unexpected direction or unexpected unit of measurement.</dd> |
| <dt>Since:</dt> |
| <dd>0.6</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="AxesConvention.html#NORMALIZED"><code>AxesConvention.NORMALIZED</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="replaceLinearUnit(org.opengis.referencing.cs.CoordinateSystem,javax.measure.Unit)"> |
| <h3>replaceLinearUnit</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystem.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystem</a></span> <span class="element-name">replaceLinearUnit</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystem.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystem</a> cs, |
| <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><<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/quantity/Length.html" title="class or interface in javax.measure.quantity" class="external-link">Length</a>> newUnit)</span></div> |
| <div class="block">Returns a coordinate system derived from the given one but with all linear units replaced by the given unit. |
| Non-linear units (e.g. angular or scale units) are left unchanged. |
| |
| <p>This convenience method is equivalent to the following code:</p> |
| |
| <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">return CoordinateSystems.replaceAxes(cs, new AxisFilter() { |
| @Override public Unit<?> getUnitReplacement(CoordinateSystemAxis axis, Unit<?> unit) { |
| return Units.isLinear(unit) ? newUnit : unit; |
| } |
| }); |
| </code></pre> |
| </div> |
| </div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>cs</code> - the coordinate system in which to replace linear units, or <code>null</code>.</dd> |
| <dd><code>newUnit</code> - the new linear unit.</dd> |
| <dt>Returns:</dt> |
| <dd>the modified coordinate system as a new instance, or <code>null</code> if the given <code>cs</code> was null, |
| or <code>cs</code> if all linear units were already equal to the given one.</dd> |
| <dt>Since:</dt> |
| <dd>0.7</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="../../../../../../org.apache.sis.util/org/apache/sis/measure/Units.html#isLinear(javax.measure.Unit)"><code>Units.isLinear(Unit)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="replaceAngularUnit(org.opengis.referencing.cs.CoordinateSystem,javax.measure.Unit)"> |
| <h3>replaceAngularUnit</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystem.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystem</a></span> <span class="element-name">replaceAngularUnit</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystem.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystem</a> cs, |
| <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><<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/quantity/Angle.html" title="class or interface in javax.measure.quantity" class="external-link">Angle</a>> newUnit)</span></div> |
| <div class="block">Returns a coordinate system derived from the given one but with all angular units replaced by the given unit. |
| Non-angular units (e.g. linear or scale units) are left unchanged. |
| |
| <p>This convenience method is equivalent to the following code:</p> |
| |
| <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">return CoordinateSystems.replaceAxes(cs, new AxisFilter() { |
| @Override public Unit<?> getUnitReplacement(CoordinateSystemAxis axis, Unit<?> unit) { |
| return Units.isAngular(unit) ? newUnit : unit; |
| } |
| }); |
| </code></pre> |
| </div> |
| </div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>cs</code> - the coordinate system in which to replace angular units, or <code>null</code>.</dd> |
| <dd><code>newUnit</code> - the new angular unit.</dd> |
| <dt>Returns:</dt> |
| <dd>the modified coordinate system as a new instance, or <code>null</code> if the given <code>cs</code> was null, |
| or <code>cs</code> if all angular units were already equal to the given one.</dd> |
| <dt>Since:</dt> |
| <dd>0.7</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="../../../../../../org.apache.sis.util/org/apache/sis/measure/Units.html#isAngular(javax.measure.Unit)"><code>Units.isAngular(Unit)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getAxisDirections(org.opengis.referencing.cs.CoordinateSystem)"> |
| <h3>getAxisDirections</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <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> <span class="element-name">getAxisDirections</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystem.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystem</a> cs)</span></div> |
| <div class="block">Returns the axis directions for the specified coordinate system. |
| This method guarantees that the returned array is non-null and does not contain any null direction.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>cs</code> - the coordinate system.</dd> |
| <dt>Returns:</dt> |
| <dd>the axis directions for the specified coordinate system.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/NullPointerException.html" title="class or interface in java.lang" class="external-link">NullPointerException</a></code> - if <code>cs</code> is null, or one of its axes is null, |
| or a value returned by <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystemAxis.html#getDirection()" title="class or interface in org.opengis.referencing.cs" class="external-link"><code>CoordinateSystemAxis.getDirection()</code></a> is null.</dd> |
| <dt>Since:</dt> |
| <dd>0.8</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getShortName(org.opengis.referencing.cs.CoordinateSystemAxis,java.util.Locale)"> |
| <h3>getShortName</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <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> <span class="element-name">getShortName</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> axis, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Locale.html" title="class or interface in java.util" class="external-link">Locale</a> locale)</span></div> |
| <div class="block">Returns a short (if possible) localized name for the given axis. This method replaces |
| names such as "Geodetic latitude" or "Geocentric latitude" by a simple "Latitude" word. |
| This method can be used for example in column or row headers when the context is known |
| and the space is rare.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>axis</code> - the axis for which to get a short label.</dd> |
| <dd><code>locale</code> - desired locale for the label.</dd> |
| <dt>Returns:</dt> |
| <dd>a relatively short axis label, in the desired locale if possible.</dd> |
| <dt>Since:</dt> |
| <dd>1.3</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getEpsgCode(java.lang.Class,org.opengis.referencing.cs.CoordinateSystemAxis...)"> |
| <h3>getEpsgCode</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><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></span> <span class="element-name">getEpsgCode</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><? extends <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystem.html" title="class or interface in org.opengis.referencing.cs" class="external-link">CoordinateSystem</a>> type, |
| <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>... axes)</span></div> |
| <div class="block">Returns the EPSG code of a coordinate system using the units and directions of given axes. |
| This method ignores axis metadata (names, abbreviation, identifiers, remarks, <i>etc.</i>). |
| The axis minimum and maximum values are checked only if the |
| <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystemAxis.html#getRangeMeaning()" title="class or interface in org.opengis.referencing.cs" class="external-link">range meaning</a> is "wraparound". |
| If no suitable coordinate system is known to Apache SIS, then this method returns <code>null</code>. |
| |
| <p>Current implementation uses a hard-coded list of known coordinate systems; |
| it does not yet scan the EPSG database (this may change in future Apache SIS version). |
| The current list of known coordinate systems is given below.</p> |
| |
| <table class="sis"> |
| <caption>Known coordinate systems (CS)</caption> |
| <tr><th>EPSG</th> <th>CS type</th> <th colspan="3">Axis directions</th> <th>Horizontal unit</th></tr> |
| <tr><td>6424</td> <td>Ellipsoidal</td> <td>east</td> <td>north</td> <td></td> <td>degree</td></tr> |
| <tr><td>6422</td> <td>Ellipsoidal</td> <td>north</td> <td>east</td> <td></td> <td>degree</td></tr> |
| <tr><td>6425</td> <td>Ellipsoidal</td> <td>east</td> <td>north</td> <td></td> <td>grads</td></tr> |
| <tr><td>6403</td> <td>Ellipsoidal</td> <td>north</td> <td>east</td> <td></td> <td>grads</td></tr> |
| <tr><td>6429</td> <td>Ellipsoidal</td> <td>east</td> <td>north</td> <td></td> <td>radian</td></tr> |
| <tr><td>6428</td> <td>Ellipsoidal</td> <td>north</td> <td>east</td> <td></td> <td>radian</td></tr> |
| <tr><td>6426</td> <td>Ellipsoidal</td> <td>east</td> <td>north</td> <td>up</td> <td>degree</td></tr> |
| <tr><td>6423</td> <td>Ellipsoidal</td> <td>north</td> <td>east</td> <td>up</td> <td>degree</td></tr> |
| <tr><td>6427</td> <td>Ellipsoidal</td> <td>east</td> <td>north</td> <td>up</td> <td>grads</td></tr> |
| <tr><td>6421</td> <td>Ellipsoidal</td> <td>north</td> <td>east</td> <td>up</td> <td>grads</td></tr> |
| <tr><td>6431</td> <td>Ellipsoidal</td> <td>east</td> <td>north</td> <td>up</td> <td>radian</td></tr> |
| <tr><td>6430</td> <td>Ellipsoidal</td> <td>north</td> <td>east</td> <td>up</td> <td>radian</td></tr> |
| <tr><td>4400</td> <td>Cartesian</td> <td>east</td> <td>north</td> <td></td> <td>metre</td></tr> |
| <tr><td>4500</td> <td>Cartesian</td> <td>north</td> <td>east</td> <td></td> <td>metre</td></tr> |
| <tr><td>4491</td> <td>Cartesian</td> <td>west</td> <td>north</td> <td></td> <td>metre</td></tr> |
| <tr><td>4501</td> <td>Cartesian</td> <td>north</td> <td>west</td> <td></td> <td>metre</td></tr> |
| <tr><td>6503</td> <td>Cartesian</td> <td>west</td> <td>south</td> <td></td> <td>metre</td></tr> |
| <tr><td>6501</td> <td>Cartesian</td> <td>south</td> <td>west</td> <td></td> <td>metre</td></tr> |
| <tr><td>1039</td> <td>Cartesian</td> <td>east</td> <td>north</td> <td></td> <td>foot</td></tr> |
| <tr><td>1029</td> <td>Cartesian</td> <td>north</td> <td>east</td> <td></td> <td>foot</td></tr> |
| <tr><td>4403</td> <td>Cartesian</td> <td>east</td> <td>north</td> <td></td> <td>Clarke’s foot</td></tr> |
| <tr><td>4502</td> <td>Cartesian</td> <td>north</td> <td>east</td> <td></td> <td>Clarke’s foot</td></tr> |
| <tr><td>4497</td> <td>Cartesian</td> <td>east</td> <td>north</td> <td></td> <td>US survey foot</td></tr> |
| </table></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>type</code> - the type of coordinate system for which an EPSG code is desired, as a GeoAPI interface.</dd> |
| <dd><code>axes</code> - axes for which a coordinate system EPSG code is desired.</dd> |
| <dt>Returns:</dt> |
| <dd>EPSG codes for a coordinate system using the given axes (ignoring metadata), or <code>null</code> if unknown |
| to this method. Note that a null value does not mean that a more extensive search in the EPSG database |
| would not find a matching coordinate system.</dd> |
| <dt>Since:</dt> |
| <dd>1.0</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="../factory/GeodeticAuthorityFactory.html#createCoordinateSystem(java.lang.String)"><code>GeodeticAuthorityFactory.createCoordinateSystem(String)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getEpsgCode(javax.measure.Unit,org.opengis.referencing.cs.AxisDirection...)"> |
| <h3>getEpsgCode</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><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></span> <span class="element-name">getEpsgCode</span><wbr><span class="parameters">(<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><?> unit, |
| <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>... directions)</span></div> |
| <div class="block">Returns the EPSG code of a coordinate system using the given unit and axis directions. |
| This convenience method performs the work documented in <a href="#getEpsgCode(java.lang.Class,org.opengis.referencing.cs.CoordinateSystemAxis...)"><code>getEpsgCode(Class, CoordinateSystemAxis...)</code></a>, |
| but requiring only a frequently used subset of information. |
| If no suitable coordinate system is known to Apache SIS, then this method returns <code>null</code>. |
| |
| <p>Current implementation uses a hard-coded list of known coordinate systems; |
| it does not yet scan the EPSG database (this may change in future Apache SIS version). |
| The current list of known coordinate systems is documented <a href="#getEpsgCode(java.lang.Class,org.opengis.referencing.cs.CoordinateSystemAxis...)">above</a>.</p></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>unit</code> - desired unit of measurement. For three-dimensional ellipsoidal coordinate system, |
| this is the unit for the horizontal axes only; the vertical axis is in metres.</dd> |
| <dd><code>directions</code> - desired axis directions.</dd> |
| <dt>Returns:</dt> |
| <dd>EPSG codes for a coordinate system using the given axis directions and unit of measurement, |
| or <code>null</code> if unknown to this method. Note that a null value does not mean that a more |
| extensive search in the EPSG database would not find a matching coordinate system.</dd> |
| <dt>Since:</dt> |
| <dd>0.8</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="../../../../../../org.apache.sis.util/org/apache/sis/measure/Units.html#getEpsgCode(javax.measure.Unit,boolean)"><code>Units.getEpsgCode(Unit, boolean)</code></a></li> |
| <li><a href="../factory/GeodeticAuthorityFactory.html#createCoordinateSystem(java.lang.String)"><code>GeodeticAuthorityFactory.createCoordinateSystem(String)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| </div> |
| </div> |
| </body> |
| </html> |