blob: 54b75b3b2012f945b2f5674542bfa49e8d352c99 [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>LocalizationGridBuilder (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.referencing.operation.builder.LocalizationGridBuilder class">
<meta name="keywords" content="setDesiredPrecision()">
<meta name="keywords" content="getDesiredPrecision()">
<meta name="keywords" content="setSourceToGrid()">
<meta name="keywords" content="getSourceToGrid()">
<meta name="keywords" content="getSourceEnvelope()">
<meta name="keywords" content="setControlPoints()">
<meta name="keywords" content="setControlPoint()">
<meta name="keywords" content="getControlPoint()">
<meta name="keywords" content="getRow()">
<meta name="keywords" content="getColumn()">
<meta name="keywords" content="resolveWraparoundAxis()">
<meta name="keywords" content="addLinearizers()">
<meta name="keywords" content="create()">
<meta name="keywords" content="error()">
<meta name="keywords" content="toString()">
<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="LocalizationGridBuilder (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/LocalizationGridBuilder.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>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<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.referencing.operation.builder</a></div>
<h2 title="Class LocalizationGridBuilder" class="title">Class LocalizationGridBuilder</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="TransformBuilder.html" title="class in org.apache.sis.referencing.operation.builder">TransformBuilder</a></li>
<li>
<ul class="inheritance">
<li>LocalizationGridBuilder</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public class <span class="typeNameLabel">LocalizationGridBuilder</span>
extends <a href="TransformBuilder.html" title="class in org.apache.sis.referencing.operation.builder">TransformBuilder</a></pre>
<div class="block">Creates an "almost linear" transform mapping the given source points to the given target points.
The transform is backed by a <cite>grid of localization</cite>, a two-dimensional array of coordinate points.
Grid size is <code>width</code> × <code>height</code> and input coordinates are (<var>i</var>,<var>j</var>) indices in the grid,
where <var>i</var> must be in the [0…<code>width</code>-1] range and <var>j</var> in the [0…<code>height</code>-1] range inclusive.
Output coordinates are the values stored in the grid of localization at the specified index.
After a <code>Localization­Grid­Builder</code> instance has been fully populated (i.e. real world coordinates have been
specified for all grid cells), a transformation from grid coordinates to "real world" coordinates can be obtained
with the <a href="#create(org.opengis.referencing.operation.MathTransformFactory)"><code>create(Math­Transform­Factory)</code></a> method. If this transform is close enough to an affine transform,
then an instance of <a href="../transform/LinearTransform.html" title="interface in org.apache.sis.referencing.operation.transform"><code>Linear­Transform</code></a> is returned.
Otherwise, a transform backed by the localization grid is returned.
<p>This builder performs the following steps:</p>
<ol>
<li>Compute a linear approximation of the transformation using <a href="LinearTransformBuilder.html" title="class in org.apache.sis.referencing.operation.builder"><code>Linear­Transform­Builder</code></a>.</li>
<li>Compute <a href="../../datum/DatumShiftGrid.html" title="class in org.apache.sis.referencing.datum"><code>Datum­Shift­Grid</code></a> with the residuals.</li>
<li>Create a <a href="../transform/InterpolatedTransform.html" title="class in org.apache.sis.referencing.operation.transform"><code>Interpolated­Transform</code></a> with the above shift grid.</li>
<li>If a <a href="LinearTransformBuilder.html#linearizer()">linearizer has been applied</a>,
concatenate the inverse transform of that linearizer.</li>
</ol>
Builders are not thread-safe. Builders can be used only once;
points can not be added or modified after <a href="#create(org.opengis.referencing.operation.MathTransformFactory)"><code>create(Math­Transform­Factory)</code></a> has been invoked.
<div class="section">Linearizers</div>
If the localization grid is not close enough to a linear transform, <a href="../transform/InterpolatedTransform.html" title="class in org.apache.sis.referencing.operation.transform"><code>Interpolated­Transform</code></a> may not converge.
To improve the speed and reliability of the transform, a non-linear step can be <a href="#addLinearizers(java.util.Map,int...)">specified</a>.
Many candidates can be specified in case the exact form of that non-linear step is unknown;
<code>Localization­Grid­Builder</code> will select the non-linear step that provides the best improvement, if any.
See the <cite>Linearizers</cite> section in <a href="LinearTransformBuilder.html" title="class in org.apache.sis.referencing.operation.builder"><code>Linear­Transform­Builder</code></a> for more discussion.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.8</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../transform/InterpolatedTransform.html" title="class in org.apache.sis.referencing.operation.transform"><code>Interpolated­Transform</code></a>,
<a href="../transform/LinearTransform.html" title="interface in org.apache.sis.referencing.operation.transform"><code>Linear­Transform</code></a>,
<a href="../../datum/DatumShiftGrid.html" title="class in org.apache.sis.referencing.datum"><code>Datum­Shift­Grid</code></a></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">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(int,int)">LocalizationGridBuilder</a></span>&#8203;(int&nbsp;width,
int&nbsp;height)</code></th>
<td class="colLast">
<div class="block">Creates a new, initially empty, builder for a localization grid of the given size.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.sis.math.Vector,org.apache.sis.math.Vector)">LocalizationGridBuilder</a></span>&#8203;(<a href="../../../math/Vector.html" title="class in org.apache.sis.math">Vector</a>&nbsp;sourceX,
<a href="../../../math/Vector.html" title="class in org.apache.sis.math">Vector</a>&nbsp;sourceY)</code></th>
<td class="colLast">
<div class="block">Creates a new, initially empty, builder for a localization grid of a size inferred from the given points.</div>
</td>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.sis.referencing.operation.builder.LinearTransformBuilder)">LocalizationGridBuilder</a></span>&#8203;(<a href="LinearTransformBuilder.html" title="class in org.apache.sis.referencing.operation.builder">LinearTransformBuilder</a>&nbsp;localizations)</code></th>
<td class="colLast">
<div class="block">Creates a new builder for a localization grid inferred from the given provider of control points.</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>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addLinearizers(java.util.Map,int...)">addLinearizers</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a>&lt;<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>,&#8203;<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>&gt;&nbsp;projections,
int...&nbsp;dimensions)</code></th>
<td class="colLast">
<div class="block">Adds transforms to potentially apply on target coordinates before to compute the transform.</div>
</td>
</tr>
<tr id="i1" 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="#create(org.opengis.referencing.operation.MathTransformFactory)">create</a></span>&#8203;(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/operation/MathTransformFactory.html?is-external=true" title="class or interface in org.opengis.referencing.operation" class="externalLink">MathTransformFactory</a>&nbsp;factory)</code></th>
<td class="colLast">
<div class="block">Creates a transform from the source points to the target points.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../math/Statistics.html" title="class in org.apache.sis.math">Statistics</a>[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#error(org.opengis.referencing.operation.MathTransform)">error</a></span>&#8203;(<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;mt)</code></th>
<td class="colLast">
<div class="block">Returns statistics of differences between values calculated by the given transform and actual values.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../math/Vector.html" title="class in org.apache.sis.math">Vector</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getColumn(int,int)">getColumn</a></span>&#8203;(int&nbsp;dimension,
int&nbsp;column)</code></th>
<td class="colLast">
<div class="block">Returns a column of coordinate values in the given dimension.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>double[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getControlPoint(int,int)">getControlPoint</a></span>&#8203;(int&nbsp;gridX,
int&nbsp;gridY)</code></th>
<td class="colLast">
<div class="block">Returns a single target coordinate for the given source coordinate, or <code>null</code> if none.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDesiredPrecision()">getDesiredPrecision</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the desired precision of <em>inverse</em> transformations, in units of source coordinates.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="../../../math/Vector.html" title="class in org.apache.sis.math">Vector</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRow(int,int)">getRow</a></span>&#8203;(int&nbsp;dimension,
int&nbsp;row)</code></th>
<td class="colLast">
<div class="block">Returns a row of coordinate values in the given dimension.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<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="#getSourceEnvelope(boolean)">getSourceEnvelope</a></span>&#8203;(boolean&nbsp;fullArea)</code></th>
<td class="colLast">
<div class="block">Returns the envelope of source coordinates.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="../transform/LinearTransform.html" title="interface in org.apache.sis.referencing.operation.transform">LinearTransform</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSourceToGrid()">getSourceToGrid</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the current relationship between "real-world" source coordinates and grid coordinates.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="../../../measure/NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang" class="externalLink">Double</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resolveWraparoundAxis(int,int,double)">resolveWraparoundAxis</a></span>&#8203;(int&nbsp;dimension,
int&nbsp;direction,
double&nbsp;period)</code></th>
<td class="colLast">
<div class="block">Tries to remove discontinuities in coordinates values caused by anti-meridian crossing.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setControlPoint(int,int,double...)">setControlPoint</a></span>&#8203;(int&nbsp;gridX,
int&nbsp;gridY,
double...&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Sets a single matching control point pair.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setControlPoints(org.apache.sis.math.Vector...)">setControlPoints</a></span>&#8203;(<a href="../../../math/Vector.html" title="class in org.apache.sis.math">Vector</a>...&nbsp;coordinates)</code></th>
<td class="colLast">
<div class="block">Sets all control points.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDesiredPrecision(double)">setDesiredPrecision</a></span>&#8203;(double&nbsp;precision)</code></th>
<td class="colLast">
<div class="block">Sets the desired precision of <em>inverse</em> transformations, in units of source coordinates.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSourceToGrid(org.apache.sis.referencing.operation.transform.LinearTransform)">setSourceToGrid</a></span>&#8203;(<a href="../transform/LinearTransform.html" title="interface in org.apache.sis.referencing.operation.transform">LinearTransform</a>&nbsp;sourceToGrid)</code></th>
<td class="colLast">
<div class="block">Defines relationship between "real-world" source coordinates and grid coordinates.</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 builder for debugging purpose.</div>
</td>
</tr>
<tr id="i15" 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(java.util.Locale)">toString</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)</code></th>
<td class="colLast">
<div class="block">Returns a string representation of this builder in the given locale.</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#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</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#hashCode()" title="class or interface in java.lang" class="externalLink">hash­Code</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">
<!-- ========= 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;(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LocalizationGridBuilder</h4>
<pre>public&nbsp;LocalizationGridBuilder&#8203;(int&nbsp;width,
int&nbsp;height)</pre>
<div class="block">Creates a new, initially empty, builder for a localization grid of the given size.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>width</code> - the number of columns in the grid of target positions.</dd>
<dd><code>height</code> - the number of rows in the grid of target positions.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(org.apache.sis.math.Vector,org.apache.sis.math.Vector)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LocalizationGridBuilder</h4>
<pre>public&nbsp;LocalizationGridBuilder&#8203;(<a href="../../../math/Vector.html" title="class in org.apache.sis.math">Vector</a>&nbsp;sourceX,
<a href="../../../math/Vector.html" title="class in org.apache.sis.math">Vector</a>&nbsp;sourceY)</pre>
<div class="block">Creates a new, initially empty, builder for a localization grid of a size inferred from the given points.
This constructor uses the given vectors for computing a grid size and the following initial conversion:
<blockquote>(<code>source­X</code>, <code>source­Y</code>) → (<code>grid­X</code>, <code>grid­Y</code>)</blockquote>
Above conversion can be obtained by <a href="#getSourceToGrid()"><code>get­Source­To­Grid()</code></a>.
<p>Values in the given vectors should be integers, but this constructor is tolerant to non-integer values
if they have a constant offset (typically 0.5) relative to integer values. The two vectors do not need to
have the same length (i.e. <code>source­X[i]</code> are not necessarily related to <code>source­Y[i]</code>).</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>source­X</code> - all possible <var>x</var> inputs before conversion to grid coordinates.</dd>
<dd><code>source­Y</code> - all possible <var>y</var> inputs before conversion to grid coordinates.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Arithmetic­Exception</a></code> - if this constructor can not infer a reasonable grid size from the given vectors.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(org.apache.sis.referencing.operation.builder.LinearTransformBuilder)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>LocalizationGridBuilder</h4>
<pre>public&nbsp;LocalizationGridBuilder&#8203;(<a href="LinearTransformBuilder.html" title="class in org.apache.sis.referencing.operation.builder">LinearTransformBuilder</a>&nbsp;localizations)</pre>
<div class="block">Creates a new builder for a localization grid inferred from the given provider of control points.
The <a href="LinearTransformBuilder.html#getSourceDimensions()">number of source dimensions</a> in the
given <code>localizations</code> argument shall be 2. The <code>localization</code> can be used in two ways:
<ul class="verbose">
<li>If the <code>localizations</code> instance has been
<a href="LinearTransformBuilder.html#%3Cinit%3E(int...)">created with a fixed grid size</a>,
then that instance is used as-is — it is not copied. It is okay to specify an empty instance and
to provide control points later by calls to <a href="#setControlPoint(int,int,double...)"><code>set­Control­Point(int, int, double...)</code></a>.</li>
<li>If the <code>localizations</code> instance has been
<a href="LinearTransformBuilder.html#%3Cinit%3E()">created for a grid of unknown size</a>,
then this constructor tries to infer a grid size by inspection of the control points present in
<code>localizations</code> at the time this constructor is invoked. Changes in <code>localizations</code>
after construction will not be reflected in this new builder.</li>
</ul></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>localizations</code> - the provider of control points for which to create a localization grid.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Arithmetic­Exception</a></code> - if this constructor can not infer a reasonable grid size from the given localizations.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</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="setDesiredPrecision(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDesiredPrecision</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setDesiredPrecision&#8203;(double&nbsp;precision)</pre>
<div class="block">Sets the desired precision of <em>inverse</em> transformations, in units of source coordinates.
If a conversion from "real world" to grid coordinates <a href="#setSourceToGrid(org.apache.sis.referencing.operation.transform.LinearTransform)">has been specified</a>,
then the given precision is in "real world" units. Otherwise the precision is in units of grid cells
(i.e. a value of 1 is the size of one grid cell).
<div class="note"><b>Note:</b>
there is no method for setting the desired target precision because forward transformations <em>precision</em>
(not to be confused with <em>accuracy</em>) are limited only by rounding errors. Of course the accuracy of both
forward and inverse transformations still limited by the accuracy of given control points and the grid resolution.
</div></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>precision</code> - desired precision of the results of inverse transformations.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Illegal­State­Exception</a></code> - if <a href="#create(org.opengis.referencing.operation.MathTransformFactory)"><code>create(…)</code></a> has already been invoked.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../datum/DatumShiftGrid.html#getCellPrecision()"><code>Datum­Shift­Grid​.get­Cell­Precision()</code></a></dd>
</dl>
</li>
</ul>
<a id="getDesiredPrecision()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDesiredPrecision</h4>
<pre class="methodSignature">public&nbsp;double&nbsp;getDesiredPrecision()</pre>
<div class="block">Returns the desired precision of <em>inverse</em> transformations, in units of source coordinates.
This is the precision sets by the last call to <a href="#setDesiredPrecision(double)"><code>set­Desired­Precision(double)</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>desired precision of the results of inverse transformations.</dd>
</dl>
</li>
</ul>
<a id="setSourceToGrid(org.apache.sis.referencing.operation.transform.LinearTransform)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSourceToGrid</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setSourceToGrid&#8203;(<a href="../transform/LinearTransform.html" title="interface in org.apache.sis.referencing.operation.transform">LinearTransform</a>&nbsp;sourceToGrid)</pre>
<div class="block">Defines relationship between "real-world" source coordinates and grid coordinates.
The given transform is usually two-dimensional, in which case conversions from (<var>x</var>,<var>y</var>)
source coordinates to (<code>grid­X</code>, <code>grid­Y</code>) indices can be done with the following formulas:
<ul>
<li><var>gridX</var> = (<var>x</var> - <var>x₀</var>) / <var>Δx</var></li>
<li><var>gridY</var> = (<var>y</var> - <var>y₀</var>) / <var>Δy</var></li>
</ul>
where:
<ul>
<li>(<var>x₀</var>, <var>y₀</var>) is the coordinate of the center of the cell at grid index (0,0).</li>
<li><var>Δx</var> and <var>Δy</var> are the distances between two cells on the <var>x</var> and <var>y</var>
axes respectively, in the same unit of measurement than the one documented in the
<a href="#setDesiredPrecision(double)"><code>set­Desired­Precision(double)</code></a> method.</li>
</ul>
The <code>coordinate­To­Grid</code> transform for the above formulas can be represented by the following matrix:
<blockquote><pre>┌ ┐
│ 1/Δx 0 -<var>x</var>₀/Δx │
│ 0 1/Δy -<var>y</var>₀/Δy │
│ 0 0 1 │
└ ┘</pre></blockquote>
If this method is never invoked, then the default conversion is identity.
If a <a href="#setDesiredPrecision(double)">desired precision</a> has been specified before this method call,
it is caller's responsibility to convert that value to new source units if needed.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>source­To­Grid</code> - conversion from the "real world" source coordinates to grid indices including fractional parts.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Illegal­State­Exception</a></code> - if <a href="#create(org.opengis.referencing.operation.MathTransformFactory)"><code>create(…)</code></a> has already been invoked.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../datum/DatumShiftGrid.html#getCoordinateToGrid()"><code>Datum­Shift­Grid​.get­Coordinate­To­Grid()</code></a></dd>
</dl>
</li>
</ul>
<a id="getSourceToGrid()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSourceToGrid</h4>
<pre class="methodSignature">public&nbsp;<a href="../transform/LinearTransform.html" title="interface in org.apache.sis.referencing.operation.transform">LinearTransform</a>&nbsp;getSourceToGrid()</pre>
<div class="block">Returns the current relationship between "real-world" source coordinates and grid coordinates.
This is the value set by the last call to <a href="#setSourceToGrid(org.apache.sis.referencing.operation.transform.LinearTransform)"><code>set­Source­To­Grid(Linear­Transform)</code></a>.
If that setter method has never been invoked, then this is an automatically computed transform
if the grid coordinates <a href="#%3Cinit%3E(org.apache.sis.math.Vector,org.apache.sis.math.Vector)">have been specified
to the constructor</a>, or the identity transform <a href="#%3Cinit%3E(int,int)">otherwise</a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the current relationship between "real-world" source coordinates and grid coordinates.</dd>
</dl>
</li>
</ul>
<a id="getSourceEnvelope(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSourceEnvelope</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;getSourceEnvelope&#8203;(boolean&nbsp;fullArea)
throws <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/operation/TransformException.html?is-external=true" title="class or interface in org.opengis.referencing.operation" class="externalLink">TransformException</a></pre>
<div class="block">Returns the envelope of source coordinates. The <code>full­Area</code> argument control whether
the returned envelope shall encompass full surface of every cells or only their centers:
<ul>
<li>If <code>true</code>, then the returned envelope encompasses full cell surfaces,
from lower border to upper border. In other words, the returned envelope encompasses all
<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 corners</a>.</li>
<li>If <code>false</code>, then the returned envelope encompasses only
<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 centers</a>, inclusive.</li>
</ul>
This is the envelope of the grid domain (i.e. the ranges of valid <code>grid­X</code> and <code>grid­Y</code> argument
values in calls to <code>get/set­Control­Point(…)</code> methods) transformed as below:
<ol>
<li>expanded by ½ cell on each side if <code>full­Area</code> is <code>true</code></li>
<li>transformed by the inverse of <a href="#getSourceToGrid()">source to grid</a> transform.</li>
</ol></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>full­Area</code> - whether the the envelope shall encompass the full cell surfaces instead than only their centers.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the envelope of grid points, from lower corner to upper corner.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Illegal­State­Exception</a></code> - if the grid points are not yet known.</dd>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/operation/TransformException.html?is-external=true" title="class or interface in org.opengis.referencing.operation" class="externalLink">Transform­Exception</a></code> - if the envelope can not be calculated.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="LinearTransformBuilder.html#getSourceEnvelope()"><code>Linear­Transform­Builder​.get­Source­Envelope()</code></a></dd>
</dl>
</li>
</ul>
<a id="setControlPoints(org.apache.sis.math.Vector...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setControlPoints</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setControlPoints&#8203;(<a href="../../../math/Vector.html" title="class in org.apache.sis.math">Vector</a>...&nbsp;coordinates)</pre>
<div class="block">Sets all control points. The length of given vectors must be equal to the total number of cells in the grid.
The first vector provides the <var>x</var> coordinates; the second vector provides the <var>y</var> coordinates,
<i>etc.</i>. Coordinates are stored in row-major order (column index varies faster, followed by row index).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>coordinates</code> - coordinates in each target dimensions, stored in row-major order.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Illegal­State­Exception</a></code> - if <a href="#create(org.opengis.referencing.operation.MathTransformFactory)"><code>create(…)</code></a> has already been invoked.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
</dl>
</li>
</ul>
<a id="setControlPoint(int,int,double...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setControlPoint</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setControlPoint&#8203;(int&nbsp;gridX,
int&nbsp;gridY,
double...&nbsp;target)</pre>
<div class="block">Sets a single matching control point pair. Source position is assumed precise and target position is assumed uncertain.
If the given source position was already associated with another target position, then the old target position is discarded.
<p>If a <a href="#getSourceToGrid()">source to grid</a> conversion exists, it shall have been applied
by the caller for computing the (<code>grid­X</code>, <code>grid­Y</code>) coordinates given to this method.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>grid­X</code> - the column index in the grid where to store the given target position.</dd>
<dd><code>grid­Y</code> - the row index in the grid where to store the given target position.</dd>
<dd><code>target</code> - the target coordinates, assumed uncertain.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Illegal­State­Exception</a></code> - if <a href="#create(org.opengis.referencing.operation.MathTransformFactory)"><code>create(…)</code></a> has already been invoked.</dd>
<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 <code>x</code> or <code>y</code> coordinate value is out of grid range.</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 target position does not have the expected number of dimensions.</dd>
</dl>
</li>
</ul>
<a id="getControlPoint(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getControlPoint</h4>
<pre class="methodSignature">public&nbsp;double[]&nbsp;getControlPoint&#8203;(int&nbsp;gridX,
int&nbsp;gridY)</pre>
<div class="block">Returns a single target coordinate for the given source coordinate, or <code>null</code> if none.
If <a href="#addLinearizers(java.util.Map,int...)">linearizers</a> have been specified and <a href="#create(org.opengis.referencing.operation.MathTransformFactory)"><code>create(…)</code></a>
has already been invoked, then the control points may be projected using one of the linearizers.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>grid­X</code> - the column index in the grid where to read the target position.</dd>
<dd><code>grid­Y</code> - the row index in the grid where to read the target position.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the target coordinates associated to the given source, or <code>null</code> if none.</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 <code>x</code> or <code>y</code> coordinate value is out of grid range.</dd>
</dl>
</li>
</ul>
<a id="getRow(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRow</h4>
<pre class="methodSignature">public&nbsp;<a href="../../../math/Vector.html" title="class in org.apache.sis.math">Vector</a>&nbsp;getRow&#8203;(int&nbsp;dimension,
int&nbsp;row)</pre>
<div class="block">Returns a row of coordinate values in the given dimension.
The returned vector is a view; changes in the returned vector will be reflected in this builder.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>dimension</code> - the target dimension for which to get coordinate values.</dd>
<dd><code>row</code> - index of the row to get.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>coordinate values of the specified row in the specified dimension.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
</dl>
</li>
</ul>
<a id="getColumn(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getColumn</h4>
<pre class="methodSignature">public&nbsp;<a href="../../../math/Vector.html" title="class in org.apache.sis.math">Vector</a>&nbsp;getColumn&#8203;(int&nbsp;dimension,
int&nbsp;column)</pre>
<div class="block">Returns a column of coordinate values in the given dimension.
The returned vector is a view; changes in the returned vector will be reflected in this builder.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>dimension</code> - the target dimension for which to get coordinate values.</dd>
<dd><code>column</code> - index of the column to get.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>coordinate values of the specified column in the specified dimension.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
</dl>
</li>
</ul>
<a id="resolveWraparoundAxis(int,int,double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resolveWraparoundAxis</h4>
<pre class="methodSignature">public&nbsp;<a href="../../../measure/NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang" class="externalLink">Double</a>&gt;&nbsp;resolveWraparoundAxis&#8203;(int&nbsp;dimension,
int&nbsp;direction,
double&nbsp;period)</pre>
<div class="block">Tries to remove discontinuities in coordinates values caused by anti-meridian crossing.
This method can be invoked when the localization grid may cross the anti-meridian,
where longitude values may suddenly jump from +180° to -180° or conversely.
This method walks through the coordinate values of the given dimension (typically the longitudes dimension)
in the given direction (grid rows or grid columns).
If a difference greater than <code>period/2</code> (typically 180°) is found between two consecutive values,
then a multiple of <code>period</code> (typically 360°) is added or subtracted in order to make a value as close
as possible from its previous value.
<p>This method needs a direction to be specified:</p>
<ul>
<li>Direction 0 means that each value is compared with the value in the previous column,
except the value in the first column which is compared to the value in previous row.</li>
<li>Direction 1 means that each value is compared with the value in the previous row,
except the value in the first row which is compared to the value in previous column.</li>
</ul>
The recommended value is the direction of most stable values. Typically, longitude values increase with column indices
and are almost constant when increasing row indices. In such case, the recommended direction is 1 for comparing each
value with the value in previous row, since that value should be closer than the value in previous column.
<div class="note"><b>Example:</b>
for a grid of (<var>longitude</var>, <var>latitude</var>) values in decimal degrees where longitude values
vary (increase or decrease) with increasing column indices and latitude values vary (increase or decrease)
with increasing row indices, the the following method should be invoked for protecting the grid against
discontinuities on anti-meridian:
<blockquote><pre>grid.<b>resolveWraparoundAxis</b>(0, 1, 360);</pre></blockquote>
</div></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>dimension</code> - the dimension to process.
This is 0 for longitude dimension in a (<var>longitudes</var>, <var>latitudes</var>) grid.</dd>
<dd><code>direction</code> - the direction to walk through: 0 for columns or 1 for rows.
The recommended direction is the direction of most stable values, typically 1 (rows) for longitudes.</dd>
<dd><code>period</code> - that wraparound range (typically 360° for longitudes). Must be strictly positive.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the range of coordinate values in the specified dimension after correction for wraparound values.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Illegal­State­Exception</a></code> - if <a href="#create(org.opengis.referencing.operation.MathTransformFactory)"><code>create(…)</code></a> has already been invoked.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
</dl>
</li>
</ul>
<a id="addLinearizers(java.util.Map,int...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addLinearizers</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;addLinearizers&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a>&lt;<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>,&#8203;<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>&gt;&nbsp;projections,
int...&nbsp;dimensions)</pre>
<div class="block">Adds transforms to potentially apply on target coordinates before to compute the transform.
This method can be invoked if the departure from a linear transform is too large, resulting
in <a href="../transform/InterpolatedTransform.html" title="class in org.apache.sis.referencing.operation.transform"><code>Interpolated­Transform</code></a> to fail with "no convergence error" messages.
If linearizers have been specified, then the <a href="#create(org.opengis.referencing.operation.MathTransformFactory)"><code>create(Math­Transform­Factory)</code></a> method
will try to apply each transform on target coordinates and check which one results in the
best correlation coefficients. It may be none.
<p>The linearizers are specified as <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>s from current target coordinates
to other spaces where <cite>sources to new targets</cite> transforms may be more linear.
The keys in the map are arbitrary identifiers used in <a href="#toString()"><code>to­String()</code></a> for debugging purpose.
The <code>dimensions</code> argument specifies which target dimensions to project and can be null or omitted
if the projections shall be applied on all target coordinates. It is possible to invoke this method many
times with different <code>dimensions</code> argument values.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>projections</code> - projections from current target coordinates to other spaces which may result in more linear transforms.</dd>
<dd><code>dimensions</code> - the target dimensions to project, or null or omitted for projecting all target dimensions.
If non-null and non-empty, then all transforms in the <code>projections</code> map shall have a
number of source and target dimensions equals to the length of this array.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Illegal­State­Exception</a></code> - if <a href="#create(org.opengis.referencing.operation.MathTransformFactory)"><code>create(…)</code></a> has already been invoked.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="LinearTransformBuilder.html#addLinearizers(java.util.Map,int...)"><code>Linear­Transform­Builder​.add­Linearizers(Map, int...)</code></a></dd>
</dl>
</li>
</ul>
<a id="create(org.opengis.referencing.operation.MathTransformFactory)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>create</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;create&#8203;(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/operation/MathTransformFactory.html?is-external=true" title="class or interface in org.opengis.referencing.operation" class="externalLink">MathTransformFactory</a>&nbsp;factory)
throws <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/FactoryException.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">FactoryException</a></pre>
<div class="block">Creates a transform from the source points to the target points.
This method assumes that source points are precise and all uncertainty is in the target points.
If this transform is close enough to an affine transform, then an instance of <a href="../transform/LinearTransform.html" title="interface in org.apache.sis.referencing.operation.transform"><code>Linear­Transform</code></a> is returned.
<p>If this method is invoked more than once, the previously created transform instance is returned.</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="TransformBuilder.html#create(org.opengis.referencing.operation.MathTransformFactory)">create</a></code>&nbsp;in class&nbsp;<code><a href="TransformBuilder.html" title="class in org.apache.sis.referencing.operation.builder">Transform­Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>factory</code> - the factory to use for creating the transform, or <code>null</code> for the default factory.
The <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/operation/MathTransformFactory.html?is-external=true#createAffineTransform(org.opengis.referencing.operation.Matrix)" title="class or interface in org.opengis.referencing.operation" class="externalLink"><code>Math­Transform­Factory​.create­Affine­Transform(Matrix)</code></a> method of that factory
shall return <a href="../transform/LinearTransform.html" title="interface in org.apache.sis.referencing.operation.transform"><code>Linear­Transform</code></a> instances.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the transform from source to target points.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/FactoryException.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">Factory­Exception</a></code> - if the transform can not be created,
for example because the target points have not be specified.</dd>
</dl>
</li>
</ul>
<a id="error(org.opengis.referencing.operation.MathTransform)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>error</h4>
<pre class="methodSignature">public&nbsp;<a href="../../../math/Statistics.html" title="class in org.apache.sis.math">Statistics</a>[]&nbsp;error&#8203;(<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;mt)
throws <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/operation/NoninvertibleTransformException.html?is-external=true" title="class or interface in org.opengis.referencing.operation" class="externalLink">NoninvertibleTransformException</a></pre>
<div class="block">Returns statistics of differences between values calculated by the given transform and actual values.
The given math transform is typically the transform computed by <a href="#create(org.opengis.referencing.operation.MathTransformFactory)"><code>create(Math­Transform­Factory)</code></a>,
but not necessarily. The returned statistics are:
<ol class="verbose">
<li>One <code>Statistics</code> instance for each target dimension, containing statistics about the differences between
coordinates computed by the given transform and expected coordinates. For each (<var>i</var>,<var>j</var>) indices
in this grid, the indices are transformed by a call to <code>mt​.transform(…)</code> and the result is compared with the
coordinates given by <code><a href="#getControlPoint(int,int)">get­Control­Point</a>(i,j)</code>.
Those statistics are identified by labels like “P → x” and “P → y” where <var>P</var> stands for pixel coordinates.</li>
<li>One <code>Statistics</code> instance for each source dimension, containing statistics about the differences between
coordinates computed by the <em>inverse</em> of the transform and expected coordinates.
For each (<var>x</var>,<var>y</var>) control point in this grid, the points are transformed by a call
to <code>mt​.inverse()​.transform(…)</code> and the result is compared with the pixel indices of that point.
Those statistics are identified by labels like “i ← P′” and “j ← P′” where <var>P′</var> stands for
the control point.</li>
</ol></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mt</code> - the transform to test.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>statistics of difference between computed values and expected values for each target dimension.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/operation/NoninvertibleTransformException.html?is-external=true" title="class or interface in org.opengis.referencing.operation" class="externalLink">Noninvertible­Transform­Exception</a></code> - if an error occurred while inverting a transform.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
</dl>
</li>
</ul>
<a id="toString(java.util.Locale)">
<!-- -->
</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&#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)</pre>
<div class="block">Returns a string representation of this builder in the given locale.
Current implementation shows the following information:
<ul>
<li>Number of points.</li>
<li>Linearizers and their correlation coefficients (if available).</li>
<li>The linear component of the transform.</li>
<li>Error statistics, as documented in the <a href="#error(org.opengis.referencing.operation.MathTransform)"><code>error(Math­Transform)</code></a> method.</li>
</ul>
The string representation may change in any future version.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>locale</code> - the locale for formatting messages and some numbers, or <code>null</code> for the default.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a string representation of this builder.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
</dl>
</li>
</ul>
<a id="toString()">
<!-- -->
</a>
<ul class="blockListLast">
<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 builder for debugging purpose.
The string representation is for debugging purpose and may change in any future version.
The default implementation delegates to <a href="#toString(java.util.Locale)"><code>to­String(Locale)</code></a> with a null locale.</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>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a string representation of this builder.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</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/LocalizationGridBuilder.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>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<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>