| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (21) on Thu Oct 05 19:54:57 CEST 2023 --> |
| <title>AbstractDirectPosition (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.geometry, class: AbstractDirectPosition"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <meta name="keywords" content="org.apache.sis.geometry.AbstractDirectPosition class"> |
| <meta name="keywords" content="castOrCopy()"> |
| <meta name="keywords" content="getDirectPosition()"> |
| <meta name="keywords" content="getCoordinateReferenceSystem()"> |
| <meta name="keywords" content="getCoordinate()"> |
| <meta name="keywords" content="setOrdinate()"> |
| <meta name="keywords" content="setLocation()"> |
| <meta name="keywords" content="normalize()"> |
| <meta name="keywords" content="formatTo()"> |
| <meta name="keywords" content="toString()"> |
| <meta name="keywords" content="hashCode()"> |
| <meta name="keywords" content="equals()"> |
| <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><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: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor-summary">Constr</a> | </li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor-detail">Constr</a> | </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.geometry</a></div> |
| <h1 title="Class AbstractDirectPosition" class="title">Class AbstractDirectPosition</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="../io/wkt/FormattableObject.html" title="class in org.apache.sis.io.wkt">FormattableObject</a> |
| <div class="inheritance">AbstractDirectPosition</div> |
| </div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <dl class="notes"> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/coordinate/Position.html" title="class or interface in org.opengis.geometry.coordinate" class="external-link">Position</a></code>, <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">DirectPosition</a></code></dd> |
| </dl> |
| <dl class="notes"> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><code><a href="DirectPosition1D.html" title="class in org.apache.sis.geometry">DirectPosition1D</a></code>, <code><a href="GeneralDirectPosition.html" title="class in org.apache.sis.geometry">GeneralDirectPosition</a></code></dd> |
| </dl> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public abstract class </span><span class="element-name type-name-label">AbstractDirectPosition</span> |
| <span class="extends-implements">extends <a href="../io/wkt/FormattableObject.html" title="class in org.apache.sis.io.wkt">FormattableObject</a> |
| implements <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></div> |
| <div class="block">Default implementations of some <code>DirectPosition</code> methods, leaving the data storage to subclasses. |
| A direct position holds the coordinates for a position within some |
| <a href="../referencing/crs/AbstractCRS.html" title="class in org.apache.sis.referencing.crs">coordinate reference system</a>. |
| This base class provides default implementations for <a href="#toString()"><code>toString()</code></a>, |
| <a href="#equals(java.lang.Object)"><code>equals(Object)</code></a> and <a href="#hashCode()"><code>hashCode()</code></a> methods. |
| |
| <p>This base class does not hold any state and does not implement the <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"><code>Serializable</code></a> |
| or <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Cloneable.html" title="class or interface in java.lang" class="external-link"><code>Cloneable</code></a> interfaces. The internal representation, and the choice to be cloneable or |
| serializable, is left to subclasses.</p></div> |
| <dl class="notes"> |
| <dt>Since:</dt> |
| <dd>0.3</dd> |
| </dl> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <li> |
| <section class="constructor-summary" id="constructor-summary"> |
| <h2>Constructor Summary</h2> |
| <div class="caption"><span>Constructors</span></div> |
| <div class="summary-table 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()" class="member-name-link">AbstractDirectPosition</a>()</code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Constructs a direct position.</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-tab1 method-summary-table-tab4"><code>static <a href="AbstractDirectPosition.html" title="class in org.apache.sis.geometry">AbstractDirectPosition</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#castOrCopy(org.opengis.geometry.DirectPosition)" class="member-name-link">castOrCopy</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">DirectPosition</a> position)</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 given position as an <code>AbstractDirectPosition</code> instance.</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="#equals(java.lang.Object)" class="member-name-link">equals</a><wbr>(<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> object)</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 specified object is also a <code>DirectPosition</code> |
| with equal coordinates and equal CRS.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#formatTo(org.apache.sis.io.wkt.Formatter)" class="member-name-link">formatTo</a><wbr>(<a href="../io/wkt/Formatter.html" title="class in org.apache.sis.io.wkt">Formatter</a> formatter)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Formats this position in the <cite>Well Known Text</cite> (WKT) format.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double[]</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getCoordinate()" class="member-name-link">getCoordinate</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 a sequence of numbers that hold the coordinate of this position in its reference system.</div> |
| </div> |
| <div class="col-first even-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/referencing/crs/CoordinateReferenceSystem.html" title="class or interface in org.opengis.referencing.crs" class="external-link">CoordinateReferenceSystem</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getCoordinateReferenceSystem()" class="member-name-link">getCoordinateReferenceSystem</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 coordinate reference system in which the coordinate tuple is given.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>final <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></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getDirectPosition()" class="member-name-link">getDirectPosition</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 always <code>this</code>, the direct position for this |
| <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/coordinate/Position.html" title="class or interface in org.opengis.geometry.coordinate" class="external-link">position</a>.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#hashCode()" class="member-name-link">hashCode</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns a hash value for this coordinate tuple.</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="#normalize()" class="member-name-link">normalize</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Ensures that the position is contained in the coordinate system domain.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setLocation(org.opengis.geometry.DirectPosition)" class="member-name-link">setLocation</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">DirectPosition</a> position)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Sets this direct position to the given position.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setOrdinate(int,double)" class="member-name-link">setOrdinate</a><wbr>(int dimension, |
| double value)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Sets the coordinate value along the specified dimension.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toString()" class="member-name-link">toString</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Formats this position in the <cite>Well Known Text</cite> (WKT) format.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-FormattableObject">Methods inherited from class <a href="../io/wkt/FormattableObject.html" title="class in org.apache.sis.io.wkt">FormattableObject</a></h3> |
| <code><a href="../io/wkt/FormattableObject.html#print()">print</a>, <a href="../io/wkt/FormattableObject.html#toString(org.apache.sis.io.wkt.Convention)">toString</a>, <a href="../io/wkt/FormattableObject.html#toWKT()">toWKT</a></code></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#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#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#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-DirectPosition">Methods inherited from interface <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></h3> |
| <code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/DirectPosition.html#getDimension()" title="class or interface in org.opengis.geometry" class="external-link">getDimension</a>, <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/DirectPosition.html#getOrdinate(int)" title="class or interface in org.opengis.geometry" class="external-link">getOrdinate</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="<init>()"> |
| <h3>AbstractDirectPosition</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="element-name">AbstractDirectPosition</span>()</div> |
| <div class="block">Constructs a direct position.</div> |
| </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="castOrCopy(org.opengis.geometry.DirectPosition)"> |
| <h3>castOrCopy</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="AbstractDirectPosition.html" title="class in org.apache.sis.geometry">AbstractDirectPosition</a></span> <span class="element-name">castOrCopy</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> position)</span></div> |
| <div class="block">Returns the given position as an <code>AbstractDirectPosition</code> instance. |
| If the given position is already an instance of <code>AbstractDirectPosition</code>, |
| then it is returned unchanged. Otherwise the coordinate values and the CRS |
| of the given position are copied in a new position.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>position</code> - the position to cast, or <code>null</code>.</dd> |
| <dt>Returns:</dt> |
| <dd>the values of the given position as an <code>AbstractDirectPosition</code> instance.</dd> |
| <dt>Since:</dt> |
| <dd>1.0</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getDirectPosition()"> |
| <h3>getDirectPosition</h3> |
| <div class="member-signature"><span class="modifiers">public final</span> <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> <span class="element-name">getDirectPosition</span>()</div> |
| <div class="block">Returns always <code>this</code>, the direct position for this |
| <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/coordinate/Position.html" title="class or interface in org.opengis.geometry.coordinate" class="external-link">position</a>.</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/coordinate/Position.html#getDirectPosition()" title="class or interface in org.opengis.geometry.coordinate" class="external-link">getDirectPosition</a></code> in interface <code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/coordinate/Position.html" title="class or interface in org.opengis.geometry.coordinate" class="external-link">Position</a></code></dd> |
| <dt>Returns:</dt> |
| <dd><code>this</code>.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getCoordinateReferenceSystem()"> |
| <h3>getCoordinateReferenceSystem</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/CoordinateReferenceSystem.html" title="class or interface in org.opengis.referencing.crs" class="external-link">CoordinateReferenceSystem</a></span> <span class="element-name">getCoordinateReferenceSystem</span>()</div> |
| <div class="block">Returns the coordinate reference system in which the coordinate tuple is given. |
| May be <code>null</code> if this particular <code>DirectPosition</code> is included in a larger object |
| with such a reference to a <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/CoordinateReferenceSystem.html" title="class or interface in org.opengis.referencing.crs" class="external-link">coordinate reference system</a>. |
| |
| <p>The default implementation returns <code>null</code>. |
| Subclasses should override this method if the CRS can be provided.</p></div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/DirectPosition.html#getCoordinateReferenceSystem()" title="class or interface in org.opengis.geometry" class="external-link">getCoordinateReferenceSystem</a></code> in interface <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">DirectPosition</a></code></dd> |
| <dt>Returns:</dt> |
| <dd>the coordinate reference system, or <code>null</code>.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getCoordinate()"> |
| <h3>getCoordinate</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">double[]</span> <span class="element-name">getCoordinate</span>()</div> |
| <div class="block">Returns a sequence of numbers that hold the coordinate of this position in its reference system.</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/DirectPosition.html#getCoordinate()" title="class or interface in org.opengis.geometry" class="external-link">getCoordinate</a></code> in interface <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">DirectPosition</a></code></dd> |
| <dt>Returns:</dt> |
| <dd>the coordinates.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setOrdinate(int,double)"> |
| <h3>setOrdinate</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setOrdinate</span><wbr><span class="parameters">(int dimension, |
| double value)</span></div> |
| <div class="block">Sets the coordinate value along the specified dimension. |
| |
| <p>The default implementation throws <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link"><code>UnsupportedOperationException</code></a>. |
| Subclasses need to override this method if this direct position is mutable.</p></div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/DirectPosition.html#setOrdinate(int,double)" title="class or interface in org.opengis.geometry" class="external-link">setOrdinate</a></code> in interface <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">DirectPosition</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>dimension</code> - the dimension for the coordinate of interest.</dd> |
| <dd><code>value</code> - the coordinate value of interest.</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">IndexOutOfBoundsException</a></code> - if the given index is negative or is equal or greater |
| than the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/DirectPosition.html#getDimension()" title="class or interface in org.opengis.geometry" class="external-link">position dimension</a>.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">UnsupportedOperationException</a></code> - if this direct position is immutable.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setLocation(org.opengis.geometry.DirectPosition)"> |
| <h3>setLocation</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setLocation</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> position)</span> |
| throws <span class="exceptions"><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">MismatchedDimensionException</a>, |
| <a href="MismatchedReferenceSystemException.html" title="class in org.apache.sis.geometry">MismatchedReferenceSystemException</a></span></div> |
| <div class="block">Sets this direct position to the given position. If the given position is |
| <code>null</code>, then all coordinate values are set to <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link"><code>NaN</code></a>. |
| |
| <p>If this position and the given position have a non-null CRS, then the default implementation |
| requires the CRS to be <a href="../../../../../org.apache.sis.util/org/apache/sis/util/Utilities.html#equalsIgnoreMetadata(java.lang.Object,java.lang.Object)">equals (ignoring metadata)</a>, |
| otherwise a <code>MismatchedReferenceSystemException</code> is thrown. However, subclass may choose |
| to assign the CRS of this position to the CRS of the given position.</p></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>position</code> - the new position, or <code>null</code>.</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">MismatchedDimensionException</a></code> - if the given position doesn't have the expected dimension.</dd> |
| <dd><code><a href="MismatchedReferenceSystemException.html" title="class in org.apache.sis.geometry">MismatchedReferenceSystemException</a></code> - if the given position doesn't use the expected CRS.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="normalize()"> |
| <h3>normalize</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">normalize</span>()</div> |
| <div class="block">Ensures that the position is contained in the coordinate system domain. |
| For each dimension, this method compares the coordinate values against the |
| limits of the coordinate system axis for that dimension. |
| If some coordinates are out of range, then there is a choice depending on 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">axis range meaning</a>: |
| |
| <ul> |
| <li>If <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/RangeMeaning.html#EXACT" title="class or interface in org.opengis.referencing.cs" class="external-link"><code>RangeMeaning.EXACT</code></a> (typically <em>latitudes</em> coordinates), then values |
| greater than the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystemAxis.html#getMaximumValue()" title="class or interface in org.opengis.referencing.cs" class="external-link">axis maximal value</a> |
| are replaced by the axis maximum, and values smaller than the |
| <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystemAxis.html#getMinimumValue()" title="class or interface in org.opengis.referencing.cs" class="external-link">axis minimal value</a> |
| are replaced by the axis minimum.</li> |
| |
| <li>If <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/RangeMeaning.html#WRAPAROUND" title="class or interface in org.opengis.referencing.cs" class="external-link"><code>RangeMeaning.WRAPAROUND</code></a> (typically <em>longitudes</em> coordinates), then |
| a multiple of the axis range (e.g. 360° for longitudes) is added or subtracted.</li> |
| </ul></div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd><code>true</code> if this position has been modified as a result of this method call, |
| or <code>false</code> if no change has been done.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="GeneralEnvelope.html#normalize()"><code>GeneralEnvelope.normalize()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="formatTo(org.apache.sis.io.wkt.Formatter)"> |
| <h3>formatTo</h3> |
| <div class="member-signature"><span class="modifiers">protected</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">formatTo</span><wbr><span class="parameters">(<a href="../io/wkt/Formatter.html" title="class in org.apache.sis.io.wkt">Formatter</a> formatter)</span></div> |
| <div class="block">Formats this position in the <cite>Well Known Text</cite> (WKT) format. |
| The format is like below, where <code>x₀</code>, <code>x₁</code>, <code>x₂</code>, <i>etc.</i> |
| are the coordinate values at index 0, 1, 2, <i>etc.</i>: |
| |
| |
| <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-wkt">POINT[x₀ x₁ x₂ …] |
| </code></pre> |
| </div> |
| |
| |
| If the coordinate reference system is geodetic or projected, then coordinate values are formatted |
| with a precision equivalent to one centimetre on Earth (the actual number of fraction digits is |
| adjusted for the axis unit of measurement and the planet size if different than Earth).</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="../io/wkt/FormattableObject.html#formatTo(org.apache.sis.io.wkt.Formatter)">formatTo</a></code> in class <code><a href="../io/wkt/FormattableObject.html" title="class in org.apache.sis.io.wkt">FormattableObject</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>formatter</code> - the formatter where to format the inner content of this point.</dd> |
| <dt>Returns:</dt> |
| <dd>the WKT keyword, which is <code>"Point"</code> for this element.</dd> |
| <dt>Since:</dt> |
| <dd>1.0</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="../io/wkt/FormattableObject.html#toWKT()"><code>FormattableObject.toWKT()</code></a></li> |
| <li><a href="../io/wkt/FormattableObject.html#toString()"><code>FormattableObject.toString()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="toString()"> |
| <h3>toString</h3> |
| <div class="member-signature"><span class="modifiers">public</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">toString</span>()</div> |
| <div class="block">Formats this position in the <cite>Well Known Text</cite> (WKT) format. |
| The returned string is like below, where <code>x₀</code>, <code>x₁</code>, <code>x₂</code>, <i>etc.</i> |
| are the coordinate values at index 0, 1, 2, <i>etc.</i>: |
| |
| |
| <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-wkt">POINT(x₀ x₁ x₂ …) |
| </code></pre> |
| </div> |
| |
| |
| This method formats the numbers as with <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#toString(double)" title="class or interface in java.lang" class="external-link"><code>Double.toString(double)</code></a> (i.e. without fixed number of fraction digits). |
| The string returned by this method can be <a href="GeneralDirectPosition.html#%3Cinit%3E(java.lang.CharSequence)">parsed</a> |
| by the <code>GeneralDirectPosition</code> constructor.</div> |
| <dl class="notes"> |
| <dt>Overrides:</dt> |
| <dd><code><a href="../io/wkt/FormattableObject.html#toString()">toString</a></code> in class <code><a href="../io/wkt/FormattableObject.html" title="class in org.apache.sis.io.wkt">FormattableObject</a></code></dd> |
| <dt>Returns:</dt> |
| <dd>this position as a <code>POINT</code> in <cite>Well Known Text</cite> (WKT) format.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="hashCode()"> |
| <h3>hashCode</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">hashCode</span>()</div> |
| <div class="block">Returns a hash value for this coordinate tuple. This method returns a value compliant |
| with the contract documented in the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/DirectPosition.html#hashCode()" title="class or interface in org.opengis.geometry" class="external-link"><code>DirectPosition.hashCode()</code></a> javadoc. |
| Consequently, it should be possible to mix different <code>DirectPosition</code> |
| implementations in the same hash map.</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/DirectPosition.html#hashCode()" title="class or interface in org.opengis.geometry" class="external-link">hashCode</a></code> in interface <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">DirectPosition</a></code></dd> |
| <dt>Overrides:</dt> |
| <dd><code><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></code> in class <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></dd> |
| <dt>Returns:</dt> |
| <dd>a hash code value for this position.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="equals(java.lang.Object)"> |
| <h3>equals</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">equals</span><wbr><span class="parameters">(<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> object)</span></div> |
| <div class="block">Returns <code>true</code> if the specified object is also a <code>DirectPosition</code> |
| with equal coordinates and equal CRS. |
| |
| This method performs the comparison as documented in the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/DirectPosition.html#equals(java.lang.Object)" title="class or interface in org.opengis.geometry" class="external-link"><code>DirectPosition.equals(Object)</code></a> |
| javadoc. In particular, the given object is not required to be of the same implementation class. |
| Consequently, it should be possible to mix different <code>DirectPosition</code> implementations in |
| the same hash map.</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/DirectPosition.html#equals(java.lang.Object)" title="class or interface in org.opengis.geometry" class="external-link">equals</a></code> in interface <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">DirectPosition</a></code></dd> |
| <dt>Overrides:</dt> |
| <dd><code><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></code> in class <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>object</code> - the object to compare with this position.</dd> |
| <dt>Returns:</dt> |
| <dd><code>true</code> if the given object is equal to this position.</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| </div> |
| </div> |
| </body> |
| </html> |