| <!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 Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <main role="main"> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.apache.sis.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>LocalizationGridBuilder</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(MathTransformFactory)</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>LinearTransform</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>LinearTransformBuilder</code></a>.</li> |
| <li>Compute <a href="../../datum/DatumShiftGrid.html" title="class in org.apache.sis.referencing.datum"><code>DatumShiftGrid</code></a> with the residuals.</li> |
| <li>Create a <a href="../transform/InterpolatedTransform.html" title="class in org.apache.sis.referencing.operation.transform"><code>InterpolatedTransform</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(MathTransformFactory)</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>InterpolatedTransform</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>LocalizationGridBuilder</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>LinearTransformBuilder</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>InterpolatedTransform</code></a>, |
| <a href="../transform/LinearTransform.html" title="interface in org.apache.sis.referencing.operation.transform"><code>LinearTransform</code></a>, |
| <a href="../../datum/DatumShiftGrid.html" title="class in org.apache.sis.referencing.datum"><code>DatumShiftGrid</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"> </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>​(int width, |
| int 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>​(<a href="../../../math/Vector.html" title="class in org.apache.sis.math">Vector</a> sourceX, |
| <a href="../../../math/Vector.html" title="class in org.apache.sis.math">Vector</a> 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>​(<a href="LinearTransformBuilder.html" title="class in org.apache.sis.referencing.operation.builder">LinearTransformBuilder</a> 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"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addLinearizers(java.util.Map,int...)">addLinearizers</a></span>​(<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><<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>,​<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>> projections, |
| int... 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>​(<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> 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>​(<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> 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>​(int dimension, |
| int 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>​(int gridX, |
| int 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>​(int dimension, |
| int 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>​(boolean 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><<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>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resolveWraparoundAxis(int,int,double)">resolveWraparoundAxis</a></span>​(int dimension, |
| int direction, |
| double 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>​(int gridX, |
| int gridY, |
| double... 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>​(<a href="../../../math/Vector.html" title="class in org.apache.sis.math">Vector</a>... 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>​(double 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>​(<a href="../transform/LinearTransform.html" title="interface in org.apache.sis.referencing.operation.transform">LinearTransform</a> 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>​(<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> 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 <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">getClass</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">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a id="<init>(int,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>LocalizationGridBuilder</h4> |
| <pre>public LocalizationGridBuilder​(int width, |
| int 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="<init>(org.apache.sis.math.Vector,org.apache.sis.math.Vector)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>LocalizationGridBuilder</h4> |
| <pre>public LocalizationGridBuilder​(<a href="../../../math/Vector.html" title="class in org.apache.sis.math">Vector</a> sourceX, |
| <a href="../../../math/Vector.html" title="class in org.apache.sis.math">Vector</a> 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>sourceX</code>, <code>sourceY</code>) → (<code>gridX</code>, <code>gridY</code>)</blockquote> |
| |
| Above conversion can be obtained by <a href="#getSourceToGrid()"><code>getSourceToGrid()</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>sourceX[i]</code> are not necessarily related to <code>sourceY[i]</code>).</p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>sourceX</code> - all possible <var>x</var> inputs before conversion to grid coordinates.</dd> |
| <dd><code>sourceY</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">ArithmeticException</a></code> - if this constructor can not infer a reasonable grid size from the given vectors.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="<init>(org.apache.sis.referencing.operation.builder.LinearTransformBuilder)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>LocalizationGridBuilder</h4> |
| <pre>public LocalizationGridBuilder​(<a href="LinearTransformBuilder.html" title="class in org.apache.sis.referencing.operation.builder">LinearTransformBuilder</a> 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>setControlPoint(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">ArithmeticException</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 void setDesiredPrecision​(double 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">IllegalStateException</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>DatumShiftGrid.getCellPrecision()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getDesiredPrecision()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getDesiredPrecision</h4> |
| <pre class="methodSignature">public double 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>setDesiredPrecision(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 void setSourceToGrid​(<a href="../transform/LinearTransform.html" title="interface in org.apache.sis.referencing.operation.transform">LinearTransform</a> 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>gridX</code>, <code>gridY</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>setDesiredPrecision(double)</code></a> method.</li> |
| </ul> |
| |
| The <code>coordinateToGrid</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>sourceToGrid</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">IllegalStateException</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>DatumShiftGrid.getCoordinateToGrid()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getSourceToGrid()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSourceToGrid</h4> |
| <pre class="methodSignature">public <a href="../transform/LinearTransform.html" title="interface in org.apache.sis.referencing.operation.transform">LinearTransform</a> 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>setSourceToGrid(LinearTransform)</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 <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> getSourceEnvelope​(boolean 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>fullArea</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>gridX</code> and <code>gridY</code> argument |
| values in calls to <code>get/setControlPoint(…)</code> methods) transformed as below: |
| <ol> |
| <li>expanded by ½ cell on each side if <code>fullArea</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>fullArea</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">IllegalStateException</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">TransformException</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>LinearTransformBuilder.getSourceEnvelope()</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 void setControlPoints​(<a href="../../../math/Vector.html" title="class in org.apache.sis.math">Vector</a>... 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">IllegalStateException</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 void setControlPoint​(int gridX, |
| int gridY, |
| double... 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>gridX</code>, <code>gridY</code>) coordinates given to this method.</p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>gridX</code> - the column index in the grid where to store the given target position.</dd> |
| <dd><code>gridY</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">IllegalStateException</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">IllegalArgumentException</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">MismatchedDimensionException</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 double[] getControlPoint​(int gridX, |
| int 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>gridX</code> - the column index in the grid where to read the target position.</dd> |
| <dd><code>gridY</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">IllegalArgumentException</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 <a href="../../../math/Vector.html" title="class in org.apache.sis.math">Vector</a> getRow​(int dimension, |
| int 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 <a href="../../../math/Vector.html" title="class in org.apache.sis.math">Vector</a> getColumn​(int dimension, |
| int 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 <a href="../../../measure/NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><<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>> resolveWraparoundAxis​(int dimension, |
| int direction, |
| double 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">IllegalStateException</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 void addLinearizers​(<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><<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>,​<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>> projections, |
| int... 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>InterpolatedTransform</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(MathTransformFactory)</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>MathTransform</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>toString()</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">IllegalStateException</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>LinearTransformBuilder.addLinearizers(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 <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> create​(<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> 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>LinearTransform</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> in class <code><a href="TransformBuilder.html" title="class in org.apache.sis.referencing.operation.builder">TransformBuilder</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>MathTransformFactory.createAffineTransform(Matrix)</code></a> method of that factory |
| shall return <a href="../transform/LinearTransform.html" title="interface in org.apache.sis.referencing.operation.transform"><code>LinearTransform</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">FactoryException</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 <a href="../../../math/Statistics.html" title="class in org.apache.sis.math">Statistics</a>[] error​(<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> 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(MathTransformFactory)</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)">getControlPoint</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">NoninvertibleTransformException</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 <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> toString​(<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> 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(MathTransform)</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 <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> toString()</pre> |
| <div class="block">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>toString(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">toString</a></code> in class <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></dd> |
| <dt><span class="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 Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 2010–2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |