| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (11.0.4) on Fri Sep 20 12:10:30 CEST 2019 --> |
| <title>LinearTransformBuilder (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.LinearTransformBuilder class"> |
| <meta name="keywords" content="getSourceDimensions()"> |
| <meta name="keywords" content="getTargetDimensions()"> |
| <meta name="keywords" content="getSourceEnvelope()"> |
| <meta name="keywords" content="getTargetEnvelope()"> |
| <meta name="keywords" content="setControlPoints()"> |
| <meta name="keywords" content="getControlPoints()"> |
| <meta name="keywords" content="setControlPoint()"> |
| <meta name="keywords" content="getControlPoint()"> |
| <meta name="keywords" content="addLinearizers()"> |
| <meta name="keywords" content="create()"> |
| <meta name="keywords" content="linearizer()"> |
| <meta name="keywords" content="correlation()"> |
| <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="LinearTransformBuilder (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}; |
| 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/LinearTransformBuilder.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 LinearTransformBuilder" class="title">Class LinearTransformBuilder</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>LinearTransformBuilder</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <pre>public class <span class="typeNameLabel">LinearTransformBuilder</span> |
| extends <a href="TransformBuilder.html" title="class in org.apache.sis.referencing.operation.builder">TransformBuilder</a></pre> |
| <div class="block">Creates an affine transform which will map approximately the given source positions to the given target positions. |
| In many cases, the <em>source</em> positions are grid indices and the <em>target</em> positions are geographic or |
| projected coordinates, but this is not mandatory. If the source positions are known to be grid indices, |
| then a builder created by the <a href="#%3Cinit%3E(int...)"><code>LinearTransformBuilder(int...)</code></a> constructor will be more efficient. |
| Otherwise a builder created by the <a href="#%3Cinit%3E()"><code>LinearTransformBuilder()</code></a> constructor will be able to handle |
| randomly distributed coordinates. |
| |
| <p>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. |
| The transform coefficients are determined using a <cite>least squares</cite> estimation method, |
| with the assumption that source positions are exact and all the uncertainty is in the target positions.</p> |
| |
| <div class="section">Linearizers</div> |
| Consider the following situation (commonly found with <a href="../../../storage/netcdf/package-summary.html">netCDF files</a>): |
| the <i>sources</i> coordinates are pixel indices and the <i>targets</i> are (longitude, latitude) coordinates, |
| but we suspect that the <i>sources to targets</i> transform is some undetermined map projection, maybe Mercator. |
| A linear approximation between those coordinates will give poor results; the results would be much better if all |
| (longitude, latitude) coordinates were converted to the right projection first. However that map projection may |
| not be known, but we can try to guess it by trials-and-errors using a set of plausible projections. |
| That set can be specified by <a href="#addLinearizers(java.util.Map,int...)"><code>addLinearizers(Map, int...)</code></a>. |
| If the <a href="#create(org.opengis.referencing.operation.MathTransformFactory)"><code>create(MathTransformFactory)</code></a> method finds that one of the specified projections seems a good fit, |
| it will automatically convert all target coordinates to that projection. |
| That selected projection is given by <a href="#linearizer()"><code>linearizer()</code></a>.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.5</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="LocalizationGridBuilder.html" title="class in org.apache.sis.referencing.operation.builder"><code>LocalizationGridBuilder</code></a>, |
| <a href="../transform/LinearTransform.html" title="interface in org.apache.sis.referencing.operation.transform"><code>LinearTransform</code></a>, |
| <a href="../../../math/Line.html" title="class in org.apache.sis.math"><code>Line</code></a>, |
| <a href="../../../math/Plane.html" title="class in org.apache.sis.math"><code>Plane</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()">LinearTransformBuilder</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a new linear transform builder for randomly distributed positions.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(int...)">LinearTransformBuilder</a></span>​(int... gridSize)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a new linear transform builder for source positions distributed on a regular grid.</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... projToGrid)</code></th> |
| <td class="colLast"> |
| <div class="block">Adds transforms to potentially apply on target coordinates before to compute the linear transform.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>double[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#correlation()">correlation</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the Pearson correlation coefficients of the transform created by <a href="#create(org.opengis.referencing.operation.MathTransformFactory)"><code>create(…)</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i2" 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="#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 linear transform approximation from the source positions to the target positions.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>double[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getControlPoint(int%5B%5D)">getControlPoint</a></span>​(int[] source)</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="i4" class="altColor"> |
| <td class="colFirst"><code><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="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/DirectPosition.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">DirectPosition</a>,​<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/DirectPosition.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">DirectPosition</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getControlPoints()">getControlPoints</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns all control points as a map.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSourceDimensions()">getSourceDimensions</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the number of dimensions in source positions.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSourceEnvelope()">getSourceEnvelope</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the envelope of source points (<em>keys</em> of the map returned by <a href="#getControlPoints()"><code>getControlPoints()</code></a>).</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTargetDimensions()">getTargetDimensions</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the number of dimensions in target positions.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTargetEnvelope()">getTargetEnvelope</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the envelope of target points (<em>values</em> of the map returned by <a href="#getControlPoints()"><code>getControlPoints()</code></a>).</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html?is-external=true" title="class or interface in java.util" class="externalLink">Optional</a><<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="#linearizer()">linearizer</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">If target coordinates have been projected to another space, returns that projection.</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%5B%5D,double%5B%5D)">setControlPoint</a></span>​(int[] source, |
| 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(java.util.Map)">setControlPoints</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><? extends <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/coordinate/Position.html?is-external=true" title="class or interface in org.opengis.geometry.coordinate" class="externalLink">Position</a>,​? extends <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/coordinate/Position.html?is-external=true" title="class or interface in org.opengis.geometry.coordinate" class="externalLink">Position</a>> sourceToTarget)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets all matching control point pairs, overwriting any previous setting.</div> |
| </td> |
| </tr> |
| <tr id="i12" 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> |
| </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>()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>LinearTransformBuilder</h4> |
| <pre>public LinearTransformBuilder()</pre> |
| <div class="block">Creates a new linear transform builder for randomly distributed positions. |
| |
| <div class="note"><b>Tip:</b> |
| if the source coordinates are grid indices, then |
| the <a href="#%3Cinit%3E(int...)"><code>LinearTransformBuilder(int...)</code></a> constructor will create a more efficient builder. |
| </div></div> |
| </li> |
| </ul> |
| <a id="<init>(int...)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>LinearTransformBuilder</h4> |
| <pre>public LinearTransformBuilder​(int... gridSize)</pre> |
| <div class="block">Creates a new linear transform builder for source positions distributed on a regular grid. |
| This constructor notifies <code>LinearTransformBuilder</code> that coordinate values of all source positions will |
| be integers in the [0 … <code>gridSize[0]</code>-1] range for the first dimension (typically column indices), |
| in the [0 … <code>gridSize[1]</code>-1] range for the second dimension (typically row indices), <i>etc.</i> |
| The dimension of all source positions is the length of the given <code>gridSize</code> array. |
| |
| <p>An empty array is equivalent to invoking the no-argument constructor, |
| i.e. no restriction is put on the source coordinates.</p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>gridSize</code> - the number of integer coordinate values in each grid dimension.</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 a grid size is not strictly positive, or if the product |
| of all values (∏<code>gridSize</code>) is greater than <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true#MAX_VALUE" title="class or interface in java.lang" class="externalLink"><code>Integer.MAX_VALUE</code></a>.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.8</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="getSourceDimensions()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSourceDimensions</h4> |
| <pre class="methodSignature">public int getSourceDimensions()</pre> |
| <div class="block">Returns the number of dimensions in source positions. This is the length of the <code>source</code> array given in argument |
| to <a href="#getControlPoint(int%5B%5D)"><code>get</code></a>/<a href="#setControlPoint(int%5B%5D,double%5B%5D)"><code>setControlPoint(int[], …)</code></a> methods. |
| This is also the number of dimensions of the <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/DirectPosition.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink"><code>DirectPosition</code></a> <em>keys</em> in the <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"><code>Map</code></a> exchanged by |
| <a href="#getControlPoints()"><code>get</code></a>/<a href="#setControlPoints(java.util.Map)"><code>setControlPoints(Map)</code></a> methods.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the dimension of source points.</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 number of source dimensions is not yet known.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.8</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/operation/MathTransform.html?is-external=true#getSourceDimensions()" title="class or interface in org.opengis.referencing.operation" class="externalLink"><code>MathTransform.getSourceDimensions()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getTargetDimensions()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getTargetDimensions</h4> |
| <pre class="methodSignature">public int getTargetDimensions()</pre> |
| <div class="block">Returns the number of dimensions in target positions. This is the length of the <code>target</code> array exchanged by |
| <a href="#getControlPoint(int%5B%5D)"><code>get</code></a>/<a href="#setControlPoint(int%5B%5D,double%5B%5D)"><code>setControlPoint(…, double[])</code></a> methods. |
| This is also the number of dimensions of the <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/DirectPosition.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink"><code>DirectPosition</code></a> <em>values</em> in the <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"><code>Map</code></a> exchanged by |
| <a href="#getControlPoints()"><code>get</code></a>/<a href="#setControlPoints(java.util.Map)"><code>setControlPoints(Map)</code></a> methods.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the dimension of target points.</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 number of target dimensions is not yet known.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.8</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/operation/MathTransform.html?is-external=true#getTargetDimensions()" title="class or interface in org.opengis.referencing.operation" class="externalLink"><code>MathTransform.getTargetDimensions()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getSourceEnvelope()"> |
| <!-- --> |
| </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()</pre> |
| <div class="block">Returns the envelope of source points (<em>keys</em> of the map returned by <a href="#getControlPoints()"><code>getControlPoints()</code></a>). |
| The number of dimensions is equal to <a href="#getSourceDimensions()"><code>getSourceDimensions()</code></a>. |
| This method returns the known minimum and maximum values (inclusive) for each dimension, |
| <strong>not</strong> expanded to encompass full cell surfaces. In other words, 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>. |
| |
| <p>If a grid size was <a href="#%3Cinit%3E(int...)"><code>specified at construction time</code></a>, |
| then those minimums and maximums are inferred from the grid size and are always integer values. |
| Otherwise, the minimums and maximums are extracted from the control points and may be any floating point values. |
| In any cases, the lower and upper values are inclusive.</p></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the envelope of source points (cell centers), inclusive.</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 source points are not yet known.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getTargetEnvelope()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getTargetEnvelope</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> getTargetEnvelope()</pre> |
| <div class="block">Returns the envelope of target points (<em>values</em> of the map returned by <a href="#getControlPoints()"><code>getControlPoints()</code></a>). |
| The number of dimensions is equal to <a href="#getTargetDimensions()"><code>getTargetDimensions()</code></a>. The lower and upper values are inclusive. |
| If a <a href="#linearizer()">linearizer has been applied</a>, then coordinates of |
| the returned envelope are projected by that linearizer.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the envelope of target points.</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 target points are not yet known.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setControlPoints(java.util.Map)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setControlPoints</h4> |
| <pre class="methodSignature">public void setControlPoints​(<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><? extends <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/coordinate/Position.html?is-external=true" title="class or interface in org.opengis.geometry.coordinate" class="externalLink">Position</a>,​? extends <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/coordinate/Position.html?is-external=true" title="class or interface in org.opengis.geometry.coordinate" class="externalLink">Position</a>> sourceToTarget) |
| throws <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">MismatchedDimensionException</a></pre> |
| <div class="block">Sets all matching control point pairs, overwriting any previous setting. The source positions are the keys in |
| the given map, and the target positions are the associated values in the map. The map should not contain two |
| entries with the same source position. Coordinate reference systems are ignored. |
| Null positions are silently ignored. |
| Positions with NaN or infinite coordinates cause an exception to be thrown. |
| |
| <p>All source positions shall have the same number of dimensions (the <cite>source dimension</cite>), |
| and all target positions shall have the same number of dimensions (the <cite>target dimension</cite>). |
| However the source dimension does not need to be the same than the target dimension. |
| Apache SIS currently supports only one- or two-dimensional source positions, |
| together with arbitrary target dimension.</p> |
| |
| <p>If this builder has been created with the <a href="#%3Cinit%3E(int...)"><code>LinearTransformBuilder(int...)</code></a> constructor, |
| then the coordinate values of all source positions shall be integers in the [0 … <code>gridSize[0]</code>-1] |
| range for the first dimension (typically column indices), in the [0 … <code>gridSize[1]</code>-1] range for |
| the second dimension (typically row indices), <i>etc</i>. This constraint does not apply for builders |
| created with the <a href="#%3Cinit%3E()"><code>LinearTransformBuilder()</code></a> constructor.</p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>sourceToTarget</code> - a map of source positions to target positions. |
| Source positions are assumed precise and target positions are 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 given positions contain NaN or infinite coordinate values.</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 this builder has been <a href="#%3Cinit%3E(int...)">created for a grid</a> but some source coordinates are not indices in that grid.</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 some positions do not have the expected number of dimensions.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.8</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getControlPoints()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getControlPoints</h4> |
| <pre class="methodSignature">public <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="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/DirectPosition.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">DirectPosition</a>,​<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/DirectPosition.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">DirectPosition</a>> getControlPoints()</pre> |
| <div class="block">Returns all control points as a map. Values are source coordinates and keys are target coordinates. |
| The map is unmodifiable and is guaranteed to contain only non-null keys and values. |
| The map is a view: changes in this builder are immediately reflected in the returned map. |
| |
| <p>If <a href="#linearizer()"><code>linearizer()</code></a> returns a non-empty value, |
| then the values in the returned map are projected using that linearizer. |
| This may happen only after <a href="#create(org.opengis.referencing.operation.MathTransformFactory)"><code>create(…)</code></a> has been invoked.</p></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>all control points in this builder.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setControlPoint(int[],double[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setControlPoint</h4> |
| <pre class="methodSignature">public void setControlPoint​(int[] source, |
| 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. |
| |
| <div class="note"><b>Performance note:</b> |
| current implementation is efficient for builders <a href="#%3Cinit%3E(int...)">created for a grid</a> |
| but inefficient for builders <a href="#%3Cinit%3E()">created for randomly distributed points</a>. |
| In the later case, the <a href="#setControlPoints(java.util.Map)"><code>setControlPoints(Map)</code></a> method is a more efficient alternative.</div></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>source</code> - the source coordinates. If this builder has been created with the <a href="#%3Cinit%3E(int...)"><code>LinearTransformBuilder(int...)</code></a> constructor, |
| then for every index <var>i</var> the <code>source[i]</code> value shall be in the [0 … <code>gridSize[i]</code>-1] range inclusive. |
| If this builder has been created with the <a href="#%3Cinit%3E()"><code>LinearTransformBuilder()</code></a> constructor, then no constraint apply.</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 this builder has been <a href="#%3Cinit%3E(int...)">created for a grid</a> |
| but some source coordinates are out of index range, or if <code>target</code> contains NaN of infinite numbers.</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 source or target position does not have the expected number of dimensions.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.8</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getControlPoint(int[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getControlPoint</h4> |
| <pre class="methodSignature">public double[] getControlPoint​(int[] source)</pre> |
| <div class="block">Returns a single target coordinate for the given source coordinate, or <code>null</code> if none. |
| This method can be used for retrieving points set by previous calls to |
| <a href="#setControlPoint(int%5B%5D,double%5B%5D)"><code>setControlPoint(int[], double[])</code></a> or <a href="#setControlPoints(java.util.Map)"><code>setControlPoints(Map)</code></a>. |
| |
| <p>If <a href="#linearizer()"><code>linearizer()</code></a> returns a non-empty value, then the returned values are projected using that linearizer. |
| This may happen only if this method is invoked after <a href="#create(org.opengis.referencing.operation.MathTransformFactory)"><code>create(…)</code></a>.</p> |
| |
| <div class="note"><b>Performance note:</b> |
| current implementation is efficient for builders <a href="#%3Cinit%3E(int...)">created for a grid</a> |
| but inefficient for builders <a href="#%3Cinit%3E()">created for randomly distributed points</a>.</div></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>source</code> - the source coordinates. If this builder has been created with the <a href="#%3Cinit%3E(int...)"><code>LinearTransformBuilder(int...)</code></a> constructor, |
| then for every index <var>i</var> the <code>source[i]</code> value shall be in the [0 … <code>gridSize[i]</code>-1] range inclusive. |
| If this builder has been created with the <a href="#%3Cinit%3E()"><code>LinearTransformBuilder()</code></a> constructor, then no constraint apply.</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 this builder has been <a href="#%3Cinit%3E(int...)">created for a grid</a> |
| but some source coordinates are out of index 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 source position does not have the expected number of dimensions.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.8</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... projToGrid)</pre> |
| <div class="block">Adds transforms to potentially apply on target coordinates before to compute the linear transform. |
| This method can be invoked if one suspects that the <cite>source to target</cite> transform may be |
| more linear when the target is another space than the current space of <a href="#getTargetEnvelope()">target coordinates</a>. 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 |
| <a href="#correlation()">correlation</a> 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 <a href="#getTargetEnvelope()">target coordinates</a> to other spaces where <cite>sources to new targets</cite> transforms may be more linear. |
| Keys in the map are arbitrary identifiers used in <a href="#toString()"><code>toString()</code></a> for debugging purpose. |
| Values in the map are non-<a href="../transform/LinearTransform.html" title="interface in org.apache.sis.referencing.operation.transform"><code>LinearTransform</code></a>s (linear transforms are not forbidden, but are useless for this process).</p> |
| |
| <p>The <code>projToGrid</code> argument maps <code>projections</code> dimensions to this builder target dimensions. |
| For example if <code>projToGrid</code> array is <code>{2,1}</code>, then dimensions 0 and 1 of given <code>projections</code> |
| (both source and target dimensions) will map to dimensions 2 and 1 of this builder target dimensions, respectively. |
| The <code>projToGrid</code> argument can be omitted or null, in which {0, 1, 2 … <a href="#getTargetDimensions()"><code>getTargetDimensions()</code></a> - 1} is assumed. |
| All given <code>projections</code> shall have a number of source and target dimensions equals to the length of the given or assumed |
| <code>projToGrid</code> array. It is possible to invoke this method many times with different <code>projToGrid</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>projToGrid</code> - the target dimensions to project, or null or omitted for projecting all target dimensions.</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="#linearizer()"><code>linearizer()</code></a>, |
| <a href="#correlation()"><code>correlation()</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="../transform/LinearTransform.html" title="interface in org.apache.sis.referencing.operation.transform">LinearTransform</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 linear transform approximation from the source positions to the target positions. |
| This method assumes that source positions are precise and that all uncertainty is in the target positions. |
| If <a href="#addLinearizers(java.util.Map,int...)">linearizers have been specified</a>, then this method may project all target |
| coordinates using one of those linearizers in order to get a more linear transform. |
| If such projection is applied, then <a href="#linearizer()"><code>linearizer()</code></a> will return a non-empty value after this method call. |
| |
| <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 fitted linear transform.</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 source or target points have not be specified.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.8</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="linearizer()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>linearizer</h4> |
| <pre class="methodSignature">public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html?is-external=true" title="class or interface in java.util" class="externalLink">Optional</a><<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>> linearizer()</pre> |
| <div class="block">If target coordinates have been projected to another space, returns that projection. |
| This method returns a non-empty value only if all the following conditions are met: |
| |
| <ol> |
| <li><a href="#addLinearizers(java.util.Map,int...)"><code>addLinearizers(Map, int...)</code></a> has been invoked.</li> |
| <li><a href="#create(org.opengis.referencing.operation.MathTransformFactory)"><code>create(MathTransformFactory)</code></a> has been invoked.</li> |
| <li>The <code>create(…)</code> method at step 2 found that projecting target coordinates using |
| one of the linearizers specified at step 1 results in a more linear transform.</li> |
| </ol> |
| |
| If this method returns a non-empty value, then the envelope returned by <a href="#getTargetEnvelope()"><code>getTargetEnvelope()</code></a> |
| and all control points returned by <a href="#getControlPoint(int%5B%5D)"><code>getControlPoint(int[])</code></a> are projected by this transform. |
| The returned transform includes axes swapping specified by the <code>dimensions</code> argument given to |
| <code><a href="#addLinearizers(java.util.Map,int...)">addLinearizers</a>(…, dimensions)</code>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the projection applied on target coordinates before to compute a linear transform.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="correlation()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>correlation</h4> |
| <pre class="methodSignature">public double[] correlation()</pre> |
| <div class="block">Returns the Pearson correlation coefficients of the transform created by <a href="#create(org.opengis.referencing.operation.MathTransformFactory)"><code>create(…)</code></a>. |
| The closer those coefficients are to +1 or -1, the better the fit. |
| This method returns <code>null</code> if <code>create(…)</code> has not yet been invoked. |
| If non-null, the array length is equal to the number of target dimensions.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>estimation of Pearson correlation coefficients for each target dimension, |
| or <code>null</code> if <code>create(…)</code> has not been invoked yet.</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. |
| Current implementation shows the following information: |
| |
| <ul> |
| <li>Number of points.</li> |
| <li>Linearizers and their correlation coefficients (if available).</li> |
| <li>The linear transform (if already computed).</li> |
| </ul> |
| |
| The string representation may change in any future version.</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> |
| </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/LinearTransformBuilder.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> |