blob: 0400a56911db77f14243a3c705f07592ef71cf6e [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) on Thu Oct 05 19:54:57 CEST 2023 -->
<title>Extents (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.metadata, package: org.apache.sis.metadata.iso.extent, class: Extents">
<meta name="generator" content="javadoc/ClassWriterImpl">
<meta name="keywords" content="org.apache.sis.metadata.iso.extent.Extents class">
<meta name="keywords" content="WORLD">
<meta name="keywords" content="fromIdentificationInfo()">
<meta name="keywords" content="getGeographicBoundingBox()">
<meta name="keywords" content="getVerticalRange()">
<meta name="keywords" content="getTimeRange()">
<meta name="keywords" content="getDate()">
<meta name="keywords" content="getDescription()">
<meta name="keywords" content="centroid()">
<meta name="keywords" content="area()">
<meta name="keywords" content="union()">
<meta name="keywords" content="intersection()">
<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><a href="#field-summary">Field</a></li>
<li>Constr</li>
<li><a href="#method-summary">Method</a></li>
</ul>
</li>
<li>
<p>Detail:</p>
<ul>
<li><a href="#field-detail">Field</a></li>
<li>Constr</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</li>
</ul>
</div>
<div class="sub-nav">
<div id="navbar-sub-list">
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li><a href="#field-detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&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.metadata</a></div>
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.sis.metadata.iso.extent</a></div>
<h1 title="Class Extents" class="title">Class Extents</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>
<div class="inheritance"><a href="../../../../../../../org.apache.sis.util/org/apache/sis/util/Static.html" title="class in org.apache.sis.util">Static</a>
<div class="inheritance">Extents</div>
</div>
</div>
<section class="class-description" id="class-description">
<hr>
<div class="type-signature"><span class="modifiers">public final class </span><span class="element-name type-name-label">Extents</span>
<span class="extends-implements">extends <a href="../../../../../../../org.apache.sis.util/org/apache/sis/util/Static.html" title="class in org.apache.sis.util">Static</a></span></div>
<div class="block">Convenience static methods for extracting information from <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link"><code>Extent</code></a> or <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/Metadata.html" title="class or interface in org.opengis.metadata" class="external-link"><code>Metadata</code></a> objects.
This class provides methods for:
<ul>
<li><a href="#getGeographicBoundingBox(org.opengis.metadata.Metadata)">Fetching geographic</a>,
<a href="#getVerticalRange(org.opengis.metadata.extent.Extent)">vertical</a> or
<a href="#getDate(org.opengis.metadata.extent.Extent,double)">temporal components</a> in a convenient form.</li>
<li>Computing <a href="#intersection(org.opengis.metadata.extent.GeographicBoundingBox,org.opengis.metadata.extent.GeographicBoundingBox)">intersection</a> of bounding boxes</li>
<li>Computing <a href="#area(org.opengis.metadata.extent.GeographicBoundingBox)">area</a> estimations.</li>
</ul></div>
<dl class="notes">
<dt>Since:</dt>
<dd>0.3</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="../../../../../../../org.apache.sis.referencing/org/apache/sis/geometry/Envelopes.html" title="class in org.apache.sis.geometry"><code>Envelopes</code></a></li>
</ul>
</dd>
</dl>
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>static final <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Extent</a></code></div>
<div class="col-second even-row-color"><code><a href="#WORLD" class="member-name-link">WORLD</a></code></div>
<div class="col-last even-row-color">
<div class="block">A geographic extent ranging from 180°W to 180°E and 90°S to 90°N.</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-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static double</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#area(org.opengis.metadata.extent.GeographicBoundingBox)" class="member-name-link">area</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 even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns an <em>estimation</em> of the area (in square metres) of the given bounding box.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/DirectPosition.html" title="class or interface in org.opengis.geometry" class="external-link">Direct­Position</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#centroid(org.opengis.metadata.extent.GeographicBoundingBox)" class="member-name-link">centroid</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;bbox)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns the position at the median longitude and latitude values of the given bounding box.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><wbr>&lt;? extends <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Extent</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#fromIdentificationInfo(org.opengis.metadata.Metadata)" class="member-name-link">from­Identification­Info</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/Metadata.html" title="class or interface in org.opengis.metadata" class="external-link">Metadata</a>&nbsp;metadata)</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 extents found in all <code>Identification</code> elements of the given metadata.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Date.html" title="class or interface in java.util" class="external-link">Date</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getDate(org.opengis.metadata.extent.Extent,double)" class="member-name-link">get­Date</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Extent</a>&nbsp;extent,
double&nbsp;location)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns an instant in the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html#getTemporalElements()" title="class or interface in org.opengis.metadata.extent" class="external-link">temporal elements</a> of the given extent,
or <code>null</code> if none.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/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-tab1 method-summary-table-tab4"><code><a href="#getDescription(org.opengis.metadata.extent.Extent,java.util.Locale)" class="member-name-link">get­Description</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Extent</a>&nbsp;extent,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Locale.html" title="class or interface in java.util" class="external-link">Locale</a>&nbsp;locale)</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 description of the given extent, or <code>null</code> if none.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Optional.html" title="class or interface in java.util" class="external-link">Optional</a><wbr>&lt;<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>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getGeographicBoundingBox(java.util.stream.Stream)" class="member-name-link">get­Geographic­Bounding­Box</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/stream/Stream.html" title="class or interface in java.util.stream" class="external-link">Stream</a>&lt;? extends <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Extent</a>&gt;&nbsp;extents)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a single geographic bounding box for the given extents.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/GeographicBoundingBox.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Geographic­Bounding­Box</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getGeographicBoundingBox(org.opengis.metadata.extent.Extent)" class="member-name-link">get­Geographic­Bounding­Box</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Extent</a>&nbsp;extent)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a single geographic bounding box from the specified extent.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/GeographicBoundingBox.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Geographic­Bounding­Box</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getGeographicBoundingBox(org.opengis.metadata.Metadata)" class="member-name-link">get­Geographic­Bounding­Box</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/Metadata.html" title="class or interface in org.opengis.metadata" class="external-link">Metadata</a>&nbsp;metadata)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a single geographic bounding box from the specified metadata.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="../../../../../../../org.apache.sis.util/org/apache/sis/measure/Range.html" title="class in org.apache.sis.measure">Range</a><wbr>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Date.html" title="class or interface in java.util" class="external-link">Date</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getTimeRange(org.opengis.metadata.extent.Extent)" class="member-name-link">get­Time­Range</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Extent</a>&nbsp;extent)</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 union of all time ranges found in the given extent, or <code>null</code> if none.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="../../../../../../../org.apache.sis.util/org/apache/sis/measure/MeasurementRange.html" title="class in org.apache.sis.measure">Measurement­Range</a><wbr>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html" title="class or interface in java.lang" class="external-link">Double</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getVerticalRange(org.opengis.metadata.extent.Extent)" class="member-name-link">get­Vertical­Range</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Extent</a>&nbsp;extent)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns the union of chosen vertical ranges found in the given extent, or <code>null</code> if none.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Extent</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#intersection(org.opengis.metadata.extent.Extent,org.opengis.metadata.extent.Extent)" class="member-name-link">intersection</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Extent</a>&nbsp;e1,
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Extent</a>&nbsp;e2)</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 intersection of the given extents.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/GeographicBoundingBox.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Geographic­Bounding­Box</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#intersection(org.opengis.metadata.extent.GeographicBoundingBox,org.opengis.metadata.extent.GeographicBoundingBox)" class="member-name-link">intersection</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;b1,
<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;b2)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns the intersection of the given geographic bounding boxes.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/TemporalExtent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Temporal­Extent</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#intersection(org.opengis.metadata.extent.TemporalExtent,org.opengis.metadata.extent.TemporalExtent)" class="member-name-link">intersection</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/TemporalExtent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Temporal­Extent</a>&nbsp;e1,
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/TemporalExtent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Temporal­Extent</a>&nbsp;e2)</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 intersection of the given temporal extents.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/VerticalExtent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Vertical­Extent</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#intersection(org.opengis.metadata.extent.VerticalExtent,org.opengis.metadata.extent.VerticalExtent)" class="member-name-link">intersection</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/VerticalExtent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Vertical­Extent</a>&nbsp;e1,
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/VerticalExtent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Vertical­Extent</a>&nbsp;e2)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns the intersection of the given vertical extents.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/GeographicBoundingBox.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Geographic­Bounding­Box</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#union(org.opengis.metadata.extent.GeographicBoundingBox,org.opengis.metadata.extent.GeographicBoundingBox)" class="member-name-link">union</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;b1,
<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;b2)</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 union of the given geographic bounding boxes.</div>
</div>
</div>
</div>
</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#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">get­Class</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hash­Code</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#toString()" title="class or interface in java.lang" class="external-link">to­String</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">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="WORLD">
<h3>WORLD</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Extent</a></span>&nbsp;<span class="element-name">WORLD</span></div>
<div class="block">A geographic extent ranging from 180°W to 180°E and 90°S to 90°N.
This extent has no vertical and no temporal components.</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="fromIdentificationInfo(org.opengis.metadata.Metadata)">
<h3>fromIdentificationInfo</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;? extends <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Extent</a>&gt;</span>&nbsp;<span class="element-name">fromIdentificationInfo</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/Metadata.html" title="class or interface in org.opengis.metadata" class="external-link">Metadata</a>&nbsp;metadata)</span></div>
<div class="block">Returns the extents found in all <code>Identification</code> elements of the given metadata.
If there is only one <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/identification/Identification.html" title="class or interface in org.opengis.metadata.identification" class="external-link"><code>Identification</code></a> element (which is the usual case), then its
collection of extents is returned <em>as-is</em>; the collection is not copied.
<p>In the less usual case where there is many <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/identification/Identification.html" title="class or interface in org.opengis.metadata.identification" class="external-link"><code>Identification</code></a> elements providing
non-empty collection of extents, then this method returns the union of all collections
without duplicated elements (duplication determined by <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link"><code>Object​.equals(Object)</code></a>).
In the special case where the first non-empty collection of extents contains all other
collections, then that collection is returned <em>as-is</em>.</p>
<div class="note"><b>Rational:</b>
above policy makes a best effort for avoiding to create new collections.
The reason is that collection implementations may perform lazy calculations of <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link"><code>Extent</code></a> elements.
This method tries to preserve the lazy behavior (if any).</div></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>metadata</code> - the metadata, or <code>null</code> if none.</dd>
<dt>Returns:</dt>
<dd>extents found in all <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/identification/Identification.html" title="class or interface in org.opengis.metadata.identification" class="external-link"><code>Identification</code></a> elements, or an empty collection if none.</dd>
<dt>Since:</dt>
<dd>1.3</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getGeographicBoundingBox(org.opengis.metadata.Metadata)">
<h3>getGeographicBoundingBox</h3>
<div class="member-signature"><span class="annotations"><a href="../../../../../../../org.apache.sis.util/org/apache/sis/util/OptionalCandidate.html" title="annotation interface in org.apache.sis.util">@OptionalCandidate</a>
</span><span class="modifiers">public static</span>&nbsp;<span class="return-type"><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></span>&nbsp;<span class="element-name">getGeographicBoundingBox</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/Metadata.html" title="class or interface in org.opengis.metadata" class="external-link">Metadata</a>&nbsp;metadata)</span></div>
<div class="block">Returns a single geographic bounding box from the specified metadata. If the given metadata
contains many <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/identification/Identification.html" title="class or interface in org.opengis.metadata.identification" class="external-link"><code>Identification</code></a> or many <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link"><code>Extent</code></a> instances, then this method returns
the <a href="DefaultGeographicBoundingBox.html#add(org.opengis.metadata.extent.GeographicBoundingBox)">union</a> of all of them.
<h4 id="use-case-heading">Use case</h4>
This convenience method is useful when the metadata is expected to contain only one bounding box,
typically because the metadata were obtained from a <a href="../../../../../../../org.apache.sis.storage/org/apache/sis/storage/Resource.html" title="interface in org.apache.sis.storage">resource</a> which is known to support only singletons (one raster or one set of features).
For more general cases, it is often more appropriate to handle each bounding box separately
using <a href="#getGeographicBoundingBox(org.opengis.metadata.extent.Extent)"><code>get­Geographic­Bounding­Box(Extent)</code></a>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>metadata</code> - the metadata from which to get a global bounding box, or <code>null</code> if none.</dd>
<dt>Returns:</dt>
<dd>a global bounding box for all extents found in the given metadata, or <code>null</code> if none.</dd>
<dt>Since:</dt>
<dd>1.1</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getGeographicBoundingBox(java.util.stream.Stream)">
<h3>getGeographicBoundingBox</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Optional.html" title="class or interface in java.util" class="external-link">Optional</a>&lt;<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>&gt;</span>&nbsp;<span class="element-name">getGeographicBoundingBox</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/stream/Stream.html" title="class or interface in java.util.stream" class="external-link">Stream</a>&lt;? extends <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Extent</a>&gt;&nbsp;extents)</span></div>
<div class="block">Returns a single geographic bounding box for the given extents.
For each extent, the bounding box is fetched with <a href="#getGeographicBoundingBox(org.opengis.metadata.extent.Extent)"><code>get­Geographic­Bounding­Box(Extent)</code></a>.
If more than one geographic bound is found, this method computes their union.
<p>This is a convenience method for fetching the domain of validity of
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/datum/Datum.html" title="class or interface in org.opengis.referencing.datum" class="external-link"><code>Datum</code></a>,
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/CoordinateReferenceSystem.html" title="class or interface in org.opengis.referencing.crs" class="external-link"><code>Coordinate­Reference­System</code></a> or
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/operation/CoordinateOperation.html" title="class or interface in org.opengis.referencing.operation" class="external-link"><code>Coordinate­Operation</code></a> objects.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>extents</code> - the extents for which to get a single geographic bounding box.</dd>
<dt>Returns:</dt>
<dd>the union of all geographic bounding boxes found in all extents.</dd>
<dt>Throws:</dt>
<dd><code><a href="../../InvalidMetadataException.html" title="class in org.apache.sis.metadata">Invalid­Metadata­Exception</a></code> - if an envelope cannot be transformed to a geographic bounding box.</dd>
<dt>Since:</dt>
<dd>1.4</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="../../../../../../../org.apache.sis.referencing/org/apache/sis/referencing/AbstractIdentifiedObject.html#getDomains()"><code>Abstract­Identified­Object​.get­Domains()</code></a></li>
<li><a href="../../../../../../../org.apache.sis.referencing/org/apache/sis/referencing/CRS.html#getDomainOfValidity(org.opengis.referencing.crs.CoordinateReferenceSystem)"><code>CRS​.get­Domain­Of­Validity(Coordinate­Reference­System)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getGeographicBoundingBox(org.opengis.metadata.extent.Extent)">
<h3>getGeographicBoundingBox</h3>
<div class="member-signature"><span class="annotations"><a href="../../../../../../../org.apache.sis.util/org/apache/sis/util/OptionalCandidate.html" title="annotation interface in org.apache.sis.util">@OptionalCandidate</a>
</span><span class="modifiers">public static</span>&nbsp;<span class="return-type"><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></span>&nbsp;<span class="element-name">getGeographicBoundingBox</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Extent</a>&nbsp;extent)</span></div>
<div class="block">Returns a single geographic bounding box from the specified extent.
This method tries to find the bounding box in the cheapest way
before to fallback on more expensive computations:
<ol>
<li>First, this method searches geographic elements that are instance of <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"><code>Geographic­Bounding­Box</code></a>.<ul>
<li>If exactly one such instance is found, then this method returns that instance directly (no copy).</li>
<li>If more than one instance is found, then this method computes and returns the
<a href="DefaultGeographicBoundingBox.html#add(org.opengis.metadata.extent.GeographicBoundingBox)">union</a> of all bounding boxes.</li>
</ul></li>
<li>If above step found no <code>Geographic­Bounding­Box</code>, then this method inspects geographic elements
that are instance of <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/BoundingPolygon.html" title="class or interface in org.opengis.metadata.extent" class="external-link"><code>Bounding­Polygon</code></a>, taking in account only the envelopes associated to a
coordinate reference system of kind <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/GeographicCRS.html" title="class or interface in org.opengis.referencing.crs" class="external-link"><code>Geographic­CRS</code></a>. If such envelopes are found, then this
method computes and returns their union.</li>
<li>If above step found no polygon's envelope associated to a geographic CRS, then in last resort this
method uses all polygon's envelopes regardless their coordinate reference system (provided that the
CRS is not null), applying coordinate transformations if needed.</li>
<li>If above step found no polygon's envelope, then this method returns <code>null</code>.</li>
</ol></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>extent</code> - the extent to convert to a geographic bounding box, or <code>null</code>.</dd>
<dt>Returns:</dt>
<dd>a geographic bounding box extracted from the given extent, or <code>null</code> if none.</dd>
<dt>Throws:</dt>
<dd><code><a href="../../InvalidMetadataException.html" title="class in org.apache.sis.metadata">Invalid­Metadata­Exception</a></code> - if an envelope cannot be transformed to a geographic bounding box.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="../../../../../../../org.apache.sis.referencing/org/apache/sis/referencing/CRS.html#getDomainOfValidity(org.opengis.referencing.crs.CoordinateReferenceSystem)"><code>CRS​.get­Domain­Of­Validity(Coordinate­Reference­System)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getVerticalRange(org.opengis.metadata.extent.Extent)">
<h3>getVerticalRange</h3>
<div class="member-signature"><span class="annotations"><a href="../../../../../../../org.apache.sis.util/org/apache/sis/util/OptionalCandidate.html" title="annotation interface in org.apache.sis.util">@OptionalCandidate</a>
</span><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="../../../../../../../org.apache.sis.util/org/apache/sis/measure/MeasurementRange.html" title="class in org.apache.sis.measure">MeasurementRange</a>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html" title="class or interface in java.lang" class="external-link">Double</a>&gt;</span>&nbsp;<span class="element-name">getVerticalRange</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Extent</a>&nbsp;extent)</span></div>
<div class="block">Returns the union of chosen vertical ranges found in the given extent, or <code>null</code> if none.
This method gives preference to heights above the Mean Sea Level when possible.
Depths have negative height values: if the
<a href="../../../../../../../org.apache.sis.referencing/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.html#getDirection()">axis direction</a>
is toward down, then this method reverses the sign of minimum and maximum values.
<h4 id="multi-occurrences-heading">Multi-occurrences</h4>
If the given <code>Extent</code> object contains more than one vertical extent, then this method
performs a choice based on the vertical datum and the unit of measurement:
<ul class="verbose">
<li><p><b>Choice based on vertical datum</b><br>
Only the extents associated (indirectly, through their CRS) to the same non-null <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/datum/VerticalDatumType.html" title="class or interface in org.opengis.referencing.datum" class="external-link"><code>Vertical­Datum­Type</code></a>
will be taken in account. If all datum types are null, then this method conservatively uses only the first
vertical extent. Otherwise the datum type used for filtering the vertical extents is:</p>
<ul>
<li><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/datum/VerticalDatumType.html#GEOIDAL" title="class or interface in org.opengis.referencing.datum" class="external-link"><code>Vertical­Datum­Type​.GEOIDAL</code></a> or <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/datum/VerticalDatumType.html#DEPTH" title="class or interface in org.opengis.referencing.datum" class="external-link"><code>DEPTH</code></a> if at least one extent
uses those datum types. For this method, <code>DEPTH</code> is considered as equivalent to <code>GEOIDAL</code>
except for the axis direction.</li>
<li>Otherwise, the first non-null datum type found in iteration order.</li>
</ul>
<div class="note"><b>Rational:</b> like <a href="#getGeographicBoundingBox(org.opengis.metadata.extent.Extent)">geographic bounding box</a>,
the vertical range is an approximated information; the range returned by this method does not carry any
information about the vertical CRS and this method does not attempt to perform coordinate transformation.
But this method is more useful if the returned ranges are close to a frequently used surface, like the
Mean Sea Level. The same simplification is applied in the
<a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#31"><code>Vertical­Extent</code> element of
Well Known Text (WKT) format</a>, which specifies that <cite>“Vertical extent is an approximate description
of location; heights are relative to an unspecified mean sea level.”</cite></div></li>
<li><p><b>Choice based on units of measurement</b><br>
If, after the choice based on the vertical datum described above, there is still more than one vertical
extent to consider, then the next criterion checks for the units of measurement.</p>
<ul>
<li>If no range specify a unit of measurement, return the first range and ignore all others.</li>
<li>Otherwise take the first range having a unit of measurement. Then:<ul>
<li>All other ranges having an incompatible unit of measurement will be ignored.</li>
<li>All other ranges having a compatible unit of measurement will be converted to
the unit of the first retained range, and their union will be computed.</li>
</ul></li>
</ul>
<div class="note"><b>Example:</b>
Heights or depths are often measured using some pressure units, for example hectopascals (hPa).
An <code>Extent</code> could contain two vertical elements: one with the height measurements in hPa,
and the other element with heights transformed to metres using an empirical formula.
In such case this method will select the first vertical element on the assumption that it is
the "main" one that the metadata producer intended to show. Next, this method will search for
other vertical elements using pressure unit. In our example there is none, but if such elements
were found, this method would compute their union.</div></li>
</ul></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>extent</code> - the extent to convert to a vertical measurement range, or <code>null</code>.</dd>
<dt>Returns:</dt>
<dd>a vertical measurement range created from the given extent, or <code>null</code> if none.</dd>
<dt>Since:</dt>
<dd>0.4</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getTimeRange(org.opengis.metadata.extent.Extent)">
<h3>getTimeRange</h3>
<div class="member-signature"><span class="annotations"><a href="../../../../../../../org.apache.sis.util/org/apache/sis/util/OptionalCandidate.html" title="annotation interface in org.apache.sis.util">@OptionalCandidate</a>
</span><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="../../../../../../../org.apache.sis.util/org/apache/sis/measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Date.html" title="class or interface in java.util" class="external-link">Date</a>&gt;</span>&nbsp;<span class="element-name">getTimeRange</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Extent</a>&nbsp;extent)</span></div>
<div class="block">Returns the union of all time ranges found in the given extent, or <code>null</code> if none.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>extent</code> - the extent to convert to a time range, or <code>null</code>.</dd>
<dt>Returns:</dt>
<dd>a time range created from the given extent, or <code>null</code> if none.</dd>
<dt>Since:</dt>
<dd>0.4</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getDate(org.opengis.metadata.extent.Extent,double)">
<h3>getDate</h3>
<div class="member-signature"><span class="annotations"><a href="../../../../../../../org.apache.sis.util/org/apache/sis/util/OptionalCandidate.html" title="annotation interface in org.apache.sis.util">@OptionalCandidate</a>
</span><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Date.html" title="class or interface in java.util" class="external-link">Date</a></span>&nbsp;<span class="element-name">getDate</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Extent</a>&nbsp;extent,
double&nbsp;location)</span></div>
<div class="block">Returns an instant in the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html#getTemporalElements()" title="class or interface in org.opengis.metadata.extent" class="external-link">temporal elements</a> of the given extent,
or <code>null</code> if none. First, this method computes the union of all temporal elements. Then this method
computes the linear interpolation between the start and end time as in the following pseudo-code:
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../../../copy.svg" alt="Copy snippet"></button>
<pre class="snippet"><code class="language-java">return new Date(startTime + (endTime - startTime) * location);
</code></pre>
</div>
Special cases:
<ul>
<li>If <code>location</code> is 0, then this method returns the <a href="DefaultTemporalExtent.html#getStartTime()">start time</a>.</li>
<li>If <code>location</code> is 1, then this method returns the <a href="DefaultTemporalExtent.html#getEndTime()">end time</a>.</li>
<li>If <code>location</code> is 0.5, then this method returns the average of start time and end time.</li>
<li>If <code>location</code> is outside the [0 … 1] range, then the result will be outside the temporal extent.</li>
</ul></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>extent</code> - the extent from which to get an instant, or <code>null</code>.</dd>
<dd><code>location</code> - 0 for the start time, 1 for the end time, 0.5 for the average time, or the
coefficient (usually in the [0 … 1] range) for interpolating an instant.</dd>
<dt>Returns:</dt>
<dd>an instant interpolated at the given location, or <code>null</code> if none.</dd>
<dt>Since:</dt>
<dd>0.4</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getDescription(org.opengis.metadata.extent.Extent,java.util.Locale)">
<h3>getDescription</h3>
<div class="member-signature"><span class="annotations"><a href="../../../../../../../org.apache.sis.util/org/apache/sis/util/OptionalCandidate.html" title="annotation interface in org.apache.sis.util">@OptionalCandidate</a>
</span><span class="modifiers">public static</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">getDescription</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Extent</a>&nbsp;extent,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Locale.html" title="class or interface in java.util" class="external-link">Locale</a>&nbsp;locale)</span></div>
<div class="block">Returns the description of the given extent, or <code>null</code> if none.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>extent</code> - the extent from which to get a description, or <code>null</code>.</dd>
<dd><code>locale</code> - desired locale, or <code>null</code> for default.</dd>
<dt>Returns:</dt>
<dd>description of the given extent, or <code>null</code> if none.</dd>
<dt>Since:</dt>
<dd>1.1</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="centroid(org.opengis.metadata.extent.GeographicBoundingBox)">
<h3>centroid</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/DirectPosition.html" title="class or interface in org.opengis.geometry" class="external-link">DirectPosition</a></span>&nbsp;<span class="element-name">centroid</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;bbox)</span></div>
<div class="block">Returns the position at the median longitude and latitude values of the given bounding box.
This method does not check the <a href="AbstractGeographicExtent.html#getInclusion()">inclusion</a> status.
This method takes in account bounding boxes that cross the anti-meridian.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>bbox</code> - the bounding box for which to get the median longitude and latitude values, or <code>null</code>.</dd>
<dt>Returns:</dt>
<dd>a median position of the given bounding box, or <code>null</code> if none.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="area(org.opengis.metadata.extent.GeographicBoundingBox)">
<h3>area</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">area</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">Returns an <em>estimation</em> of the area (in square metres) of the given bounding box.
Since <code>Geographic­Bounding­Box</code> provides only approximated information (for example
it does not specify the datum), the value returned by this method is also approximated.
<p>The current implementation performs its computation on the
<a href="../../../../../../../org.apache.sis.referencing/org/apache/sis/referencing/CommonCRS.html#SPHERE">GRS 1980 Authalic Sphere</a>.
However, this may change in any future SIS version.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>box</code> - the geographic bounding box for which to compute the area, or <code>null</code>.</dd>
<dt>Returns:</dt>
<dd>an estimation of the area in the given bounding box (m²),
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">NaN</a> if the given box was null.</dd>
<dt>Since:</dt>
<dd>0.4</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="union(org.opengis.metadata.extent.GeographicBoundingBox,org.opengis.metadata.extent.GeographicBoundingBox)">
<h3>union</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><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></span>&nbsp;<span class="element-name">union</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;b1,
<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;b2)</span></div>
<div class="block">Returns the union of the given geographic bounding boxes. If any of the arguments is <code>null</code>,
then this method returns the other argument (which may be null). Otherwise this method returns a box
which is the union of the two given boxes.
<p>This method never modify the given boxes, but may return directly one of the given arguments
if it already represents the union result.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>b1</code> - the first bounding box, or <code>null</code>.</dd>
<dd><code>b2</code> - the second bounding box, or <code>null</code>.</dd>
<dt>Returns:</dt>
<dd>the union (may be any of the <code>b1</code> or <code>b2</code> argument if unchanged),
or <code>null</code> if the two given boxes are null.</dd>
<dt>Since:</dt>
<dd>1.2</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="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="intersection(org.opengis.metadata.extent.GeographicBoundingBox,org.opengis.metadata.extent.GeographicBoundingBox)">
<h3>intersection</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><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></span>&nbsp;<span class="element-name">intersection</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;b1,
<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;b2)</span></div>
<div class="block">Returns the intersection of the given geographic bounding boxes. If any of the arguments is <code>null</code>,
then this method returns the other argument (which may be null). Otherwise this method returns a box which
is the intersection of the two given boxes. If there is no intersection, the returned bounding box contains
<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> bounds.
<p>This method never modify the given boxes, but may return directly one of the given arguments if it
already represents the intersection result.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>b1</code> - the first bounding box, or <code>null</code>.</dd>
<dd><code>b2</code> - the second bounding box, or <code>null</code>.</dd>
<dt>Returns:</dt>
<dd>the intersection (may be any of the <code>b1</code> or <code>b2</code> argument if unchanged),
or <code>null</code> if the two given boxes are null. May contain <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> bounds.</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 <a href="AbstractGeographicExtent.html#getInclusion()">inclusion status</a>
is not the same for both boxes.</dd>
<dt>Since:</dt>
<dd>0.4</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="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="intersection(org.opengis.metadata.extent.VerticalExtent,org.opengis.metadata.extent.VerticalExtent)">
<h3>intersection</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/VerticalExtent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">VerticalExtent</a></span>&nbsp;<span class="element-name">intersection</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/VerticalExtent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">VerticalExtent</a>&nbsp;e1,
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/VerticalExtent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">VerticalExtent</a>&nbsp;e2)</span></div>
<div class="block">Returns the intersection of the given vertical extents. If any of the arguments is <code>null</code>,
then this method returns the other argument (which may be null). Otherwise this method returns a
vertical extent which is the intersection of the two given extents.
<p>This method never modify the given extents, but may return directly one of the given arguments
if it already represents the intersection result.</p>
<h4 id="advantage-and-inconvenient-of-this-method-heading">Advantage and inconvenient of this method</h4>
This method cannot intersect extents defined with different datums because height transformations
generally require the geodetic positions (latitudes and longitudes) of the heights to transform.
For more general transformations, it is better to convert all extent components into a single envelope,
then <a href="../../../../../../../org.apache.sis.referencing/org/apache/sis/geometry/Envelopes.html#transform(org.opengis.referencing.operation.CoordinateOperation,org.opengis.geometry.Envelope)">transform
the envelope at once</a>. On the other hand, this <code>intersect(…)</code> method preserves better
the <a href="../../../xml/NilReason.html" title="class in org.apache.sis.xml"><code>Nil­Reason</code></a> (if any).</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>e1</code> - the first extent, or <code>null</code>.</dd>
<dd><code>e2</code> - the second extent, or <code>null</code>.</dd>
<dt>Returns:</dt>
<dd>the intersection (may be any of the <code>e1</code> or <code>e2</code> argument if unchanged),
or <code>null</code> if the two given extents are null.</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 two extents do not use the same datum, ignoring metadata.</dd>
<dt>Since:</dt>
<dd>0.8</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="DefaultVerticalExtent.html#intersect(org.opengis.metadata.extent.VerticalExtent)"><code>Default­Vertical­Extent​.intersect(Vertical­Extent)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="intersection(org.opengis.metadata.extent.TemporalExtent,org.opengis.metadata.extent.TemporalExtent)">
<h3>intersection</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/TemporalExtent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">TemporalExtent</a></span>&nbsp;<span class="element-name">intersection</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/TemporalExtent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">TemporalExtent</a>&nbsp;e1,
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/TemporalExtent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">TemporalExtent</a>&nbsp;e2)</span></div>
<div class="block">Returns the intersection of the given temporal extents. If any of the arguments is <code>null</code>,
then this method returns the other argument (which may be null). Otherwise this method returns a
temporal extent which is the intersection of the two given extents.
<p>This method never modify the given extents, but may return directly one of the given arguments
if it already represents the intersection result.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>e1</code> - the first extent, or <code>null</code>.</dd>
<dd><code>e2</code> - the second extent, or <code>null</code>.</dd>
<dt>Returns:</dt>
<dd>the intersection (may be any of the <code>e1</code> or <code>e2</code> argument if unchanged),
or <code>null</code> if the two given extents are null.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">Unsupported­Operation­Exception</a></code> - if no implementation of <code>Temporal­Factory</code> has been found
on the module path.</dd>
<dt>Since:</dt>
<dd>0.8</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="DefaultTemporalExtent.html#intersect(org.opengis.metadata.extent.TemporalExtent)"><code>Default­Temporal­Extent​.intersect(Temporal­Extent)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="intersection(org.opengis.metadata.extent.Extent,org.opengis.metadata.extent.Extent)">
<h3>intersection</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Extent</a></span>&nbsp;<span class="element-name">intersection</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Extent</a>&nbsp;e1,
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link">Extent</a>&nbsp;e2)</span></div>
<div class="block">Returns the intersection of the given extents. If any of the arguments is <code>null</code>,
then this method returns the other argument (which may be null). Otherwise this method
returns an extent which is the intersection of all geographic, vertical and temporal
elements in the two given extents.
<p>This method never modify the given extents, but may return directly one of the given
arguments if it already represents the intersection result.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>e1</code> - the first extent, or <code>null</code>.</dd>
<dd><code>e2</code> - the second extent, or <code>null</code>.</dd>
<dt>Returns:</dt>
<dd>the intersection (may be any of the <code>e1</code> or <code>e2</code> argument if unchanged),
or <code>null</code> if the two given extents are null.</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 two elements to intersect are not compatible (e.g. mismatched
<a href="AbstractGeographicExtent.html#getInclusion()">bounding box inclusion status</a> or
mismatched <a href="DefaultVerticalExtent.html#getVerticalCRS()">vertical datum</a>).</dd>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">Unsupported­Operation­Exception</a></code> - if a <code>Temporal­Factory</code> is required but no implementation
has been found on the module path.</dd>
<dt>Since:</dt>
<dd>0.8</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="DefaultExtent.html#intersect(org.opengis.metadata.extent.Extent)"><code>Default­Extent​.intersect(Extent)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</div>
</body>
</html>