blob: 526e93c45ac2ec37d696d6051ea9045c799be367 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.4) on Fri Sep 20 12:10:30 CEST 2019 -->
<title>GridGeometry (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.coverage.grid.GridGeometry class">
<meta name="keywords" content="CRS">
<meta name="keywords" content="ENVELOPE">
<meta name="keywords" content="EXTENT">
<meta name="keywords" content="GRID_TO_CRS">
<meta name="keywords" content="RESOLUTION">
<meta name="keywords" content="GEOGRAPHIC_EXTENT">
<meta name="keywords" content="TEMPORAL_EXTENT">
<meta name="keywords" content="extent">
<meta name="keywords" content="envelope">
<meta name="keywords" content="gridToCRS">
<meta name="keywords" content="resolution">
<meta name="keywords" content="UNDEFINED">
<meta name="keywords" content="getDimension()">
<meta name="keywords" content="getExtent()">
<meta name="keywords" content="getGridToCRS()">
<meta name="keywords" content="getCoordinateReferenceSystem()">
<meta name="keywords" content="getEnvelope()">
<meta name="keywords" content="getGeographicExtent()">
<meta name="keywords" content="getTemporalExtent()">
<meta name="keywords" content="getResolution()">
<meta name="keywords" content="isConversionLinear()">
<meta name="keywords" content="isDefined()">
<meta name="keywords" content="derive()">
<meta name="keywords" content="reduce()">
<meta name="keywords" content="hashCode()">
<meta name="keywords" content="equals()">
<meta name="keywords" content="toString()">
<meta name="keywords" content="toTree()">
<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="GridGeometry (Apache SIS 1.0 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance 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/GridGeometry.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&nbsp;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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</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">&nbsp;</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>&nbsp;<a href="package-summary.html">org.apache.sis.coverage.grid</a></div>
<h2 title="Class GridGeometry" class="title">Class GridGeometry</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>GridGeometry</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><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">Serializable</a></code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">GridGeometry</span>
extends <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>
implements <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">Serializable</a></pre>
<div class="block">Valid extent of grid coordinates together with the transform from those grid coordinates
to real world coordinates. <code>Grid­Geometry</code> contains:
<ul class="verbose">
<li>A <a href="#getExtent()">grid extent</a> (a.k.a. <cite>grid envelope</cite>),
often inferred from the <a href="https://docs.oracle.com/javase/8/docs/api/java/awt/image/RenderedImage.html?is-external=true" title="class or interface in java.awt.image" class="externalLink"><code>Rendered­Image</code></a> size.</li>
<li>A <a href="#getGridToCRS(org.opengis.referencing.datum.PixelInCell)">grid to CRS</a> transform,
which may be inferred from the grid extent and the georeferenced envelope.</li>
<li>A <a href="#getEnvelope()">georeferenced envelope</a>, which can be inferred
from the grid extent and the <cite>grid to CRS</cite> transform.</li>
<li>An optional <a href="#getCoordinateReferenceSystem()">Coordinate Reference System</a> (CRS)
specified as part of the georeferenced envelope.
This CRS is the target of the <cite>grid to CRS</cite> transform.</li>
<li>An <em>estimation</em> of <a href="#getResolution(boolean)"><code>grid resolution</code></a> along each CRS axes,
computed from the <cite>grid to CRS</cite> transform and eventually from the grid extent.</li>
<li>An <a href="#isConversionLinear(int...)">indication of whether conversion for some axes is linear or not</a>.</li>
</ul>
The first three properties should be mandatory, but are allowed to be temporarily absent during
grid coverage construction. Temporarily absent properties are allowed because they may be inferred
from a wider context. For example a grid geometry know nothing about <a href="https://docs.oracle.com/javase/8/docs/api/java/awt/image/RenderedImage.html?is-external=true" title="class or interface in java.awt.image" class="externalLink"><code>Rendered­Image</code></a>,
but <code>Grid­Coverage2D</code> does and may use that information for providing a missing grid extent.
By default, any request for an undefined property will throw an <a href="IncompleteGridGeometryException.html" title="class in org.apache.sis.coverage.grid"><code>Incomplete­Grid­Geometry­Exception</code></a>.
In order to check if a property is defined, use <a href="#isDefined(int)"><code>is­Defined(int)</code></a>.
<p><code>Grid­Geometry</code> instances are immutable and thread-safe.
The same instance can be shared by different <a href="GridCoverage.html" title="class in org.apache.sis.coverage.grid"><code>Grid­Coverage</code></a> instances.</p></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../serialized-form.html#org.apache.sis.coverage.grid.GridGeometry">Serialized Form</a></dd>
<p><font size="-1">Defined in the <code>sis-feature</code> module</font></p>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#CRS">CRS</a></span></code></th>
<td class="colLast">
<div class="block">A bitmask to specify the validity of the Coordinate Reference System property.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="../../geometry/ImmutableEnvelope.html" title="class in org.apache.sis.geometry">ImmutableEnvelope</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#envelope">envelope</a></span></code></th>
<td class="colLast">
<div class="block">The geodetic envelope, or <code>null</code> if unknown.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ENVELOPE">ENVELOPE</a></span></code></th>
<td class="colLast">
<div class="block">A bitmask to specify the validity of the geodetic envelope property.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="GridExtent.html" title="class in org.apache.sis.coverage.grid">GridExtent</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#extent">extent</a></span></code></th>
<td class="colLast">
<div class="block">The valid domain of a grid coverage, or <code>null</code> if unknown.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#EXTENT">EXTENT</a></span></code></th>
<td class="colLast">
<div class="block">A bitmask to specify the validity of the grid extent property.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#GEOGRAPHIC_EXTENT">GEOGRAPHIC_EXTENT</a></span></code></th>
<td class="colLast">
<div class="block">A bitmask to specify the validity of the geographic bounding box.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#GRID_TO_CRS">GRID_TO_CRS</a></span></code></th>
<td class="colLast">
<div class="block">A bitmask to specify the validity of the <cite>"grid to CRS"</cite> transform.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/operation/MathTransform.html?is-external=true" title="class or interface in org.opengis.referencing.operation" class="externalLink">MathTransform</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#gridToCRS">gridToCRS</a></span></code></th>
<td class="colLast">
<div class="block">The conversion from grid indices to "real world" coordinates, or <code>null</code> if unknown.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected double[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resolution">resolution</a></span></code></th>
<td class="colLast">
<div class="block">An <em>estimation</em> of the grid resolution, in units of the CRS axes.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#RESOLUTION">RESOLUTION</a></span></code></th>
<td class="colLast">
<div class="block">A bitmask to specify the validity of the grid resolution.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TEMPORAL_EXTENT">TEMPORAL_EXTENT</a></span></code></th>
<td class="colLast">
<div class="block">A bitmask to specify the validity of the temporal period.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">GridGeometry</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#UNDEFINED">UNDEFINED</a></span></code></th>
<td class="colLast">
<div class="block">An "empty" grid geometry with no value defined.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ======== 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">&nbsp;</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>&nbsp;</code></td>
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.sis.coverage.grid.GridExtent,org.opengis.geometry.Envelope)">GridGeometry</a></span>&#8203;(<a href="GridExtent.html" title="class in org.apache.sis.coverage.grid">GridExtent</a>&nbsp;extent,
<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>&nbsp;envelope)</code></th>
<td class="colLast">
<div class="block">Creates a grid geometry with an extent and an envelope.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>&nbsp;</code></td>
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.sis.coverage.grid.GridExtent,org.opengis.referencing.datum.PixelInCell,org.opengis.referencing.operation.MathTransform,org.opengis.referencing.crs.CoordinateReferenceSystem)">GridGeometry</a></span>&#8203;(<a href="GridExtent.html" title="class in org.apache.sis.coverage.grid">GridExtent</a>&nbsp;extent,
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/datum/PixelInCell.html?is-external=true" title="class or interface in org.opengis.referencing.datum" class="externalLink">PixelInCell</a>&nbsp;anchor,
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/operation/MathTransform.html?is-external=true" title="class or interface in org.opengis.referencing.operation" class="externalLink">MathTransform</a>&nbsp;gridToCRS,
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/crs/CoordinateReferenceSystem.html?is-external=true" title="class or interface in org.opengis.referencing.crs" class="externalLink">CoordinateReferenceSystem</a>&nbsp;crs)</code></th>
<td class="colLast">
<div class="block">Creates a new grid geometry from a grid extent and a mapping from cell coordinates to "real world" coordinates.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.sis.coverage.grid.GridGeometry)">GridGeometry</a></span>&#8203;(<a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">GridGeometry</a>&nbsp;other)</code></th>
<td class="colLast">
<div class="block">Creates a new grid geometry with the same values than the given grid geometry.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>&nbsp;</code></td>
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.opengis.referencing.datum.PixelInCell,org.opengis.referencing.operation.MathTransform,org.opengis.geometry.Envelope,org.apache.sis.coverage.grid.GridRoundingMode)">GridGeometry</a></span>&#8203;(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/datum/PixelInCell.html?is-external=true" title="class or interface in org.opengis.referencing.datum" class="externalLink">PixelInCell</a>&nbsp;anchor,
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/operation/MathTransform.html?is-external=true" title="class or interface in org.opengis.referencing.operation" class="externalLink">MathTransform</a>&nbsp;gridToCRS,
<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>&nbsp;envelope,
<a href="GridRoundingMode.html" title="enum in org.apache.sis.coverage.grid">GridRoundingMode</a>&nbsp;rounding)</code></th>
<td class="colLast">
<div class="block">Creates a new grid geometry from a geospatial envelope and a mapping from cell coordinates to "real world" coordinates.</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">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</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><a href="GridDerivation.html" title="class in org.apache.sis.coverage.grid">GridDerivation</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#derive()">derive</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns an object that can be used for creating a new grid geometry derived from this grid geometry.</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="#equals(java.lang.Object)">equals</a></span>&#8203;(<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>&nbsp;object)</code></th>
<td class="colLast">
<div class="block">Compares the specified object with this grid geometry for equality.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/crs/CoordinateReferenceSystem.html?is-external=true" title="class or interface in org.opengis.referencing.crs" class="externalLink">CoordinateReferenceSystem</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCoordinateReferenceSystem()">getCoordinateReferenceSystem</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the "real world" coordinate reference system.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDimension()">getDimension</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the number of dimensions of the <em>grid</em>.</div>
</td>
</tr>
<tr id="i4" 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="#getEnvelope()">getEnvelope</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the bounding box of "real world" coordinates for this grid geometry.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="GridExtent.html" title="class in org.apache.sis.coverage.grid">GridExtent</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getExtent()">getExtent</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the valid coordinate range of a grid coverage.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html?is-external=true" title="class or interface in java.util" class="externalLink">Optional</a>&lt;<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/extent/GeographicBoundingBox.html?is-external=true" title="class or interface in org.opengis.metadata.extent" class="externalLink">GeographicBoundingBox</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getGeographicExtent()">getGeographicExtent</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the approximate latitude and longitude coordinates of the grid.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/operation/MathTransform.html?is-external=true" title="class or interface in org.opengis.referencing.operation" class="externalLink">MathTransform</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getGridToCRS(org.opengis.referencing.datum.PixelInCell)">getGridToCRS</a></span>&#8203;(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/datum/PixelInCell.html?is-external=true" title="class or interface in org.opengis.referencing.datum" class="externalLink">PixelInCell</a>&nbsp;anchor)</code></th>
<td class="colLast">
<div class="block">Returns the conversion from grid coordinates to "real world" coordinates.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>double[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getResolution(boolean)">getResolution</a></span>&#8203;(boolean&nbsp;allowEstimates)</code></th>
<td class="colLast">
<div class="block">Returns an <em>estimation</em> of the grid resolution, in units of the coordinate reference system axes.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html?is-external=true" title="class or interface in java.time" class="externalLink">Instant</a>[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTemporalExtent()">getTemporalExtent</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the start time and end time of coordinates of the grid.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<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 grid geometry.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isConversionLinear(int...)">isConversionLinear</a></span>&#8203;(int...&nbsp;targets)</code></th>
<td class="colLast">
<div class="block">Indicates whether the <cite>grid to CRS</cite> conversion is linear for all the specified CRS axes.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isDefined(int)">isDefined</a></span>&#8203;(int&nbsp;bitmask)</code></th>
<td class="colLast">
<div class="block">Returns <code>true</code> if all the parameters specified by the argument are set.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">GridGeometry</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#reduce(int...)">reduce</a></span>&#8203;(int...&nbsp;dimensions)</code></th>
<td class="colLast">
<div class="block">Returns a grid geometry that encompass only some dimensions of the grid geometry.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<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">Returns a string representation of this grid geometry.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="../../util/collection/TreeTable.html" title="interface in org.apache.sis.util.collection">TreeTable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toTree(java.util.Locale,int)">toTree</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util" class="externalLink">Locale</a>&nbsp;locale,
int&nbsp;bitmask)</code></th>
<td class="colLast">
<div class="block">Returns a tree representation of some elements of this grid geometry.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;<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">get­Class</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">notify­All</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>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a id="CRS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CRS</h4>
<pre>public static final&nbsp;int CRS</pre>
<div class="block">A bitmask to specify the validity of the Coordinate Reference System property.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#isDefined(int)"><code>is­Defined(int)</code></a>,
<a href="#getCoordinateReferenceSystem()"><code>get­Coordinate­Reference­System()</code></a>,
<a href="../../../../../constant-values.html#org.apache.sis.coverage.grid.GridGeometry.CRS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="ENVELOPE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ENVELOPE</h4>
<pre>public static final&nbsp;int ENVELOPE</pre>
<div class="block">A bitmask to specify the validity of the geodetic envelope property.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#isDefined(int)"><code>is­Defined(int)</code></a>,
<a href="#getEnvelope()"><code>get­Envelope()</code></a>,
<a href="../../../../../constant-values.html#org.apache.sis.coverage.grid.GridGeometry.ENVELOPE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="EXTENT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EXTENT</h4>
<pre>public static final&nbsp;int EXTENT</pre>
<div class="block">A bitmask to specify the validity of the grid extent property.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#isDefined(int)"><code>is­Defined(int)</code></a>,
<a href="#getExtent()"><code>get­Extent()</code></a>,
<a href="../../../../../constant-values.html#org.apache.sis.coverage.grid.GridGeometry.EXTENT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="GRID_TO_CRS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>GRID_TO_CRS</h4>
<pre>public static final&nbsp;int GRID_TO_CRS</pre>
<div class="block">A bitmask to specify the validity of the <cite>"grid to CRS"</cite> transform.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#isDefined(int)"><code>is­Defined(int)</code></a>,
<a href="#getGridToCRS(org.opengis.referencing.datum.PixelInCell)"><code>get­Grid­To­CRS(Pixel­In­Cell)</code></a>,
<a href="../../../../../constant-values.html#org.apache.sis.coverage.grid.GridGeometry.GRID_TO_CRS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="RESOLUTION">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>RESOLUTION</h4>
<pre>public static final&nbsp;int RESOLUTION</pre>
<div class="block">A bitmask to specify the validity of the grid resolution.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#isDefined(int)"><code>is­Defined(int)</code></a>,
<a href="#getResolution(boolean)"><code>get­Resolution(boolean)</code></a>,
<a href="../../../../../constant-values.html#org.apache.sis.coverage.grid.GridGeometry.RESOLUTION">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="GEOGRAPHIC_EXTENT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>GEOGRAPHIC_EXTENT</h4>
<pre>public static final&nbsp;int GEOGRAPHIC_EXTENT</pre>
<div class="block">A bitmask to specify the validity of the geographic bounding box.
This information can sometime be derived from the envelope and the CRS.
It is an optional element even with a complete grid geometry since the
coordinate reference system is not required to have an horizontal component.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#getGeographicExtent()"><code>get­Geographic­Extent()</code></a>,
<a href="../../../../../constant-values.html#org.apache.sis.coverage.grid.GridGeometry.GEOGRAPHIC_EXTENT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TEMPORAL_EXTENT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TEMPORAL_EXTENT</h4>
<pre>public static final&nbsp;int TEMPORAL_EXTENT</pre>
<div class="block">A bitmask to specify the validity of the temporal period.
This information can sometime be derived from the envelope and the CRS.
It is an optional element even with a complete grid geometry since the
coordinate reference system is not required to have a temporal component.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#getTemporalExtent()"><code>get­Temporal­Extent()</code></a>,
<a href="../../../../../constant-values.html#org.apache.sis.coverage.grid.GridGeometry.TEMPORAL_EXTENT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="extent">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>extent</h4>
<pre>protected final&nbsp;<a href="GridExtent.html" title="class in org.apache.sis.coverage.grid">GridExtent</a> extent</pre>
<div class="block">The valid domain of a grid coverage, or <code>null</code> if unknown. The lowest valid grid coordinate is zero
for <a href="https://docs.oracle.com/javase/8/docs/api/java/awt/image/BufferedImage.html?is-external=true" title="class or interface in java.awt.image" class="externalLink"><code>Buffered­Image</code></a>, but may be non-zero for arbitrary <a href="https://docs.oracle.com/javase/8/docs/api/java/awt/image/RenderedImage.html?is-external=true" title="class or interface in java.awt.image" class="externalLink"><code>Rendered­Image</code></a>.
A grid with 512 cells can have a minimum coordinate of 0 and maximum of 511.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#EXTENT"><code>EXTENT</code></a>,
<a href="#getExtent()"><code>get­Extent()</code></a></dd>
</dl>
</li>
</ul>
<a id="envelope">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>envelope</h4>
<pre>protected final&nbsp;<a href="../../geometry/ImmutableEnvelope.html" title="class in org.apache.sis.geometry">ImmutableEnvelope</a> envelope</pre>
<div class="block">The geodetic envelope, or <code>null</code> if unknown. If non-null, this envelope is usually the grid <a href="#extent"><code>extent</code></a>
<a href="#gridToCRS">transformed</a> to real world coordinates. The Coordinate Reference System} (CRS) of this
envelope defines the "real world" CRS of this grid geometry.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#ENVELOPE"><code>ENVELOPE</code></a>,
<a href="#getEnvelope()"><code>get­Envelope()</code></a></dd>
</dl>
</li>
</ul>
<a id="gridToCRS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>gridToCRS</h4>
<pre>protected final&nbsp;<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/operation/MathTransform.html?is-external=true" title="class or interface in org.opengis.referencing.operation" class="externalLink">MathTransform</a> gridToCRS</pre>
<div class="block">The conversion from grid indices to "real world" coordinates, or <code>null</code> if unknown.
If non-null, the conversion shall map <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/datum/PixelInCell.html?is-external=true#CELL_CENTER" title="class or interface in org.opengis.referencing.datum" class="externalLink">cell center</a>.
This conversion is usually, but not necessarily, affine.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#CRS"><code>CRS</code></a>,
<a href="#getGridToCRS(org.opengis.referencing.datum.PixelInCell)"><code>get­Grid­To­CRS(Pixel­In­Cell)</code></a>,
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/datum/PixelInCell.html?is-external=true#CELL_CENTER" title="class or interface in org.opengis.referencing.datum" class="externalLink"><code>Pixel­In­Cell​.CELL_CENTER</code></a></dd>
</dl>
</li>
</ul>
<a id="resolution">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resolution</h4>
<pre>protected final&nbsp;double[] resolution</pre>
<div class="block">An <em>estimation</em> of the grid resolution, in units of the CRS axes.
Computed from <a href="#gridToCRS"><code>grid­To­CRS</code></a>, eventually together with <a href="#extent"><code>extent</code></a>.
May be <code>null</code> if unknown.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#RESOLUTION"><code>RESOLUTION</code></a>,
<a href="#getResolution(boolean)"><code>get­Resolution(boolean)</code></a></dd>
</dl>
</li>
</ul>
<a id="UNDEFINED">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>UNDEFINED</h4>
<pre>public static final&nbsp;<a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">GridGeometry</a> UNDEFINED</pre>
<div class="block">An "empty" grid geometry with no value defined. All getter methods invoked on this instance will cause
<a href="IncompleteGridGeometryException.html" title="class in org.apache.sis.coverage.grid"><code>Incomplete­Grid­Geometry­Exception</code></a> to be thrown. This instance can be used as a place-holder when
the grid geometry can not be obtained.</div>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(org.apache.sis.coverage.grid.GridGeometry)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>GridGeometry</h4>
<pre>protected&nbsp;GridGeometry&#8203;(<a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">GridGeometry</a>&nbsp;other)</pre>
<div class="block">Creates a new grid geometry with the same values than the given grid geometry.
This is a copy constructor for subclasses.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>other</code> - the other grid geometry to copy.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(org.apache.sis.coverage.grid.GridExtent,org.opengis.referencing.datum.PixelInCell,org.opengis.referencing.operation.MathTransform,org.opengis.referencing.crs.CoordinateReferenceSystem)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>GridGeometry</h4>
<pre>public&nbsp;GridGeometry&#8203;(<a href="GridExtent.html" title="class in org.apache.sis.coverage.grid">GridExtent</a>&nbsp;extent,
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/datum/PixelInCell.html?is-external=true" title="class or interface in org.opengis.referencing.datum" class="externalLink">PixelInCell</a>&nbsp;anchor,
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/operation/MathTransform.html?is-external=true" title="class or interface in org.opengis.referencing.operation" class="externalLink">MathTransform</a>&nbsp;gridToCRS,
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/crs/CoordinateReferenceSystem.html?is-external=true" title="class or interface in org.opengis.referencing.crs" class="externalLink">CoordinateReferenceSystem</a>&nbsp;crs)</pre>
<div class="block">Creates a new grid geometry from a grid extent and a mapping from cell coordinates to "real world" coordinates.
At least one of <code>extent</code>, <code>grid­To­CRS</code> or <code>crs</code> arguments shall be non-null.
If <code>grid­To­CRS</code> is non-null, then <code>anchor</code> shall be non-null too with one of the following values:
<ul>
<li><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/datum/PixelInCell.html?is-external=true#CELL_CENTER" title="class or interface in org.opengis.referencing.datum" class="externalLink"><code>Pixel­In­Cell​.CELL_CENTER</code></a> if conversions of cell indices by <code>grid­To­CRS</code> give "real world"
coordinates close to the center of each cell.</li>
<li><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/datum/PixelInCell.html?is-external=true#CELL_CORNER" title="class or interface in org.opengis.referencing.datum" class="externalLink"><code>Pixel­In­Cell​.CELL_CORNER</code></a> if conversions of cell indices by <code>grid­To­CRS</code> give "real world"
coordinates at the corner of each cell. The cell corner is the one for which all grid indices have the
smallest values (closest to negative infinity).</li>
</ul>
<div class="note"><b>API note:</b>
there is no default value for <code>anchor</code> because experience shows that images shifted by ½ pixel
(with pixels that may be tens of kilometres large) is a recurrent problem. We want to encourage developers
to always think about wether their <cite>grid to CRS</cite> transform is mapping pixel corner or center.</div>
<div class="warning"><b>Upcoming API generalization:</b>
the <code>extent</code> type of this method may be changed to <code>Grid­Envelope</code> interface in a future Apache SIS version.
This is pending <a href="https://github.com/opengeospatial/geoapi/issues/36">GeoAPI update</a>.
In addition, the <code>Pixel­In­Cell</code> code list currently defined in the <code>org​.opengis​.referencing​.datum</code> package
may move in another package in a future GeoAPI version because this type is no longer defined by the ISO 19111 standard
after the 2018 revision.</div></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>extent</code> - the valid extent of grid coordinates, or <code>null</code> if unknown.</dd>
<dd><code>anchor</code> - <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/datum/PixelInCell.html?is-external=true#CELL_CENTER" title="class or interface in org.opengis.referencing.datum" class="externalLink">Cell center</a> for OGC conventions or
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/datum/PixelInCell.html?is-external=true#CELL_CORNER" title="class or interface in org.opengis.referencing.datum" class="externalLink">cell corner</a> for Java2D/JAI conventions.</dd>
<dd><code>grid­To­CRS</code> - the mapping from grid coordinates to "real world" coordinates, or <code>null</code> if unknown.</dd>
<dd><code>crs</code> - the coordinate reference system of the "real world" coordinates, or <code>null</code> if unknown.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Null­Pointer­Exception</a></code> - if <code>extent</code>, <code>grid­To­CRS</code> and <code>crs</code> arguments are all null.</dd>
<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">Mismatched­Dimension­Exception</a></code> - if the math transform and the CRS do not have consistent dimensions.</dd>
<dd><code><a href="IllegalGridGeometryException.html" title="class in org.apache.sis.coverage.grid">Illegal­Grid­Geometry­Exception</a></code> - if the math transform can not compute the geospatial envelope or resolution from the grid extent.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(org.opengis.referencing.datum.PixelInCell,org.opengis.referencing.operation.MathTransform,org.opengis.geometry.Envelope,org.apache.sis.coverage.grid.GridRoundingMode)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>GridGeometry</h4>
<pre>public&nbsp;GridGeometry&#8203;(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/datum/PixelInCell.html?is-external=true" title="class or interface in org.opengis.referencing.datum" class="externalLink">PixelInCell</a>&nbsp;anchor,
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/operation/MathTransform.html?is-external=true" title="class or interface in org.opengis.referencing.operation" class="externalLink">MathTransform</a>&nbsp;gridToCRS,
<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>&nbsp;envelope,
<a href="GridRoundingMode.html" title="enum in org.apache.sis.coverage.grid">GridRoundingMode</a>&nbsp;rounding)</pre>
<div class="block">Creates a new grid geometry from a geospatial envelope and a mapping from cell coordinates to "real world" coordinates.
At least one of <code>grid­To­CRS</code> or <code>envelope</code> arguments shall be non-null.
If <code>grid­To­CRS</code> is non-null, then <code>anchor</code> shall be non-null too with one of the values documented in the
<a href="#%3Cinit%3E(org.apache.sis.coverage.grid.GridExtent,org.opengis.referencing.datum.PixelInCell,org.opengis.referencing.operation.MathTransform,org.opengis.referencing.crs.CoordinateReferenceSystem)"><code>constructor expecting a grid
extent</code></a>.
<p>The given envelope shall encompass all cell surfaces, from the left border of leftmost cell to the right border
of the rightmost cell and similarly along other axes. This constructor tries to store a geospatial envelope close
to the specified envelope, but there is no guarantees that the envelope returned by <a href="#getEnvelope()"><code>get­Envelope()</code></a> will be
equal to the given envelope. The envelope stored in the new <code>Grid­Geometry</code> may be slightly smaller, larger or
shifted because the floating point values used in geospatial envelope can not always be mapped to the integer
coordinates used in <a href="GridExtent.html" title="class in org.apache.sis.coverage.grid"><code>Grid­Extent</code></a>.
The rules for deciding whether coordinates should be rounded toward nearest integers,
to <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html?is-external=true#floor(double)" title="class or interface in java.lang" class="externalLink">floor</a> or to <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html?is-external=true#ceil(double)" title="class or interface in java.lang" class="externalLink">ceil</a> values
are specified by the <a href="GridRoundingMode.html" title="enum in org.apache.sis.coverage.grid"><code>Grid­Rounding­Mode</code></a> argument.</p>
<p>Because of the uncertainties explained in above paragraph, this constructor should be used only in last resort,
when the grid extent is unknown. For determinist results, developers should prefer the
<a href="#%3Cinit%3E(org.apache.sis.coverage.grid.GridExtent,org.opengis.referencing.datum.PixelInCell,org.opengis.referencing.operation.MathTransform,org.opengis.referencing.crs.CoordinateReferenceSystem)">constructor using grid extent</a>
as much as possible. In particular, this constructor is not suitable for computing grid geometry of tiles in a tiled image,
because the above-cited uncertainties may result in apparently random black lines between tiles.</p>
<div class="warning"><b>Upcoming API change:</b>
The <code>Pixel­In­Cell</code> code list currently defined in the <code>org​.opengis​.referencing​.datum</code> package
may move in another package in a future GeoAPI version because this type is no longer defined by the
ISO 19111 standard after the 2018 revision. This code list may be taken by ISO 19123 in a future revision.</div></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>anchor</code> - <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/datum/PixelInCell.html?is-external=true#CELL_CENTER" title="class or interface in org.opengis.referencing.datum" class="externalLink">Cell center</a> for OGC conventions or
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/datum/PixelInCell.html?is-external=true#CELL_CORNER" title="class or interface in org.opengis.referencing.datum" class="externalLink">cell corner</a> for Java2D/JAI conventions.</dd>
<dd><code>grid­To­CRS</code> - the mapping from grid coordinates to "real world" coordinates, or <code>null</code> if unknown.</dd>
<dd><code>envelope</code> - the geospatial envelope, including its coordinate reference system if available.
There is no guarantees that the envelope actually stored in the <code>Grid­Geometry</code>
will be equal to this specified envelope.</dd>
<dd><code>rounding</code> - controls behavior of rounding from floating point values to integers.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="IllegalGridGeometryException.html" title="class in org.apache.sis.coverage.grid">Illegal­Grid­Geometry­Exception</a></code> - if the math transform can not compute the grid extent or the resolution.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(org.apache.sis.coverage.grid.GridExtent,org.opengis.geometry.Envelope)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>GridGeometry</h4>
<pre>public&nbsp;GridGeometry&#8203;(<a href="GridExtent.html" title="class in org.apache.sis.coverage.grid">GridExtent</a>&nbsp;extent,
<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>&nbsp;envelope)</pre>
<div class="block">Creates a grid geometry with an extent and an envelope.
This constructor can be used when the <cite>grid to CRS</cite> transform is unknown.
If only the coordinate reference system is known, then the envelope coordinates can be
<a href="../../geometry/AbstractEnvelope.html#isAllNaN()"><code>Na­N</code></a>.
<p>This constructor is generally not recommended since creating a <cite>grid to CRS</cite> from an envelope
requires assumption on axis order and axis directions. This constructor assumes that all grid axes are in the
same order than CRS axes and no axis is flipped. This straightforward approach often results in the <var>y</var>
axis to be oriented toward up, not down as expected in rendered images. Those assumptions are often not suitable.
For better control, use one of the constructors expecting a <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/operation/MathTransform.html?is-external=true" title="class or interface in org.opengis.referencing.operation" class="externalLink"><code>Math­Transform</code></a> argument instead.
This constructor is provided mostly as a convenience for testing purposes, or when only the extent is known.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>extent</code> - the valid extent of grid coordinates, or <code>null</code> if unknown.</dd>
<dd><code>envelope</code> - the envelope together with CRS of the "real world" coordinates, or <code>null</code> if unknown.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Null­Pointer­Exception</a></code> - if <code>extent</code> and <code>envelope</code> arguments are both null.</dd>
</dl>
</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="getDimension()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDimension</h4>
<pre class="methodSignature">public final&nbsp;int&nbsp;getDimension()</pre>
<div class="block">Returns the number of dimensions of the <em>grid</em>. This is typically the same
than the number of <a href="#getEnvelope()">envelope</a> dimensions or the number of
<a href="#getCoordinateReferenceSystem()">coordinate reference system</a> dimensions,
but not necessarily.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of grid dimensions.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#reduce(int...)"><code>reduce(int...)</code></a>,
<a href="GridExtent.html#getDimension()"><code>Grid­Extent​.get­Dimension()</code></a></dd>
</dl>
</li>
</ul>
<a id="getExtent()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getExtent</h4>
<pre class="methodSignature">public&nbsp;<a href="GridExtent.html" title="class in org.apache.sis.coverage.grid">GridExtent</a>&nbsp;getExtent()</pre>
<div class="block">Returns the valid coordinate range of a grid coverage. The lowest valid grid coordinate is zero
for <a href="https://docs.oracle.com/javase/8/docs/api/java/awt/image/BufferedImage.html?is-external=true" title="class or interface in java.awt.image" class="externalLink"><code>Buffered­Image</code></a>, but may be non-zero for arbitrary <a href="https://docs.oracle.com/javase/8/docs/api/java/awt/image/RenderedImage.html?is-external=true" title="class or interface in java.awt.image" class="externalLink"><code>Rendered­Image</code></a>.
A grid with 512 cells can have a minimum coordinate of 0 and maximum of 511.
<div class="warning"><b>Upcoming API generalization:</b>
the return type of this method may be changed to <code>Grid­Envelope</code> interface in a future Apache SIS version.
This is pending <a href="https://github.com/opengeospatial/geoapi/issues/36">GeoAPI update</a>.</div></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the valid extent of grid coordinates (never <code>null</code>).</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="IncompleteGridGeometryException.html" title="class in org.apache.sis.coverage.grid">Incomplete­Grid­Geometry­Exception</a></code> - if this grid geometry has no extent —
i.e. <code><a href="#isDefined(int)">is­Defined</a>(<a href="#EXTENT">EXTENT</a>)</code> returned <code>false</code>.</dd>
</dl>
</li>
</ul>
<a id="getGridToCRS(org.opengis.referencing.datum.PixelInCell)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getGridToCRS</h4>
<pre class="methodSignature">public&nbsp;<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/operation/MathTransform.html?is-external=true" title="class or interface in org.opengis.referencing.operation" class="externalLink">MathTransform</a>&nbsp;getGridToCRS&#8203;(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/datum/PixelInCell.html?is-external=true" title="class or interface in org.opengis.referencing.datum" class="externalLink">PixelInCell</a>&nbsp;anchor)</pre>
<div class="block">Returns the conversion from grid coordinates to "real world" coordinates.
The conversion is often an affine transform, but not necessarily.
Conversions from cell indices to geospatial coordinates can be performed for example as below:
<blockquote><pre>MathTransform gridToCRS = gridGeometry.<b>getGridToCRS</b>(PixelInCell.CELL_CENTER);
DirectPosition indicesOfCell = <font color="green">new</font> <b>GeneralDirectPosition</b>(2, 3, 4):
DirectPosition aPixelCenter = gridToCRS.<b>transform</b>(indicesOfCell, <font color="green">null</font>);</pre></blockquote>
Callers must specify whether they want the "real world" coordinates of cell center or cell corner.
The cell corner is the one for which all grid indices have the smallest values (closest to negative infinity).
As a rule of thumb:
<ul>
<li>Use <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/datum/PixelInCell.html?is-external=true#CELL_CENTER" title="class or interface in org.opengis.referencing.datum" class="externalLink"><code>Pixel­In­Cell​.CELL_CENTER</code></a> for transforming <em>points</em>.</li>
<li>Use <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/datum/PixelInCell.html?is-external=true#CELL_CORNER" title="class or interface in org.opengis.referencing.datum" class="externalLink"><code>Pixel­In­Cell​.CELL_CORNER</code></a> for transforming <em>envelopes</em>
with inclusive lower coordinates and <strong>exclusive</strong> upper coordinates.</li>
</ul>
<div class="note"><b>API note:</b>
there is no default value for <code>anchor</code> because experience shows that images shifted by ½ pixel
(with pixels that may be tens of kilometres large) is a recurrent problem. We want to encourage developers
to always think about wether the desired <cite>grid to CRS</cite> transform shall map pixel corner or center.</div></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>anchor</code> - the cell part to map (center or corner).</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the conversion from grid coordinates to "real world" coordinates (never <code>null</code>).</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Illegal­Argument­Exception</a></code> - if the given <code>anchor</code> is not a known code list value.</dd>
<dd><code><a href="IncompleteGridGeometryException.html" title="class in org.apache.sis.coverage.grid">Incomplete­Grid­Geometry­Exception</a></code> - if this grid geometry has no transform —
i.e. <code><a href="#isDefined(int)">is­Defined</a>(<a href="#GRID_TO_CRS">GRID_TO_CRS</a>)</code> returned <code>false</code>.</dd>
</dl>
</li>
</ul>
<a id="getCoordinateReferenceSystem()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCoordinateReferenceSystem</h4>
<pre class="methodSignature">public&nbsp;<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/crs/CoordinateReferenceSystem.html?is-external=true" title="class or interface in org.opengis.referencing.crs" class="externalLink">CoordinateReferenceSystem</a>&nbsp;getCoordinateReferenceSystem()</pre>
<div class="block">Returns the "real world" coordinate reference system.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the coordinate reference system (never <code>null</code>).</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="IncompleteGridGeometryException.html" title="class in org.apache.sis.coverage.grid">Incomplete­Grid­Geometry­Exception</a></code> - if this grid geometry has no CRS —
i.e. <code><a href="#isDefined(int)">is­Defined</a>(<a href="#CRS">CRS</a>)</code> returned <code>false</code>.</dd>
</dl>
</li>
</ul>
<a id="getEnvelope()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEnvelope</h4>
<pre class="methodSignature">public&nbsp;<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>&nbsp;getEnvelope()</pre>
<div class="block">Returns the bounding box of "real world" coordinates for this grid geometry.
This envelope is computed from the <a href="#getExtent()">grid extent</a>, which is
<a href="#getGridToCRS(org.opengis.referencing.datum.PixelInCell)">transformed</a> to the "real world" coordinate system.
The initial envelope encompasses all cell surfaces, from the left border of leftmost cell
to the right border of the rightmost cell and similarly along other axes.
If this grid geometry is a <a href="GridDerivation.html#subgrid(org.opengis.geometry.Envelope,double...)">subgrid</a>, then the envelope is also
<a href="../../geometry/GeneralEnvelope.html#intersect(org.opengis.geometry.Envelope)">clipped</a> to the envelope of the original (non subsampled) grid geometry.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the bounding box in "real world" coordinates (never <code>null</code>).</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="IncompleteGridGeometryException.html" title="class in org.apache.sis.coverage.grid">Incomplete­Grid­Geometry­Exception</a></code> - if this grid geometry has no envelope —
i.e. <code><a href="#isDefined(int)">is­Defined</a>(<a href="#ENVELOPE">ENVELOPE</a>)</code> returned <code>false</code>.</dd>
</dl>
</li>
</ul>
<a id="getGeographicExtent()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getGeographicExtent</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html?is-external=true" title="class or interface in java.util" class="externalLink">Optional</a>&lt;<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/extent/GeographicBoundingBox.html?is-external=true" title="class or interface in org.opengis.metadata.extent" class="externalLink">GeographicBoundingBox</a>&gt;&nbsp;getGeographicExtent()</pre>
<div class="block">Returns the approximate latitude and longitude coordinates of the grid.
The prime meridian is Greenwich, but the geodetic reference frame is not necessarily WGS 84.
This is computed from the <a href="#getEnvelope()">envelope</a> if the coordinate reference system
contains an horizontal component such as a geographic or projected CRS.
<div class="note"><b>API note:</b>
this method does not throw <a href="IncompleteGridGeometryException.html" title="class in org.apache.sis.coverage.grid"><code>Incomplete­Grid­Geometry­Exception</code></a> because the geographic extent may be absent
even with a complete grid geometry. This is because grid geometries are not required to have an spatial component
on Earth surface; a raster could be a vertical profile for example.</div></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the geographic bounding box in "real world" coordinates.</dd>
</dl>
</li>
</ul>
<a id="getTemporalExtent()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTemporalExtent</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html?is-external=true" title="class or interface in java.time" class="externalLink">Instant</a>[]&nbsp;getTemporalExtent()</pre>
<div class="block">Returns the start time and end time of coordinates of the grid.
If the grid has no temporal dimension, then this method returns an empty array.
If only the start time or end time is defined, then returns an array of length 1.
Otherwise this method returns an array of length 2 with the start time in the first element
and the end time in the last element.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>time range as an array of length 0 (if none), 1 or 2.</dd>
</dl>
</li>
</ul>
<a id="getResolution(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getResolution</h4>
<pre class="methodSignature">public&nbsp;double[]&nbsp;getResolution&#8203;(boolean&nbsp;allowEstimates)</pre>
<div class="block">Returns an <em>estimation</em> of the grid resolution, in units of the coordinate reference system axes.
The length of the returned array is the number of CRS dimensions, with <code>resolution[0]</code>
being the resolution along the first CRS axis, <code>resolution[1]</code> the resolution along the second CRS
axis, <i>etc</i>. Note that this axis order is not necessarily the same than grid axis order.
<p>If the resolution at CRS dimension <var>i</var> is not a constant factor
(i.e. the <code><a href="#isConversionLinear(int...)">is­Conversion­Linear</a>(i)</code> returns <code>false</code>),
then <code>resolution[i]</code> is set to one of the following values:</p>
<ul>
<li><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​.Na­N</code></a> if <code>allow­Estimates</code> is <code>false</code>.</li>
<li>An arbitrary representative resolution otherwise.
Current implementation computes the resolution at <a href="GridExtent.html#getPointOfInterest()"><code>grid center</code></a>,
but different implementations may use alternative algorithms.</li>
</ul></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>allow­Estimates</code> - whether to provide some values even for resolutions that are not constant factors.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an <em>estimation</em> of the grid resolution (never <code>null</code>).</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="IncompleteGridGeometryException.html" title="class in org.apache.sis.coverage.grid">Incomplete­Grid­Geometry­Exception</a></code> - if this grid geometry has no resolution —
i.e. <code><a href="#isDefined(int)">is­Defined</a>(<a href="#RESOLUTION">RESOLUTION</a>)</code> returned <code>false</code>.</dd>
</dl>
</li>
</ul>
<a id="isConversionLinear(int...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isConversionLinear</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;isConversionLinear&#8203;(int...&nbsp;targets)</pre>
<div class="block">Indicates whether the <cite>grid to CRS</cite> conversion is linear for all the specified CRS axes.
The conversion from grid coordinates to real world coordinates is often linear for some dimensions,
typically the horizontal ones at indices 0 and 1. But the vertical dimension (usually at index 2)
is often non-linear, for example with data at 0, 5, 10, 100 and 1000 metres.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>targets</code> - indices of CRS axes. This is not necessarily the same than indices of grid axes.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the conversion from grid coordinates to "real world" coordinates is linear
for all the given CRS dimension.</dd>
</dl>
</li>
</ul>
<a id="isDefined(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDefined</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;isDefined&#8203;(int&nbsp;bitmask)</pre>
<div class="block">Returns <code>true</code> if all the parameters specified by the argument are set.
If this method returns <code>true</code>, then invoking the corresponding getter
methods will not throw <a href="IncompleteGridGeometryException.html" title="class in org.apache.sis.coverage.grid"><code>Incomplete­Grid­Geometry­Exception</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bitmask</code> - any combination of <a href="#CRS"><code>CRS</code></a>, <a href="#ENVELOPE"><code>ENVELOPE</code></a>, <a href="#EXTENT"><code>EXTENT</code></a>,
<a href="#GRID_TO_CRS"><code>GRID_TO_CRS</code></a> and <a href="#RESOLUTION"><code>RESOLUTION</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if all specified attributes are defined (i.e. invoking the
corresponding method will not thrown an <a href="IncompleteGridGeometryException.html" title="class in org.apache.sis.coverage.grid"><code>Incomplete­Grid­Geometry­Exception</code></a>).</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Illegal­Argument­Exception</a></code> - if the specified bitmask is not a combination of known masks.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#getCoordinateReferenceSystem()"><code>get­Coordinate­Reference­System()</code></a>,
<a href="#getEnvelope()"><code>get­Envelope()</code></a>,
<a href="#getExtent()"><code>get­Extent()</code></a>,
<a href="#getResolution(boolean)"><code>get­Resolution(boolean)</code></a>,
<a href="#getGridToCRS(org.opengis.referencing.datum.PixelInCell)"><code>get­Grid­To­CRS(Pixel­In­Cell)</code></a></dd>
</dl>
</li>
</ul>
<a id="derive()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>derive</h4>
<pre class="methodSignature">public&nbsp;<a href="GridDerivation.html" title="class in org.apache.sis.coverage.grid">GridDerivation</a>&nbsp;derive()</pre>
<div class="block">Returns an object that can be used for creating a new grid geometry derived from this grid geometry.
<code>Grid­Derivation</code> does not change the state of this <code>Grid­Geometry</code> but instead creates
new instances as needed. Examples of modifications include clipping to a sub-area or applying a sub-sampling.
<div class="note"><b>Example:</b>
for clipping this grid geometry to a sub-area, one can use:
<blockquote><pre>GridGeometry gg = ...;
Envelope areaOfInterest = ...;
gg = gg.<b>derive</b>().<b>rounding</b>(GridRoundingMode.ENCLOSING)
.<b>subgrid</b>(areaOfInterest).<b>build</b>();</pre></blockquote>
</div>
Each <code>Grid­Derivation</code> instance can be used only once and should be used in a single thread.
<code>Grid­Derivation</code> preserves the number of dimensions. For example <a href="GridDerivation.html#slice(org.opengis.geometry.DirectPosition)">slicing</a>
sets the <a href="GridExtent.html#getSize(int)">grid size</a> to 1 in all dimensions specified by a <cite>slice point</cite>,
but does not remove those dimensions from the grid geometry. For dimensionality reduction, see <a href="#reduce(int...)"><code>reduce(int...)</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an object for deriving a grid geometry from <code>this</code>.</dd>
</dl>
</li>
</ul>
<a id="reduce(int...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reduce</h4>
<pre class="methodSignature">public&nbsp;<a href="GridGeometry.html" title="class in org.apache.sis.coverage.grid">GridGeometry</a>&nbsp;reduce&#8203;(int...&nbsp;dimensions)</pre>
<div class="block">Returns a grid geometry that encompass only some dimensions of the grid geometry.
The specified dimensions will be copied into a new grid geometry.
The selection is applied on <a href="#getExtent()">grid extent</a> dimensions;
they are not necessarily the same than the <a href="#getEnvelope()">envelope</a> dimensions.
The given dimensions must be in strictly ascending order without duplicated values.
The number of dimensions of the sub grid geometry will be <code>dimensions​.length</code>.
<p>This method performs a <cite>dimensionality reduction</cite>.
This method can not be used for changing dimension order.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>dimensions</code> - the grid (not CRS) dimensions to select, in strictly increasing order.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the sub-grid geometry, or <code>this</code> if the given array contains all dimensions of this grid geometry.</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">Index­Out­Of­Bounds­Exception</a></code> - if an index is out of bounds.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="GridExtent.html#getSubspaceDimensions(int)"><code>Grid­Extent​.get­Subspace­Dimensions(int)</code></a>,
<a href="GridExtent.html#reduce(int...)"><code>Grid­Extent​.reduce(int...)</code></a>,
<a href="../../referencing/CRS.html#reduce(org.opengis.referencing.crs.CoordinateReferenceSystem,int...)"><code>CRS​.reduce(Coordinate­Reference­System, int...)</code></a></dd>
</dl>
</li>
</ul>
<a id="hashCode()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;hashCode()</pre>
<div class="block">Returns a hash value for this grid geometry. This value needs not to remain
consistent between different implementations of the same class.</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">hash­Code</a></code>&nbsp;in class&nbsp;<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="equals(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;equals&#8203;(<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>&nbsp;object)</pre>
<div class="block">Compares the specified object with this grid geometry for equality.</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>&nbsp;in class&nbsp;<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.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the given object is equals to this grid geometry.</dd>
</dl>
</li>
</ul>
<a id="toString()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre class="methodSignature">public&nbsp;<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>&nbsp;toString()</pre>
<div class="block">Returns a string representation of this grid geometry.
The returned string is implementation dependent and may change in any future version.
Current implementation is equivalent to a call to <a href="#toTree(java.util.Locale,int)"><code>to­Tree(Locale, int)</code></a> with
at least <a href="#EXTENT"><code>EXTENT</code></a>, <a href="#ENVELOPE"><code>ENVELOPE</code></a> and <a href="#CRS"><code>CRS</code></a> flags.
Whether more flags are present or not is unspecified.</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#toString()" title="class or interface in java.lang" class="externalLink">to­String</a></code>&nbsp;in class&nbsp;<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="toTree(java.util.Locale,int)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toTree</h4>
<pre class="methodSignature"><a href="../../util/Debug.html" title="annotation in org.apache.sis.util">@Debug</a>
public&nbsp;<a href="../../util/collection/TreeTable.html" title="interface in org.apache.sis.util.collection">TreeTable</a>&nbsp;toTree&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util" class="externalLink">Locale</a>&nbsp;locale,
int&nbsp;bitmask)</pre>
<div class="block">Returns a tree representation of some elements of this grid geometry.
The tree representation is for debugging purpose only and may change
in any future SIS version.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>locale</code> - the locale to use for textual labels.</dd>
<dd><code>bitmask</code> - combination of <a href="#EXTENT"><code>EXTENT</code></a>, <a href="#ENVELOPE"><code>ENVELOPE</code></a>, <a href="#CRS"><code>CRS</code></a>, <a href="#GRID_TO_CRS"><code>GRID_TO_CRS</code></a>,
<a href="#RESOLUTION"><code>RESOLUTION</code></a>, <a href="#GEOGRAPHIC_EXTENT"><code>GEOGRAPHIC_EXTENT</code></a> and <a href="#TEMPORAL_EXTENT"><code>TEMPORAL_EXTENT</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a tree representation of the specified elements.</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/GridGeometry.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&nbsp;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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</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 &#169; 2010&#x2013;2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>