| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (11.0.4) on Fri Sep 20 12:10:30 CEST 2019 --> |
| <title>AbstractEnvelope (Apache SIS 1.0 API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="dc.created" content="2019-09-20"> |
| <meta name="keywords" content="org.apache.sis.geometry.AbstractEnvelope class"> |
| <meta name="keywords" content="castOrCopy()"> |
| <meta name="keywords" content="getLowerCorner()"> |
| <meta name="keywords" content="getUpperCorner()"> |
| <meta name="keywords" content="getMedian()"> |
| <meta name="keywords" content="getLower()"> |
| <meta name="keywords" content="getUpper()"> |
| <meta name="keywords" content="getMinimum()"> |
| <meta name="keywords" content="getMaximum()"> |
| <meta name="keywords" content="getSpan()"> |
| <meta name="keywords" content="toSimpleEnvelopes()"> |
| <meta name="keywords" content="isEmpty()"> |
| <meta name="keywords" content="isAllNaN()"> |
| <meta name="keywords" content="contains()"> |
| <meta name="keywords" content="intersects()"> |
| <meta name="keywords" content="equals()"> |
| <meta name="keywords" content="hashCode()"> |
| <meta name="keywords" content="toString()"> |
| <meta name="keywords" content="formatTo()"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../sis.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../jquery/jquery-3.3.1.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jquery-migrate-3.0.1.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="AbstractEnvelope (Apache SIS 1.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":9,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":6,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":6,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../../../"; |
| var useModuleDirectories = false; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/AbstractEnvelope.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <main role="main"> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.apache.sis.geometry</a></div> |
| <h2 title="Class AbstractEnvelope" class="title">Class AbstractEnvelope</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../io/wkt/FormattableObject.html" title="class in org.apache.sis.io.wkt">FormattableObject</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>AbstractEnvelope</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code><a href="../util/Emptiable.html" title="interface in org.apache.sis.util">Emptiable</a></code>, <code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a></code></dd> |
| </dl> |
| <dl> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><code><a href="GeneralEnvelope.html" title="class in org.apache.sis.geometry">GeneralEnvelope</a></code>, <code><a href="ImmutableEnvelope.html" title="class in org.apache.sis.geometry">ImmutableEnvelope</a></code></dd> |
| </dl> |
| <hr> |
| <pre>public abstract class <span class="typeNameLabel">AbstractEnvelope</span> |
| extends <a href="../io/wkt/FormattableObject.html" title="class in org.apache.sis.io.wkt">FormattableObject</a> |
| implements <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a>, <a href="../util/Emptiable.html" title="interface in org.apache.sis.util">Emptiable</a></pre> |
| <div class="block">Default implementations of most <code>Envelope</code> methods, leaving the data storage to subclasses. |
| This base class does not hold any state and does not implement the <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink"><code>Serializable</code></a> |
| or <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Cloneable.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Cloneable</code></a> interfaces. The internal representation, and the choice to be cloneable or |
| serializable, is left to subclasses. |
| |
| <p>Implementers needs to define at least the following methods:</p> |
| <ul> |
| <li><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true#getDimension()" title="class or interface in org.opengis.geometry" class="externalLink"><code>Envelope.getDimension()</code></a></li> |
| <li><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true#getCoordinateReferenceSystem()" title="class or interface in org.opengis.geometry" class="externalLink"><code>Envelope.getCoordinateReferenceSystem()</code></a></li> |
| <li><a href="#getLower(int)"><code>getLower(int)</code></a></li> |
| <li><a href="#getUpper(int)"><code>getUpper(int)</code></a></li> |
| </ul> |
| |
| <p>All other methods, including <a href="#toString()"><code>toString()</code></a>, <a href="#equals(java.lang.Object)"><code>equals(Object)</code></a> and <a href="#hashCode()"><code>hashCode()</code></a>, |
| are implemented on top of the above four methods.</p> |
| |
| <div class="section">Spanning the anti-meridian of a Geographic CRS</div> |
| The <cite>Web Coverage Service</cite> (WCS) specification authorizes (with special treatment) |
| cases where <var>upper</var> < <var>lower</var> at least in the longitude case. They are |
| envelopes crossing the anti-meridian, like the red box below (the green box is the usual case). |
| The default implementation of methods listed in the right column can handle such cases. |
| |
| <div class="horizontal-flow"> |
| <div> |
| <img style="vertical-align: middle" src="doc-files/AntiMeridian.png" alt="Envelope spannning the anti-meridian"> |
| </div><div> |
| Supported methods: |
| <ul> |
| <li><a href="#getMinimum(int)"><code>getMinimum(int)</code></a></li> |
| <li><a href="#getMaximum(int)"><code>getMaximum(int)</code></a></li> |
| <li><a href="#getMedian(int)"><code>getMedian(int)</code></a></li> |
| <li><a href="#getSpan(int)"><code>getSpan(int)</code></a></li> |
| <li><a href="#toSimpleEnvelopes()"><code>toSimpleEnvelopes()</code></a></li> |
| <li><a href="#contains(org.opengis.geometry.DirectPosition)"><code>contains(DirectPosition)</code></a></li> |
| <li><a href="#contains(org.opengis.geometry.Envelope)"><code>contains(Envelope)</code></a></li> |
| <li><a href="#intersects(org.opengis.geometry.Envelope)"><code>intersects(Envelope)</code></a></li> |
| </ul> |
| </div></div> |
| |
| <div class="section">Choosing the range of longitude values</div> |
| Geographic CRS typically have longitude values in the [-180 … +180]° range, but the [0 … 360]° |
| range is also occasionally used. Users of this class need to ensure that this envelope CRS is |
| associated to axes having the desired <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/cs/CoordinateSystemAxis.html?is-external=true#getMinimumValue()" title="class or interface in org.opengis.referencing.cs" class="externalLink">minimum</a> |
| and <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/cs/CoordinateSystemAxis.html?is-external=true#getMaximumValue()" title="class or interface in org.opengis.referencing.cs" class="externalLink">maximum value</a>. |
| |
| <div class="section">Note on positive and negative zeros</div> |
| The IEEE 754 standard defines two different values for positive zero and negative zero. |
| When used with SIS envelopes and keeping in mind the above discussion, those zeros have |
| different meanings: |
| |
| <ul> |
| <li>The [-0…0]° range is an empty envelope.</li> |
| <li>The [0…-0]° range makes a full turn around the globe, like the [-180…180]° |
| range except that the former range spans across the anti-meridian.</li> |
| </ul></div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.3</dd> |
| |
| <p><font size="-1">Defined in the <code>sis-referencing</code> module</font></p> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier</th> |
| <th class="colSecond" scope="col">Constructor</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected </code></td> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">AbstractEnvelope</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Constructs an envelope.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static <a href="AbstractEnvelope.html" title="class in org.apache.sis.geometry">AbstractEnvelope</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#castOrCopy(org.opengis.geometry.Envelope)">castOrCopy</a></span>​(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a> envelope)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the given envelope as an <code>AbstractEnvelope</code> instance.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#contains(org.opengis.geometry.DirectPosition)">contains</a></span>​(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/DirectPosition.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">DirectPosition</a> position)</code></th> |
| <td class="colLast"> |
| <div class="block">Tests if a specified coordinate is inside the boundary of this envelope.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#contains(org.opengis.geometry.Envelope)">contains</a></span>​(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a> envelope)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns <code>true</code> if this envelope completely encloses the specified envelope.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#contains(org.opengis.geometry.Envelope,boolean)">contains</a></span>​(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a> envelope, |
| boolean edgesInclusive)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns <code>true</code> if this envelope completely encloses the specified envelope.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#equals(java.lang.Object)">equals</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> object)</code></th> |
| <td class="colLast"> |
| <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/geometry/Envelope.html?is-external=true#getCoordinateReferenceSystem()" title="class or interface in org.opengis.geometry" class="externalLink">CRS</a>.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#equals(org.opengis.geometry.Envelope,double,boolean)">equals</a></span>​(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a> other, |
| double eps, |
| boolean epsIsRelative)</code></th> |
| <td class="colLast"> |
| <div class="block">Compares to the specified envelope for equality up to the specified tolerance value.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#formatTo(org.apache.sis.io.wkt.Formatter)">formatTo</a></span>​(<a href="../io/wkt/Formatter.html" title="class in org.apache.sis.io.wkt">Formatter</a> formatter)</code></th> |
| <td class="colLast"> |
| <div class="block">Formats this envelope as a "<code>BOX</code>" element.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>abstract double</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLower(int)">getLower</a></span>​(int dimension)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the limit in the direction of decreasing coordinate values in the specified dimension.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/DirectPosition.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">DirectPosition</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLowerCorner()">getLowerCorner</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">A coordinate position consisting of all the lower coordinate values.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaximum(int)">getMaximum</a></span>​(int dimension)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the maximal coordinate value for the specified dimension.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/DirectPosition.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">DirectPosition</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMedian()">getMedian</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">A coordinate position consisting of all the median coordinate values.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMedian(int)">getMedian</a></span>​(int dimension)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the median coordinate along the specified dimension.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMinimum(int)">getMinimum</a></span>​(int dimension)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the minimal coordinate value for the specified dimension.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSpan(int)">getSpan</a></span>​(int dimension)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the envelope span (typically width or height) along the specified dimension.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSpan(int,javax.measure.Unit)">getSpan</a></span>​(int dimension, |
| <a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html?is-external=true" title="class or interface in javax.measure" class="externalLink">Unit</a><?> unit)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the envelope span along the specified dimension, in terms of the given units.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>abstract double</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getUpper(int)">getUpper</a></span>​(int dimension)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the limit in the direction of increasing coordinate values in the specified dimension.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/DirectPosition.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">DirectPosition</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getUpperCorner()">getUpperCorner</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">A coordinate position consisting of all the upper coordinate values.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hashCode()">hashCode</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a hash value for this envelope.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#intersects(org.opengis.geometry.Envelope)">intersects</a></span>​(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a> envelope)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns <code>true</code> if this envelope intersects the specified envelope.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#intersects(org.opengis.geometry.Envelope,boolean)">intersects</a></span>​(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a> envelope, |
| boolean touch)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns <code>true</code> if this envelope intersects or (optionally) touches the specified envelope.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isAllNaN()">isAllNaN</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns <code>false</code> if at least one coordinate value is not <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#NaN" title="class or interface in java.lang" class="externalLink">NaN</a>.</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isEmpty()">isEmpty</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Determines whether or not this envelope is empty.</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a>[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toSimpleEnvelopes()">toSimpleEnvelopes</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns this envelope as an array of simple (without wraparound) envelopes.</div> |
| </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString()">toString</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Formats this envelope as a "<code>BOX</code>" element.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.FormattableObject"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class <a href="../io/wkt/FormattableObject.html" title="class in org.apache.sis.io.wkt">FormattableObject</a></h3> |
| <code><a href="../io/wkt/FormattableObject.html#print()">print</a>, <a href="../io/wkt/FormattableObject.html#toString(org.apache.sis.io.wkt.Convention)">toString</a>, <a href="../io/wkt/FormattableObject.html#toWKT()">toWKT</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.Envelope"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a></h3> |
| <code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true#getCoordinateReferenceSystem()" title="class or interface in org.opengis.geometry" class="externalLink">getCoordinateReferenceSystem</a>, <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true#getDimension()" title="class or interface in org.opengis.geometry" class="externalLink">getDimension</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a id="<init>()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>AbstractEnvelope</h4> |
| <pre>protected AbstractEnvelope()</pre> |
| <div class="block">Constructs an envelope.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="castOrCopy(org.opengis.geometry.Envelope)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>castOrCopy</h4> |
| <pre class="methodSignature">public static <a href="AbstractEnvelope.html" title="class in org.apache.sis.geometry">AbstractEnvelope</a> castOrCopy​(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a> envelope)</pre> |
| <div class="block">Returns the given envelope as an <code>AbstractEnvelope</code> instance. |
| If the given envelope is already an instance of <code>AbstractEnvelope</code>, |
| then it is returned unchanged. Otherwise the coordinate values and the CRS |
| of the given envelope are copied in a new envelope.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>envelope</code> - the envelope to cast, or <code>null</code>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the values of the given envelope as an <code>AbstractEnvelope</code> instance.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="GeneralEnvelope.html#castOrCopy(org.opengis.geometry.Envelope)"><code>GeneralEnvelope.castOrCopy(Envelope)</code></a>, |
| <a href="ImmutableEnvelope.html#castOrCopy(org.opengis.geometry.Envelope)"><code>ImmutableEnvelope.castOrCopy(Envelope)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getLowerCorner()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLowerCorner</h4> |
| <pre class="methodSignature">public <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/DirectPosition.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">DirectPosition</a> getLowerCorner()</pre> |
| <div class="block">A coordinate position consisting of all the lower coordinate values. |
| The default implementation returns a view over the <a href="#getLower(int)"><code>getLower(int)</code></a> method, |
| so changes in this envelope will be immediately reflected in the returned direct position. |
| If the particular case of the <code>GeneralEnvelope</code> subclass, the returned position |
| supports also <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/DirectPosition.html?is-external=true#setOrdinate(int,double)" title="class or interface in org.opengis.geometry" class="externalLink">write operations</a>, |
| so changes in the position are reflected back in the envelope. |
| |
| <div class="note"><b>Note:</b> |
| The <cite>Web Coverage Service</cite> (WCS) 1.1 specification uses an extended interpretation of the |
| bounding box definition. In a WCS 1.1 data structure, the lower corner defines the edges region in the |
| directions of <em>decreasing</em> coordinate values in the envelope CRS. This is usually the algebraic |
| minimum coordinates, but not always. For example, an envelope crossing the anti-meridian could have a |
| lower corner longitude greater than the upper corner longitude. Such extended interpretation applies |
| mostly to axes having <code>WRAPAROUND</code> range meaning.</div></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true#getLowerCorner()" title="class or interface in org.opengis.geometry" class="externalLink">getLowerCorner</a></code> in interface <code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a view over the lower corner, typically (but not necessarily) containing minimal coordinate values.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getUpperCorner()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getUpperCorner</h4> |
| <pre class="methodSignature">public <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/DirectPosition.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">DirectPosition</a> getUpperCorner()</pre> |
| <div class="block">A coordinate position consisting of all the upper coordinate values. |
| The default implementation returns a view over the <a href="#getUpper(int)"><code>getUpper(int)</code></a> method, |
| so changes in this envelope will be immediately reflected in the returned direct position. |
| If the particular case of the <code>GeneralEnvelope</code> subclass, the returned position |
| supports also <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/DirectPosition.html?is-external=true#setOrdinate(int,double)" title="class or interface in org.opengis.geometry" class="externalLink">write operations</a>, |
| so changes in the position are reflected back in the envelope. |
| |
| <div class="note"><b>Note:</b> |
| The <cite>Web Coverage Service</cite> (WCS) 1.1 specification uses an extended interpretation of the |
| bounding box definition. In a WCS 1.1 data structure, the upper corner defines the edges region in the |
| directions of <em>increasing</em> coordinate values in the envelope CRS. This is usually the algebraic |
| maximum coordinates, but not always. For example, an envelope crossing the anti-meridian could have an |
| upper corner longitude less than the lower corner longitude. Such extended interpretation applies |
| mostly to axes having <code>WRAPAROUND</code> range meaning.</div></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true#getUpperCorner()" title="class or interface in org.opengis.geometry" class="externalLink">getUpperCorner</a></code> in interface <code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a view over the upper corner, typically (but not necessarily) containing maximal coordinate values.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getMedian()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMedian</h4> |
| <pre class="methodSignature">public <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/DirectPosition.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">DirectPosition</a> getMedian()</pre> |
| <div class="block">A coordinate position consisting of all the median coordinate values. |
| The default implementation returns a view over the <a href="#getMedian(int)"><code>getMedian(int)</code></a> method, |
| so changes in this envelope will be immediately reflected in the returned direct position.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the median coordinates.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getLower(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLower</h4> |
| <pre class="methodSignature">public abstract double getLower​(int dimension) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></pre> |
| <div class="block">Returns the limit in the direction of decreasing coordinate values in the specified dimension. |
| This is usually the algebraic <a href="#getMinimum(int)">minimum</a>, except if this envelope |
| spans the anti-meridian.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>dimension</code> - the dimension for which to obtain the coordinate value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the starting coordinate value at the given dimension.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the given index is negative or is equals or greater |
| than the <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true#getDimension()" title="class or interface in org.opengis.geometry" class="externalLink">envelope dimension</a>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getUpper(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getUpper</h4> |
| <pre class="methodSignature">public abstract double getUpper​(int dimension) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></pre> |
| <div class="block">Returns the limit in the direction of increasing coordinate values in the specified dimension. |
| This is usually the algebraic <a href="#getMaximum(int)">maximum</a>, except if this envelope |
| spans the anti-meridian.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>dimension</code> - the dimension for which to obtain the coordinate value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the starting coordinate value at the given dimension.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the given index is negative or is equals or greater |
| than the <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true#getDimension()" title="class or interface in org.opengis.geometry" class="externalLink">envelope dimension</a>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getMinimum(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMinimum</h4> |
| <pre class="methodSignature">public double getMinimum​(int dimension) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></pre> |
| <div class="block">Returns the minimal coordinate value for the specified dimension. In the typical case |
| of non-empty envelopes <em>not</em> spanning the anti-meridian, this method returns the |
| <a href="#getLower(int)"><code>getLower(int)</code></a> value verbatim. In the case of envelope spanning the anti-meridian, |
| this method returns the <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/cs/CoordinateSystemAxis.html?is-external=true#getMinimumValue()" title="class or interface in org.opengis.referencing.cs" class="externalLink">axis minimum value</a>. |
| If the range in the given dimension is invalid, then this method returns <code>NaN</code>.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true#getMinimum(int)" title="class or interface in org.opengis.geometry" class="externalLink">getMinimum</a></code> in interface <code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>dimension</code> - the dimension for which to obtain the coordinate value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the minimal coordinate value at the given dimension.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the given index is negative or is equals or greater |
| than the <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true#getDimension()" title="class or interface in org.opengis.geometry" class="externalLink">envelope dimension</a>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getMaximum(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMaximum</h4> |
| <pre class="methodSignature">public double getMaximum​(int dimension) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></pre> |
| <div class="block">Returns the maximal coordinate value for the specified dimension. In the typical case |
| of non-empty envelopes <em>not</em> spanning the anti-meridian, this method returns the |
| <a href="#getUpper(int)"><code>getUpper(int)</code></a> value verbatim. In the case of envelope spanning the anti-meridian, |
| this method returns the <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/cs/CoordinateSystemAxis.html?is-external=true#getMaximumValue()" title="class or interface in org.opengis.referencing.cs" class="externalLink">axis maximum value</a>. |
| If the range in the given dimension is invalid, then this method returns <code>NaN</code>.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true#getMaximum(int)" title="class or interface in org.opengis.geometry" class="externalLink">getMaximum</a></code> in interface <code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>dimension</code> - the dimension for which to obtain the coordinate value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the maximal coordinate value at the given dimension.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the given index is negative or is equals or greater |
| than the <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true#getDimension()" title="class or interface in org.opengis.geometry" class="externalLink">envelope dimension</a>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getMedian(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMedian</h4> |
| <pre class="methodSignature">public double getMedian​(int dimension) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></pre> |
| <div class="block">Returns the median coordinate along the specified dimension. |
| In most cases, the result is equals (minus rounding error) to: |
| |
| <blockquote><pre>median = (<b>getUpper</b>(dimension) + <b>getLower</b>(dimension)) / 2;</pre></blockquote> |
| |
| <div class="section">Spanning the anti-meridian of a Geographic CRS</div> |
| If <var>upper</var> < <var>lower</var> and the |
| <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/cs/CoordinateSystemAxis.html?is-external=true#getRangeMeaning()" title="class or interface in org.opengis.referencing.cs" class="externalLink">range meaning</a> for the requested |
| dimension is <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/cs/RangeMeaning.html?is-external=true#WRAPAROUND" title="class or interface in org.opengis.referencing.cs" class="externalLink">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/javase/8/docs/api/java/lang/Double.html?is-external=true#NaN" title="class or interface in java.lang" class="externalLink"><code>NaN</code></a>.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true#getMedian(int)" title="class or interface in org.opengis.geometry" class="externalLink">getMedian</a></code> in interface <code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>dimension</code> - the dimension for which to obtain the coordinate value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the median coordinate at the given dimension, or <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#NaN" title="class or interface in java.lang" class="externalLink"><code>Double.NaN</code></a>.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the given index is negative or is equals or greater |
| than the <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true#getDimension()" title="class or interface in org.opengis.geometry" class="externalLink">envelope dimension</a>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getSpan(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSpan</h4> |
| <pre class="methodSignature">public double getSpan​(int dimension)</pre> |
| <div class="block">Returns the envelope span (typically width or height) along the specified dimension. |
| In most cases, the result is equals (minus rounding error) to: |
| |
| <blockquote><pre>span = <b>getUpper</b>(dimension) - <b>getLower</b>(dimension);</pre></blockquote> |
| |
| <div class="section">Spanning the anti-meridian of a Geographic CRS</div> |
| If <var>upper</var> < <var>lower</var> and the |
| <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/cs/CoordinateSystemAxis.html?is-external=true#getRangeMeaning()" title="class or interface in org.opengis.referencing.cs" class="externalLink">range meaning</a> for the requested |
| dimension is <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/cs/RangeMeaning.html?is-external=true#WRAPAROUND" title="class or interface in org.opengis.referencing.cs" class="externalLink">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/javase/8/docs/api/java/lang/Double.html?is-external=true#NaN" title="class or interface in java.lang" class="externalLink"><code>NaN</code></a>.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true#getSpan(int)" title="class or interface in org.opengis.geometry" class="externalLink">getSpan</a></code> in interface <code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>dimension</code> - the dimension for which to obtain the span.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the span (typically width or height) at the given dimension, or <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#NaN" title="class or interface in java.lang" class="externalLink"><code>Double.NaN</code></a>.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the given index is negative or is equals or greater |
| than the <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true#getDimension()" title="class or interface in org.opengis.geometry" class="externalLink">envelope dimension</a>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getSpan(int,javax.measure.Unit)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSpan</h4> |
| <pre class="methodSignature">public double getSpan​(int dimension, |
| <a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html?is-external=true" title="class or interface in javax.measure" class="externalLink">Unit</a><?> unit) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a>, |
| <a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/IncommensurableException.html?is-external=true" title="class or interface in javax.measure" class="externalLink">IncommensurableException</a></pre> |
| <div class="block">Returns the envelope span along the specified dimension, in terms of the given units. |
| The default implementation invokes <a href="#getSpan(int)"><code>getSpan(int)</code></a> and converts the result.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>dimension</code> - the dimension to query.</dd> |
| <dd><code>unit</code> - the unit for the return value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the span in terms of the given unit.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the given index is out of bounds.</dd> |
| <dd><code><a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/IncommensurableException.html?is-external=true" title="class or interface in javax.measure" class="externalLink">IncommensurableException</a></code> - if the length can't be converted to the specified units.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="toSimpleEnvelopes()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toSimpleEnvelopes</h4> |
| <pre class="methodSignature">public <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a>[] toSimpleEnvelopes()</pre> |
| <div class="block">Returns this envelope as an array of simple (without wraparound) envelopes. |
| The length of the returned array depends on the number of dimensions where a |
| <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/cs/RangeMeaning.html?is-external=true#WRAPAROUND" title="class or interface in org.opengis.referencing.cs" class="externalLink">wraparound</a> range is found. |
| Typically, wraparound occurs only in the range of longitude values, when the range crosses |
| the anti-meridian (a.k.a. date line). However this implementation will take in account any |
| axis having wraparound <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/cs/CoordinateSystemAxis.html?is-external=true#getRangeMeaning()" title="class or interface in org.opengis.referencing.cs" class="externalLink">range meaning</a>. |
| |
| <p>Special cases:</p> |
| |
| <ul> |
| <li>If this envelope <a href="#isEmpty()">is empty</a>, then this method returns an empty array.</li> |
| <li>If this envelope does not have any wraparound behavior, then this method returns <code>this</code> |
| in an array of length 1. This envelope is <strong>not</strong> cloned.</li> |
| <li>If this envelope crosses the <cite>anti-meridian</cite> (a.k.a. <cite>date line</cite>) |
| then this method represents this envelope as two separated simple envelopes. |
| <li>While uncommon, the envelope could theoretically crosses the limit of other axis having |
| wraparound range meaning. If wraparound occur along <var>n</var> axes, then this method |
| represents this envelope as 2ⁿ separated simple envelopes. |
| </ul></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a representation of this envelope as an array of non-empty envelope.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.4</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="Envelope2D.html#toRectangles()"><code>Envelope2D.toRectangles()</code></a>, |
| <a href="GeneralEnvelope.html#simplify()"><code>GeneralEnvelope.simplify()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="isEmpty()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isEmpty</h4> |
| <pre class="methodSignature">public boolean isEmpty()</pre> |
| <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/geometry/Envelope.html?is-external=true#getDimension()" title="class or interface in org.opengis.geometry" class="externalLink">dimension</a>, or if the <a href="#getSpan(int)">span</a> of |
| at least one axis is negative, 0 or <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#NaN" title="class or interface in java.lang" class="externalLink"><code>NaN</code></a>. |
| |
| <div class="note"><b>Note:</b> |
| Strictly speaking, there is an ambiguity if a span is <code>NaN</code> or if the envelope contains |
| both 0 and infinite spans (since 0⋅∞ = <code>NaN</code>). In such cases, this method arbitrarily |
| ignores the infinite values and returns <code>true</code>.</div> |
| |
| If <code>isEmpty()</code> returns <code>false</code>, then <a href="#isAllNaN()"><code>isAllNaN()</code></a> is guaranteed to |
| also return <code>false</code>. However the converse is not always true.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../util/Emptiable.html#isEmpty()">isEmpty</a></code> in interface <code><a href="../util/Emptiable.html" title="interface in org.apache.sis.util">Emptiable</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if this envelope is empty.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../metadata/iso/extent/DefaultGeographicBoundingBox.html#isEmpty()"><code>DefaultGeographicBoundingBox.isEmpty()</code></a>, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/awt/geom/RectangularShape.html?is-external=true#isEmpty()" title="class or interface in java.awt.geom" class="externalLink"><code>RectangularShape.isEmpty()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="isAllNaN()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isAllNaN</h4> |
| <pre class="methodSignature">public boolean isAllNaN()</pre> |
| <div class="block">Returns <code>false</code> if at least one coordinate value is not <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#NaN" title="class or interface in java.lang" class="externalLink">NaN</a>. |
| This <code>isAllNaN()</code> check is different than the <a href="#isEmpty()"><code>isEmpty()</code></a> check since it |
| returns <code>false</code> for a partially initialized envelope, while <code>isEmpty()</code> |
| returns <code>false</code> only after all dimensions have been initialized. |
| More specifically, the following rules apply: |
| |
| <ul> |
| <li>If <code>isAllNaN() == true</code>, then <code>isEmpty() == true</code></li> |
| <li>If <code>isEmpty() == false</code>, then <code>isAllNaN() == false</code></li> |
| <li>The converse of the above-cited rules are not always true.</li> |
| </ul> |
| |
| Note that an all-NaN envelope can still have a non-null |
| <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true#getCoordinateReferenceSystem()" title="class or interface in org.opengis.geometry" class="externalLink">coordinate reference system</a>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if this envelope has NaN values.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="GeneralEnvelope.html#setToNaN()"><code>GeneralEnvelope.setToNaN()</code></a>, |
| <a href="../metadata/iso/extent/DefaultGeographicBoundingBox.html#isEmpty()"><code>DefaultGeographicBoundingBox.isEmpty()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="contains(org.opengis.geometry.DirectPosition)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>contains</h4> |
| <pre class="methodSignature">public boolean contains​(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/DirectPosition.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">DirectPosition</a> position) |
| throws <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">MismatchedDimensionException</a></pre> |
| <div class="block">Tests if a specified coordinate is inside the boundary of this envelope. |
| Both lower and upper values of this envelope are considered inclusive. |
| If it least one coordinate value in the given point is <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#NaN" title="class or interface in java.lang" class="externalLink"><code>NaN</code></a>, |
| then this method returns <code>false</code>. |
| |
| <div class="section">Pre-conditions</div> |
| This method assumes that the specified point uses the same CRS than this envelope. |
| For performance reasons, it will no be verified unless Java assertions are enabled. |
| |
| <div class="section">Spanning the anti-meridian of a Geographic CRS</div> |
| For any dimension, if <var>upper</var> < <var>lower</var> then this method uses an |
| algorithm which is the opposite of the usual one: rather than testing if the given point is |
| inside the envelope interior, this method tests if the given point is <em>outside</em> the |
| envelope <em>exterior</em>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>position</code> - the point to text.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the specified coordinate is inside the boundary of this envelope; <code>false</code> otherwise.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">MismatchedDimensionException</a></code> - if the specified point does not have the expected number of dimensions.</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AssertionError.html?is-external=true" title="class or interface in java.lang" class="externalLink">AssertionError</a></code> - if assertions are enabled and the envelopes have mismatched CRS.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="contains(org.opengis.geometry.Envelope)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>contains</h4> |
| <pre class="methodSignature">public boolean contains​(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a> envelope) |
| throws <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">MismatchedDimensionException</a></pre> |
| <div class="block">Returns <code>true</code> if this envelope completely encloses the specified envelope. |
| The default implementation delegates to: |
| |
| <blockquote><pre><a href="#contains(org.opengis.geometry.Envelope,boolean)">contains</a>(envelope, <b>true</b>)</pre></blockquote> |
| |
| <div class="section">Pre-conditions</div> |
| This method assumes that the specified envelope uses the same CRS than this envelope. |
| For performance reasons, it will no be verified unless Java assertions are enabled. |
| |
| <div class="section">Spanning the anti-meridian of a Geographic CRS</div> |
| For every cases illustrated below, the yellow box is considered completely enclosed |
| in the blue envelope: |
| |
| <p><img src="doc-files/Contains.png" alt="Examples of envelope inclusions"></p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>envelope</code> - the envelope to test for inclusion.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if this envelope completely encloses the specified one.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">MismatchedDimensionException</a></code> - if the specified envelope doesn't have the expected dimension.</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AssertionError.html?is-external=true" title="class or interface in java.lang" class="externalLink">AssertionError</a></code> - if assertions are enabled and the envelopes have mismatched CRS.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.4</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#intersects(org.opengis.geometry.Envelope)"><code>intersects(Envelope)</code></a>, |
| <a href="#equals(org.opengis.geometry.Envelope,double,boolean)"><code>equals(Envelope, double, boolean)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="contains(org.opengis.geometry.Envelope,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>contains</h4> |
| <pre class="methodSignature">public boolean contains​(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a> envelope, |
| boolean edgesInclusive) |
| throws <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">MismatchedDimensionException</a></pre> |
| <div class="block">Returns <code>true</code> if this envelope completely encloses the specified envelope. |
| If one or more edges from the specified envelope coincide with an edge from this |
| envelope, then this method returns <code>true</code> only if <code>edgesInclusive</code> |
| is <code>true</code>. |
| |
| <p>This method is subject to the same pre-conditions than <a href="#contains(org.opengis.geometry.Envelope)"><code>contains(Envelope)</code></a>, |
| and handles envelopes spanning the anti-meridian in the same way.</p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>envelope</code> - the envelope to test for inclusion.</dd> |
| <dd><code>edgesInclusive</code> - <code>true</code> if this envelope edges are inclusive.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if this envelope completely encloses the specified one.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">MismatchedDimensionException</a></code> - if the specified envelope doesn't have the expected dimension.</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AssertionError.html?is-external=true" title="class or interface in java.lang" class="externalLink">AssertionError</a></code> - if assertions are enabled and the envelopes have mismatched CRS.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#intersects(org.opengis.geometry.Envelope,boolean)"><code>intersects(Envelope, boolean)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="intersects(org.opengis.geometry.Envelope)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>intersects</h4> |
| <pre class="methodSignature">public boolean intersects​(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a> envelope) |
| throws <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">MismatchedDimensionException</a></pre> |
| <div class="block">Returns <code>true</code> if this envelope intersects the specified envelope. |
| This method returns <code>true</code> if two envelope <em>interiors</em> have at least one point in common |
| (in other words, their intersection is non-<a href="#isEmpty()">empty</a>). |
| The default implementation delegates to: |
| |
| <blockquote><pre><a href="#intersects(org.opengis.geometry.Envelope,boolean)">intersects</a>(envelope, <b>false</b>)</pre></blockquote> |
| |
| <div class="section">Pre-conditions</div> |
| This method assumes that the specified envelope uses the same CRS than this envelope. |
| For performance reasons, it will no be verified unless Java assertions are enabled. |
| |
| <div class="section">Spanning the anti-meridian of a Geographic CRS</div> |
| This method can handle envelopes spanning the anti-meridian.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>envelope</code> - the envelope to test for intersection.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if this envelope intersects the specified one.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">MismatchedDimensionException</a></code> - if the specified envelope doesn't have the expected dimension.</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AssertionError.html?is-external=true" title="class or interface in java.lang" class="externalLink">AssertionError</a></code> - if assertions are enabled and the envelopes have mismatched CRS.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.4</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#contains(org.opengis.geometry.Envelope,boolean)"><code>contains(Envelope, boolean)</code></a>, |
| <a href="#equals(org.opengis.geometry.Envelope,double,boolean)"><code>equals(Envelope, double, boolean)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="intersects(org.opengis.geometry.Envelope,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>intersects</h4> |
| <pre class="methodSignature">public boolean intersects​(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a> envelope, |
| boolean touch) |
| throws <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">MismatchedDimensionException</a></pre> |
| <div class="block">Returns <code>true</code> if this envelope intersects or (optionally) touches the specified envelope. |
| The <code>touch</code> argument controls the value to return if only the envelope boundaries |
| (not the interiors) have a point in common: |
| |
| <ul> |
| <li>If <code>false</code>, this method returns <code>true</code> if the intersection between the two envelopes |
| is non-<a href="#isEmpty()">empty</a> (i.e. the envelope <em>interiors</em> have points in common). |
| This is the usual definition of <code>intersects</code> operation.</li> |
| <li>If <code>true</code>, this method returns <code>true</code> if the two envelopes intersect each other |
| <em>or</em> touch each other.</li> |
| </ul> |
| |
| This method is subject to the same pre-conditions than <a href="#intersects(org.opengis.geometry.Envelope)"><code>intersects(Envelope)</code></a>, |
| and handles envelopes spanning the anti-meridian in the same way.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>envelope</code> - the envelope to test for intersection.</dd> |
| <dd><code>touch</code> - the value to return if the two envelopes touch each other.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if this envelope intersects the specified envelope, or |
| <code>touch</code> if this envelope touches the specified envelope, or <code>false</code> otherwise.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">MismatchedDimensionException</a></code> - if the specified envelope does not have the expected dimension.</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AssertionError.html?is-external=true" title="class or interface in java.lang" class="externalLink">AssertionError</a></code> - if assertions are enabled and the envelopes have mismatched CRS.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#contains(org.opengis.geometry.Envelope,boolean)"><code>contains(Envelope, boolean)</code></a>, |
| <a href="#equals(org.opengis.geometry.Envelope,double,boolean)"><code>equals(Envelope, double, boolean)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="equals(org.opengis.geometry.Envelope,double,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>equals</h4> |
| <pre class="methodSignature">public boolean equals​(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a> other, |
| double eps, |
| boolean epsIsRelative)</pre> |
| <div class="block">Compares to the specified envelope for equality up to the specified tolerance value. |
| The tolerance value <code>eps</code> can be either relative to the <a href="#getSpan(int)">envelope span</a> along each dimension or can be an absolute value (as for example some |
| ground resolution of a <a href="../coverage/grid/GridCoverage.html" title="class in org.apache.sis.coverage.grid">grid coverage</a>). |
| |
| <ul> |
| <li>If <code>epsIsRelative</code> is set to <code>true</code>, the actual tolerance value for a |
| given dimension <var>i</var> is <code>eps</code> × <code>span</code> where <code>span</code> |
| is the maximum of <a href="#getSpan(int)">this envelope span</a> and the specified |
| envelope span along dimension <var>i</var>.</li> |
| <li>If <code>epsIsRelative</code> is set to <code>false</code>, the actual tolerance value for a |
| given dimension <var>i</var> is <code>eps</code>.</li> |
| </ul> |
| |
| <div class="note"><b>Note:</b> |
| Relative tolerance values (as opposed to absolute tolerance values) help to workaround the |
| fact that tolerance value are CRS dependent. For example the tolerance value need to be |
| smaller for geographic CRS than for UTM projections, because the former typically has a |
| [-180…180]° range while the later can have a range of thousands of meters.</div> |
| |
| <div class="section">Coordinate Reference System</div> |
| To be considered equal, the two envelopes must have the same <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true#getDimension()" title="class or interface in org.opengis.geometry" class="externalLink">dimension</a> |
| and their CRS must be <a href="../util/Utilities.html#equalsIgnoreMetadata(java.lang.Object,java.lang.Object)">equals, |
| ignoring metadata</a>. If at least one envelope has a null CRS, then the CRS are ignored and the |
| coordinate values are compared as if the CRS were equal.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>other</code> - the envelope to compare with.</dd> |
| <dd><code>eps</code> - the tolerance value to use for numerical comparisons.</dd> |
| <dd><code>epsIsRelative</code> - <code>true</code> if the tolerance value should be relative to axis length, |
| or <code>false</code> if it is an absolute value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the given object is equal to this envelope up to the given tolerance value.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#contains(org.opengis.geometry.Envelope)"><code>contains(Envelope)</code></a>, |
| <a href="#intersects(org.opengis.geometry.Envelope)"><code>intersects(Envelope)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="equals(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>equals</h4> |
| <pre class="methodSignature">public boolean equals​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> object)</pre> |
| <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/geometry/Envelope.html?is-external=true#getCoordinateReferenceSystem()" title="class or interface in org.opengis.geometry" class="externalLink">CRS</a>. |
| |
| <div class="note"><b>Implementation note:</b> |
| This implementation requires that the provided <code>object</code> argument is of the same class than this envelope. |
| We do not relax this rule since not every implementations in the SIS code base follow the same contract.</div></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a></code> in class <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>object</code> - the object to compare with this envelope.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the given object is equal to this envelope.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="hashCode()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hashCode</h4> |
| <pre class="methodSignature">public int hashCode()</pre> |
| <div class="block">Returns a hash value for this envelope.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a></code> in class <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="toString()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toString</h4> |
| <pre class="methodSignature">public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> toString()</pre> |
| <div class="block">Formats this envelope as a "<code>BOX</code>" element. |
| The output is of the form "<code>BOX</code><var>n</var><code>D(</code><a href="#getLowerCorner()">lower corner</a><code>,</code><a href="#getUpperCorner()">upper corner</a><code>)</code>" |
| where <var>n</var> is the <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true#getDimension()" title="class or interface in org.opengis.geometry" class="externalLink">number of dimensions</a>. |
| The number of dimension is written only if different than 2. |
| |
| <div class="note"><b>Example:</b> |
| <ul> |
| <li><code>BOX(-90 -180, 90 180)</code></li> |
| <li><code>BOX3D(-90 -180 0, 90 180 1)</code></li> |
| </ul> |
| </div> |
| |
| <div class="note"><b>Note:</b> |
| The <code>BOX</code> element is not part of the standard <cite>Well Known Text</cite> (WKT) format. |
| However it is understood by many software libraries, for example GDAL and PostGIS.</div> |
| |
| This method formats the numbers as with <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#toString(double)" title="class or interface in java.lang" class="externalLink"><code>Double.toString(double)</code></a> (i.e. without fixed number of fraction digits). |
| The string returned by this method can be <a href="GeneralEnvelope.html#%3Cinit%3E(java.lang.CharSequence)">parsed</a> |
| by the <code>GeneralEnvelope</code> constructor.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../io/wkt/FormattableObject.html#toString()">toString</a></code> in class <code><a href="../io/wkt/FormattableObject.html" title="class in org.apache.sis.io.wkt">FormattableObject</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>this envelope as a <code>BOX</code> or <code>BOX3D</code> (most typical dimensions) element.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="formatTo(org.apache.sis.io.wkt.Formatter)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>formatTo</h4> |
| <pre class="methodSignature">protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> formatTo​(<a href="../io/wkt/Formatter.html" title="class in org.apache.sis.io.wkt">Formatter</a> formatter)</pre> |
| <div class="block">Formats this envelope as a "<code>BOX</code>" element. |
| The output is of the form "<code>BOX</code><var>n</var><code>D[</code><a href="#getLowerCorner()">lower corner</a><code>,</code><a href="#getUpperCorner()">upper corner</a><code>]</code>" |
| where <var>n</var> is the <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true#getDimension()" title="class or interface in org.opengis.geometry" class="externalLink">number of dimensions</a>. |
| The number of dimension is written only if different than 2. |
| |
| <div class="note"><b>Note:</b> |
| The <code>BOX</code> element is not part of the standard <cite>Well Known Text</cite> (WKT) format. |
| However it is understood by many software libraries, for example GDAL and PostGIS.</div> |
| |
| If the coordinate reference system is geodetic or projected, then coordinate values are formatted |
| with a precision equivalent to one centimetre on Earth (the actual number of fraction digits is |
| adjusted for the axis unit of measurement and the planet size if different than Earth).</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../io/wkt/FormattableObject.html#formatTo(org.apache.sis.io.wkt.Formatter)">formatTo</a></code> in class <code><a href="../io/wkt/FormattableObject.html" title="class in org.apache.sis.io.wkt">FormattableObject</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>formatter</code> - the formatter where to format the inner content of this envelope.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the pseudo-WKT keyword, which is <code>"Box"</code> for this element.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.0</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../io/wkt/FormattableObject.html#toWKT()"><code>FormattableObject.toWKT()</code></a>, |
| <a href="../io/wkt/FormattableObject.html#toString()"><code>FormattableObject.toString()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </main> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/AbstractEnvelope.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 2010–2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |