blob: 5f9df6314d3429e43d43c7aabb53d554bc4bd360 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) on Thu Oct 05 19:54:57 CEST 2023 -->
<title>GeneralEnvelope (Apache SIS 1.4 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2023-10-05">
<meta name="description" content="declaration: module: org.apache.sis.referencing, package: org.apache.sis.geometry, class: GeneralEnvelope">
<meta name="generator" content="javadoc/ClassWriterImpl">
<meta name="keywords" content="org.apache.sis.geometry.GeneralEnvelope class">
<meta name="keywords" content="castOrCopy()">
<meta name="keywords" content="setCoordinateReferenceSystem()">
<meta name="keywords" content="setRange()">
<meta name="keywords" content="setEnvelope()">
<meta name="keywords" content="setToInfinite()">
<meta name="keywords" content="setToNaN()">
<meta name="keywords" content="setTimeRange()">
<meta name="keywords" content="translate()">
<meta name="keywords" content="add()">
<meta name="keywords" content="intersect()">
<meta name="keywords" content="normalize()">
<meta name="keywords" content="simplify()">
<meta name="keywords" content="wraparound()">
<meta name="keywords" content="horizontal()">
<meta name="keywords" content="subEnvelope()">
<meta name="keywords" content="clone()">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../sis.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../script-dir/jquery-ui.min.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jquery-3.6.1.min.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var pathtoroot = "../../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span></button>
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="../../../../module-summary.html">Module</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html#class">Help</a></li>
</ul>
<ul class="sub-nav-list-small">
<li>
<p>Summary:</p>
<ul>
<li>Nested</li>
<li>Field</li>
<li><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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><a href="../../../../../search.html">SEARCH</a>
<input type="text" id="search-input" disabled placeholder="Search">
<input type="reset" id="reset-button" disabled value="reset">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="module-label-in-type">Module</span>&nbsp;<a href="../../../../module-summary.html">org.apache.sis.referencing</a></div>
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.sis.geometry</a></div>
<h1 title="Class GeneralEnvelope" class="title">Class GeneralEnvelope</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>
<div class="inheritance"><a href="../io/wkt/FormattableObject.html" title="class in org.apache.sis.io.wkt">FormattableObject</a>
<div class="inheritance"><a href="AbstractEnvelope.html" title="class in org.apache.sis.geometry">AbstractEnvelope</a>
<div class="inheritance">GeneralEnvelope</div>
</div>
</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/Serializable.html" title="class or interface in java.io" class="external-link">Serializable</a></code>, <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Cloneable.html" title="class or interface in java.lang" class="external-link">Cloneable</a></code>, <code><a href="../../../../../org.apache.sis.util/org/apache/sis/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>
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">GeneralEnvelope</span>
<span class="extends-implements">extends <a href="AbstractEnvelope.html" title="class in org.apache.sis.geometry">AbstractEnvelope</a>
implements <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Cloneable.html" title="class or interface in java.lang" class="external-link">Cloneable</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/Serializable.html" title="class or interface in java.io" class="external-link">Serializable</a></span></div>
<div class="block">A mutable <code>Envelope</code> (a minimum bounding box or rectangle) of arbitrary dimension.
Regardless of dimension, an <code>Envelope</code> can be represented without ambiguity
as two <a href="AbstractDirectPosition.html" title="class in org.apache.sis.geometry">direct positions</a> (coordinate tuples).
To encode an <code>Envelope</code>, it is sufficient to encode these two points.
<p><code>Envelope</code> uses an arbitrary <cite>Coordinate Reference System</cite>, which does not need to be geographic.
This is different than the <code>Geographic­Bounding­Box</code> class provided in the metadata package, which can be used
as a kind of envelope restricted to a Geographic CRS having Greenwich prime meridian.</p>
This particular implementation of <code>Envelope</code> is said "General" because it uses
coordinates of an arbitrary number of dimensions. This is in contrast with
<a href="Envelope2D.html" title="class in org.apache.sis.geometry"><code>Envelope2D</code></a>, which can use only two-dimensional coordinates.
<p>A <code>General­Envelope</code> can be created in various ways:</p>
<ul>
<li><a href="#%3Cinit%3E(int)">From a given number of dimension</a>, with all coordinates initialized to 0.</li>
<li><a href="#%3Cinit%3E(double%5B%5D,double%5B%5D)">From two coordinate tuples</a>.</li>
<li><a href="#%3Cinit%3E(org.opengis.geometry.Envelope)">From a another envelope</a> (copy constructor).</li>
<li><a href="#%3Cinit%3E(org.opengis.metadata.extent.GeographicBoundingBox)">From a geographic bounding box</a>.</li>
<li><a href="#%3Cinit%3E(java.lang.CharSequence)">From a character sequence</a>
representing a <code>BBOX</code> or a <cite>Well Known Text</cite> (WKT) format.</li>
</ul>
<h2 id="crossing-the-anti-meridian-of-a-geographic-crs-heading">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> &lt; <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="AbstractEnvelope.html#getMinimum(int)"><code>Abstract­Envelope​.get­Minimum(int)</code></a></li>
<li><a href="AbstractEnvelope.html#getMaximum(int)"><code>Abstract­Envelope​.get­Maximum(int)</code></a></li>
<li><a href="AbstractEnvelope.html#getMedian(int)"><code>Abstract­Envelope​.get­Median(int)</code></a></li>
<li><a href="AbstractEnvelope.html#getSpan(int)"><code>Abstract­Envelope​.get­Span(int)</code></a></li>
<li><a href="AbstractEnvelope.html#isEmpty()"><code>Abstract­Envelope​.is­Empty()</code></a></li>
<li><a href="AbstractEnvelope.html#toSimpleEnvelopes()"><code>to­Simple­Envelopes()</code></a></li>
<li><a href="AbstractEnvelope.html#contains(org.opengis.geometry.DirectPosition)"><code>contains(Direct­Position)</code></a></li>
<li><a href="AbstractEnvelope.html#contains(org.opengis.geometry.Envelope)"><code>contains(Envelope)</code></a></li>
<li><a href="AbstractEnvelope.html#intersects(org.opengis.geometry.Envelope)"><code>intersects(Envelope)</code></a></li>
<li><a href="#intersect(org.opengis.geometry.Envelope)"><code>intersect(Envelope)</code></a></li>
<li><a href="#add(org.opengis.geometry.Envelope)"><code>add(Envelope)</code></a></li>
<li><a href="#add(org.opengis.geometry.DirectPosition)"><code>add(Direct­Position)</code></a></li>
</ul>
</div></div>
<h2 id="envelope-validation-heading">Envelope validation</h2>
If and only if this envelope is associated to a non-null CRS, then constructors and setter methods
in this class perform the following checks:
<ul>
<li>The number of CRS dimensions must be equal to <code>this.<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​.get­Dimension()</a></code>.</li>
<li>For each dimension <var>i</var>,
<code><a href="AbstractEnvelope.html#getLower(int)">get­Lower</a>(i) &gt; <a href="AbstractEnvelope.html#getUpper(int)">get­Upper</a>(i)</code> is allowed
only if the <a href="../referencing/cs/DefaultCoordinateSystemAxis.html#getRangeMeaning()">coordinate
system axis range meaning</a> is <code>WRAPAROUND</code>.</li>
</ul>
Note that this class does <em>not</em> require the coordinate values to be between the axis minimum and
maximum values. This flexibility exists because out-of-range values happen in practice, while they do
not hurt the working of <code>add(…)</code>, <code>intersect(…)</code>, <code>contains(…)</code> and similar methods.
This in contrast with the <code>lower &gt; upper</code> case, which cause the above-cited methods to behave in
an unexpected way if the axis does not have wraparound range meaning.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>0.3</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="Envelope2D.html" title="class in org.apache.sis.geometry"><code>Envelope2D</code></a></li>
<li><a href="../../../../../org.apache.sis.metadata/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBox.html" title="class in org.apache.sis.metadata.iso.extent"><code>Default­Geographic­Bounding­Box</code></a></li>
<li><a href="../../../../../serialized-form.html#org.apache.sis.geometry.GeneralEnvelope">Serialized Form</a></li>
</ul>
</dd>
</dl>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(double%5B%5D,double%5B%5D)" class="member-name-link">General­Envelope</a><wbr>(double[]&nbsp;lower­Corner,
double[]&nbsp;upper­Corner)</code></div>
<div class="col-last even-row-color">
<div class="block">Constructs an envelope defined by two corners given as sequences of coordinate values.</div>
</div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(int)" class="member-name-link">General­Envelope</a><wbr>(int&nbsp;dimension)</code></div>
<div class="col-last odd-row-color">
<div class="block">Constructs an empty envelope of the specified dimension.</div>
</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(java.lang.CharSequence)" class="member-name-link">General­Envelope</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">Char­Sequence</a>&nbsp;wkt)</code></div>
<div class="col-last even-row-color">
<div class="block">Constructs a new envelope initialized to the values parsed from the given string in
<code>BOX</code> or <cite>Well Known Text</cite> (WKT) format.</div>
</div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(org.opengis.geometry.DirectPosition,org.opengis.geometry.DirectPosition)" class="member-name-link">General­Envelope</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">Direct­Position</a>&nbsp;lower­Corner,
<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">Direct­Position</a>&nbsp;upper­Corner)</code></div>
<div class="col-last odd-row-color">
<div class="block">Constructs an envelope defined by two corners given as direct positions.</div>
</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(org.opengis.geometry.Envelope)" class="member-name-link">General­Envelope</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>&nbsp;envelope)</code></div>
<div class="col-last even-row-color">
<div class="block">Constructs a new envelope with the same data than the specified envelope.</div>
</div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(org.opengis.metadata.extent.GeographicBoundingBox)" class="member-name-link">General­Envelope</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/GeographicBoundingBox.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Geographic­Bounding­Box</a>&nbsp;box)</code></div>
<div class="col-last odd-row-color">
<div class="block">Constructs a new envelope with the same data than the specified geographic bounding box.</div>
</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(org.opengis.referencing.crs.CoordinateReferenceSystem)" class="member-name-link">General­Envelope</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/CoordinateReferenceSystem.html" title="class or interface in org.opengis.referencing.crs" class="external-link">Coordinate­Reference­System</a>&nbsp;crs)</code></div>
<div class="col-last even-row-color">
<div class="block">Constructs an empty envelope with the specified coordinate reference system.</div>
</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#add(org.opengis.geometry.DirectPosition)" class="member-name-link">add</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">Direct­Position</a>&nbsp;position)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Adds a point to this envelope.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#add(org.opengis.geometry.Envelope)" class="member-name-link">add</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>&nbsp;envelope)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Adds an envelope object to this envelope.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="GeneralEnvelope.html" title="class in org.apache.sis.geometry">General­Envelope</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">cast­Or­Copy</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>&nbsp;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 a <code>General­Envelope</code> instance.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="GeneralEnvelope.html" title="class in org.apache.sis.geometry">General­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="#clone()" class="member-name-link">clone</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a deep copy 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="#equals(java.lang.Object)" class="member-name-link">equals</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;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><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/CoordinateReferenceSystem.html" title="class or interface in org.opengis.referencing.crs" class="external-link">Coordinate­Reference­System</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getCoordinateReferenceSystem()" class="member-name-link">get­Coordinate­Reference­System</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 envelope coordinate reference system, or <code>null</code> if unknown.</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="#getDimension()" class="member-name-link">get­Dimension</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the length of coordinate sequence (the number of entries) in this envelope.</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="#getLower(int)" class="member-name-link">get­Lower</a><wbr>(int&nbsp;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 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>double</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMaximum(int)" class="member-name-link">get­Maximum</a><wbr>(int&nbsp;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 maximal 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="#getMedian(int)" class="member-name-link">get­Median</a><wbr>(int&nbsp;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">get­Minimum</a><wbr>(int&nbsp;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">get­Span</a><wbr>(int&nbsp;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="#getUpper(int)" class="member-name-link">get­Upper</a><wbr>(int&nbsp;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 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>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#hashCode()" class="member-name-link">hash­Code</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a hash value for this envelope.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="GeneralEnvelope.html" title="class in org.apache.sis.geometry">General­Envelope</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#horizontal()" class="member-name-link">horizontal</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 view over the two horizontal dimensions of this envelope.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#intersect(org.opengis.geometry.Envelope)" class="member-name-link">intersect</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>&nbsp;envelope)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets this envelope to the intersection of this envelope with the specified one.</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="#isAllNaN()" class="member-name-link">is­All­Na­N</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 <code>false</code> if at least one coordinate value is not <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link">NaN</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="#isEmpty()" class="member-name-link">is­Empty</a>()</code></div>
<div class="col-last odd-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 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="#normalize()" class="member-name-link">normalize</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Ensures that the envelope is contained inside the coordinate system domain.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setCoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem)" class="member-name-link">set­Coordinate­Reference­System</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/CoordinateReferenceSystem.html" title="class or interface in org.opengis.referencing.crs" class="external-link">Coordinate­Reference­System</a>&nbsp;crs)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the coordinate reference system in which the coordinate are given.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setEnvelope(double...)" class="member-name-link">set­Envelope</a><wbr>(double...&nbsp;corners)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the envelope to the specified values, which must be the lower corner coordinates
followed by upper corner coordinates.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setEnvelope(org.opengis.geometry.Envelope)" class="member-name-link">set­Envelope</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>&nbsp;envelope)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets this envelope to the same coordinate values than the specified envelope.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setRange(int,double,double)" class="member-name-link">set­Range</a><wbr>(int&nbsp;dimension,
double&nbsp;lower,
double&nbsp;upper)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the envelope range along the specified dimension.</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="#setTimeRange(java.time.Instant,java.time.Instant)" class="member-name-link">set­Time­Range</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/Instant.html" title="class or interface in java.time" class="external-link">Instant</a>&nbsp;start­Time,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/Instant.html" title="class or interface in java.time" class="external-link">Instant</a>&nbsp;end­Time)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">If this envelope has a temporal component, sets its temporal dimension to the given range.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setToInfinite()" class="member-name-link">set­To­Infinite</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the lower corner to <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#NEGATIVE_INFINITY" title="class or interface in java.lang" class="external-link">negative infinity</a>
and the upper corner to <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#POSITIVE_INFINITY" title="class or interface in java.lang" class="external-link">positive infinity</a>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setToNaN()" class="member-name-link">set­To­Na­N</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets all coordinate values to <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link">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="#simplify()" class="member-name-link">simplify</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Ensures that <var>lower</var><var>upper</var> for every dimensions.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="GeneralEnvelope.html" title="class in org.apache.sis.geometry">General­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="#subEnvelope(int,int)" class="member-name-link">sub­Envelope</a><wbr>(int&nbsp;begin­Index,
int&nbsp;end­Index)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a view over this envelope that encompass only some dimensions.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toString()" class="member-name-link">to­String</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 class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#translate(double...)" class="member-name-link">translate</a><wbr>(double...&nbsp;vector)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Translates the envelope by the given vector.</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="#wraparound(org.apache.sis.geometry.WraparoundMethod)" class="member-name-link">wraparound</a><wbr>(<a href="WraparoundMethod.html" title="enum class in org.apache.sis.geometry">Wraparound­Method</a>&nbsp;method)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">If this envelope is crossing the limit of a wraparound axis, modifies coordinates by application
of the specified strategy.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-AbstractEnvelope">Methods inherited from class&nbsp;<a href="AbstractEnvelope.html" title="class in org.apache.sis.geometry">AbstractEnvelope</a></h3>
<code><a href="AbstractEnvelope.html#contains(org.opengis.geometry.DirectPosition)">contains</a>, <a href="AbstractEnvelope.html#contains(org.opengis.geometry.Envelope)">contains</a>, <a href="AbstractEnvelope.html#contains(org.opengis.geometry.Envelope,boolean)">contains</a>, <a href="AbstractEnvelope.html#equals(org.opengis.geometry.Envelope,double,boolean)">equals</a>, <a href="AbstractEnvelope.html#formatTo(org.apache.sis.io.wkt.Formatter)">format­To</a>, <a href="AbstractEnvelope.html#getLowerCorner()">get­Lower­Corner</a>, <a href="AbstractEnvelope.html#getMedian()">get­Median</a>, <a href="AbstractEnvelope.html#getSpan(int,javax.measure.Unit)">get­Span</a>, <a href="AbstractEnvelope.html#getTimeRange()">get­Time­Range</a>, <a href="AbstractEnvelope.html#getUpperCorner()">get­Upper­Corner</a>, <a href="AbstractEnvelope.html#intersects(org.opengis.geometry.Envelope)">intersects</a>, <a href="AbstractEnvelope.html#intersects(org.opengis.geometry.Envelope,boolean)">intersects</a>, <a href="AbstractEnvelope.html#isFinite()">is­Finite</a>, <a href="AbstractEnvelope.html#toSimpleEnvelopes()">to­Simple­Envelopes</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-FormattableObject">Methods inherited from class&nbsp;<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)">to­String</a>, <a href="../io/wkt/FormattableObject.html#toWKT()">to­WKT</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-Object">Methods inherited from class&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">get­Class</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notify­All</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;(org.opengis.geometry.DirectPosition,org.opengis.geometry.DirectPosition)">
<h3>GeneralEnvelope</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">GeneralEnvelope</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>&nbsp;lowerCorner,
<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>&nbsp;upperCorner)</span>
throws <span class="exceptions"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/MismatchedDimensionException.html" title="class or interface in org.opengis.geometry" class="external-link">MismatchedDimensionException</a>,
<a href="MismatchedReferenceSystemException.html" title="class in org.apache.sis.geometry">MismatchedReferenceSystemException</a></span></div>
<div class="block">Constructs an envelope defined by two corners given as direct positions.
If at least one corner is associated to a CRS, then the new envelope will also
be associated to that CRS.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>lower­Corner</code> - the limits in the direction of decreasing coordinate values for each dimension.</dd>
<dd><code>upper­Corner</code> - the limits in the direction of increasing coordinate values for each dimension.</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">Mismatched­Dimension­Exception</a></code> - if the two positions do not have the same dimension.</dd>
<dd><code><a href="MismatchedReferenceSystemException.html" title="class in org.apache.sis.geometry">Mismatched­Reference­System­Exception</a></code> - if the CRS of the two position are not equal.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(double[],double[])">
<h3>GeneralEnvelope</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">GeneralEnvelope</span><wbr><span class="parameters">(double[]&nbsp;lowerCorner,
double[]&nbsp;upperCorner)</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">Constructs an envelope defined by two corners given as sequences of coordinate values.
The Coordinate Reference System is initially <code>null</code>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>lower­Corner</code> - the limits in the direction of decreasing coordinate values for each dimension.</dd>
<dd><code>upper­Corner</code> - the limits in the direction of increasing coordinate values for each dimension.</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">Mismatched­Dimension­Exception</a></code> - if the two sequences do not have the same length.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(int)">
<h3>GeneralEnvelope</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">GeneralEnvelope</span><wbr><span class="parameters">(int&nbsp;dimension)</span></div>
<div class="block">Constructs an empty envelope of the specified dimension. All coordinates
are initialized to 0 and the coordinate reference system is undefined.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>dimension</code> - the envelope dimension.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(org.opengis.referencing.crs.CoordinateReferenceSystem)">
<h3>GeneralEnvelope</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">GeneralEnvelope</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/CoordinateReferenceSystem.html" title="class or interface in org.opengis.referencing.crs" class="external-link">CoordinateReferenceSystem</a>&nbsp;crs)</span></div>
<div class="block">Constructs an empty envelope with the specified coordinate reference system.
All coordinate values are initialized to 0.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>crs</code> - the coordinate reference system.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(org.opengis.geometry.Envelope)">
<h3>GeneralEnvelope</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">GeneralEnvelope</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>&nbsp;envelope)</span></div>
<div class="block">Constructs a new envelope with the same data than the specified envelope.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>envelope</code> - the envelope to copy.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="#castOrCopy(org.opengis.geometry.Envelope)"><code>cast­Or­Copy(Envelope)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(org.opengis.metadata.extent.GeographicBoundingBox)">
<h3>GeneralEnvelope</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">GeneralEnvelope</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/GeographicBoundingBox.html" title="class or interface in org.opengis.metadata.extent" class="external-link">GeographicBoundingBox</a>&nbsp;box)</span></div>
<div class="block">Constructs a new envelope with the same data than the specified geographic bounding box.
The coordinate reference system is set to the
<a href="../referencing/CommonCRS.html#defaultGeographic()">default geographic CRS</a>.
Axis order is (<var>longitude</var>, <var>latitude</var>).</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>box</code> - the bounding box to copy.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(java.lang.CharSequence)">
<h3>GeneralEnvelope</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">GeneralEnvelope</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a>&nbsp;wkt)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></span></div>
<div class="block">Constructs a new envelope initialized to the values parsed from the given string in
<code>BOX</code> or <cite>Well Known Text</cite> (WKT) format. The given string is typically
a <code>BOX</code> element like below:
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../copy.svg" alt="Copy snippet"></button>
<pre class="snippet"><code class="language-wkt">BOX(-180 -90, 180 90)
</code></pre>
</div>
However, this constructor is lenient to other geometry types like <code>POLYGON</code>.
Actually this constructor ignores the geometry type and just applies the following
simple rules:
<ul>
<li>Character sequences complying to the rules of Java identifiers are skipped.</li>
<li>Coordinates are separated by a coma (<code>,</code>) character.</li>
<li>The coordinates in a coordinate tuple are separated by a space.</li>
<li>Coordinate numbers are assumed formatted in US locale.</li>
<li>The coordinate having the highest dimension determines the dimension of this envelope.</li>
</ul>
This constructor does not check the consistency of the provided text. For example, it does not
check that every points in a <code>LINESTRING</code> have the same dimension. However, this
constructor ensures that the parenthesis are balanced, in order to catch some malformed WKT.
<h4 id="example-heading">Example</h4>
The following texts can be parsed by this constructor in addition of the usual <code>BOX</code> element.
This constructor creates the bounding box of those geometries:
<ul>
<li><code>POINT(6 10)</code></li>
<li><code>MULTIPOLYGON(((1 1, 5 1, 1 5, 1 1),(2 2, 3 2, 3 3, 2 2)))</code></li>
<li><code>GEOMETRYCOLLECTION(POINT(4 6),LINESTRING(3 8,7 10))</code></li>
</ul></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>wkt</code> - the <code>BOX</code>, <code>POLYGON</code> or other kind of element to parse.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">Illegal­Argument­Exception</a></code> - if the given string cannot be parsed.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="Envelopes.html#fromWKT(java.lang.CharSequence)"><code>Envelopes​.from­WKT(Char­Sequence)</code></a></li>
<li><a href="Envelopes.html#toString(org.opengis.geometry.Envelope)"><code>Envelopes​.to­String(Envelope)</code></a></li>
</ul>
</dd>
</dl>
</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>&nbsp;<span class="return-type"><a href="GeneralEnvelope.html" title="class in org.apache.sis.geometry">GeneralEnvelope</a></span>&nbsp;<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>&nbsp;envelope)</span></div>
<div class="block">Returns the given envelope as a <code>General­Envelope</code> instance. If the given envelope
is already an instance of <code>General­Envelope</code>, then it is returned unchanged.
Otherwise the coordinate values and the CRS of the given envelope are
<a href="#%3Cinit%3E(org.opengis.geometry.Envelope)">copied</a> in a new <code>General­Envelope</code>.</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 a <code>General­Envelope</code> instance.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="AbstractEnvelope.html#castOrCopy(org.opengis.geometry.Envelope)"><code>Abstract­Envelope​.cast­Or­Copy(Envelope)</code></a></li>
<li><a href="ImmutableEnvelope.html#castOrCopy(org.opengis.geometry.Envelope)"><code>Immutable­Envelope​.cast­Or­Copy(Envelope)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setCoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem)">
<h3>setCoordinateReferenceSystem</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setCoordinateReferenceSystem</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/CoordinateReferenceSystem.html" title="class or interface in org.opengis.referencing.crs" class="external-link">CoordinateReferenceSystem</a>&nbsp;crs)</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">Sets the coordinate reference system in which the coordinate are given.
This method <strong>does not</strong> reproject the envelope, and does
not check if the envelope is contained in the new domain of validity.
<p>If the envelope coordinates need to be transformed to the new CRS, consider
using <a href="Envelopes.html#transform(org.opengis.geometry.Envelope,org.opengis.referencing.crs.CoordinateReferenceSystem)"><code>Envelopes​.transform(Envelope, Coordinate­Reference­System)</code></a> instead.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>crs</code> - the new coordinate reference system, or <code>null</code>.</dd>
<dt>Throws:</dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/MismatchedDimensionException.html" title="class or interface in org.opengis.geometry" class="external-link">Mismatched­Dimension­Exception</a></code> - if the specified CRS doesn't have the expected number of dimensions.</dd>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">Illegal­State­Exception</a></code> - if a range of coordinate values in this envelope is compatible with the given CRS.
See <cite>Envelope validation</cite> in class javadoc for more details.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setRange(int,double,double)">
<h3>setRange</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setRange</span><wbr><span class="parameters">(int&nbsp;dimension,
double&nbsp;lower,
double&nbsp;upper)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">IndexOutOfBoundsException</a></span></div>
<div class="block">Sets the envelope range along the specified dimension.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>dimension</code> - the dimension to set.</dd>
<dd><code>lower</code> - the limit in the direction of decreasing coordinate values.</dd>
<dd><code>upper</code> - the limit in the direction of increasing coordinate values.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">Index­Out­Of­Bounds­Exception</a></code> - if the given index is out of bounds.</dd>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">Illegal­Argument­Exception</a></code> - if <code>lower &gt; upper</code> and the axis range meaning at the given dimension
is not "wraparound". See <cite>Envelope validation</cite> in class javadoc for more details.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setEnvelope(double...)">
<h3>setEnvelope</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setEnvelope</span><wbr><span class="parameters">(double...&nbsp;corners)</span></div>
<div class="block">Sets the envelope to the specified values, which must be the lower corner coordinates
followed by upper corner coordinates. The number of arguments provided shall be twice
this <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>, and minimum shall not be greater
than maximum.
<div class="note"><b>Example:</b>
(<var>x</var><sub>min</sub>, <var>y</var><sub>min</sub>, <var>z</var><sub>min</sub>,
<var>x</var><sub>max</sub>, <var>y</var><sub>max</sub>, <var>z</var><sub>max</sub>)
</div></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>corners</code> - coordinates of the new lower corner followed by the new upper corner.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setEnvelope(org.opengis.geometry.Envelope)">
<h3>setEnvelope</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setEnvelope</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>&nbsp;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">Sets this envelope to the same coordinate values than the specified envelope.
If the given envelope has a non-null Coordinate Reference System (CRS), then
the CRS of this envelope will be set to the CRS of the given envelope.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>envelope</code> - the envelope to copy coordinates from.</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">Mismatched­Dimension­Exception</a></code> - if the specified envelope does not have
the expected number of dimensions.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setToInfinite()">
<h3>setToInfinite</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setToInfinite</span>()</div>
<div class="block">Sets the lower corner to <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#NEGATIVE_INFINITY" title="class or interface in java.lang" class="external-link">negative infinity</a>
and the upper corner to <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#POSITIVE_INFINITY" title="class or interface in java.lang" class="external-link">positive infinity</a>.
The <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>
(if any) stay unchanged.</div>
</section>
</li>
<li>
<section class="detail" id="setToNaN()">
<h3>setToNaN</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setToNaN</span>()</div>
<div class="block">Sets all coordinate values to <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link">NaN</a>.
The <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>
(if any) stay unchanged.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="AbstractEnvelope.html#isAllNaN()"><code>Abstract­Envelope​.is­All­Na­N()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setTimeRange(java.time.Instant,java.time.Instant)">
<h3>setTimeRange</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">setTimeRange</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/Instant.html" title="class or interface in java.time" class="external-link">Instant</a>&nbsp;startTime,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/Instant.html" title="class or interface in java.time" class="external-link">Instant</a>&nbsp;endTime)</span></div>
<div class="block">If this envelope has a temporal component, sets its temporal dimension to the given range.
Otherwise this method does nothing. This convenience method converts the given instants to
floating point values using <a href="../referencing/crs/DefaultTemporalCRS.html" title="class in org.apache.sis.referencing.crs"><code>Default­Temporal­CRS</code></a>,
then delegates to <a href="#setRange(int,double,double)"><code>set­Range(int, double, double)</code></a>.
<p>Null value means no time limit. More specifically
null <code>start­Time</code> is mapped to <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#NEGATIVE_INFINITY" title="class or interface in java.lang" class="external-link">−∞</a> and
null <code>end­Time</code> is mapped to <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#POSITIVE_INFINITY" title="class or interface in java.lang" class="external-link">+∞</a>.
This rule makes easy to create <cite>is before</cite> or <cite>is after</cite> temporal filters,
which can be combined with other envelopes using <a href="#intersect(org.opengis.geometry.Envelope)">intersection</a>
for logical AND, or <a href="#add(org.opengis.geometry.Envelope)">union</a> for logical OR operations.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>start­Time</code> - the lower temporal value, or <code>null</code> if unbounded.</dd>
<dd><code>end­Time</code> - the upper temporal value, or <code>null</code> if unbounded.</dd>
<dt>Returns:</dt>
<dd>whether the temporal component has been set, or <code>false</code>
if no temporal dimension has been found in this envelope.</dd>
<dt>Since:</dt>
<dd>1.0</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="AbstractEnvelope.html#getTimeRange()"><code>Abstract­Envelope​.get­Time­Range()</code></a></li>
<li><a href="Envelopes.html#toTimeRange(org.opengis.geometry.Envelope)"><code>Envelopes​.to­Time­Range(Envelope)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="translate(double...)">
<h3>translate</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">translate</span><wbr><span class="parameters">(double...&nbsp;vector)</span></div>
<div class="block">Translates the envelope by the given vector. For every dimension <var>i</var>, the
<a href="AbstractEnvelope.html#getLower(int)">lower</a> and <a href="AbstractEnvelope.html#getUpper(int)">upper</a> values are
increased by <code>vector[i]</code>.
<p>This method does not check if the translation result is inside the coordinate system domain
(e.g. [-180 … +180]° of longitude). Callers can normalize the envelope when desired by call to
the <a href="#normalize()"><code>normalize()</code></a> method.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>vector</code> - the translation vector. The length of this array shall be equal to this envelope
<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>.</dd>
<dt>Since:</dt>
<dd>0.5</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="add(org.opengis.geometry.DirectPosition)">
<h3>add</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">add</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>&nbsp;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">Adds a point to this envelope. The resulting envelope is the smallest envelope that
contains both the original envelope and the specified point.
<p>After adding a point, a call to <a href="AbstractEnvelope.html#contains(org.opengis.geometry.DirectPosition)"><code>contains(Direct­Position)</code></a>
with the added point as an argument will return <code>true</code>, except if one of the point
coordinates was <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link"><code>Double​.Na­N</code></a> in which case the corresponding coordinate has been ignored.</p>
<h4 id="preconditions-heading">Preconditions</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 id="crossing-the-anti-meridian-of-a-geographic-crs-heading1">Crossing the anti-meridian of a Geographic CRS</h4>
This method supports envelopes crossing the anti-meridian. In such cases it is possible to
move both envelope borders in order to encompass the given point, as illustrated below (the
new point is represented by the <code>+</code> symbol):
<pre class="text">
─────┐ + ┌─────
─────┘ └─────</pre>
The default implementation moves only the border which is closest to the given point.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>position</code> - the point to add.</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">Mismatched­Dimension­Exception</a></code> - if the given point does not have the expected number of dimensions.</dd>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/AssertionError.html" title="class or interface in java.lang" class="external-link">Assertion­Error</a></code> - if assertions are enabled and the envelopes have mismatched CRS.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="add(org.opengis.geometry.Envelope)">
<h3>add</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">add</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>&nbsp;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">Adds an envelope object to this envelope.
The resulting envelope is the union of the two <code>Envelope</code> objects.
<h4 id="preconditions-heading1">Preconditions</h4>
This method assumes that the specified envelope uses a CRS equivalent to this envelope CRS.
For performance reasons, it will no be verified unless Java assertions are enabled.
<h4 id="crossing-the-anti-meridian-of-a-geographic-crs-heading2">Crossing the anti-meridian of a Geographic CRS</h4>
This method supports envelopes crossing the anti-meridian. If one or both envelopes cross
the anti-meridian, then the result of the <code>add</code> operation may be an envelope expanding
to infinities. In such case, the coordinate range will be either [−∞…∞] or [0…−0] depending on
whatever the original range crosses the anti-meridian or not.
<h4 id="handling-of-nan-values-heading">Handling of NaN values</h4>
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link"><code>Double​.Na­N</code></a> values may be present in any dimension, in the lower coordinate, upper coordinate or both.
The behavior of this method in such case depends where the <code>Na­N</code> values appear and whether an envelope
spans the anti-meridian:
<ul class="verbose">
<li>If this envelope or the given envelope spans anti-meridian in the dimension containing <code>Na­N</code> coordinates,
then this method does not changes the coordinates in that dimension. The rational for such conservative approach
is because union computation depends on whether the other envelope spans anti-meridian too, which is unknown
because at least one envelope bounds is <code>Na­N</code>. Since anti-meridian crossing has been detected in an envelope,
there is suspicion about whether the other envelope could cross anti-meridian too.</li>
<li>Otherwise since the envelope containing real values does not cross anti-meridian in that dimension,
this method assumes that the envelope containing <code>Na­N</code> values does not cross anti-meridian neither.
This assumption is not guaranteed to be true, but cover common cases.
With this assumption in mind:
<ul class="verbose">
<li>All <code>Na­N</code> coordinates in the <em>given</em> envelope are ignored, <i>i.e.</i>
this method does not replace finite coordinates in this envelope by <code>Na­N</code> values from the given envelope.
Note that if only the lower or upper bound is <code>Na­N</code>, the other bound will still
be used for computing union with the assumption described in above paragraph.</li>
<li>All <code>Na­N</code> coordinates in <em>this</em> envelope are left unchanged, <i>i.e.</i> the union will
still contain all the <code>Na­N</code> values that this envelope had before <code>add(Envelope)</code> invocation.
Note that if only the lower or upper bound is <code>Na­N</code>, the other bound will still
be used for computing union with the assumption described in above paragraph.</li>
</ul></li>
</ul></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>envelope</code> - the <code>Envelope</code> to add to this envelope.</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">Mismatched­Dimension­Exception</a></code> - if the given envelope does not have the expected number of dimensions.</dd>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/AssertionError.html" title="class or interface in java.lang" class="external-link">Assertion­Error</a></code> - if assertions are enabled and the envelopes have mismatched CRS.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="Envelopes.html#union(org.opengis.geometry.Envelope...)"><code>Envelopes​.union(Envelope...)</code></a></li>
<li><a href="../../../../../org.apache.sis.metadata/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBox.html#add(org.opengis.metadata.extent.GeographicBoundingBox)"><code>Default­Geographic­Bounding­Box​.add(Geographic­Bounding­Box)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="intersect(org.opengis.geometry.Envelope)">
<h3>intersect</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">intersect</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>&nbsp;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">Sets this envelope to the intersection of this envelope with the specified one.
<h4 id="preconditions-heading2">Preconditions</h4>
This method assumes that the specified envelope uses a CRS equivalent to this envelope CRS.
For performance reasons, it will no be verified unless Java assertions are enabled.
<h4 id="crossing-the-anti-meridian-of-a-geographic-crs-heading3">Crossing the anti-meridian of a Geographic CRS</h4>
This method supports envelopes crossing the anti-meridian.
<h4 id="handling-of-nan-values-heading1">Handling of NaN values</h4>
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link"><code>Double​.Na­N</code></a> values may be present in any dimension, in the lower coordinate, upper coordinate or both.
The behavior of this method in such case depends where the <code>Na­N</code> values appear and whether an envelope
spans the anti-meridian:
<ul class="verbose">
<li>If this envelope or the given envelope spans anti-meridian in the dimension containing <code>Na­N</code> coordinates,
then this method does not changes the coordinates in that dimension. The rational for such conservative approach
is because intersection computation depends on whether the other envelope spans anti-meridian too, which is unknown
because at least one envelope bounds is <code>Na­N</code>. Since anti-meridian crossing has been detected in an envelope,
there is suspicion about whether the other envelope could cross anti-meridian too.</li>
<li>Otherwise since the envelope containing real values does not cross anti-meridian in that dimension,
this method assumes that the envelope containing <code>Na­N</code> values does not cross anti-meridian neither.
This assumption is not guaranteed to be true, but cover common cases.
With this assumption in mind:
<ul class="verbose">
<li>All <code>Na­N</code> coordinates in the <em>given</em> envelope are ignored, <i>i.e.</i>
this method does not replace finite coordinates in this envelope by <code>Na­N</code> values from the given envelope.
Note that if only the lower or upper bound is <code>Na­N</code>, the other bound will still
be used for computing intersection with the assumption described in above paragraph.</li>
<li>All <code>Na­N</code> coordinates in <em>this</em> envelope are left unchanged, <i>i.e.</i> the intersection will
still contain all the <code>Na­N</code> values that this envelope had before <code>intersect(Envelope)</code> invocation.
Note that if only the lower or upper bound is <code>Na­N</code>, the other bound will still
be used for computing intersection with the assumption described in above paragraph.</li>
</ul></li>
</ul>
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link"><code>Double​.Na­N</code></a> coordinates may appear as a result of intersection, even if such values were not present
in any source envelopes, if the two envelopes do not intersect in some dimensions.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>envelope</code> - the <code>Envelope</code> to intersect to this envelope.</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">Mismatched­Dimension­Exception</a></code> - if the given envelope does not have the expected number of dimensions.</dd>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/AssertionError.html" title="class or interface in java.lang" class="external-link">Assertion­Error</a></code> - if assertions are enabled and the envelopes have mismatched CRS.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="Envelopes.html#intersect(org.opengis.geometry.Envelope...)"><code>Envelopes​.intersect(Envelope...)</code></a></li>
<li><a href="../../../../../org.apache.sis.metadata/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBox.html#intersect(org.opengis.metadata.extent.GeographicBoundingBox)"><code>Default­Geographic­Bounding­Box​.intersect(Geographic­Bounding­Box)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="normalize()">
<h3>normalize</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">normalize</span>()</div>
<div class="block">Ensures that the envelope is contained inside the coordinate system domain.
For each dimension, this method compares the coordinate values against the
limits of the coordinate system axis for that dimension.
If some coordinates are out of range, then there is a choice depending on the
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystemAxis.html#getRangeMeaning()" title="class or interface in org.opengis.referencing.cs" class="external-link">axis range meaning</a>:
<ul class="verbose">
<li>If <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/RangeMeaning.html#EXACT" title="class or interface in org.opengis.referencing.cs" class="external-link"><code>Range­Meaning​.EXACT</code></a> (typically <em>latitudes</em> coordinates), then values
greater than the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystemAxis.html#getMaximumValue()" title="class or interface in org.opengis.referencing.cs" class="external-link">axis maximal value</a>
are replaced by the axis maximum, and values smaller than the
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CoordinateSystemAxis.html#getMinimumValue()" title="class or interface in org.opengis.referencing.cs" class="external-link">axis minimal value</a>
are replaced by the axis minimum.</li>
<li>If <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/RangeMeaning.html#WRAPAROUND" title="class or interface in org.opengis.referencing.cs" class="external-link"><code>Range­Meaning​.WRAPAROUND</code></a> (typically <em>longitudes</em> coordinates), then
a multiple of the axis range (e.g. 360° for longitudes) is added or subtracted.
Example:
<ul>
<li>the [190 … 200]° longitude range is converted to [-170 … -160]°,</li>
<li>the [170 … 200]° longitude range is converted to [+170 … -160]°.</li>
</ul>
See <cite>Crossing the anti-meridian of a Geographic CRS</cite> in the
class javadoc for more information about the meaning of such range.</li>
</ul>
<h4 id="crossing-the-anti-meridian-of-a-geographic-crs-heading4">Crossing the anti-meridian of a Geographic CRS</h4>
If the envelope is crossing the anti-meridian, then some <a href="AbstractEnvelope.html#getLower(int)">lower</a>
coordinate values may become greater than their <a href="AbstractEnvelope.html#getUpper(int)">upper</a> counterpart
as a result of this method call. If such effect is undesirable, then this method may be
combined with <a href="#simplify()"><code>simplify()</code></a> as below:
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../copy.svg" alt="Copy snippet"></button>
<pre class="snippet"><code class="language-java">if (envelope.normalize()) {
envelope.simplify();
}
</code></pre>
</div>
<h4 id="choosing-the-range-of-longitude-values-heading">Choosing the range of longitude values</h4>
Geographic CRS typically have longitude values in the [-180 … +180]° range, but the [0 … 360]°
range is also occasionally used. Callers 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>.
<h4 id="usage-heading">Usage</h4>
This method is sometimes useful before to compute the <a href="#add(org.opengis.geometry.Envelope)">union</a>
or <a href="#intersect(org.opengis.geometry.Envelope)">intersection</a> of envelopes, in order to ensure that
both envelopes are defined in the same domain. This method may also be invoked before
to project an envelope, since some projections produce <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link"><code>Double​.Na­N</code></a> numbers when
given an coordinate value out of bounds.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd><code>true</code> if this envelope has been modified as a result of this method call,
or <code>false</code> if no change has been done.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="AbstractDirectPosition.html#normalize()"><code>Abstract­Direct­Position​.normalize()</code></a></li>
<li><a href="WraparoundMethod.html#NORMALIZE"><code>Wraparound­Method​.NORMALIZE</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="simplify()">
<h3>simplify</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">simplify</span>()
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></span></div>
<div class="block">Ensures that <var>lower</var><var>upper</var> for every dimensions.
If a <a href="AbstractEnvelope.html#getUpper(int)">upper coordinate value</a> is less than a
<a href="AbstractEnvelope.html#getLower(int)">lower coordinate value</a>, then there is a choice:
<ul>
<li>If the axis has <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/RangeMeaning.html#WRAPAROUND" title="class or interface in org.opengis.referencing.cs" class="external-link"><code>Range­Meaning​.WRAPAROUND</code></a>, then:<ul>
<li>the lower coordinate value is set to 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>, and</li>
<li>the upper coordinate value is set to 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>.</li>
</ul></li>
<li>Otherwise an <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link"><code>Illegal­State­Exception</code></a> is thrown.</li>
</ul>
This method is useful when the envelope needs to be used with libraries that do not support
envelopes crossing the anti-meridian.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd><code>true</code> if this envelope has been modified as a result of this method call,
or <code>false</code> if no change has been done.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">Illegal­State­Exception</a></code> - if a upper coordinate value is less than a lower coordinate
value on an axis which does not have the <code>WRAPAROUND</code> range meaning.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="AbstractEnvelope.html#toSimpleEnvelopes()"><code>Abstract­Envelope​.to­Simple­Envelopes()</code></a></li>
<li><a href="WraparoundMethod.html#EXPAND"><code>Wraparound­Method​.EXPAND</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="wraparound(org.apache.sis.geometry.WraparoundMethod)">
<h3>wraparound</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">wraparound</span><wbr><span class="parameters">(<a href="WraparoundMethod.html" title="enum class in org.apache.sis.geometry">WraparoundMethod</a>&nbsp;method)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></span></div>
<div class="block">If this envelope is crossing the limit of a wraparound axis, modifies coordinates by application
of the specified strategy. This applies typically to longitude values crossing the anti-meridian,
but other kinds of wraparound axes may also exist. Possible values are listed below.
<table class="sis">
<caption>Legal argument values</caption>
<tr><th>Value</th><th>Action</th></tr>
<tr><td><a href="WraparoundMethod.html#NONE"><code>WraparoundMethod.NONE</code></a>:</td> <td>Do nothing and return <code>false</code>.</td></tr>
<tr><td><a href="WraparoundMethod.html#NORMALIZE"><code>WraparoundMethod.NORMALIZE</code></a>:</td> <td>Delegate to <a href="#normalize()"><code>normalize()</code></a>.</td></tr>
<tr><td><a href="WraparoundMethod.html#EXPAND"><code>WraparoundMethod.EXPAND</code></a>:</td> <td>Equivalent to <a href="#simplify()"><code>simplify()</code></a>.</td></tr>
<tr><td><a href="WraparoundMethod.html#CONTIGUOUS"><code>WraparoundMethod.CONTIGUOUS</code></a>:</td> <td>See enumeration javadoc.</td></tr>
<tr><td><a href="WraparoundMethod.html#CONTIGUOUS_LOWER"><code>WraparoundMethod.CONTIGUOUS_LOWER</code></a>:</td> <td>See enumeration javadoc.</td></tr>
<tr><td><a href="WraparoundMethod.html#CONTIGUOUS_UPPER"><code>WraparoundMethod.CONTIGUOUS_UPPER</code></a>:</td> <td>See enumeration javadoc.</td></tr>
<tr><td><a href="WraparoundMethod.html#SPLIT"><code>WraparoundMethod.SPLIT</code></a>:</td> <td>Throw <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link"><code>Illegal­Argument­Exception</code></a>.</td></tr>
</table></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>method</code> - the strategy to use for representing a region crossing the anti-meridian or other wraparound limit.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if this envelope has been modified as a result of this method call,
or <code>false</code> if no change has been done.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">Illegal­State­Exception</a></code> - if a upper coordinate value is less than a lower coordinate
value on an axis which does not have the <code>WRAPAROUND</code> range meaning.</dd>
<dt>Since:</dt>
<dd>1.1</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="horizontal()">
<h3>horizontal</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="GeneralEnvelope.html" title="class in org.apache.sis.geometry">GeneralEnvelope</a></span>&nbsp;<span class="element-name">horizontal</span>()
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></span></div>
<div class="block">Returns a view over the two horizontal dimensions of this envelope. The horizontal dimensions are
<a href="../referencing/CRS.html#getHorizontalComponent(org.opengis.referencing.crs.CoordinateReferenceSystem)">inferred from the CRS</a>. If this
method cannot infer the horizontal dimensions, then an <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link"><code>Illegal­State­Exception</code></a> is thrown.
<p>The returned envelope is a <em>view</em>: changes in the returned envelope are reflected in this
envelope, and conversely. The returned envelope will have its CRS defined.</p></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>a view over the horizontal components of this envelope. May be <code>this</code>.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">Illegal­State­Exception</a></code> - if this method cannot infer the horizontal components of this envelope.</dd>
<dt>Since:</dt>
<dd>1.1</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="#subEnvelope(int,int)"><code>sub­Envelope(int, int)</code></a></li>
<li><a href="../referencing/CRS.html#getHorizontalComponent(org.opengis.referencing.crs.CoordinateReferenceSystem)"><code>CRS​.get­Horizontal­Component(Coordinate­Reference­System)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="subEnvelope(int,int)">
<h3>subEnvelope</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="GeneralEnvelope.html" title="class in org.apache.sis.geometry">GeneralEnvelope</a></span>&nbsp;<span class="element-name">subEnvelope</span><wbr><span class="parameters">(int&nbsp;beginIndex,
int&nbsp;endIndex)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">IndexOutOfBoundsException</a></span></div>
<div class="block">Returns a view over this envelope that encompass only some dimensions. The returned object is "live":
changes applied on the original envelope is reflected in the sub-envelope view, and conversely.
<p>This method is useful for querying and updating only some dimensions.
For example, in order to expand only the horizontal component of a four dimensional
(<var>x</var>,<var>y</var>,<var>z</var>,<var>t</var>) envelope, one can use:</p>
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../copy.svg" alt="Copy snippet"></button>
<pre class="snippet"><code class="language-java">envelope.subEnvelope(0, 2).add(myPosition2D);
</code></pre>
</div>
If the sub-envelope needs to be independent from the original envelope, use the following idiom:
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../copy.svg" alt="Copy snippet"></button>
<pre class="snippet"><code class="language-java">GeneralEnvelope copy = envelope.subEnvelope(0, 2).clone();
</code></pre>
</div>
The sub-envelope is initialized with a <code>null</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">CRS</a>.
This method does not compute a sub-CRS because it may not be needed, or the sub-CRS may be already
known by the caller.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>begin­Index</code> - the index of the first valid coordinate value of the corners.</dd>
<dd><code>end­Index</code> - the index after the last valid coordinate value of the corners.</dd>
<dt>Returns:</dt>
<dd>the sub-envelope of dimension <code>end­Index - begin­Index</code>.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">Index­Out­Of­Bounds­Exception</a></code> - if an index is out of bounds.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="#horizontal()"><code>horizontal()</code></a></li>
<li><a href="../referencing/CRS.html#getComponentAt(org.opengis.referencing.crs.CoordinateReferenceSystem,int,int)"><code>CRS​.get­Component­At(Coordinate­Reference­System, int, int)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="clone()">
<h3>clone</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="GeneralEnvelope.html" title="class in org.apache.sis.geometry">GeneralEnvelope</a></span>&nbsp;<span class="element-name">clone</span>()</div>
<div class="block">Returns a deep copy of this envelope.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></dd>
<dt>Returns:</dt>
<dd>a clone of this envelope.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getDimension()">
<h3>getDimension</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getDimension</span>()</div>
<div class="block">Returns the length of coordinate sequence (the number of entries) in this envelope.
This information is available even when the <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> is unknown.</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#getDimension()" title="class or interface in org.opengis.geometry" class="external-link">get­Dimension</a></code>&nbsp;in interface&nbsp;<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>the dimensionality of this envelope.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getCoordinateReferenceSystem()">
<h3>getCoordinateReferenceSystem</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/CoordinateReferenceSystem.html" title="class or interface in org.opengis.referencing.crs" class="external-link">CoordinateReferenceSystem</a></span>&nbsp;<span class="element-name">getCoordinateReferenceSystem</span>()</div>
<div class="block">Returns the envelope coordinate reference system, or <code>null</code> if unknown.
If non-null, it shall be the same as <a href="AbstractEnvelope.html#getLowerCorner()">lower corner</a>
and <a href="AbstractEnvelope.html#getUpperCorner()">upper corner</a> CRS.</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#getCoordinateReferenceSystem()" title="class or interface in org.opengis.geometry" class="external-link">get­Coordinate­Reference­System</a></code>&nbsp;in interface&nbsp;<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>the envelope CRS, or <code>null</code> if unknown.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getLower(int)">
<h3>getLower</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getLower</span><wbr><span class="parameters">(int&nbsp;dimension)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">IndexOutOfBoundsException</a></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="AbstractEnvelope.html#getMinimum(int)">minimum</a>, except if this envelope
spans the anti-meridian.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="AbstractEnvelope.html#getLower(int)">get­Lower</a></code>&nbsp;in class&nbsp;<code><a href="AbstractEnvelope.html" title="class in org.apache.sis.geometry">Abstract­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 starting coordinate value at the given dimension.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">Index­Out­Of­Bounds­Exception</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="tag-list-long">
<li><a href="AbstractEnvelope.html#getLowerCorner()"><code>Abstract­Envelope​.get­Lower­Corner()</code></a></li>
<li><a href="AbstractEnvelope.html#getMinimum(int)"><code>Abstract­Envelope​.get­Minimum(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</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getUpper</span><wbr><span class="parameters">(int&nbsp;dimension)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">IndexOutOfBoundsException</a></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="AbstractEnvelope.html#getMaximum(int)">maximum</a>, except if this envelope
spans the anti-meridian.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="AbstractEnvelope.html#getUpper(int)">get­Upper</a></code>&nbsp;in class&nbsp;<code><a href="AbstractEnvelope.html" title="class in org.apache.sis.geometry">Abstract­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 starting coordinate value at the given dimension.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">Index­Out­Of­Bounds­Exception</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="tag-list-long">
<li><a href="AbstractEnvelope.html#getUpperCorner()"><code>Abstract­Envelope​.get­Upper­Corner()</code></a></li>
<li><a href="AbstractEnvelope.html#getMaximum(int)"><code>Abstract­Envelope​.get­Maximum(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>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getMinimum</span><wbr><span class="parameters">(int&nbsp;dimension)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">IndexOutOfBoundsException</a></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="AbstractEnvelope.html#getLower(int)"><code>Abstract­Envelope​.get­Lower(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>Na­N</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">get­Minimum</a></code>&nbsp;in interface&nbsp;<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>Overrides:</dt>
<dd><code><a href="AbstractEnvelope.html#getMinimum(int)">get­Minimum</a></code>&nbsp;in class&nbsp;<code><a href="AbstractEnvelope.html" title="class in org.apache.sis.geometry">Abstract­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/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">Index­Out­Of­Bounds­Exception</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>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getMaximum</span><wbr><span class="parameters">(int&nbsp;dimension)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">IndexOutOfBoundsException</a></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="AbstractEnvelope.html#getUpper(int)"><code>Abstract­Envelope​.get­Upper(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>Na­N</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">get­Maximum</a></code>&nbsp;in interface&nbsp;<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>Overrides:</dt>
<dd><code><a href="AbstractEnvelope.html#getMaximum(int)">get­Maximum</a></code>&nbsp;in class&nbsp;<code><a href="AbstractEnvelope.html" title="class in org.apache.sis.geometry">Abstract­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/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">Index­Out­Of­Bounds­Exception</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>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getMedian</span><wbr><span class="parameters">(int&nbsp;dimension)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">IndexOutOfBoundsException</a></span></div>
<div class="block">Returns the median coordinate along the specified dimension.
In most cases, the result is equal (minus rounding error) to:
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../copy.svg" alt="Copy snippet"></button>
<pre class="snippet"><code class="language-java">median = (getUpper(dimension) + getLower(dimension)) / 2;
</code></pre>
</div>
<h4 id="crossing-the-anti-meridian-of-a-geographic-crs-heading5">Crossing the anti-meridian of a Geographic CRS</h4>
If <var>upper</var> &lt; <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/11/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link"><code>Na­N</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">get­Median</a></code>&nbsp;in interface&nbsp;<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>Overrides:</dt>
<dd><code><a href="AbstractEnvelope.html#getMedian(int)">get­Median</a></code>&nbsp;in class&nbsp;<code><a href="AbstractEnvelope.html" title="class in org.apache.sis.geometry">Abstract­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/11/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link"><code>Double​.Na­N</code></a>.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">Index­Out­Of­Bounds­Exception</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="tag-list">
<li><a href="AbstractEnvelope.html#getMedian()"><code>Abstract­Envelope​.get­Median()</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>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getSpan</span><wbr><span class="parameters">(int&nbsp;dimension)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">IndexOutOfBoundsException</a></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:
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../copy.svg" alt="Copy snippet"></button>
<pre class="snippet"><code class="language-java">span = getUpper(dimension) - getLower(dimension);
</code></pre>
</div>
<h4 id="crossing-the-anti-meridian-of-a-geographic-crs-heading6">Crossing the anti-meridian of a Geographic CRS</h4>
If <var>upper</var> &lt; <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/11/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link"><code>Na­N</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">get­Span</a></code>&nbsp;in interface&nbsp;<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>Overrides:</dt>
<dd><code><a href="AbstractEnvelope.html#getSpan(int)">get­Span</a></code>&nbsp;in class&nbsp;<code><a href="AbstractEnvelope.html" title="class in org.apache.sis.geometry">Abstract­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/11/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link"><code>Double​.Na­N</code></a>.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">Index­Out­Of­Bounds­Exception</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="isEmpty()">
<h3>isEmpty</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<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="AbstractEnvelope.html#getSpan(int)">span</a> of
at least one axis is negative, 0 or <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link"><code>Na­N</code></a>.
<div class="note"><b>Note:</b>
Strictly speaking, there is an ambiguity if a span is <code>Na­N</code> or if the envelope contains
both 0 and infinite spans (since 0⋅∞ = <code>Na­N</code>). In such cases, this method arbitrarily
ignores the infinite values and returns <code>true</code>.</div>
If <code>is­Empty()</code> returns <code>false</code>, then <a href="AbstractEnvelope.html#isAllNaN()"><code>Abstract­Envelope​.is­All­Na­N()</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="../../../../../org.apache.sis.util/org/apache/sis/util/Emptiable.html#isEmpty()">is­Empty</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org.apache.sis.util/org/apache/sis/util/Emptiable.html" title="interface in org.apache.sis.util">Emptiable</a></code></dd>
<dt>Overrides:</dt>
<dd><code><a href="AbstractEnvelope.html#isEmpty()">is­Empty</a></code>&nbsp;in class&nbsp;<code><a href="AbstractEnvelope.html" title="class in org.apache.sis.geometry">Abstract­Envelope</a></code></dd>
<dt>Returns:</dt>
<dd><code>true</code> if this envelope is empty.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="../../../../../org.apache.sis.metadata/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBox.html#isEmpty()"><code>Default­Geographic­Bounding­Box​.is­Empty()</code></a></li>
<li><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/java/awt/geom/RectangularShape.html#isEmpty()" title="class or interface in java.awt.geom" class="external-link"><code>Rectangular­Shape​.is­Empty()</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>&nbsp;<span class="return-type">boolean</span>&nbsp;<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/11/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link">NaN</a>.
This <code>is­All­Na­N()</code> check is different than the <a href="AbstractEnvelope.html#isEmpty()"><code>Abstract­Envelope​.is­Empty()</code></a> check since it
returns <code>false</code> for a partially initialized envelope, while <code>is­Empty()</code>
returns <code>false</code> only after all dimensions have been initialized.
More specifically, the following rules apply:
<ul>
<li>If <code>is­All­Na­N() == true</code>, then <code>is­Empty() == true</code></li>
<li>If <code>is­Empty() == false</code>, then <code>is­All­Na­N() == 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>Overrides:</dt>
<dd><code><a href="AbstractEnvelope.html#isAllNaN()">is­All­Na­N</a></code>&nbsp;in class&nbsp;<code><a href="AbstractEnvelope.html" title="class in org.apache.sis.geometry">Abstract­Envelope</a></code></dd>
<dt>Returns:</dt>
<dd><code>true</code> if this envelope has NaN values.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="#setToNaN()"><code>set­To­Na­N()</code></a></li>
<li><a href="../../../../../org.apache.sis.metadata/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBox.html#isEmpty()"><code>Default­Geographic­Bounding­Box​.is­Empty()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="hashCode()">
<h3>hashCode</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<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="AbstractEnvelope.html#hashCode()">hash­Code</a></code>&nbsp;in class&nbsp;<code><a href="AbstractEnvelope.html" title="class in org.apache.sis.geometry">Abstract­Envelope</a></code></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>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">equals</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;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>.
<h4 id="implementation-note-heading">Implementation note</h4>
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>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="AbstractEnvelope.html#equals(java.lang.Object)">equals</a></code>&nbsp;in class&nbsp;<code><a href="AbstractEnvelope.html" title="class in org.apache.sis.geometry">Abstract­Envelope</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="toString()">
<h3>toString</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<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="AbstractEnvelope.html#getLowerCorner()">lower corner</a><code>,</code><a href="AbstractEnvelope.html#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.
Examples:
<ul>
<li><code>BOX(-90 -180, 90 180)</code></li>
<li><code>BOX3D(-90 -180 0, 90 180 1)</code></li>
</ul>
This method formats the numbers as with <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#toString(double)" title="class or interface in java.lang" class="external-link"><code>Double​.to­String(double)</code></a> (i.e. without fixed number of fraction digits).
The string returned by this method can be <a href="#%3Cinit%3E(java.lang.CharSequence)">parsed</a>
by the <code>General­Envelope</code> constructor.
<h4 id="note-on-standards-heading">Note on standards</h4>
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>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="AbstractEnvelope.html#toString()">to­String</a></code>&nbsp;in class&nbsp;<code><a href="AbstractEnvelope.html" title="class in org.apache.sis.geometry">Abstract­Envelope</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>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</div>
</body>
</html>