| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (19) --> |
| <title>AbstractEnvelope (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.geometry, class: AbstractEnvelope"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <meta name="keywords" content="org.apache.sis.geometry.AbstractEnvelope class"> |
| <meta name="keywords" content="castOrCopy()"> |
| <meta name="keywords" content="getLowerCorner()"> |
| <meta name="keywords" content="getUpperCorner()"> |
| <meta name="keywords" content="getMedian()"> |
| <meta name="keywords" content="getLower()"> |
| <meta name="keywords" content="getUpper()"> |
| <meta name="keywords" content="getMinimum()"> |
| <meta name="keywords" content="getMaximum()"> |
| <meta name="keywords" content="getSpan()"> |
| <meta name="keywords" content="getTimeRange()"> |
| <meta name="keywords" content="toSimpleEnvelopes()"> |
| <meta name="keywords" content="isEmpty()"> |
| <meta name="keywords" content="isAllNaN()"> |
| <meta name="keywords" content="contains()"> |
| <meta name="keywords" content="intersects()"> |
| <meta name="keywords" content="equals()"> |
| <meta name="keywords" content="hashCode()"> |
| <meta name="keywords" content="toString()"> |
| <meta name="keywords" content="formatTo()"> |
| <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/AbstractEnvelope.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.geometry</a></div> |
| <h1 title="Class AbstractEnvelope" class="title">Class AbstractEnvelope</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="../io/wkt/FormattableObject.html" title="class in org.apache.sis.io.wkt">FormattableObject</a> |
| <div class="inheritance">AbstractEnvelope</div> |
| </div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <dl class="notes"> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code><a href="../util/Emptiable.html" title="interface in org.apache.sis.util">Emptiable</a></code>, <code><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></code></dd> |
| </dl> |
| <dl class="notes"> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><code><a href="GeneralEnvelope.html" title="class in org.apache.sis.geometry">GeneralEnvelope</a></code>, <code><a href="ImmutableEnvelope.html" title="class in org.apache.sis.geometry">ImmutableEnvelope</a></code></dd> |
| </dl> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public abstract class </span><span class="element-name type-name-label">AbstractEnvelope</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/Envelope.html" title="class or interface in org.opengis.geometry" class="external-link">Envelope</a>, <a href="../util/Emptiable.html" title="interface in org.apache.sis.util">Emptiable</a></span></div> |
| <div class="block">Default implementations of most <code>Envelope</code> methods, leaving the data storage to subclasses. |
| This base class does not hold any state and does not implement the <a href="https://docs.oracle.com/en/java/javase/16/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/16/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>Implementers needs to define at least the following methods:</p> |
| <ul> |
| <li><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/Envelope.html#getDimension()" title="class or interface in org.opengis.geometry" class="external-link"><code>Envelope.getDimension()</code></a></li> |
| <li><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/Envelope.html#getCoordinateReferenceSystem()" title="class or interface in org.opengis.geometry" class="external-link"><code>Envelope.getCoordinateReferenceSystem()</code></a></li> |
| <li><a href="#getLower(int)"><code>getLower(int)</code></a></li> |
| <li><a href="#getUpper(int)"><code>getUpper(int)</code></a></li> |
| </ul> |
| |
| <p>All other methods, including <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>, |
| are implemented on top of the above four methods.</p> |
| |
| <h2>Crossing the anti-meridian of a Geographic CRS</h2> |
| The <cite>Web Coverage Service</cite> (WCS) specification authorizes (with special treatment) |
| cases where <var>upper</var> < <var>lower</var> at least in the longitude case. They are |
| envelopes crossing the anti-meridian, like the red box below (the green box is the usual case). |
| The default implementation of methods listed in the right column can handle such cases. |
| |
| <div class="horizontal-flow"> |
| <div> |
| <img style="vertical-align: middle" src="doc-files/AntiMeridian.png" alt="Envelope crossing the anti-meridian"> |
| </div><div> |
| Supported methods: |
| <ul> |
| <li><a href="#getMinimum(int)"><code>getMinimum(int)</code></a></li> |
| <li><a href="#getMaximum(int)"><code>getMaximum(int)</code></a></li> |
| <li><a href="#getMedian(int)"><code>getMedian(int)</code></a></li> |
| <li><a href="#getSpan(int)"><code>getSpan(int)</code></a></li> |
| <li><a href="#toSimpleEnvelopes()"><code>toSimpleEnvelopes()</code></a></li> |
| <li><a href="#contains(org.opengis.geometry.DirectPosition)"><code>contains(DirectPosition)</code></a></li> |
| <li><a href="#contains(org.opengis.geometry.Envelope)"><code>contains(Envelope)</code></a></li> |
| <li><a href="#intersects(org.opengis.geometry.Envelope)"><code>intersects(Envelope)</code></a></li> |
| </ul> |
| </div></div> |
| |
| <h2>Choosing the range of longitude values</h2> |
| Geographic CRS typically have longitude values in the [-180 … +180]° range, but the [0 … 360]° |
| range is also occasionally used. Users of this class need to ensure that this envelope CRS is |
| associated to axes having the desired <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">minimum</a> |
| and <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">maximum value</a>. |
| |
| <h2>Note on positive and negative zeros</h2> |
| The IEEE 754 standard defines two different values for positive zero and negative zero. |
| When used with SIS envelopes and keeping in mind the above discussion, those zeros have |
| different meanings: |
| |
| <ul> |
| <li>The [-0…0]° range is an empty envelope.</li> |
| <li>The [0…-0]° range makes a full turn around the globe, like the [-180…180]° |
| range except that the former range spans across the anti-meridian.</li> |
| </ul></div> |
| <dl class="notes"> |
| <dt>Since:</dt> |
| <dd>0.3</dd> |
| |
| <p><font size="-1">Defined in the <code>sis-referencing</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">AbstractEnvelope</a>()</code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Constructs an envelope.</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-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract 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="AbstractEnvelope.html" title="class in org.apache.sis.geometry">AbstractEnvelope</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.Envelope)" class="member-name-link">castOrCopy</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> envelope)</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 envelope as an <code>AbstractEnvelope</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="#contains(org.opengis.geometry.DirectPosition)" class="member-name-link">contains</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">Tests if a specified coordinate is inside the boundary of this envelope.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#contains(org.opengis.geometry.Envelope)" class="member-name-link">contains</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> envelope)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns <code>true</code> if this envelope completely encloses the specified 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="#contains(org.opengis.geometry.Envelope,boolean)" class="member-name-link">contains</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> envelope, |
| boolean edgesInclusive)</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 this envelope completely encloses the specified envelope.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#equals(java.lang.Object)" class="member-name-link">equals</a><wbr>(<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> object)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns <code>true</code> if the specified object is an envelope of the same class |
| with equals coordinates and <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/Envelope.html#getCoordinateReferenceSystem()" title="class or interface in org.opengis.geometry" class="external-link">CRS</a>.</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(org.opengis.geometry.Envelope,double,boolean)" class="member-name-link">equals</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> other, |
| double eps, |
| boolean epsIsRelative)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Compares to the specified envelope for equality up to the specified tolerance value.</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/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="#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 envelope as a "<code>BOX</code>" element.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract double</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getLower(int)" class="member-name-link">getLower</a><wbr>(int dimension)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Returns the limit in the direction of decreasing coordinate values in 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="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 even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getLowerCorner()" class="member-name-link">getLowerCorner</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">A coordinate position consisting of all the lower coordinate values.</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="#getMaximum(int)" class="member-name-link">getMaximum</a><wbr>(int dimension)</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 maximal coordinate value for 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="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 even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMedian()" class="member-name-link">getMedian</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">A coordinate position consisting of all the median coordinate values.</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="#getMedian(int)" class="member-name-link">getMedian</a><wbr>(int dimension)</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 median coordinate 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>double</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMinimum(int)" class="member-name-link">getMinimum</a><wbr>(int dimension)</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 minimal coordinate value for the specified dimension.</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="#getSpan(int)" class="member-name-link">getSpan</a><wbr>(int dimension)</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 envelope span (typically width or height) 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>double</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getSpan(int,javax.measure.Unit)" class="member-name-link">getSpan</a><wbr>(int dimension, |
| <a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a><?> unit)</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 envelope span along the specified dimension, in terms of the given units.</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/Optional.html" title="class or interface in java.util" class="external-link">Optional</a><<a href="../measure/Range.html" title="class in org.apache.sis.measure">Range</a><<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/time/Instant.html" title="class or interface in java.time" class="external-link">Instant</a>>></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getTimeRange()" class="member-name-link">getTimeRange</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 time range of the first dimension associated to a temporal CRS.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract double</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getUpper(int)" class="member-name-link">getUpper</a><wbr>(int dimension)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Returns the limit in the direction of increasing coordinate values in the specified dimension.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/DirectPosition.html" title="class or interface in org.opengis.geometry" class="external-link">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="#getUpperCorner()" class="member-name-link">getUpperCorner</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">A coordinate position consisting of all the upper coordinate values.</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 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="#intersects(org.opengis.geometry.Envelope)" class="member-name-link">intersects</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> envelope)</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 this envelope intersects the specified envelope.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#intersects(org.opengis.geometry.Envelope,boolean)" class="member-name-link">intersects</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> envelope, |
| boolean touch)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns <code>true</code> if this envelope intersects or (optionally) touches the specified 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="#isAllNaN()" class="member-name-link">isAllNaN</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 <code>false</code> if at least one coordinate value is not <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link">NaN</a>.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isEmpty()" class="member-name-link">isEmpty</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Determines whether or not this envelope is empty.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/Envelope.html" title="class or interface in org.opengis.geometry" class="external-link">Envelope</a>[]</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toSimpleEnvelopes()" class="member-name-link">toSimpleEnvelopes</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 this envelope as an array of simple (without wraparound) envelopes.</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="#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 envelope as a "<code>BOX</code>" element.</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/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#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#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#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> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-Envelope">Methods inherited from interface <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></h3> |
| <code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/Envelope.html#getCoordinateReferenceSystem()" title="class or interface in org.opengis.geometry" class="external-link">getCoordinateReferenceSystem</a>, <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/Envelope.html#getDimension()" title="class or interface in org.opengis.geometry" class="external-link">getDimension</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>AbstractEnvelope</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="element-name">AbstractEnvelope</span>()</div> |
| <div class="block">Constructs an envelope.</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.Envelope)"> |
| <h3>castOrCopy</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="AbstractEnvelope.html" title="class in org.apache.sis.geometry">AbstractEnvelope</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/Envelope.html" title="class or interface in org.opengis.geometry" class="external-link">Envelope</a> envelope)</span></div> |
| <div class="block">Returns the given envelope as an <code>AbstractEnvelope</code> instance. |
| If the given envelope is already an instance of <code>AbstractEnvelope</code>, |
| then it is returned unchanged. Otherwise the coordinate values and the CRS |
| of the given envelope are copied in a new envelope.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>envelope</code> - the envelope to cast, or <code>null</code>.</dd> |
| <dt>Returns:</dt> |
| <dd>the values of the given envelope as an <code>AbstractEnvelope</code> instance.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list-long"> |
| <li><a href="GeneralEnvelope.html#castOrCopy(org.opengis.geometry.Envelope)"><code>GeneralEnvelope.castOrCopy(Envelope)</code></a></li> |
| <li><a href="ImmutableEnvelope.html#castOrCopy(org.opengis.geometry.Envelope)"><code>ImmutableEnvelope.castOrCopy(Envelope)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getLowerCorner()"> |
| <h3>getLowerCorner</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/geometry/DirectPosition.html" title="class or interface in org.opengis.geometry" class="external-link">DirectPosition</a></span> <span class="element-name">getLowerCorner</span>()</div> |
| <div class="block">A coordinate position consisting of all the lower coordinate values. |
| The default implementation returns a view over the <a href="#getLower(int)"><code>getLower(int)</code></a> method, |
| so changes in this envelope will be immediately reflected in the returned direct position. |
| If the particular case of the <code>GeneralEnvelope</code> subclass, the returned position |
| supports also <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">write operations</a>, |
| so changes in the position are reflected back in the envelope. |
| |
| <div class="note"><b>Note:</b> |
| The <cite>Web Coverage Service</cite> (WCS) 1.1 specification uses an extended interpretation of the |
| bounding box definition. In a WCS 1.1 data structure, the lower corner defines the edges region in the |
| directions of <em>decreasing</em> coordinate values in the envelope CRS. This is usually the algebraic |
| minimum coordinates, but not always. For example, an envelope crossing the anti-meridian could have a |
| lower corner longitude greater than the upper corner longitude. Such extended interpretation applies |
| mostly to axes having <code>WRAPAROUND</code> range meaning.</div></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/Envelope.html#getLowerCorner()" title="class or interface in org.opengis.geometry" class="external-link">getLowerCorner</a></code> in interface <code><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></code></dd> |
| <dt>Returns:</dt> |
| <dd>a view over the lower corner, typically (but not necessarily) containing minimal coordinate values.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="#getLower(int)"><code>getLower(int)</code></a></li> |
| <li><a href="#getMinimum(int)"><code>getMinimum(int)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getUpperCorner()"> |
| <h3>getUpperCorner</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/geometry/DirectPosition.html" title="class or interface in org.opengis.geometry" class="external-link">DirectPosition</a></span> <span class="element-name">getUpperCorner</span>()</div> |
| <div class="block">A coordinate position consisting of all the upper coordinate values. |
| The default implementation returns a view over the <a href="#getUpper(int)"><code>getUpper(int)</code></a> method, |
| so changes in this envelope will be immediately reflected in the returned direct position. |
| If the particular case of the <code>GeneralEnvelope</code> subclass, the returned position |
| supports also <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">write operations</a>, |
| so changes in the position are reflected back in the envelope. |
| |
| <div class="note"><b>Note:</b> |
| The <cite>Web Coverage Service</cite> (WCS) 1.1 specification uses an extended interpretation of the |
| bounding box definition. In a WCS 1.1 data structure, the upper corner defines the edges region in the |
| directions of <em>increasing</em> coordinate values in the envelope CRS. This is usually the algebraic |
| maximum coordinates, but not always. For example, an envelope crossing the anti-meridian could have an |
| upper corner longitude less than the lower corner longitude. Such extended interpretation applies |
| mostly to axes having <code>WRAPAROUND</code> range meaning.</div></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/Envelope.html#getUpperCorner()" title="class or interface in org.opengis.geometry" class="external-link">getUpperCorner</a></code> in interface <code><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></code></dd> |
| <dt>Returns:</dt> |
| <dd>a view over the upper corner, typically (but not necessarily) containing maximal coordinate values.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="#getUpper(int)"><code>getUpper(int)</code></a></li> |
| <li><a href="#getMaximum(int)"><code>getMaximum(int)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getMedian()"> |
| <h3>getMedian</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/geometry/DirectPosition.html" title="class or interface in org.opengis.geometry" class="external-link">DirectPosition</a></span> <span class="element-name">getMedian</span>()</div> |
| <div class="block">A coordinate position consisting of all the median coordinate values. |
| The default implementation returns a view over the <a href="#getMedian(int)"><code>getMedian(int)</code></a> method, |
| so changes in this envelope will be immediately reflected in the returned direct position.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the median coordinates.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="#getMedian(int)"><code>getMedian(int)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getLower(int)"> |
| <h3>getLower</h3> |
| <div class="member-signature"><span class="modifiers">public abstract</span> <span class="return-type">double</span> <span class="element-name">getLower</span><wbr><span class="parameters">(int dimension)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">IndexOutOfBoundsException</a></span></div> |
| <div class="block">Returns the limit in the direction of decreasing coordinate values in the specified dimension. |
| This is usually the algebraic <a href="#getMinimum(int)">minimum</a>, except if this envelope |
| spans the anti-meridian.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>dimension</code> - the dimension for which to obtain the coordinate value.</dd> |
| <dt>Returns:</dt> |
| <dd>the starting coordinate value at the given dimension.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/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/Envelope.html#getDimension()" title="class or interface in org.opengis.geometry" class="external-link">envelope dimension</a>.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="#getLowerCorner()"><code>getLowerCorner()</code></a></li> |
| <li><a href="#getMinimum(int)"><code>getMinimum(int)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getUpper(int)"> |
| <h3>getUpper</h3> |
| <div class="member-signature"><span class="modifiers">public abstract</span> <span class="return-type">double</span> <span class="element-name">getUpper</span><wbr><span class="parameters">(int dimension)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">IndexOutOfBoundsException</a></span></div> |
| <div class="block">Returns the limit in the direction of increasing coordinate values in the specified dimension. |
| This is usually the algebraic <a href="#getMaximum(int)">maximum</a>, except if this envelope |
| spans the anti-meridian.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>dimension</code> - the dimension for which to obtain the coordinate value.</dd> |
| <dt>Returns:</dt> |
| <dd>the starting coordinate value at the given dimension.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/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/Envelope.html#getDimension()" title="class or interface in org.opengis.geometry" class="external-link">envelope dimension</a>.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="#getUpperCorner()"><code>getUpperCorner()</code></a></li> |
| <li><a href="#getMaximum(int)"><code>getMaximum(int)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getMinimum(int)"> |
| <h3>getMinimum</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">double</span> <span class="element-name">getMinimum</span><wbr><span class="parameters">(int dimension)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">IndexOutOfBoundsException</a></span></div> |
| <div class="block">Returns the minimal coordinate value for the specified dimension. In the typical case |
| of non-empty envelopes <em>not</em> crossing the anti-meridian, this method returns the |
| <a href="#getLower(int)"><code>getLower(int)</code></a> value verbatim. In the case of envelope crossing the anti-meridian, |
| this method returns 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 minimum value</a>. |
| If the range in the given dimension is invalid, then this method returns <code>NaN</code>.</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/Envelope.html#getMinimum(int)" title="class or interface in org.opengis.geometry" class="external-link">getMinimum</a></code> in interface <code><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></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>dimension</code> - the dimension for which to obtain the coordinate value.</dd> |
| <dt>Returns:</dt> |
| <dd>the minimal coordinate value at the given dimension.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/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/Envelope.html#getDimension()" title="class or interface in org.opengis.geometry" class="external-link">envelope dimension</a>.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getMaximum(int)"> |
| <h3>getMaximum</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">double</span> <span class="element-name">getMaximum</span><wbr><span class="parameters">(int dimension)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">IndexOutOfBoundsException</a></span></div> |
| <div class="block">Returns the maximal coordinate value for the specified dimension. In the typical case |
| of non-empty envelopes <em>not</em> crossing the anti-meridian, this method returns the |
| <a href="#getUpper(int)"><code>getUpper(int)</code></a> value verbatim. In the case of envelope crossing the anti-meridian, |
| this method returns 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 maximum value</a>. |
| If the range in the given dimension is invalid, then this method returns <code>NaN</code>.</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/Envelope.html#getMaximum(int)" title="class or interface in org.opengis.geometry" class="external-link">getMaximum</a></code> in interface <code><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></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>dimension</code> - the dimension for which to obtain the coordinate value.</dd> |
| <dt>Returns:</dt> |
| <dd>the maximal coordinate value at the given dimension.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/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/Envelope.html#getDimension()" title="class or interface in org.opengis.geometry" class="external-link">envelope dimension</a>.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getMedian(int)"> |
| <h3>getMedian</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">double</span> <span class="element-name">getMedian</span><wbr><span class="parameters">(int dimension)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">IndexOutOfBoundsException</a></span></div> |
| <div class="block">Returns the median coordinate along the specified dimension. |
| In most cases, the result is equal (minus rounding error) to: |
| |
| <blockquote><pre>median = (<b>getUpper</b>(dimension) + <b>getLower</b>(dimension)) / 2;</pre></blockquote> |
| |
| <h4>Crossing the anti-meridian of a Geographic CRS</h4> |
| If <var>upper</var> < <var>lower</var> and the |
| <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystemAxis.html#getRangeMeaning()" title="class or interface in org.opengis.referencing.cs" class="external-link">range meaning</a> for the requested |
| dimension is <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">wraparound</a>, then the median calculated |
| above is actually in the middle of the space <em>outside</em> the envelope. In such cases, |
| this method shifts the <var>median</var> value by half of the periodicity (180° in the |
| longitude case) in order to switch from <cite>outer</cite> space to <cite>inner</cite> |
| space. If the axis range meaning is not <code>WRAPAROUND</code>, then this method returns |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link"><code>NaN</code></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/Envelope.html#getMedian(int)" title="class or interface in org.opengis.geometry" class="external-link">getMedian</a></code> in interface <code><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></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>dimension</code> - the dimension for which to obtain the coordinate value.</dd> |
| <dt>Returns:</dt> |
| <dd>the median coordinate at the given dimension, or <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link"><code>Double.NaN</code></a>.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/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/Envelope.html#getDimension()" title="class or interface in org.opengis.geometry" class="external-link">envelope dimension</a>.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="#getMedian()"><code>getMedian()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getSpan(int)"> |
| <h3>getSpan</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">double</span> <span class="element-name">getSpan</span><wbr><span class="parameters">(int dimension)</span></div> |
| <div class="block">Returns the envelope span (typically width or height) along the specified dimension. |
| In most cases, the result is equal (minus rounding error) to: |
| |
| <blockquote><pre>span = <b>getUpper</b>(dimension) - <b>getLower</b>(dimension);</pre></blockquote> |
| |
| <h4>Crossing the anti-meridian of a Geographic CRS</h4> |
| If <var>upper</var> < <var>lower</var> and the |
| <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystemAxis.html#getRangeMeaning()" title="class or interface in org.opengis.referencing.cs" class="external-link">range meaning</a> for the requested |
| dimension is <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">wraparound</a>, then the span calculated |
| above is negative. In such cases, this method adds the periodicity (typically 360° of |
| longitude) to the span. If the result is a positive number, it is returned. Otherwise |
| this method returns <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link"><code>NaN</code></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/Envelope.html#getSpan(int)" title="class or interface in org.opengis.geometry" class="external-link">getSpan</a></code> in interface <code><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></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>dimension</code> - the dimension for which to obtain the span.</dd> |
| <dt>Returns:</dt> |
| <dd>the span (typically width or height) at the given dimension, or <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link"><code>Double.NaN</code></a>.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/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/Envelope.html#getDimension()" title="class or interface in org.opengis.geometry" class="external-link">envelope dimension</a>.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getSpan(int,javax.measure.Unit)"> |
| <h3>getSpan</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">double</span> <span class="element-name">getSpan</span><wbr><span class="parameters">(int dimension, |
| <a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a><?> unit)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">IndexOutOfBoundsException</a>, |
| <a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/IncommensurableException.html" title="class or interface in javax.measure" class="external-link">IncommensurableException</a></span></div> |
| <div class="block">Returns the envelope span along the specified dimension, in terms of the given units. |
| The default implementation invokes <a href="#getSpan(int)"><code>getSpan(int)</code></a> and converts the result.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>dimension</code> - the dimension to query.</dd> |
| <dd><code>unit</code> - the unit for the return value.</dd> |
| <dt>Returns:</dt> |
| <dd>the span in terms of the given unit.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/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 out of bounds.</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 length cannot be converted to the specified units.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getTimeRange()"> |
| <h3>getTimeRange</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/Optional.html" title="class or interface in java.util" class="external-link">Optional</a><<a href="../measure/Range.html" title="class in org.apache.sis.measure">Range</a><<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/time/Instant.html" title="class or interface in java.time" class="external-link">Instant</a>>></span> <span class="element-name">getTimeRange</span>()</div> |
| <div class="block">Returns the time range of the first dimension associated to a temporal CRS. |
| This convenience method converts floating point values to instants using |
| <a href="../referencing/crs/DefaultTemporalCRS.html#toInstant(double)"><code>DefaultTemporalCRS.toInstant(double)</code></a>.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>time range in this given envelope.</dd> |
| <dt>Since:</dt> |
| <dd>1.1</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list-long"> |
| <li><a href="Envelopes.html#toTimeRange(org.opengis.geometry.Envelope)"><code>Envelopes.toTimeRange(Envelope)</code></a></li> |
| <li><a href="GeneralEnvelope.html#setTimeRange(java.time.Instant,java.time.Instant)"><code>GeneralEnvelope.setTimeRange(Instant, Instant)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="toSimpleEnvelopes()"> |
| <h3>toSimpleEnvelopes</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/geometry/Envelope.html" title="class or interface in org.opengis.geometry" class="external-link">Envelope</a>[]</span> <span class="element-name">toSimpleEnvelopes</span>()</div> |
| <div class="block">Returns this envelope as an array of simple (without wraparound) envelopes. |
| The length of the returned array depends on the number of dimensions where a |
| <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">wraparound</a> range is found. |
| Typically, wraparound occurs only in the range of longitude values, when the range crosses |
| the anti-meridian (a.k.a. date line). However, this implementation will take in account any |
| axis having wraparound <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystemAxis.html#getRangeMeaning()" title="class or interface in org.opengis.referencing.cs" class="external-link">range meaning</a>. |
| |
| <p>Special cases:</p> |
| <ul> |
| <li>If this envelope <a href="#isEmpty()">is empty</a>, then this method returns an empty array.</li> |
| <li>If this envelope does not have any wraparound behavior, then this method returns <code>this</code> |
| in an array of length 1. This envelope is <strong>not</strong> cloned.</li> |
| <li>If this envelope crosses the <cite>anti-meridian</cite> (a.k.a. <cite>date line</cite>) |
| then this method returns two separated envelopes covering the same area than this envelopes. |
| <li>While uncommon, the envelope could theoretically crosses the limit of other axis having |
| wraparound range meaning. If wraparounds occur along <var>n</var> axes, then this method |
| may return 2ⁿ separated simple envelopes. |
| </ul></div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>a representation of this envelope as an array of non-empty envelope.</dd> |
| <dt>Since:</dt> |
| <dd>0.4</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="Envelope2D.html#toRectangles()"><code>Envelope2D.toRectangles()</code></a></li> |
| <li><a href="GeneralEnvelope.html#simplify()"><code>GeneralEnvelope.simplify()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isEmpty()"> |
| <h3>isEmpty</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">isEmpty</span>()</div> |
| <div class="block">Determines whether or not this envelope is empty. An envelope is empty if it has zero |
| <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/Envelope.html#getDimension()" title="class or interface in org.opengis.geometry" class="external-link">dimension</a>, or if the <a href="#getSpan(int)">span</a> of |
| at least one axis is negative, 0 or <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link"><code>NaN</code></a>. |
| |
| <div class="note"><b>Note:</b> |
| Strictly speaking, there is an ambiguity if a span is <code>NaN</code> or if the envelope contains |
| both 0 and infinite spans (since 0⋅∞ = <code>NaN</code>). In such cases, this method arbitrarily |
| ignores the infinite values and returns <code>true</code>.</div> |
| |
| If <code>isEmpty()</code> returns <code>false</code>, then <a href="#isAllNaN()"><code>isAllNaN()</code></a> is guaranteed to |
| also return <code>false</code>. However, the converse is not always true.</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="../util/Emptiable.html#isEmpty()">isEmpty</a></code> in interface <code><a href="../util/Emptiable.html" title="interface in org.apache.sis.util">Emptiable</a></code></dd> |
| <dt>Returns:</dt> |
| <dd><code>true</code> if this envelope is empty.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list-long"> |
| <li><a href="../metadata/iso/extent/DefaultGeographicBoundingBox.html#isEmpty()"><code>DefaultGeographicBoundingBox.isEmpty()</code></a></li> |
| <li><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/geom/RectangularShape.html#isEmpty()" title="class or interface in java.awt.geom" class="external-link"><code>RectangularShape.isEmpty()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isAllNaN()"> |
| <h3>isAllNaN</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">isAllNaN</span>()</div> |
| <div class="block">Returns <code>false</code> if at least one coordinate value is not <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link">NaN</a>. |
| This <code>isAllNaN()</code> check is different than the <a href="#isEmpty()"><code>isEmpty()</code></a> check since it |
| returns <code>false</code> for a partially initialized envelope, while <code>isEmpty()</code> |
| returns <code>false</code> only after all dimensions have been initialized. |
| More specifically, the following rules apply: |
| |
| <ul> |
| <li>If <code>isAllNaN() == true</code>, then <code>isEmpty() == true</code></li> |
| <li>If <code>isEmpty() == false</code>, then <code>isAllNaN() == false</code></li> |
| <li>The converse of the above-cited rules are not always true.</li> |
| </ul> |
| |
| Note that an all-NaN envelope can still have a non-null |
| <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/Envelope.html#getCoordinateReferenceSystem()" title="class or interface in org.opengis.geometry" class="external-link">coordinate reference system</a>.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd><code>true</code> if this envelope has NaN values.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list-long"> |
| <li><a href="GeneralEnvelope.html#setToNaN()"><code>GeneralEnvelope.setToNaN()</code></a></li> |
| <li><a href="../metadata/iso/extent/DefaultGeographicBoundingBox.html#isEmpty()"><code>DefaultGeographicBoundingBox.isEmpty()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="contains(org.opengis.geometry.DirectPosition)"> |
| <h3>contains</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">contains</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></span></div> |
| <div class="block">Tests if a specified coordinate is inside the boundary of this envelope. |
| Both lower and upper values of this envelope are considered inclusive. |
| If it least one coordinate value in the given point is <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link"><code>NaN</code></a>, |
| then this method returns <code>false</code>. |
| |
| <h4>Pre-conditions</h4> |
| This method assumes that the specified point uses a CRS equivalent to this envelope CRS. |
| For performance reasons, it will no be verified unless Java assertions are enabled. |
| |
| <h4>Crossing the anti-meridian of a Geographic CRS</h4> |
| For any dimension, if <var>upper</var> < <var>lower</var> then this method uses an |
| algorithm which is the opposite of the usual one: rather than testing if the given point is |
| inside the envelope interior, this method tests if the given point is <em>outside</em> the |
| envelope <em>exterior</em>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>position</code> - the point to text.</dd> |
| <dt>Returns:</dt> |
| <dd><code>true</code> if the specified coordinate is inside the boundary of this envelope; <code>false</code> otherwise.</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 specified point does not have the expected number of dimensions.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/AssertionError.html" title="class or interface in java.lang" class="external-link">AssertionError</a></code> - if assertions are enabled and the envelopes have mismatched CRS.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="contains(org.opengis.geometry.Envelope)"> |
| <h3>contains</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">contains</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> envelope)</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></span></div> |
| <div class="block">Returns <code>true</code> if this envelope completely encloses the specified envelope. |
| The default implementation delegates to: |
| |
| <blockquote><pre><a href="#contains(org.opengis.geometry.Envelope,boolean)">contains</a>(envelope, <b>true</b>)</pre></blockquote> |
| |
| <h4>Pre-conditions</h4> |
| This method assumes that the specified envelope uses the same CRS than this envelope. |
| For performance reasons, it will no be verified unless Java assertions are enabled. |
| |
| <h4>Crossing the anti-meridian of a Geographic CRS</h4> |
| For every cases illustrated below, the yellow box is considered completely enclosed |
| in the blue envelope: |
| |
| <p><img src="doc-files/Contains.png" alt="Examples of envelope inclusions"></p></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>envelope</code> - the envelope to test for inclusion.</dd> |
| <dt>Returns:</dt> |
| <dd><code>true</code> if this envelope completely encloses the specified one.</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 specified envelope doesn't have the expected dimension.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/AssertionError.html" title="class or interface in java.lang" class="external-link">AssertionError</a></code> - if assertions are enabled and the envelopes have mismatched CRS.</dd> |
| <dt>Since:</dt> |
| <dd>0.4</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list-long"> |
| <li><a href="#intersects(org.opengis.geometry.Envelope)"><code>intersects(Envelope)</code></a></li> |
| <li><a href="#equals(org.opengis.geometry.Envelope,double,boolean)"><code>equals(Envelope, double, boolean)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="contains(org.opengis.geometry.Envelope,boolean)"> |
| <h3>contains</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">contains</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> envelope, |
| boolean edgesInclusive)</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></span></div> |
| <div class="block">Returns <code>true</code> if this envelope completely encloses the specified envelope. |
| If one or more edges from the specified envelope coincide with an edge from this |
| envelope, then this method returns <code>true</code> only if <code>edgesInclusive</code> |
| is <code>true</code>. |
| |
| <p>This method is subject to the same pre-conditions than <a href="#contains(org.opengis.geometry.Envelope)"><code>contains(Envelope)</code></a>, |
| and handles envelopes crossing the anti-meridian in the same way.</p></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>envelope</code> - the envelope to test for inclusion.</dd> |
| <dd><code>edgesInclusive</code> - <code>true</code> if this envelope edges are inclusive.</dd> |
| <dt>Returns:</dt> |
| <dd><code>true</code> if this envelope completely encloses the specified one.</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 specified envelope doesn't have the expected dimension.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/AssertionError.html" title="class or interface in java.lang" class="external-link">AssertionError</a></code> - if assertions are enabled and the envelopes have mismatched CRS.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list-long"> |
| <li><a href="#intersects(org.opengis.geometry.Envelope,boolean)"><code>intersects(Envelope, boolean)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="intersects(org.opengis.geometry.Envelope)"> |
| <h3>intersects</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">intersects</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> envelope)</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></span></div> |
| <div class="block">Returns <code>true</code> if this envelope intersects the specified envelope. |
| This method returns <code>true</code> if two envelope <em>interiors</em> have at least one point in common |
| (in other words, their intersection is non-<a href="#isEmpty()">empty</a>). |
| The default implementation delegates to: |
| |
| <blockquote><pre><a href="#intersects(org.opengis.geometry.Envelope,boolean)">intersects</a>(envelope, <b>false</b>)</pre></blockquote> |
| |
| <h4>Pre-conditions</h4> |
| This method assumes that the specified envelope uses the same CRS than this envelope. |
| For performance reasons, it will no be verified unless Java assertions are enabled. |
| |
| <h4>Crossing the anti-meridian of a Geographic CRS</h4> |
| This method can handle envelopes crossing the anti-meridian.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>envelope</code> - the envelope to test for intersection.</dd> |
| <dt>Returns:</dt> |
| <dd><code>true</code> if this envelope intersects the specified one.</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 specified envelope doesn't have the expected dimension.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/AssertionError.html" title="class or interface in java.lang" class="external-link">AssertionError</a></code> - if assertions are enabled and the envelopes have mismatched CRS.</dd> |
| <dt>Since:</dt> |
| <dd>0.4</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list-long"> |
| <li><a href="#contains(org.opengis.geometry.Envelope,boolean)"><code>contains(Envelope, boolean)</code></a></li> |
| <li><a href="#equals(org.opengis.geometry.Envelope,double,boolean)"><code>equals(Envelope, double, boolean)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="intersects(org.opengis.geometry.Envelope,boolean)"> |
| <h3>intersects</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">intersects</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> envelope, |
| boolean touch)</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></span></div> |
| <div class="block">Returns <code>true</code> if this envelope intersects or (optionally) touches the specified envelope. |
| The <code>touch</code> argument controls the value to return if only the envelope boundaries |
| (not the interiors) have a point in common: |
| |
| <ul> |
| <li>If <code>false</code>, this method returns <code>true</code> if the intersection between the two envelopes |
| is non-<a href="#isEmpty()">empty</a> (i.e. the envelope <em>interiors</em> have points in common). |
| This is the usual definition of <code>intersects</code> operation.</li> |
| <li>If <code>true</code>, this method returns <code>true</code> if the two envelopes intersect each other |
| <em>or</em> touch each other.</li> |
| </ul> |
| |
| This method is subject to the same pre-conditions than <a href="#intersects(org.opengis.geometry.Envelope)"><code>intersects(Envelope)</code></a>, |
| and handles envelopes crossing the anti-meridian in the same way.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>envelope</code> - the envelope to test for intersection.</dd> |
| <dd><code>touch</code> - the value to return if the two envelopes touch each other.</dd> |
| <dt>Returns:</dt> |
| <dd><code>true</code> if this envelope intersects the specified envelope, or |
| <code>touch</code> if this envelope touches the specified envelope, or <code>false</code> otherwise.</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 specified envelope does not have the expected dimension.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/AssertionError.html" title="class or interface in java.lang" class="external-link">AssertionError</a></code> - if assertions are enabled and the envelopes have mismatched CRS.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list-long"> |
| <li><a href="#contains(org.opengis.geometry.Envelope,boolean)"><code>contains(Envelope, boolean)</code></a></li> |
| <li><a href="#equals(org.opengis.geometry.Envelope,double,boolean)"><code>equals(Envelope, double, boolean)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="equals(org.opengis.geometry.Envelope,double,boolean)"> |
| <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="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> other, |
| double eps, |
| boolean epsIsRelative)</span></div> |
| <div class="block">Compares to the specified envelope for equality up to the specified tolerance value. |
| The tolerance value <code>eps</code> can be either relative to the <a href="#getSpan(int)">envelope span</a> along each dimension or can be an absolute value (as for example some |
| ground resolution of a <a href="../coverage/grid/GridCoverage.html" title="class in org.apache.sis.coverage.grid">grid coverage</a>). |
| |
| <ul> |
| <li>If <code>epsIsRelative</code> is set to <code>true</code>, the actual tolerance value for a |
| given dimension <var>i</var> is <code>eps</code> × <code>span</code> where <code>span</code> |
| is the maximum of <a href="#getSpan(int)">this envelope span</a> and the specified |
| envelope span along dimension <var>i</var>.</li> |
| <li>If <code>epsIsRelative</code> is set to <code>false</code>, the actual tolerance value for a |
| given dimension <var>i</var> is <code>eps</code>.</li> |
| </ul> |
| |
| <div class="note"><b>Note:</b> |
| Relative tolerance values (as opposed to absolute tolerance values) help to workaround the |
| fact that tolerance value are CRS dependent. For example, the tolerance value need to be |
| smaller for geographic CRS than for UTM projections, because the former typically has a |
| [-180…180]° range while the latter can have a range of thousands of meters.</div> |
| |
| <h4>Coordinate Reference System</h4> |
| To be considered equal, the two envelopes must have the same <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/Envelope.html#getDimension()" title="class or interface in org.opengis.geometry" class="external-link">number of dimensions</a> |
| and their CRS must be <a href="../util/ComparisonMode.html#APPROXIMATE">approximately equal</a>. |
| If at least one envelope has a null CRS, then the CRS are ignored and the coordinate values are compared |
| as if the CRS were equal.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>other</code> - the envelope to compare with.</dd> |
| <dd><code>eps</code> - the tolerance value to use for numerical comparisons.</dd> |
| <dd><code>epsIsRelative</code> - <code>true</code> if the tolerance value should be relative to axis length, |
| or <code>false</code> if it is an absolute value.</dd> |
| <dt>Returns:</dt> |
| <dd><code>true</code> if the given object is equal to this envelope up to the given tolerance value.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="#contains(org.opengis.geometry.Envelope)"><code>contains(Envelope)</code></a></li> |
| <li><a href="#intersects(org.opengis.geometry.Envelope)"><code>intersects(Envelope)</code></a></li> |
| </ul> |
| </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/16/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 an envelope of the same class |
| with equals coordinates and <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/Envelope.html#getCoordinateReferenceSystem()" title="class or interface in org.opengis.geometry" class="external-link">CRS</a>. |
| |
| <div class="note"><b>Implementation note:</b> |
| This implementation requires that the provided <code>object</code> argument is of the same class than this envelope. |
| We do not relax this rule since not every implementations in the SIS code base follow the same contract.</div></div> |
| <dl class="notes"> |
| <dt>Overrides:</dt> |
| <dd><code><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></code> in class <code><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></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>object</code> - the object to compare with this envelope.</dd> |
| <dt>Returns:</dt> |
| <dd><code>true</code> if the given object is equal to this envelope.</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 envelope.</div> |
| <dl class="notes"> |
| <dt>Overrides:</dt> |
| <dd><code><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></code> in class <code><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></code></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/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">toString</span>()</div> |
| <div class="block">Formats this envelope as a "<code>BOX</code>" element. |
| The output is of the form "<code>BOX</code><var>n</var><code>D(</code><a href="#getLowerCorner()">lower corner</a><code>,</code><a href="#getUpperCorner()">upper corner</a><code>)</code>" |
| where <var>n</var> is the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/Envelope.html#getDimension()" title="class or interface in org.opengis.geometry" class="external-link">number of dimensions</a>. |
| The number of dimension is written only if different than 2. |
| |
| <div class="note"><b>Example:</b> |
| <ul> |
| <li><code>BOX(-90 -180, 90 180)</code></li> |
| <li><code>BOX3D(-90 -180 0, 90 180 1)</code></li> |
| </ul> |
| </div> |
| |
| <div class="note"><b>Note:</b> |
| The <code>BOX</code> element is not part of the standard <cite>Well Known Text</cite> (WKT) format. |
| However, it is understood by many software libraries, for example GDAL and PostGIS.</div> |
| |
| This method formats the numbers as with <a href="https://docs.oracle.com/en/java/javase/16/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="GeneralEnvelope.html#%3Cinit%3E(java.lang.CharSequence)">parsed</a> |
| by the <code>GeneralEnvelope</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 envelope as a <code>BOX</code> or <code>BOX3D</code> (most typical dimensions) element.</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/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">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 envelope as a "<code>BOX</code>" element. |
| The output is of the form "<code>BOX</code><var>n</var><code>D[</code><a href="#getLowerCorner()">lower corner</a><code>,</code><a href="#getUpperCorner()">upper corner</a><code>]</code>" |
| where <var>n</var> is the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/Envelope.html#getDimension()" title="class or interface in org.opengis.geometry" class="external-link">number of dimensions</a>. |
| The number of dimension is written only if different than 2. |
| |
| <div class="note"><b>Note:</b> |
| The <code>BOX</code> element is not part of the standard <cite>Well Known Text</cite> (WKT) format. |
| However, it is understood by many software libraries, for example GDAL and PostGIS.</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 envelope.</dd> |
| <dt>Returns:</dt> |
| <dd>the pseudo-WKT keyword, which is <code>"Box"</code> for this element.</dd> |
| <dt>Since:</dt> |
| <dd>1.0</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-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> |
| </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> |