| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (19) --> |
| <title>MilitaryGridReferenceSystem.Coder (Apache SIS 1.3 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="description" content="declaration: package: org.apache.sis.referencing.gazetteer, class: MilitaryGridReferenceSystem, class: Coder"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <meta name="keywords" content="org.apache.sis.referencing.gazetteer.MilitaryGridReferenceSystem.Coder class"> |
| <meta name="keywords" content="getReferenceSystem()"> |
| <meta name="keywords" content="getPrecision()"> |
| <meta name="keywords" content="setPrecision()"> |
| <meta name="keywords" content="getSeparator()"> |
| <meta name="keywords" content="setSeparator()"> |
| <meta name="keywords" content="getClipToValidArea()"> |
| <meta name="keywords" content="setClipToValidArea()"> |
| <meta name="keywords" content="encode()"> |
| <meta name="keywords" content="decode()"> |
| <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"> |
| <link rel="stylesheet" type="text/css" href="../../../../../jquery-ui.overrides.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../script-dir/jquery-3.6.0.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="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">Class</li> |
| <li><a href="class-use/MilitaryGridReferenceSystem.Coder.html">Use</a></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="package-label-in-type">Package</span> <a href="package-summary.html">org.apache.sis.referencing.gazetteer</a></div> |
| <h1 title="Class MilitaryGridReferenceSystem.Coder" class="title">Class MilitaryGridReferenceSystem.Coder</h1> |
| </div> |
| <div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/16/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="ReferencingByIdentifiers.Coder.html" title="class in org.apache.sis.referencing.gazetteer">ReferencingByIdentifiers.Coder</a> |
| <div class="inheritance">Coder</div> |
| </div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <dl class="notes"> |
| <dt>Enclosing class:</dt> |
| <dd><code><a href="MilitaryGridReferenceSystem.html" title="class in org.apache.sis.referencing.gazetteer">MilitaryGridReferenceSystem</a></code></dd> |
| </dl> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">MilitaryGridReferenceSystem.Coder</span> |
| <span class="extends-implements">extends <a href="ReferencingByIdentifiers.Coder.html" title="class in org.apache.sis.referencing.gazetteer">ReferencingByIdentifiers.Coder</a></span></div> |
| <div class="block">Conversions between direct positions and references in the Military Grid Reference System (MGRS). |
| Each <code>Coder</code> instance can read references at arbitrary precision, but formats at the |
| <a href="#setPrecision(double)">specified precision</a>. |
| The same <code>Coder</code> instance can be reused for reading or writing many MGRS references. |
| |
| <p>See the <a href="MilitaryGridReferenceSystem.html" title="class in org.apache.sis.referencing.gazetteer"><code>MilitaryGridReferenceSystem</code></a> enclosing class for usage example.</p> |
| |
| <h2>Immutability and thread safety</h2> |
| This class is <strong>not</strong> thread-safe. A new instance must be created for each thread, |
| or synchronization must be applied by the caller.</div> |
| <dl class="notes"> |
| <dt>Since:</dt> |
| <dd>0.8</dd> |
| |
| <p><font size="-1">Defined in the <code>sis-referencing-by-identifiers</code> module</font></p> |
| </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">Coder</a>()</code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Creates a new coder initialized to the default precision and separator.</div> |
| </div> |
| </div> |
| </section> |
| </li> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li> |
| <section class="method-summary" id="method-summary"> |
| <h2>Method Summary</h2> |
| <div id="method-summary-table"> |
| <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div> |
| <div id="method-summary-table.tabpanel" role="tabpanel"> |
| <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Method</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="AbstractLocation.html" title="class in org.apache.sis.referencing.gazetteer">AbstractLocation</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#decode(java.lang.CharSequence)" class="member-name-link">decode</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a> reference)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Decodes the given MGRS reference into a position and an envelope.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/16/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-tab2 method-summary-table-tab4"><code><a href="#encode(org.opengis.geometry.DirectPosition)" class="member-name-link">encode</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 odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Encodes the given position into a MGRS reference.</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/16/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="#encode(org.opengis.geometry.DirectPosition,javax.measure.Quantity)" class="member-name-link">encode</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, |
| <a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Quantity.html" title="class or interface in javax.measure" class="external-link">Quantity</a><?> precision)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Encodes the given position into a MGRS reference with the given precision.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Iterator.html" title="class or interface in java.util" class="external-link">Iterator</a><<a href="https://docs.oracle.com/en/java/javase/16/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-tab2 method-summary-table-tab4"><code><a href="#encode(org.opengis.geometry.Envelope)" class="member-name-link">encode</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/Envelope.html" title="class or interface in org.opengis.geometry" class="external-link">Envelope</a> areaOfInterest)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns an iterator over all MGRS references that intersect the given envelope.</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/16/docs/api/java.base/java/util/stream/Stream.html" title="class or interface in java.util.stream" class="external-link">Stream</a><<a href="https://docs.oracle.com/en/java/javase/16/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="#encode(org.opengis.geometry.Envelope,boolean)" class="member-name-link">encode</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/Envelope.html" title="class or interface in org.opengis.geometry" class="external-link">Envelope</a> areaOfInterest, |
| boolean parallel)</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 stream of all MGRS references that intersect the given envelope.</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="#getClipToValidArea()" class="member-name-link">getClipToValidArea</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 whether the decoded locations should be clipped to the valid area.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getPrecision()" class="member-name-link">getPrecision</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 precision of the references formatted by this coder.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Quantity.html" title="class or interface in javax.measure" class="external-link">Quantity</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>></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getPrecision(org.opengis.geometry.DirectPosition)" class="member-name-link">getPrecision</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 odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns the precision of the references formatted by this coder.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>final <a href="MilitaryGridReferenceSystem.html" title="class in org.apache.sis.referencing.gazetteer">MilitaryGridReferenceSystem</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getReferenceSystem()" class="member-name-link">getReferenceSystem</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 reference system for which MGRS references will be encoded or decoded.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/16/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-tab2 method-summary-table-tab4"><code><a href="#getSeparator()" class="member-name-link">getSeparator</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns the separator to insert between each component of the MGRS identifier.</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="#setClipToValidArea(boolean)" class="member-name-link">setClipToValidArea</a><wbr>(boolean clip)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Sets whether the decoded locations should be clipped to the valid area.</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="#setPrecision(double)" class="member-name-link">setPrecision</a><wbr>(double precision)</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 desired precision of the references formatted by this coder.</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="#setPrecision(javax.measure.Quantity,org.opengis.geometry.DirectPosition)" class="member-name-link">setPrecision</a><wbr>(<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Quantity.html" title="class or interface in javax.measure" class="external-link">Quantity</a><?> precision, |
| <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 the desired precision of the references formatted by this coder.</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="#setSeparator(java.lang.String)" class="member-name-link">setSeparator</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> separator)</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 separator to insert between each component of the MGRS identifier.</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/16/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/16/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/16/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/16/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/16/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/16/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/16/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/16/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/16/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/16/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/16/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/16/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="details-list"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <li> |
| <section class="constructor-details" id="constructor-detail"> |
| <h2>Constructor Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="<init>()"> |
| <h3>Coder</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="element-name">Coder</span>()</div> |
| <div class="block">Creates a new coder initialized to the default precision and separator.</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="getReferenceSystem()"> |
| <h3>getReferenceSystem</h3> |
| <div class="member-signature"><span class="modifiers">public final</span> <span class="return-type"><a href="MilitaryGridReferenceSystem.html" title="class in org.apache.sis.referencing.gazetteer">MilitaryGridReferenceSystem</a></span> <span class="element-name">getReferenceSystem</span>()</div> |
| <div class="block">Returns the reference system for which MGRS references will be encoded or decoded.</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="ReferencingByIdentifiers.Coder.html#getReferenceSystem()">getReferenceSystem</a></code> in class <code><a href="ReferencingByIdentifiers.Coder.html" title="class in org.apache.sis.referencing.gazetteer">ReferencingByIdentifiers.Coder</a></code></dd> |
| <dt>Returns:</dt> |
| <dd>the enclosing reference system.</dd> |
| <dt>Since:</dt> |
| <dd>1.3</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getPrecision()"> |
| <h3>getPrecision</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">double</span> <span class="element-name">getPrecision</span>()</div> |
| <div class="block">Returns the precision of the references formatted by this coder. |
| This method returns one of the following values: |
| |
| <table class="sis"> |
| <caption>MGRS reference precisions</caption> |
| <tr><th>Precision (m)</th> <th>Reference example</th></tr> |
| <tr><td style="text-align:right">1</td> <td>4 Q FJ 12345 67890</td></tr> |
| <tr><td style="text-align:right">10</td> <td>4 Q FJ 1234 6789</td></tr> |
| <tr><td style="text-align:right">100</td> <td>4 Q FJ 123 678</td></tr> |
| <tr><td style="text-align:right">1000</td> <td>4 Q FJ 12 67</td></tr> |
| <tr><td style="text-align:right">10 000</td> <td>4 Q FJ 1 6</td></tr> |
| <tr><td style="text-align:right">100 000</td> <td>4 Q FJ</td></tr> |
| <tr><td style="text-align:right">(approximated) 1 000 000</td> <td>4 Q</td></tr> |
| </table> |
| |
| Values smaller than 1 (e.g. 0.01 for a centimetre precision) may also be returned |
| if that value has been <a href="#setPrecision(double)">explicitly set</a>, |
| but sub-metric precision are usually not used with MGRS.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>precision of formatted references in metres.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setPrecision(double)"> |
| <h3>setPrecision</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setPrecision</span><wbr><span class="parameters">(double precision)</span></div> |
| <div class="block">Sets the desired precision of the references formatted by this coder. |
| This method rounds the given precision to one of the power of 10 |
| documented in the <a href="#getPrecision()"><code>getPrecision()</code></a> method.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>precision</code> - the desired precision in metres.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/ArithmeticException.html" title="class or interface in java.lang" class="external-link">ArithmeticException</a></code> - if the given precision is zero, negative, infinity or NaN.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getPrecision(org.opengis.geometry.DirectPosition)"> |
| <h3>getPrecision</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Quantity.html" title="class or interface in javax.measure" class="external-link">Quantity</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>></span> <span class="element-name">getPrecision</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 precision of the references formatted by this coder. |
| This method returns the same value as <a href="#getPrecision()"><code>getPrecision()</code></a> but as a quantity.</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="ReferencingByIdentifiers.Coder.html#getPrecision(org.opengis.geometry.DirectPosition)">getPrecision</a></code> in class <code><a href="ReferencingByIdentifiers.Coder.html" title="class in org.apache.sis.referencing.gazetteer">ReferencingByIdentifiers.Coder</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>position</code> - ignored (can be null).</dd> |
| <dt>Returns:</dt> |
| <dd>precision of formatted references in metres.</dd> |
| <dt>Since:</dt> |
| <dd>1.3</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setPrecision(javax.measure.Quantity,org.opengis.geometry.DirectPosition)"> |
| <h3>setPrecision</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setPrecision</span><wbr><span class="parameters">(<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Quantity.html" title="class or interface in javax.measure" class="external-link">Quantity</a><?> precision, |
| <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://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">Sets the desired precision of the references formatted by this coder. |
| If the given quantity uses angular units, it is converted to an approximate precision in metres |
| at the latitude of given position. Then this method delegates to <a href="#setPrecision(double)"><code>setPrecision(double)</code></a>.</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="ReferencingByIdentifiers.Coder.html#setPrecision(javax.measure.Quantity,org.opengis.geometry.DirectPosition)">setPrecision</a></code> in class <code><a href="ReferencingByIdentifiers.Coder.html" title="class in org.apache.sis.referencing.gazetteer">ReferencingByIdentifiers.Coder</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>precision</code> - the desired precision in a linear or angular unit.</dd> |
| <dd><code>position</code> - location where the specified precision is desired, or <code>null</code> for the equator.</dd> |
| <dt>Throws:</dt> |
| <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 given precision does not use linear or angular units.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/ArithmeticException.html" title="class or interface in java.lang" class="external-link">ArithmeticException</a></code> - if the precision is zero, negative, infinity or NaN.</dd> |
| <dt>Since:</dt> |
| <dd>1.3</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getSeparator()"> |
| <h3>getSeparator</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/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">getSeparator</span>()</div> |
| <div class="block">Returns the separator to insert between each component of the MGRS identifier. |
| Components are zone number, latitude band, 100 000-metres square identifier and numerical values. |
| By default the separator is an empty string, which produce references like "4QFJ12345678".</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the separator to insert between each component of the MGRS identifier, or an empty string if none.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setSeparator(java.lang.String)"> |
| <h3>setSeparator</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setSeparator</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> separator)</span></div> |
| <div class="block">Sets the separator to insert between each component of the MGRS identifier. |
| Components are zone number, latitude band, 100 000-metres square identifier and numerical values. |
| By default the separator is an empty string, which produce references like "4QFJ12345678". |
| If the separator is set to a space, then the references will be formatted like "4 Q FJ 1234 5678". |
| |
| <p>Note that a MGRS reference is normally written as an entity without spaces, parentheses, dashes, |
| or decimal points. Invoking this method with a non-empty separator produces non-conform MGRS, but |
| is sometimes convenient for readability or for use in file systems (with the <code>'/'</code> separator).</p></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>separator</code> - the separator to insert between each component of the MGRS identifier.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getClipToValidArea()"> |
| <h3>getClipToValidArea</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">getClipToValidArea</span>()</div> |
| <div class="block">Returns whether the decoded locations should be clipped to the valid area. |
| The default value is <code>true</code>.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd><code>true</code> if decoded locations are clipped to the valid area.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setClipToValidArea(boolean)"> |
| <h3>setClipToValidArea</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setClipToValidArea</span><wbr><span class="parameters">(boolean clip)</span></div> |
| <div class="block">Sets whether the decoded locations should be clipped to the valid area. |
| MGRS 100 km squares can actually be smaller than 100 km when the square overlaps two UTM zones or |
| two latitude bands. We may have half of a square in a zone and the other half in the other zone. |
| By default, the <a href="#decode(java.lang.CharSequence)"><code>decode(CharSequence)</code></a> method clips the square to the zone where it belongs. |
| Invoking this method with the <code>false</code> value disables this behavior.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>clip</code> - whether the decoded locations should be clipped to the valid area.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="encode(org.opengis.geometry.DirectPosition)"> |
| <h3>encode</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/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">encode</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/referencing/operation/TransformException.html" title="class or interface in org.opengis.referencing.operation" class="external-link">TransformException</a></span></div> |
| <div class="block">Encodes the given position into a MGRS reference. |
| The given position must have a Coordinate Reference System (CRS) associated to it.</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="ReferencingByIdentifiers.Coder.html#encode(org.opengis.geometry.DirectPosition)">encode</a></code> in class <code><a href="ReferencingByIdentifiers.Coder.html" title="class in org.apache.sis.referencing.gazetteer">ReferencingByIdentifiers.Coder</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>position</code> - the coordinate to encode.</dd> |
| <dt>Returns:</dt> |
| <dd>MGRS encoding of the given position.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/operation/TransformException.html" title="class or interface in org.opengis.referencing.operation" class="external-link">TransformException</a></code> - if an error occurred while transforming the given coordinate to a MGRS reference.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="encode(org.opengis.geometry.DirectPosition,javax.measure.Quantity)"> |
| <h3>encode</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/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">encode</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, |
| <a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Quantity.html" title="class or interface in javax.measure" class="external-link">Quantity</a><?> precision)</span> |
| throws <span class="exceptions"><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>, |
| <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/operation/TransformException.html" title="class or interface in org.opengis.referencing.operation" class="external-link">TransformException</a></span></div> |
| <div class="block">Encodes the given position into a MGRS reference with the given precision. |
| This is equivalent to invoking <a href="#setPrecision(javax.measure.Quantity,org.opengis.geometry.DirectPosition)"><code>setPrecision(Quantity, DirectPosition)</code></a> |
| before <a href="#encode(org.opengis.geometry.DirectPosition)"><code>encode(DirectPosition)</code></a>, except that it is potentially more efficient.</div> |
| <dl class="notes"> |
| <dt>Overrides:</dt> |
| <dd><code><a href="ReferencingByIdentifiers.Coder.html#encode(org.opengis.geometry.DirectPosition,javax.measure.Quantity)">encode</a></code> in class <code><a href="ReferencingByIdentifiers.Coder.html" title="class in org.apache.sis.referencing.gazetteer">ReferencingByIdentifiers.Coder</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>position</code> - the coordinate to encode.</dd> |
| <dd><code>precision</code> - the desired precision in a linear or angular unit.</dd> |
| <dt>Returns:</dt> |
| <dd>MGRS encoding of the given position.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/ArithmeticException.html" title="class or interface in java.lang" class="external-link">ArithmeticException</a></code> - if the precision is zero, negative, infinity or NaN.</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 given precision does not use linear or angular units.</dd> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/operation/TransformException.html" title="class or interface in org.opengis.referencing.operation" class="external-link">TransformException</a></code> - if an error occurred while transforming the given coordinate to a MGRS reference.</dd> |
| <dt>Since:</dt> |
| <dd>1.3</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="encode(org.opengis.geometry.Envelope)"> |
| <h3>encode</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Iterator.html" title="class or interface in java.util" class="external-link">Iterator</a><<a href="https://docs.oracle.com/en/java/javase/16/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">encode</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/Envelope.html" title="class or interface in org.opengis.geometry" class="external-link">Envelope</a> areaOfInterest)</span> |
| throws <span class="exceptions"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/operation/TransformException.html" title="class or interface in org.opengis.referencing.operation" class="external-link">TransformException</a></span></div> |
| <div class="block">Returns an iterator over all MGRS references that intersect the given envelope. |
| The given envelope must have a Coordinate Reference System (CRS) associated to it. |
| If the CRS is geographic, the envelope is allowed to span the anti-meridian. |
| The MGRS references may be returned in any iteration order. |
| |
| <div class="note"><b>Possible evolution:</b> |
| current implementation does not clip the cells to UPS/UTM valid areas before to test for intersection |
| with <code>areaOfInterest</code>. Consequently, the iterator may return slightly more cells than expected. |
| A future version may filter the cells more accurately. If an application needs the same set of cells |
| than what current the implementation returns, it can invoke <code><a href="#setClipToValidArea(boolean)">setClipToValidArea</a>(false)</code> for preserving current behavior in future Apache SIS versions.</div></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>areaOfInterest</code> - envelope of desired MGRS references.</dd> |
| <dt>Returns:</dt> |
| <dd>an iterator over MGRS references intersecting the given area of interest.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/operation/TransformException.html" title="class or interface in org.opengis.referencing.operation" class="external-link">TransformException</a></code> - if an error occurred while transforming the area of interest.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="encode(org.opengis.geometry.Envelope,boolean)"> |
| <h3>encode</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/stream/Stream.html" title="class or interface in java.util.stream" class="external-link">Stream</a><<a href="https://docs.oracle.com/en/java/javase/16/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">encode</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/Envelope.html" title="class or interface in org.opengis.geometry" class="external-link">Envelope</a> areaOfInterest, |
| boolean parallel)</span> |
| throws <span class="exceptions"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/operation/TransformException.html" title="class or interface in org.opengis.referencing.operation" class="external-link">TransformException</a></span></div> |
| <div class="block">Returns a stream of all MGRS references that intersect the given envelope. |
| The given envelope must have a Coordinate Reference System (CRS) associated to it. |
| If the CRS is geographic, the envelope is allowed to span the anti-meridian. |
| The MGRS references may be returned in any order. |
| |
| <div class="note"><b>Possible evolution:</b> |
| current implementation does not clip the cells to UPS/UTM valid areas before to test for intersection |
| with <code>areaOfInterest</code>. Consequently, the iterator may return slightly more cells than expected. |
| A future version may filter the cells more accurately. If an application needs the same set of cells |
| than what current the implementation returns, it can invoke <code><a href="#setClipToValidArea(boolean)">setClipToValidArea</a>(false)</code> for preserving current behavior in future Apache SIS versions.</div></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>areaOfInterest</code> - envelope of desired MGRS references.</dd> |
| <dd><code>parallel</code> - <code>true</code> for a parallel stream, or <code>false</code> for a sequential stream.</dd> |
| <dt>Returns:</dt> |
| <dd>a stream of MGRS references intersecting the given area of interest.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/operation/TransformException.html" title="class or interface in org.opengis.referencing.operation" class="external-link">TransformException</a></code> - if an error occurred while transforming the area of interest.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="decode(java.lang.CharSequence)"> |
| <h3>decode</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="AbstractLocation.html" title="class in org.apache.sis.referencing.gazetteer">AbstractLocation</a></span> <span class="element-name">decode</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a> reference)</span> |
| throws <span class="exceptions"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/operation/TransformException.html" title="class or interface in org.opengis.referencing.operation" class="external-link">TransformException</a></span></div> |
| <div class="block">Decodes the given MGRS reference into a position and an envelope. |
| The Coordinate Reference System (CRS) associated to the returned position depends on the given reference. |
| |
| <div class="warning"><b>Upcoming API change — generalization</b><br> |
| in a future SIS version, the type of returned element may be generalized |
| to the <code>org.opengis.referencing.gazetteer.Location</code> interface. |
| This change is pending GeoAPI revision.</div></div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="ReferencingByIdentifiers.Coder.html#decode(java.lang.CharSequence)">decode</a></code> in class <code><a href="ReferencingByIdentifiers.Coder.html" title="class in org.apache.sis.referencing.gazetteer">ReferencingByIdentifiers.Coder</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>reference</code> - MGRS string to decode.</dd> |
| <dt>Returns:</dt> |
| <dd>a new position with the longitude at coordinate 0 and latitude at coordinate 1.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/operation/TransformException.html" title="class or interface in org.opengis.referencing.operation" class="external-link">TransformException</a></code> - if an error occurred while parsing the given string.</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| <footer role="contentinfo"> |
| <hr> |
| <p class="legal-copy"><small>Copyright © 2010–2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </div> |
| </div> |
| </body> |
| </html> |