sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1717746 [1/2] - in /sis/ip-review: NADCON.xhtml rev/07843/NADCON.xhtml rev/09131/NADCON.xhtml rev/10796/NADCON.xhtml rev/20874/NADCON.xhtml
Date Thu, 03 Dec 2015 12:11:46 GMT
Author: desruisseaux
Date: Thu Dec  3 12:11:45 2015
New Revision: 1717746

URL: http://svn.apache.org/viewvc?rev=1717746&view=rev
Log:
Add IP review for NADCON. Applies also indirectly to DatumShiftGridLoader and InterpolatedTransform.

Added:
    sis/ip-review/NADCON.xhtml   (with props)
    sis/ip-review/rev/07843/NADCON.xhtml   (with props)
    sis/ip-review/rev/09131/NADCON.xhtml   (with props)
    sis/ip-review/rev/10796/NADCON.xhtml   (with props)
    sis/ip-review/rev/20874/NADCON.xhtml   (with props)

Added: sis/ip-review/NADCON.xhtml
URL: http://svn.apache.org/viewvc/sis/ip-review/NADCON.xhtml?rev=1717746&view=auto
==============================================================================
--- sis/ip-review/NADCON.xhtml (added)
+++ sis/ip-review/NADCON.xhtml Thu Dec  3 12:11:45 2015
@@ -0,0 +1,77 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta charset="UTF-8"/>
+    <title>NADCON history</title>
+    <style type="text/css" media="all">
+      @import url("./reports.css");
+    </style>
+  </head>
+  <body>
+    <div>
+      <h1>NADCON history</h1>
+  <p>Click on the commit message for inspecting the <code>diff</code> and how the code has been rewritten.</p>
+<p><b>Command line:</b></p>
+<blockquote><code>svn log -r31996:1 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/operation/transform/NADCONTransform.java</code></blockquote>
+<table>
+  <tr>
+    <th>Rev.</th>
+    <th>Date</th>
+    <th>Author</th>
+    <th class="last">Message</th>
+  </tr>
+<tr><td class="rev">30641</td><td>2008-06-12</td><td>acuster</td><td>Copyright headers: lib/referencing, this time with feeling (and the el in Toolkit)</td></tr>
+<tr><td class="rev">30639</td><td>2008-06-12</td><td>acuster</td><td>Copyright headers: cleanup library/referencing</td></tr>
+<tr><td class="rev">30521</td><td>2008-06-05</td><td>acuster</td><td>Copyright: Update referencing headers</td></tr>
+<tr><td class="rev">30258</td><td>2008-05-08</td><td>acuster</td><td>Reshuffle the top level repo: drop uDig, move up trunk, tags, and branches.</td></tr>
+<tr><td class="rev">30257</td><td>2008-05-08</td><td>acuster</td><td>Move trunk/gt/ directory contents up to trunk/ and drop gt</td></tr>
+<tr><td class="rev">29825</td><td>2008-04-07</td><td>desruisseaux</td><td>Added synchronized statements. While the old approach was not exactly the deprecated double-check idiom, it was too close of that. A few unsynchronized blocks still exist which may need to be revisited later.</td></tr>
+<tr><td class="rev">29100</td><td>2008-02-06</td><td>desruisseaux</td><td>Moved LocalizationGrid to builder package for consistency with other builders.</td></tr>
+<tr><td class="rev">28922</td><td>2008-01-24</td><td>acuster</td><td>Bump the (at)since version to 2.5 since WKTParser was cut from 2.4</td></tr>
+<tr><td class="rev">28846</td><td>2008-01-20</td><td>desruisseaux</td><td>Covariant return type for inverse() method in MathTransform1D and MathTransform2D. Also javadoc fixes and Java 5 type safety. Changed ViewType to an enum and initial implementation of GridCoverageViews (not yet connected to GridCoverage2D).</td></tr>
+<tr><td class="rev">28540</td><td>2007-12-29</td><td>acuster</td><td>Hide buttons which are not yet used</td></tr>
+<tr><td class="rev">28520</td><td>2007-12-27</td><td>desruisseaux</td><td>Added @Override annotation for safety.</td></tr>
+<tr><td class="rev">28081</td><td>2007-11-27</td><td>desruisseaux</td><td>Java 5 constructs: replaced some StringBuffer by StringBuilder in order to avoid unecessary synchronisation; rely on auto-boxing in order to give a chance to the JVM to reuse its cached values.</td></tr>
+<tr><td class="rev">24384</td><td>2007-02-14</td><td>desruisseaux</td><td>GEOT-1160: First working implementation of AbstractAuthorityFactory.find(IdentifiedObject). This includes a package-privated AuthorityFactoryProxy class, together with many fix in the code base in order to get CRS.equalsIgnoreCase to work in the ProjectedCRS case.</td></tr>
+<tr><td class="rev">22327</td><td>2006-10-23</td><td>desruisseaux</td><td>GEOT-982: regroup 'module', 'plugin', 'ext' and 'unsupported' in a common directory.</td></tr>
+<tr><td class="rev">22315</td><td>2006-10-22</td><td>desruisseaux</td><td>Reorganisation of directory tree structure (GEOT-982) phase 1: moved 'src' to 'src/main/java'.</td></tr>
+<tr><td class="rev">22126</td><td>2006-10-14</td><td>desruisseaux</td><td>Rolled back to non-static inner classes, now that the Clover bug has been fixed (as for maven-clover-plugin 2.3, released recently).</td></tr>
+<tr><td class="rev">20874</td><td>2006-08-07</td><td class="unav">jgarnett</td><td><a href="rev/20874/NADCON.xhtml">ip review</a></td></tr>
+<tr><td class="rev">20756</td><td>2006-07-30</td><td class="unav">aaime</td><td><a href="rev/20874/NADCON.xhtml">Clover in, PMD out since nobody is using it. Also changed a few classes to make them compatible with Clover (workaround for a Clover bug, see http://www.cenqua.com/forums/thread.jspa?forumID=1&amp;threadID=2333)</a></td></tr>
+<tr><td class="rev">19769</td><td>2006-06-02</td><td>desruisseaux</td><td>Javadoc fix: replaced 'degrees' by 'decimal degrees' when relevant (GEOT-855)</td></tr>
+<tr><td class="rev">17672</td><td>2006-01-19</td><td>desruisseaux</td><td>Added @source tag.</td></tr>
+<tr><td class="rev">17660</td><td>2006-01-18</td><td>desruisseaux</td><td>Fixed SVN attributes, including the addition of URL attribute.</td></tr>
+<tr><td class="rev">16983</td><td>2005-11-25</td><td>desruisseaux</td><td>Replaced references to static fields and methods of CitationImpl.* by Citations.*</td></tr>
+<tr><td class="rev">15350</td><td>2005-08-16</td><td>desruisseaux</td><td>Merged the 'split-main' branch to trunk (GEOT-662)</td></tr>
+<tr><td class="rev">15256</td><td>2005-08-09</td><td>desruisseaux</td><td>Extraction of referencing module from main</td></tr>
+<tr><td class="rev">15255</td><td>2005-08-09</td><td>desruisseaux</td><td>Prepare branch for splitting main</td></tr>
+<tr><td class="rev">14834</td><td>2005-07-20</td><td>desruisseaux</td><td>Reorganized I18N resources</td></tr>
+<tr><td class="rev">14610</td><td>2005-06-26</td><td>desruisseaux</td><td>CoordinateOperationFactory is now backed by an EPSG authority when available (GEOT-592)</td></tr>
+<tr><td class="rev">14581</td><td>2005-06-22</td><td>desruisseaux</td><td>Implemented South-Orientated transverse mercator / more GEOT-589 work</td></tr>
+<tr><td class="rev">13925</td><td>2005-05-30</td><td>desruisseaux</td><td>Added @since javadoc tag</td></tr>
+<tr><td class="rev">13922</td><td>2005-05-29</td><td>desruisseaux</td><td>Renaming of remainding GeoAPI implementations. Renaming is now finished.</td></tr>
+<tr><td class="rev">13907</td><td>2005-05-28</td><td>desruisseaux</td><td>More additions of 'Default' prefix in CRS package</td></tr>
+<tr><td class="rev">13853</td><td>2005-05-26</td><td>desruisseaux</td><td>Bug fix: arrays must be NamedIndentifier[], because it implements two interfaces</td></tr>
+<tr><td class="rev">13836</td><td>2005-05-26</td><td>desruisseaux</td><td>Added 'Default' suffix to some CRS implementations: partial work</td></tr>
+<tr><td class="rev">13773</td><td>2005-05-24</td><td>desruisseaux</td><td>Removed old metadata implementations (they are now renamed with 'Impl' suffix) / Use OGC citation instead of OPEN_GIS</td></tr>
+<tr><td class="rev">13752</td><td>2005-05-23</td><td>desruisseaux</td><td>Added the 'Impl' suffix to direct implementations of all metadata interfaces; deprecated the old implementations (not yet deleted).</td></tr>
+<tr><td class="rev">11718</td><td>2005-03-01</td><td>desruisseaux</td><td>Replaced system preferences by user preferences, as of GEOT-450</td></tr>
+<tr><td class="rev">11074</td><td>2005-02-03</td><td>desruisseaux</td><td>Revisited CRSFactory.createProjectedCRS(...) API</td></tr>
+<tr><td class="rev">10796</td><td>2005-01-28</td><td class="unav">dzwiers</td><td><a href="rev/10796/NADCON.xhtml">imports cleaned</a></td></tr>
+<tr><td class="rev">10469</td><td>2005-01-11</td><td>desruisseaux</td><td>Replaced calls to 'getDim[Source|Target]' by 'get[Source|Target]Dimensions</td></tr>
+<tr><td class="rev">10228</td><td>2005-01-04</td><td>desruisseaux</td><td>Renamed 'getDimSource' as 'getSourceDimension'</td></tr>
+<tr><td class="rev">9266</td><td>2004-11-23</td><td>desruisseaux</td><td>Last WKT tuning; parsing and formatting should now be functional</td></tr>
+<tr><td class="rev">9131</td><td>2004-11-16</td><td class="unav">rschulz</td><td><a href="rev/09131/NADCON.xhtml">updated parameter and math transform aliases (GEOT-337)</a></td></tr>
+<tr><td class="rev">9118</td><td>2004-11-14</td><td>desruisseaux</td><td>Mercator projection port completed (but untested) as a use case for other projection ports</td></tr>
+<tr><td class="rev">9117</td><td>2004-11-13</td><td>desruisseaux</td><td>Added the capability to list all available MathTransforms</td></tr>
+<tr><td class="rev">9104</td><td>2004-11-12</td><td>desruisseaux</td><td>First prototype of a MapProjection implementation</td></tr>
+<tr><td class="rev">9103</td><td>2004-11-12</td><td>desruisseaux</td><td>Fixed and enabled test cases</td></tr>
+<tr><td class="rev">9092</td><td>2004-11-11</td><td>desruisseaux</td><td>Slight modification in the protected API for handling parameters</td></tr>
+<tr><td class="rev">8726</td><td>2004-10-21</td><td>desruisseaux</td><td>Various bug fixes in parameter handling</td></tr>
+<tr><td class="rev">7843</td><td>2004-09-08</td><td class="unav">jgarnett</td><td><a href="rev/07843/NADCON.xhtml">First round of resync with geoapi</a></td></tr>
+<tr><td class="rev">7707</td><td>2004-08-31</td><td class="unav">jgarnett</td><td><a href="rev/07843/NADCON.xhtml">Change over to parameter descriptor.</a></td></tr>
+<tr><td class="rev">7334</td><td>2004-08-01</td><td class="unav">rschulz</td><td><a href="rev/07843/NADCON.xhtml">first commit for NADCONTransform</a></td></tr>
+</table>
+    </div>
+  </body>
+</html>

Propchange: sis/ip-review/NADCON.xhtml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/ip-review/NADCON.xhtml
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: sis/ip-review/rev/07843/NADCON.xhtml
URL: http://svn.apache.org/viewvc/sis/ip-review/rev/07843/NADCON.xhtml?rev=1717746&view=auto
==============================================================================
--- sis/ip-review/rev/07843/NADCON.xhtml (added)
+++ sis/ip-review/rev/07843/NADCON.xhtml Thu Dec  3 12:11:45 2015
@@ -0,0 +1,1036 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta charset="UTF-8"/>
+    <title>NADCON changes for revisions 7333:7843</title>
+    <style type="text/css" media="all">
+      @import url("../../reports.css");
+    </style>
+  </head>
+  <body>
+    <div>
+      <h1>NADCON changes for revisions 7333:7843</h1>
+      <p>This class has been fully rewritten in Apache SIS:</p>
+      <ul>
+        <li>The coordinate transformations are done in <code>InterpolatedTransform</code>, which is totally independent of NADCON.
+            Indeed, that same class is used for NADCON, NTv2 or any other transformations base on datum shift grid files.
+            <code>InterpolatedTransform</code> expect the datum shift data to be provided in a separated class, <code>DatumShiftGrid</code>.</li>
+        <li>The <code>DatumShiftGrid</code> class contains information equivalent to the <code>xmin</code>, <code>ymin</code>, <code>xmax</code>,
+            <code>ymax</code>, <code>dx</code>, <code>dy</code> and the data below, but in a quite different way. <code>DatumShiftGrid</code> rather
+            manages those information as <code>LinearTransform</code>, <code>Matrix</code>, <code>int[]</code> and <code>float[][]</code> objects.
+            In particular, <code>DatumShiftGrid</code> allows the shifts to have more than 2 dimensions. This allows the same code to be used for
+            <cite>France Geocentric Interpolation Transformation</cite>, which uses shift in 3 dimensions.</li>
+        <li>The process of reading the datum shift grid files is done in a <code>DatumShiftGridLoader</code> subclass.
+            The same methods read both ASCII and binary files (their data are organized in the same way).</li>
+        <li>The parameter descriptors are in the <code>NADCON</code> class and contain only the names found in the EPSG database.</li>
+      </ul>
+
+<p><b>Command line:</b></p>
+<blockquote><code>svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r7333:7843 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/operation/transform/NADCONTransform.java</code></blockquote>
+<table class="changes">
+<tr><th>Revision 7843</th></tr>
+<tr>
+<td><pre><span class="add">/*</span>
+<span class="add"> *    Geotools 2 - OpenSource mapping toolkit</span>
+<span class="add"> *    http://www.geotools.org</span>
+<span class="add"> *    (C) 2004 Geotools Project Managment Committee (PMC)</span>
+<span class="add"> *</span>
+<span class="add"> *    This library is free software; you can redistribute it and/or</span>
+<span class="add"> *    modify it under the terms of the GNU Lesser General Public</span>
+<span class="add"> *    License as published by the Free Software Foundation; either</span>
+<span class="add"> *    version 2.1 of the License, or (at your option) any later version.</span>
+<span class="add"> *</span>
+<span class="add"> *    This library is distributed in the hope that it will be useful,</span>
+<span class="add"> *    but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
+<span class="add"> *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
+<span class="add"> *    Lesser General Public License for more details.</span>
+<span class="add"> *</span>
+<span class="add"> *    You should have received a copy of the GNU Lesser General Public</span>
+<span class="add"> *    License along with this library; if not, write to the Free Software</span>
+<span class="add"> *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</span>
+<span class="add"> *</span>
+<span class="add"> *</span>
+<span class="add"> *    This package contains documentation from OpenGIS specifications.</span>
+<span class="add"> *    OpenGIS consortium's work is fully acknowledged here.</span>
+<span class="add"> */</span>
+<span class="add">package org.geotools.referencing.operation.transform;</span>
+<span class="add"></span>
+<span class="add">// Geotools dependencies</span>
+<span class="add">import org.geotools.metadata.citation.Citation;</span>
+<span class="add">import org.geotools.referencing.Identifier;</span>
+<span class="add">import org.geotools.referencing.operation.MathTransformProvider;</span>
+<span class="add">import org.geotools.resources.Arguments;</span>
+<span class="add">import org.geotools.resources.cts.ResourceKeys;</span>
+<span class="add">import org.geotools.resources.cts.Resources;</span>
+<span class="add">import org.opengis.parameter.GeneralParameterValue;</span>
+<span class="add">import org.opengis.parameter.ParameterDescriptor;</span>
+<span class="add">import org.opengis.parameter.ParameterDescriptorGroup;</span>
+<span class="add">import org.opengis.parameter.ParameterNotFoundException;</span>
+<span class="add"></span>
+<span class="add">// OpenGIS dependencies</span>
+<span class="add">import org.opengis.parameter.ParameterValue;</span>
+<span class="add">import org.opengis.parameter.ParameterValueGroup;</span>
+<span class="add">import org.opengis.referencing.FactoryException;</span>
+<span class="add">import org.opengis.referencing.operation.MathTransform;</span>
+<span class="add">import org.opengis.referencing.operation.TransformException;</span>
+<span class="add"></span>
+<span class="add">// J2SE dependencies</span>
+<span class="add">import java.io.BufferedReader;</span>
+<span class="add">import java.io.EOFException;</span>
+<span class="add">import java.io.File;</span>
+<span class="add">import java.io.FileInputStream;</span>
+<span class="add">import java.io.IOException;</span>
+<span class="add">import java.io.InputStream;</span>
+<span class="add">import java.io.InputStreamReader;</span>
+<span class="add">import java.io.ObjectInputStream;</span>
+<span class="add">import java.io.PrintWriter;</span>
+<span class="add">import java.io.Serializable;</span>
+<span class="add">import java.net.URL;</span>
+<span class="add">import java.nio.ByteBuffer;</span>
+<span class="add">import java.nio.ByteOrder;</span>
+<span class="add">import java.nio.channels.Channels;</span>
+<span class="add">import java.nio.channels.ReadableByteChannel;</span>
+<span class="add">import java.util.StringTokenizer;</span>
+<span class="add">import java.util.prefs.Preferences;</span>
+<span class="add"></span>
+<span class="add"></span>
+<span class="add">/**</span>
+<span class="add"> * The North American Datum Conversion (NADCON) Transform (EPSG code 9613) is a</span>
+<span class="add"> * two dimentional datum shift method, created by the National Geodetic Survey</span>
+<span class="add"> * (NGS), that uses interpolated values from two grid shift files. This</span>
+<span class="add"> * method is used  to transform NAD27 (EPSG code 4267) datum coordinates (and</span>
+<span class="add"> * some others) to  NAD83 (EPSG code 4267) within the United States. There are</span>
+<span class="add"> * two sent of grid  shift files: NADCON and High Accuracy Reference Networks</span>
+<span class="add"> * (HARN).  NADCON shfts from NAD27 (and some others) to NAD83 while HARN</span>
+<span class="add"> * shifts from  the NADCON NAD83 to an improved NAD83. Both sets of grid shift</span>
+<span class="add"> * files may be  downloaded from  &lt;a href="http://www.ngs.noaa.gov/PC_PROD/NADCON/"&gt;www.ngs.noaa.gov/PC_PROD/NADCON/&lt;/a&gt;.</span>
+<span class="add"> * &lt;br&gt;&lt;br&gt;</span>
+<span class="add"> *</span>
+<span class="add"> * Some of the NADCON grids, their areas of use, and source datums are shown</span>
+<span class="add"> * in the following table.</span>
+<span class="add"> * &lt;br&gt;&lt;br&gt;</span>
+<span class="add"> *</span>
+<span class="add"> * &lt;table&gt;</span>
+<span class="add"> *   &lt;tr&gt;&lt;th&gt;Shift File Name&lt;/td&gt;&lt;th&gt;Area&lt;/td&gt;&lt;th&gt;Source Datum&lt;/td&gt;&lt;th&gt;Accuracy at 67% confidence (m)&lt;/td&gt;&lt;/tr&gt;</span>
+<span class="add"> *   &lt;tr&gt;&lt;td&gt;CONUS&lt;/td&gt;&lt;td&gt;Conterminous U S (lower 48 states)&lt;/td&gt;&lt;td&gt;NAD27&lt;/td&gt;&lt;td&gt;0.15&lt;/td&gt;&lt;/tr&gt;</span>
+<span class="add"> *   &lt;tr&gt;&lt;td&gt;ALASKA&lt;/td&gt;&lt;td&gt;Alaska, incl. Aleutian Islands&lt;/td&gt;&lt;td&gt;NAD27&lt;/td&gt;&lt;td&gt;0.5&lt;/td&gt;&lt;/tr&gt;</span>
+<span class="add"> *   &lt;tr&gt;&lt;td&gt;HAWAII&lt;/td&gt;&lt;td&gt;Hawaiian Islands&lt;/td&gt;&lt;td&gt;Old Hawaiian (4135)&lt;/td&gt;&lt;td&gt;0.2&lt;/td&gt;&lt;/tr&gt;</span>
+<span class="add"> *   &lt;tr&gt;&lt;td&gt;STLRNC&lt;/td&gt;&lt;td&gt;St. Lawrence Is., AK&lt;/td&gt;&lt;td&gt;St. Lawrence Island (4136)&lt;/td&gt;&lt;td&gt;--&lt;/td&gt;&lt;/tr&gt;</span>
+<span class="add"> *   &lt;tr&gt;&lt;td&gt;STPAUL &lt;/td&gt;&lt;td&gt;St. Paul Is., AK&lt;/td&gt;&lt;td&gt;St. Paul Island (4137)&lt;/td&gt;&lt;td&gt;--&lt;/td&gt;&lt;/tr&gt;</span>
+<span class="add"> *   &lt;tr&gt;&lt;td&gt;STGEORGE&lt;/td&gt;&lt;td&gt;St. George Is., AK&lt;/td&gt;&lt;td&gt;St. George Island (4138)&lt;/td&gt;&lt;td&gt;--&lt;/td&gt;&lt;/tr&gt;</span>
+<span class="add"> *   &lt;tr&gt;&lt;td&gt;PRVI&lt;/td&gt;&lt;td&gt;Puerto Rico and the Virgin Islands&lt;/td&gt;&lt;td&gt;Puerto Rico (4139)&lt;/td&gt;&lt;td&gt;0.05&lt;/td&gt;&lt;/tr&gt;</span>
+<span class="add"> * &lt;/table&gt;</span>
+<span class="add"> * &lt;br&gt;&lt;br&gt;</span>
+<span class="add"> *</span>
+<span class="add"> * Grid shift files come in two formats: binary and text. The files from  the</span>
+<span class="add"> * NGS are binary and have .las (latitude shift) and .los (longitude shift)</span>
+<span class="add"> * extentions. Text grids may be created with the NGS nadgrd program and have</span>
+<span class="add"> * .laa (latitude shift) and .loa (longitude shift) file extentions. Both</span>
+<span class="add"> * types of  files may be used here.</span>
+<span class="add"> * &lt;br&gt;&lt;br&gt;</span>
+<span class="add"> *</span>
+<span class="add"> * The grid names to use for transforming are parameters of this</span>
+<span class="add"> * MathTransform.  This parameter may be the full name and path to the grids</span>
+<span class="add"> * or just the name  of the grids if the default location of the grids was set</span>
+<span class="add"> * as a preference.  This preference may be set with the main method of this</span>
+<span class="add"> * class. &lt;br&gt;&lt;br&gt;</span>
+<span class="add"> *</span>
+<span class="add"> * Transformations here have been tested to be within 0.00001 seconds of</span>
+<span class="add"> * values  given by the NGS ndcon210 program for NADCON grids. American Samoa</span>
+<span class="add"> * and HARN  shifts have not yet been tested.  &lt;strong&gt;References:&lt;/strong&gt;</span>
+<span class="add"> *</span>
+<span class="add"> * &lt;ul&gt;</span>
+<span class="add"> *   &lt;li&gt;&lt;a href="http://www.ngs.noaa.gov/PC_PROD/NADCON/Readme.htm"&gt;NADCONreadme&lt;/a&gt;&lt;/li&gt;</span>
+<span class="add"> *   &lt;li&gt;American Samoa Grids for NADCON - Samoa_Readme.txt&lt;/li&gt;</span>
+<span class="add"> *   &lt;li&gt;&lt;a href="http://www.ngs.noaa.gov/PUBS_LIB/NGS50.pdf"&gt;NADCON - The</span>
+<span class="add"> *       Application of Minimum-Curvature-Derived  Surfaces in the Transformation of</span>
+<span class="add"> *       Positional Data From the North American  Datum of 1927 to the North</span>
+<span class="add"> *       American Datum of 1983&lt;/a&gt; - NOAA TM.&lt;/li&gt;</span>
+<span class="add"> *   &lt;li&gt;ndcon210.for - NGS fortran source code for NADCON conversions. See the</span>
+<span class="add"> *       following subroutines: TRANSF, TO83, FGRID, INTRP, COEFF and SURF&lt;/li&gt;</span>
+<span class="add"> *   &lt;li&gt;nadgrd.for - NGS fortran source code to export/import binary and text grid</span>
+<span class="add"> *       formats&lt;/li&gt;</span>
+<span class="add"> *   &lt;li&gt;EPSG Geodesy Parameters database version 6.5&lt;/li&gt;</span>
+<span class="add"> * &lt;/ul&gt;</span>
+<span class="add"> *</span>
+<span class="add"> * @see &lt;a href="http://www.ngs.noaa.gov/TOOLS/Nadcon/Nadcon.html"&gt; NADCON -</span>
+<span class="add"> *      North American Datum Conversion Utility&lt;/a&gt;</span>
+<span class="add"> *</span>
+<span class="add"> * @version $Id$</span>
+<span class="add"> * @author Rueben Schulz</span>
+<span class="add"> *</span>
+<span class="add"> * @TODO the transform code does not deal with the case where grids</span>
+<span class="add"> *       cross +- 180 degrees</span>
+<span class="add"> */</span>
+<span class="add">public class NADCONTransform extends AbstractMathTransform implements Serializable {</span>
+<span class="add"></span>
+<span class="add">    /** Serial number for interoperability with different versions. */</span>
+<span class="add">    private static final long serialVersionUID = -4707304160205218546L;</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Preference node for the grid shift file location, and its default value.</span>
+<span class="add">     */</span>
+<span class="add">    private static final String GRID_LOCATION = "Grid location";</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Preference node for the grid shift file location, and its default value.</span>
+<span class="add">     */</span>
+<span class="add">    private static final String DEFAULT_GRID_LOCATION = ".";</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Difference allowed in iterative computations. This is half the value</span>
+<span class="add">     * used in the NGS fortran code (so all tests pass).</span>
+<span class="add">     */</span>
+<span class="add">    private static final double TOL = 5.0E-10;</span>
+<span class="add"></span>
+<span class="add">    /** Maximum number of itterations for iterative computations. */</span>
+<span class="add">    private static final int MAX_ITER = 10;</span>
+<span class="add"></span>
+<span class="add">    /** Conversion factor from seconds to degrees. */</span>
+<span class="add">    private static final double SEC_2_DEG = 3600.0;</span>
+<span class="add"></span>
+<span class="add">    /** latitude and longitude grid shift file names. Output in WKT. */</span>
+<span class="add">    private final String latGridName;</span>
+<span class="add"></span>
+<span class="add">    /** latitude and longitude grid shift file names. Output in WKT. */</span>
+<span class="add">    private final String longGridName;</span>
+<span class="add"></span>
+<span class="add">    /*</span>
+<span class="add">     * the minimum longitude value covered by this grid (degrees)</span>
+<span class="add">     */</span>
+<span class="add">    private double xmin;</span>
+<span class="add"></span>
+<span class="add">    /*</span>
+<span class="add">     * the minimum latiude value covered by this grid (degrees)</span>
+<span class="add">     */</span>
+<span class="add">    private double ymin;</span>
+<span class="add"></span>
+<span class="add">    /*</span>
+<span class="add">     * the maximum longitude value covered by this grid (degrees)</span>
+<span class="add">     */</span>
+<span class="add">    private double xmax;</span>
+<span class="add"></span>
+<span class="add">    /*</span>
+<span class="add">     * the maximum latitude value covered by this grid (degrees)</span>
+<span class="add">     */</span>
+<span class="add">    private double ymax;</span>
+<span class="add"></span>
+<span class="add">    /*</span>
+<span class="add">     * the difference between longitude grid points (degrees)</span>
+<span class="add">     */</span>
+<span class="add">    private double dx;</span>
+<span class="add"></span>
+<span class="add">    /*</span>
+<span class="add">     * the difference between latitude grid points (degrees)</span>
+<span class="add">     */</span>
+<span class="add">    private double dy;</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * longitude and latitude grid shift values. Values are organized from  low</span>
+<span class="add">     * to high longitude (low x index to high) and low to high latitude (low y</span>
+<span class="add">     * index to high).</span>
+<span class="add">     */</span>
+<span class="add">    private LocalizationGrid gridShift = null;</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * The {@link gridShift} values as a {@link LocalizationGridTransform2D}.</span>
+<span class="add">     * Used for interpolating shift values.</span>
+<span class="add">     */</span>
+<span class="add">    private MathTransform gridShiftTransform = null;</span>
+<span class="add"></span>
+<span class="add">    /** The inverse of this transform. Will be created only when needed. */</span>
+<span class="add">    private transient MathTransform inverse;</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Constructs a NADCONTransform from the specified grid shift files.</span>
+<span class="add">     *</span>
+<span class="add">     * @param latGridName path and name (or just name if {@link GRID_LOCATION}</span>
+<span class="add">     *        is set) to the latitude differenc file. This will have a .las or</span>
+<span class="add">     *        .laa file extention.</span>
+<span class="add">     * @param longGridName path and name (or just name if {@link GRID_LOCATION}</span>
+<span class="add">     *        is set) to the longitude differenc file. This will have a .los</span>
+<span class="add">     *        or .loa file extention.</span>
+<span class="add">     *</span>
+<span class="add">     * @throws ParameterNotFoundException if a math transform parameter cannot</span>
+<span class="add">     *         be found.</span>
+<span class="add">     * @throws FactoryException if there is a problem creating this math transform</span>
+<span class="add">     *         (ie file extentions are unknown or there is an error reading the</span>
+<span class="add">     *          grid files)</span>
+<span class="add">     */</span>
+<span class="add">    public NADCONTransform(String latGridName, String longGridName)</span>
+<span class="add">            throws ParameterNotFoundException, FactoryException</span>
+<span class="add">    {</span>
+<span class="add">        this.latGridName = latGridName;</span>
+<span class="add">        this.longGridName = longGridName;</span>
+<span class="add"></span>
+<span class="add">        //decide if text or binary grid will be used</span>
+<span class="add">        try {</span>
+<span class="add">            final URL latGridURL = makeURL(latGridName);</span>
+<span class="add">            final URL longGridURL = makeURL(longGridName);</span>
+<span class="add"></span>
+<span class="add">            if ((latGridName.endsWith(".las") &amp;&amp; longGridName.endsWith(".los"))</span>
+<span class="add">                    || (latGridName.endsWith(".LAS") &amp;&amp; longGridName.endsWith(".LOS"))) {</span>
+<span class="add">                loadBinaryGrid(latGridURL, longGridURL);</span>
+<span class="add">            } else if ((latGridName.endsWith(".laa") &amp;&amp; longGridName.endsWith(".loa"))</span>
+<span class="add">                    || (latGridName.endsWith(".LAA") &amp;&amp; longGridName.endsWith(".LOA"))) {</span>
+<span class="add">                loadTextGrid(latGridURL, longGridURL);</span>
+<span class="add">            } else {</span>
+<span class="add">                throw new FactoryException(Resources.format(</span>
+<span class="add">                        ResourceKeys.ERROR_UNSUPPORTED_FILE_TYPE_$2,</span>
+<span class="add">                        latGridName.substring(latGridName.lastIndexOf('.')),</span>
+<span class="add">                        longGridName.substring(longGridName.lastIndexOf('.'))));</span>
+<span class="add">            }</span>
+<span class="add"></span>
+<span class="add">            gridShiftTransform = gridShift.getMathTransform();</span>
+<span class="add">        } catch (IOException exception) {</span>
+<span class="add">            final Throwable cause = exception.getCause();</span>
+<span class="add">            if (cause instanceof FactoryException) {</span>
+<span class="add">                throw (FactoryException) cause;</span>
+<span class="add">            }</span>
+<span class="add">            throw new FactoryException(exception.getLocalizedMessage(),</span>
+<span class="add">                exception);</span>
+<span class="add">        }</span>
+<span class="add">    }</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Returns the parameter values for this math transform.</span>
+<span class="add">     *</span>
+<span class="add">     * @return A copy of the parameter values for this math transform.</span>
+<span class="add">     */</span>
+<span class="add">    public ParameterValueGroup getParameterValues() {</span>
+<span class="add">        final ParameterValue lat_diff_file = new org.geotools.parameter.Parameter(Provider.LAT_DIFF_FILE);</span>
+<span class="add">        lat_diff_file.setValue(latGridName);</span>
+<span class="add"></span>
+<span class="add">        final ParameterValue long_diff_file = new org.geotools.parameter.Parameter(Provider.LONG_DIFF_FILE);</span>
+<span class="add">        long_diff_file.setValue(longGridName);</span>
+<span class="add"></span>
+<span class="add">        return new org.geotools.parameter.ParameterGroup(</span>
+<span class="add">            Provider.PARAMETERS,</span>
+<span class="add">            new GeneralParameterValue[] { lat_diff_file, long_diff_file }</span>
+<span class="add">        );</span>
+<span class="add">    }</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Gets the dimension of input points (always 2).</span>
+<span class="add">     *</span>
+<span class="add">     * @return the source dimention.</span>
+<span class="add">     */</span>
+<span class="add">    public int getDimSource() {</span>
+<span class="add">        return 2;</span>
+<span class="add">    }</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Gets the dimension of output points (always 2).</span>
+<span class="add">     *</span>
+<span class="add">     * @return the target dimention.</span>
+<span class="add">     */</span>
+<span class="add">    public int getDimTarget() {</span>
+<span class="add">        return 2;</span>
+<span class="add">    }</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Returns a URL from the string representation. If the string has  no</span>
+<span class="add">     * path, the default path preferece is added.</span>
+<span class="add">     *</span>
+<span class="add">     * @param str a string representation of a URL</span>
+<span class="add">     * @return a URL created from the string representation</span>
+<span class="add">     * @throws java.net.MalformedURLException if the URL cannot be created</span>
+<span class="add">     */</span>
+<span class="add">    private URL makeURL(String str) throws java.net.MalformedURLException {</span>
+<span class="add">        //has '/' or '\' or ':', so probably full path to file</span>
+<span class="add">        if ((str.indexOf("\\") != -1) || (str.indexOf("/") != -1)</span>
+<span class="add">                || (str.indexOf(":") != -1)) {</span>
+<span class="add">            return makeURLfromString(str);</span>
+<span class="add">        } else {</span>
+<span class="add">            //just a file name , prepend base location</span>
+<span class="add">            final Preferences prefs = Preferences.systemNodeForPackage(NADCONTransform.class);</span>
+<span class="add">            final String baseLocation = prefs.get(GRID_LOCATION,</span>
+<span class="add">                    DEFAULT_GRID_LOCATION);</span>
+<span class="add">            return makeURLfromString(baseLocation + "/" + str);</span>
+<span class="add">        }</span>
+<span class="add">    }</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Returns a URL based on a string representation. If no protocol is given,</span>
+<span class="add">     * it is assumed to be a local file.</span>
+<span class="add">     *</span>
+<span class="add">     * @param str a string representation of a URL</span>
+<span class="add">     * @return a URL created from the string representation</span>
+<span class="add">     * @throws java.net.MalformedURLException if the URL cannot be created</span>
+<span class="add">     */</span>
+<span class="add">    private URL makeURLfromString(String str)</span>
+<span class="add">            throws java.net.MalformedURLException</span>
+<span class="add">    {</span>
+<span class="add">        try {</span>
+<span class="add">            return new URL(str);</span>
+<span class="add">        } catch (java.net.MalformedURLException e) {</span>
+<span class="add">            //try making this with a file protocal</span>
+<span class="add">            return new URL("file", "", str);</span>
+<span class="add">        }</span>
+<span class="add">    }</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Reads latitude and longitude binary grid shift file data into {@link</span>
+<span class="add">     * grid}.  The file is organized into records, with the first record</span>
+<span class="add">     * containing the  header information, followed by the shift data. The</span>
+<span class="add">     * header values are: text describing grid (64 bytes), num. columns (int),</span>
+<span class="add">     * num. rows (int),  num. z (int), min x (float), delta x (float), min y</span>
+<span class="add">     * (float), delta y (float)  and angle (float). Each record is num.</span>
+<span class="add">     * columns  4 bytes + 4 byte separator long and the file contains num.</span>
+<span class="add">     * rows + 1 (for the header) records. The data records (with the grid</span>
+<span class="add">     * shift values) are all floats and have a 4 byte  separator (0's) before</span>
+<span class="add">     * the data. Row records are organized from low  y (latitude) to high and</span>
+<span class="add">     * columns are orderd from low longitude to high.  Everything is written</span>
+<span class="add">     * in low byte order.</span>
+<span class="add">     *</span>
+<span class="add">     * @param latGridUrl URL to the binary latitude shift file (.las</span>
+<span class="add">     *        extention).</span>
+<span class="add">     * @param longGridUrl URL to the binary longitude shift file (.los</span>
+<span class="add">     *        extention).</span>
+<span class="add">     * @throws IOException if the data files cannot be read.</span>
+<span class="add">     * @throws FactoryException if there is an inconsistency in the data</span>
+<span class="add">     */</span>
+<span class="add">    private void loadBinaryGrid(URL latGridUrl, URL longGridUrl)</span>
+<span class="add">            throws IOException, FactoryException</span>
+<span class="add">    {</span>
+<span class="add">        final int HEADER_BYTES = 96;</span>
+<span class="add">        final int SEPARATOR_BYTES = 4;</span>
+<span class="add">        final int DESCRIPTION_LENGTH = 64;</span>
+<span class="add">        ReadableByteChannel latChannel;</span>
+<span class="add">        ReadableByteChannel longChannel;</span>
+<span class="add">        ByteBuffer latBuffer;</span>
+<span class="add">        ByteBuffer longBuffer;</span>
+<span class="add"></span>
+<span class="add">        ////////////////////////</span>
+<span class="add">        //setup</span>
+<span class="add">        ////////////////////////</span>
+<span class="add">        latChannel = getReadChannel(latGridUrl);</span>
+<span class="add">        latBuffer = fillBuffer(latChannel, HEADER_BYTES);</span>
+<span class="add"></span>
+<span class="add">        longChannel = getReadChannel(longGridUrl);</span>
+<span class="add">        longBuffer = fillBuffer(longChannel, HEADER_BYTES);</span>
+<span class="add"></span>
+<span class="add">        ////////////////////////</span>
+<span class="add">        //read header info</span>
+<span class="add">        ////////////////////////</span>
+<span class="add">        //skip the header description</span>
+<span class="add">        latBuffer.position(latBuffer.position() + DESCRIPTION_LENGTH);</span>
+<span class="add"></span>
+<span class="add">        int nc = latBuffer.getInt();</span>
+<span class="add">        int nr = latBuffer.getInt();</span>
+<span class="add">        int nz = latBuffer.getInt();</span>
+<span class="add"></span>
+<span class="add">        xmin = latBuffer.getFloat();</span>
+<span class="add">        dx = latBuffer.getFloat();</span>
+<span class="add">        ymin = latBuffer.getFloat();</span>
+<span class="add">        dy = latBuffer.getFloat();</span>
+<span class="add"></span>
+<span class="add">        float angle = latBuffer.getFloat();</span>
+<span class="add">        xmax = xmin + ((nc - 1) * dx);</span>
+<span class="add">        ymax = ymin + ((nr - 1) * dy);</span>
+<span class="add"></span>
+<span class="add">        //skip the longitude header description</span>
+<span class="add">        longBuffer.position(longBuffer.position() + DESCRIPTION_LENGTH);</span>
+<span class="add"></span>
+<span class="add">        //check that latitude grid header is the same as for latitude grid</span>
+<span class="add">        if ((nc != longBuffer.getInt()) || (nr != longBuffer.getInt())</span>
+<span class="add">                || (nz != longBuffer.getInt())</span>
+<span class="add">                || (xmin != longBuffer.getFloat())</span>
+<span class="add">                || (dx != longBuffer.getFloat())</span>
+<span class="add">                || (ymin != longBuffer.getFloat())</span>
+<span class="add">                || (dy != longBuffer.getFloat())</span>
+<span class="add">                || (angle != longBuffer.getFloat())) {</span>
+<span class="add">            throw new FactoryException(Resources.format(</span>
+<span class="add">                    ResourceKeys.ERROR_GRID_LOCATIONS_UNEQUAL));</span>
+<span class="add">        }</span>
+<span class="add"></span>
+<span class="add">        ////////////////////////</span>
+<span class="add">        //read grid shift data into LocalizationGrid</span>
+<span class="add">        ////////////////////////</span>
+<span class="add">        final int RECORD_LENGTH = (nc * 4) + SEPARATOR_BYTES;</span>
+<span class="add">        final int NUM_BYTES_LEFT = ((nr + 1) * RECORD_LENGTH) - HEADER_BYTES;</span>
+<span class="add">        final int START_OF_DATA = RECORD_LENGTH - HEADER_BYTES;</span>
+<span class="add"></span>
+<span class="add">        latBuffer = fillBuffer(latChannel, NUM_BYTES_LEFT);</span>
+<span class="add">        latBuffer.position(START_OF_DATA); //start of second record (data)</span>
+<span class="add"></span>
+<span class="add">        longBuffer = fillBuffer(longChannel, NUM_BYTES_LEFT);</span>
+<span class="add">        longBuffer.position(START_OF_DATA);</span>
+<span class="add"></span>
+<span class="add">        gridShift = new LocalizationGrid(nc, nr);</span>
+<span class="add"></span>
+<span class="add">        int i = 0;</span>
+<span class="add">        int j = 0;</span>
+<span class="add">        for (i = 0; i &lt; nr; i++) {</span>
+<span class="add">            latBuffer.position(latBuffer.position() + SEPARATOR_BYTES); //skip record separator</span>
+<span class="add">            longBuffer.position(longBuffer.position() + SEPARATOR_BYTES);</span>
+<span class="add"></span>
+<span class="add">            for (j = 0; j &lt; nc; j++) {</span>
+<span class="add">                gridShift.setLocalizationPoint(j, i,</span>
+<span class="add">                    (new Float(longBuffer.getFloat())).doubleValue(),</span>
+<span class="add">                    (new Float(latBuffer.getFloat())).doubleValue());</span>
+<span class="add">            }</span>
+<span class="add">        }</span>
+<span class="add"></span>
+<span class="add">        assert i == nr : i;</span>
+<span class="add">        assert j == nc : j;</span>
+<span class="add">    }</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Returns a new bytebuffer, of numBytes length and little endian byte</span>
+<span class="add">     * order, filled from the channel.</span>
+<span class="add">     *</span>
+<span class="add">     * @param channel the channel to fill the buffer from</span>
+<span class="add">     * @param numBytes number of bytes to read</span>
+<span class="add">     * @return a new bytebuffer filled from the channel</span>
+<span class="add">     * @throws IOException if there is a problem reading the channel</span>
+<span class="add">     * @throws EOFException if the end of the channel is reached</span>
+<span class="add">     */</span>
+<span class="add">    private ByteBuffer fillBuffer(ReadableByteChannel channel, int numBytes)</span>
+<span class="add">        throws IOException {</span>
+<span class="add">        ByteBuffer buf = ByteBuffer.allocateDirect(numBytes);</span>
+<span class="add"></span>
+<span class="add">        if (fill(buf, channel) == -1) {</span>
+<span class="add">            throw new EOFException(Resources.format(</span>
+<span class="add">                    ResourceKeys.ERROR_END_OF_DATA_FILE));</span>
+<span class="add">        }</span>
+<span class="add"></span>
+<span class="add">        buf.flip();</span>
+<span class="add">        buf.order(ByteOrder.LITTLE_ENDIAN);</span>
+<span class="add"></span>
+<span class="add">        return buf;</span>
+<span class="add">    }</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Fills the bytebuffer from the channel. Code was lifted from</span>
+<span class="add">     * ShapefileDataStore.</span>
+<span class="add">     *</span>
+<span class="add">     * @param buffer bytebuffer to fill from the channel</span>
+<span class="add">     * @param channel channel to fill the buffer from</span>
+<span class="add">     * @return number of bytes read</span>
+<span class="add">     * @throws IOException if there is a problem reading the channel</span>
+<span class="add">     */</span>
+<span class="add">    private int fill(ByteBuffer buffer, ReadableByteChannel channel)</span>
+<span class="add">        throws IOException {</span>
+<span class="add">        int r = buffer.remaining();</span>
+<span class="add"></span>
+<span class="add">        // channel reads return -1 when EOF or other error</span>
+<span class="add">        // because they a non-blocking reads, 0 is a valid return value!!</span>
+<span class="add">        while ((buffer.remaining() &gt; 0) &amp;&amp; (r != -1)) {</span>
+<span class="add">            r = channel.read(buffer);</span>
+<span class="add">        }</span>
+<span class="add"></span>
+<span class="add">        if (r == -1) {</span>
+<span class="add">            buffer.limit(buffer.position());</span>
+<span class="add">        }</span>
+<span class="add"></span>
+<span class="add">        return r;</span>
+<span class="add">    }</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Obtain a ReadableByteChannel from the given URL. If the url protocol is</span>
+<span class="add">     * file, a FileChannel will be returned. Otherwise a generic channel will</span>
+<span class="add">     * be obtained from the urls input stream. Code swiped from</span>
+<span class="add">     * ShapefileDataStore.</span>
+<span class="add">     *</span>
+<span class="add">     * @param url URL to create the channel from</span>
+<span class="add">     * @return a new PeadableByteChannel from the input url</span>
+<span class="add">     * @throws IOException if there is a problem creating the channel</span>
+<span class="add">     */</span>
+<span class="add">    private ReadableByteChannel getReadChannel(URL url)</span>
+<span class="add">        throws IOException {</span>
+<span class="add">        ReadableByteChannel channel = null;</span>
+<span class="add"></span>
+<span class="add">        if (url.getProtocol().equals("file")) {</span>
+<span class="add">            File file = new File(url.getFile());</span>
+<span class="add"></span>
+<span class="add">            if (!file.exists() || !file.canRead()) {</span>
+<span class="add">                throw new IOException(Resources.format(</span>
+<span class="add">                        ResourceKeys.ERROR_FILE_DOES_NOT_EXIST_$1, file));</span>
+<span class="add">            }</span>
+<span class="add"></span>
+<span class="add">            FileInputStream in = new FileInputStream(file);</span>
+<span class="add">            channel = in.getChannel();</span>
+<span class="add">        } else {</span>
+<span class="add">            InputStream in = url.openConnection().getInputStream();</span>
+<span class="add">            channel = Channels.newChannel(in);</span>
+<span class="add">        }</span>
+<span class="add"></span>
+<span class="add">        return channel;</span>
+<span class="add">    }</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Reads latitude and longitude text grid shift file data into {@link</span>
+<span class="add">     * grid}.    The first two lines of the shift data file contain the</span>
+<span class="add">     * header, with the first being a description of the grid. The second line</span>
+<span class="add">     * contains 8 values separated by spaces: num. columns, num. rows, num. z,</span>
+<span class="add">     * min x, delta x, min y, delta y and angle. Shift data values follow this</span>
+<span class="add">     * and are also  separated by spaces. Row records are organized from low y</span>
+<span class="add">     * (latitude) to  high and columns are orderd from low longitude to high.</span>
+<span class="add">     *</span>
+<span class="add">     * @param latGridUrl URL to the text latitude shift file (.laa extention).</span>
+<span class="add">     * @param longGridUrl URL to the text longitude shift file (.loa</span>
+<span class="add">     *        extention).</span>
+<span class="add">     * @throws IOException if the data files cannot be read.</span>
+<span class="add">     * @throws FactoryException if there is an inconsistency in the data</span>
+<span class="add">     */</span>
+<span class="add">    private void loadTextGrid(URL latGridUrl, URL longGridUrl)</span>
+<span class="add">        throws IOException, FactoryException {</span>
+<span class="add">        String latLine;</span>
+<span class="add">        String longLine;</span>
+<span class="add">        StringTokenizer latSt;</span>
+<span class="add">        StringTokenizer longSt;</span>
+<span class="add"></span>
+<span class="add">        ////////////////////////</span>
+<span class="add">        //setup</span>
+<span class="add">        ////////////////////////</span>
+<span class="add">        InputStreamReader latIsr = new InputStreamReader(latGridUrl.openStream());</span>
+<span class="add">        BufferedReader latBr = new BufferedReader(latIsr);</span>
+<span class="add"></span>
+<span class="add">        InputStreamReader longIsr = new InputStreamReader(longGridUrl.openStream());</span>
+<span class="add">        BufferedReader longBr = new BufferedReader(longIsr);</span>
+<span class="add"></span>
+<span class="add">        ////////////////////////</span>
+<span class="add">        //read header info</span>
+<span class="add">        ////////////////////////</span>
+<span class="add">        latLine = latBr.readLine(); //skip header description</span>
+<span class="add">        latLine = latBr.readLine();</span>
+<span class="add">        latSt = new StringTokenizer(latLine, " ");</span>
+<span class="add"></span>
+<span class="add">        if (latSt.countTokens() != 8) {</span>
+<span class="add">            throw new FactoryException(Resources.format(</span>
+<span class="add">                    ResourceKeys.ERROR_HEADER_UNEXPECTED_LENGTH_$1,</span>
+<span class="add">                    String.valueOf(latSt.countTokens())));</span>
+<span class="add">        }</span>
+<span class="add"></span>
+<span class="add">        int nc = Integer.parseInt(latSt.nextToken());</span>
+<span class="add">        int nr = Integer.parseInt(latSt.nextToken());</span>
+<span class="add">        int nz = Integer.parseInt(latSt.nextToken());</span>
+<span class="add"></span>
+<span class="add">        xmin = Float.parseFloat(latSt.nextToken());</span>
+<span class="add">        dx = Float.parseFloat(latSt.nextToken());</span>
+<span class="add">        ymin = Float.parseFloat(latSt.nextToken());</span>
+<span class="add">        dy = Float.parseFloat(latSt.nextToken());</span>
+<span class="add"></span>
+<span class="add">        float angle = Float.parseFloat(latSt.nextToken());</span>
+<span class="add">        xmax = xmin + ((nc - 1) * dx);</span>
+<span class="add">        ymax = ymin + ((nr - 1) * dy);</span>
+<span class="add"></span>
+<span class="add">        //now read long shift grid</span>
+<span class="add">        longLine = longBr.readLine(); //skip header description</span>
+<span class="add">        longLine = longBr.readLine();</span>
+<span class="add">        longSt = new StringTokenizer(longLine, " ");</span>
+<span class="add"></span>
+<span class="add">        if (longSt.countTokens() != 8) {</span>
+<span class="add">            throw new FactoryException(Resources.format(</span>
+<span class="add">                    ResourceKeys.ERROR_HEADER_UNEXPECTED_LENGTH_$1,</span>
+<span class="add">                    String.valueOf(longSt.countTokens())));</span>
+<span class="add">        }</span>
+<span class="add"></span>
+<span class="add">        //check that latitude grid header is the same as for latitude grid</span>
+<span class="add">        if ((nc != Integer.parseInt(longSt.nextToken()))</span>
+<span class="add">                || (nr != Integer.parseInt(longSt.nextToken()))</span>
+<span class="add">                || (nz != Integer.parseInt(longSt.nextToken()))</span>
+<span class="add">                || (xmin != Float.parseFloat(longSt.nextToken()))</span>
+<span class="add">                || (dx != Float.parseFloat(longSt.nextToken()))</span>
+<span class="add">                || (ymin != Float.parseFloat(longSt.nextToken()))</span>
+<span class="add">                || (dy != Float.parseFloat(longSt.nextToken()))</span>
+<span class="add">                || (angle != Float.parseFloat(longSt.nextToken()))) {</span>
+<span class="add">            throw new FactoryException(Resources.format(</span>
+<span class="add">                    ResourceKeys.ERROR_GRID_LOCATIONS_UNEQUAL));</span>
+<span class="add">        }</span>
+<span class="add"></span>
+<span class="add">        ////////////////////////</span>
+<span class="add">        //read grid shift data into LocalizationGrid</span>
+<span class="add">        ////////////////////////</span>
+<span class="add">        gridShift = new LocalizationGrid(nc, nr);</span>
+<span class="add"></span>
+<span class="add">        int i = 0;</span>
+<span class="add">        int j = 0;</span>
+<span class="add">        for (i = 0; i &lt; nr; i++) {</span>
+<span class="add">            for (j = 0; j &lt; nc;) {</span>
+<span class="add">                latLine = latBr.readLine();</span>
+<span class="add">                latSt = new StringTokenizer(latLine, " ");</span>
+<span class="add">                longLine = longBr.readLine();</span>
+<span class="add">                longSt = new StringTokenizer(longLine, " ");</span>
+<span class="add"></span>
+<span class="add">                while (latSt.hasMoreTokens() &amp;&amp; longSt.hasMoreTokens()) {</span>
+<span class="add">                    gridShift.setLocalizationPoint(j, i,</span>
+<span class="add">                        (double) Float.parseFloat(longSt.nextToken()),</span>
+<span class="add">                        (double) Float.parseFloat(latSt.nextToken()));</span>
+<span class="add">                    ++j;</span>
+<span class="add">                }</span>
+<span class="add">            }</span>
+<span class="add">        }</span>
+<span class="add"></span>
+<span class="add">        assert i == nr : i;</span>
+<span class="add">        assert j == nc : j;</span>
+<span class="add">    }</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Transforms a list of coordinate point ordinal values. This method is</span>
+<span class="add">     * provided for efficiently transforming many points. The supplied array</span>
+<span class="add">     * of ordinal values will contain packed ordinal values.  For example, if</span>
+<span class="add">     * the source dimension is 3, then the ordinals will be packed in this</span>
+<span class="add">     * order:</span>
+<span class="add">     * (&lt;var&gt;x&lt;sub&gt;0&lt;/sub&gt;&lt;/var&gt;,&lt;var&gt;y&lt;sub&gt;0&lt;/sub&gt;&lt;/var&gt;,&lt;var&gt;z&lt;sub&gt;0&lt;/sub&gt;&lt;/var&gt;,</span>
+<span class="add">     *</span>
+<span class="add">     * &lt;var&gt;x&lt;sub&gt;1&lt;/sub&gt;&lt;/var&gt;,&lt;var&gt;y&lt;sub&gt;1&lt;/sub&gt;&lt;/var&gt;,&lt;var&gt;z&lt;sub&gt;1&lt;/sub&gt;&lt;/var&gt;</span>
+<span class="add">     * ...).  All input and output values are in degrees.</span>
+<span class="add">     *</span>
+<span class="add">     * @param srcPts the array containing the source point coordinates.</span>
+<span class="add">     * @param srcOff the offset to the first point to be transformed in the</span>
+<span class="add">     *        source array.</span>
+<span class="add">     * @param dstPts the array into which the transformed point coordinates are</span>
+<span class="add">     *        returned. May be the same than &lt;code&gt;srcPts&lt;/code&gt;.</span>
+<span class="add">     * @param dstOff the offset to the location of the first transformed point</span>
+<span class="add">     *        that is stored in the destination array.</span>
+<span class="add">     * @param numPts the number of point objects to be transformed.</span>
+<span class="add">     *</span>
+<span class="add">     * @throws TransformException if the input point is outside the area</span>
+<span class="add">     *         covered by this grid.</span>
+<span class="add">     */</span>
+<span class="add">    public void transform(final double[] srcPts, int srcOff,</span>
+<span class="add">        final double[] dstPts, int dstOff, int numPts)</span>
+<span class="add">        throws TransformException {</span>
+<span class="add">        int step = 0;</span>
+<span class="add"></span>
+<span class="add">        if ((srcPts == dstPts) &amp;&amp; (srcOff &lt; dstOff)</span>
+<span class="add">                &amp;&amp; ((srcOff + (numPts * getDimSource())) &gt; dstOff)) {</span>
+<span class="add">            step = -getDimSource();</span>
+<span class="add">            srcOff -= ((numPts - 1) * step);</span>
+<span class="add">            dstOff -= ((numPts - 1) * step);</span>
+<span class="add">        }</span>
+<span class="add"></span>
+<span class="add">        while (--numPts &gt;= 0) {</span>
+<span class="add">            double x = srcPts[srcOff++];</span>
+<span class="add">            double y = srcPts[srcOff++];</span>
+<span class="add"></span>
+<span class="add">            //check bounding box</span>
+<span class="add">//issue of bbox crossing +- 180 degrees (ie input point of -188 longitude);</span>
+<span class="add">//abs(x - xmin) &gt; 0 , rollLongitude() ???</span>
+<span class="add">            if (((x &lt; xmin) || (x &gt; xmax)) || ((y &lt; ymin) || (y &gt; ymax))) {</span>
+<span class="add">                throw new TransformException(Resources.format(</span>
+<span class="add">                        ResourceKeys.ERROR_POINT_OUTSIDE_GRID));</span>
+<span class="add">            }</span>
+<span class="add"></span>
+<span class="add">            //find the grid the point is in (index is 0 based)</span>
+<span class="add">            final double xgrid = (x - xmin) / dx;</span>
+<span class="add">            final double ygrid = (y - ymin) / dy;</span>
+<span class="add">            double[] array = new double[] { xgrid, ygrid };</span>
+<span class="add"></span>
+<span class="add">            //use the LocalizationGridTransform2D transform method (bilineal interpolation)</span>
+<span class="add">            //returned shift values are in seconds, longitude shift values are + west</span>
+<span class="add">            gridShiftTransform.transform(array, 0, array, 0, 1);</span>
+<span class="add"></span>
+<span class="add">            dstPts[dstOff++] = x - (array[0] / SEC_2_DEG);</span>
+<span class="add">            dstPts[dstOff++] = y + (array[1] / SEC_2_DEG);</span>
+<span class="add">            srcOff += step;</span>
+<span class="add">            dstOff += step;</span>
+<span class="add">        }</span>
+<span class="add">    }</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Transforms nad83 values to nad27. Input and output values are in</span>
+<span class="add">     * degrees.  This is done by itteratively finding a nad27 value that</span>
+<span class="add">     * shifts to the  input nad83 value. The input nad83 value is used as the</span>
+<span class="add">     * first  approximation.</span>
+<span class="add">     *</span>
+<span class="add">     * @param srcPts the array containing the source point coordinates.</span>
+<span class="add">     * @param srcOff the offset to the first point to be transformed in the</span>
+<span class="add">     *        source array.</span>
+<span class="add">     * @param dstPts the array into which the transformed point coordinates are</span>
+<span class="add">     *        returned. May be the same than &lt;code&gt;srcPts&lt;/code&gt;.</span>
+<span class="add">     * @param dstOff the offset to the location of the first transformed point</span>
+<span class="add">     *        that is stored in the destination array.</span>
+<span class="add">     * @param numPts the number of point objects to be transformed.</span>
+<span class="add">     *</span>
+<span class="add">     * @throws TransformException if the input point is outside the area</span>
+<span class="add">     *         covered by this grid.</span>
+<span class="add">     */</span>
+<span class="add">    public void inverseTransform(final double[] srcPts, int srcOff,</span>
+<span class="add">        final double[] dstPts, int dstOff, int numPts)</span>
+<span class="add">        throws TransformException {</span>
+<span class="add">        int step = 0;</span>
+<span class="add"></span>
+<span class="add">        if ((srcPts == dstPts) &amp;&amp; (srcOff &lt; dstOff)</span>
+<span class="add">                &amp;&amp; ((srcOff + (numPts * getDimSource())) &gt; dstOff)) {</span>
+<span class="add">            step = -getDimSource();</span>
+<span class="add">            srcOff -= ((numPts - 1) * step);</span>
+<span class="add">            dstOff -= ((numPts - 1) * step);</span>
+<span class="add">        }</span>
+<span class="add"></span>
+<span class="add">        while (--numPts &gt;= 0) {</span>
+<span class="add">            final double x = srcPts[srcOff++];</span>
+<span class="add">            final double y = srcPts[srcOff++];</span>
+<span class="add">            double xtemp = x;</span>
+<span class="add">            double ytemp = y;</span>
+<span class="add"></span>
+<span class="add">            for (int i = MAX_ITER;;) {</span>
+<span class="add">                double[] array = { xtemp, ytemp };</span>
+<span class="add">                transform(array, 0, array, 0, 1);</span>
+<span class="add">                double xdif = array[0] - x;</span>
+<span class="add">                double ydif = array[1] - y;</span>
+<span class="add"></span>
+<span class="add">                if (Math.abs(xdif) &gt; TOL) {</span>
+<span class="add">                    xtemp = xtemp - xdif;</span>
+<span class="add">                }</span>
+<span class="add">                if (Math.abs(ydif) &gt; TOL) {</span>
+<span class="add">                    ytemp = ytemp - ydif;</span>
+<span class="add">                }</span>
+<span class="add"></span>
+<span class="add">                if ((Math.abs(xdif) &lt;= TOL) &amp;&amp; (Math.abs(ydif) &lt;= TOL)) {</span>
+<span class="add">                    dstPts[dstOff++] = xtemp;</span>
+<span class="add">                    dstPts[dstOff++] = ytemp;</span>
+<span class="add">                    break;</span>
+<span class="add">                }</span>
+<span class="add">                if (--i &lt; 0) {</span>
+<span class="add">                    throw new TransformException(Resources.format(</span>
+<span class="add">                            ResourceKeys.ERROR_NO_CONVERGENCE));</span>
+<span class="add">                }</span>
+<span class="add">            }</span>
+<span class="add"></span>
+<span class="add">            srcOff += step;</span>
+<span class="add">            dstOff += step;</span>
+<span class="add">        }</span>
+<span class="add">    }</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Returns the inverse of this transform.</span>
+<span class="add">     *</span>
+<span class="add">     * @return the inverse of this transform</span>
+<span class="add">     */</span>
+<span class="add">    public MathTransform inverse() {</span>
+<span class="add">        if (inverse == null) {</span>
+<span class="add">            // No need to synchronize; this is not a big deal if this object is created twice.</span>
+<span class="add">            inverse = new Inverse();</span>
+<span class="add">        }</span>
+<span class="add"></span>
+<span class="add">        return inverse;</span>
+<span class="add">    }</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Returns a hash value for this transform. To make this faster it does not</span>
+<span class="add">     * check the grid values.</span>
+<span class="add">     *</span>
+<span class="add">     * @return a hash value for this transform.</span>
+<span class="add">     */</span>
+<span class="add">    public final int hashCode() {</span>
+<span class="add">        final long code = Double.doubleToLongBits(xmin)</span>
+<span class="add">            + (37 * (Double.doubleToLongBits(ymin)</span>
+<span class="add">            + (37 * (Double.doubleToLongBits(xmax)</span>
+<span class="add">            + (37 * (Double.doubleToLongBits(ymax)</span>
+<span class="add">            + (37 * (Double.doubleToLongBits(dx)</span>
+<span class="add">            + (37 * (Double.doubleToLongBits(dy)))))))))));</span>
+<span class="add"></span>
+<span class="add">        return (int) code ^ (int) (code &gt;&gt;&gt; 32);</span>
+<span class="add">    }</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Compares the specified object with this math transform for equality.</span>
+<span class="add">     *</span>
+<span class="add">     * @param object the object to compare to</span>
+<span class="add">     * @return &lt;code&gt;true&lt;/code&gt; if the objects are equal.</span>
+<span class="add">     */</span>
+<span class="add">    public final boolean equals(final Object object) {</span>
+<span class="add">        if (object == this) {</span>
+<span class="add">            // Slight optimization</span>
+<span class="add">            return true;</span>
+<span class="add">        }</span>
+<span class="add"></span>
+<span class="add">        if (super.equals(object)) {</span>
+<span class="add">            final NADCONTransform that = (NADCONTransform) object;</span>
+<span class="add"></span>
+<span class="add">            return (Double.doubleToLongBits(this.xmin) == Double.doubleToLongBits(that.xmin))</span>
+<span class="add">                &amp;&amp; (Double.doubleToLongBits(this.ymin) == Double.doubleToLongBits(that.ymin))</span>
+<span class="add">                &amp;&amp; (Double.doubleToLongBits(this.xmax) == Double.doubleToLongBits(that.xmax))</span>
+<span class="add">                &amp;&amp; (Double.doubleToLongBits(this.ymax) == Double.doubleToLongBits(that.ymax))</span>
+<span class="add">                &amp;&amp; (Double.doubleToLongBits(this.dx) == Double.doubleToLongBits(that.dx))</span>
+<span class="add">                &amp;&amp; (Double.doubleToLongBits(this.dy) == Double.doubleToLongBits(that.dy))</span>
+<span class="add">                &amp;&amp; (this.gridShiftTransform).equals(that.gridShiftTransform);</span>
+<span class="add">        }</span>
+<span class="add"></span>
+<span class="add">        return false;</span>
+<span class="add">    }</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Used to set the preference for the default grid shift file location.</span>
+<span class="add">     * This allows grids parameters to be specified by name only, without the</span>
+<span class="add">     * full path. This needs to be done only once, by the superuser (root or</span>
+<span class="add">     * admin). Path values may be simple file system paths or more complex</span>
+<span class="add">     * text  representations of a url. A value of "default" resets this</span>
+<span class="add">     * preference to its default value.</span>
+<span class="add">     * &lt;br&gt;&lt;br&gt;</span>
+<span class="add">     *</span>
+<span class="add">     * Example:</span>
+<span class="add">     * &lt;blockquote&gt;</span>
+<span class="add">     * &lt;pre&gt;</span>
+<span class="add">     * java org.geotools.referencing.operation.transform.NADCONTransform file:///home/rschulz/GIS/NADCON/data</span>
+<span class="add">     * &lt;/pre&gt;</span>
+<span class="add">     * &lt;/blockquote&gt;</span>
+<span class="add">     *</span>
+<span class="add">     * @param args a single argument for the defualt location of grid shift</span>
+<span class="add">     *        files</span>
+<span class="add">     */</span>
+<span class="add">    public static void main(String[] args) {</span>
+<span class="add">        final Arguments arguments = new Arguments(args);</span>
+<span class="add">        final PrintWriter out = arguments.out;</span>
+<span class="add">        final Preferences prefs = Preferences.systemNodeForPackage(NADCONTransform.class);</span>
+<span class="add"></span>
+<span class="add">        if (args.length == 1) {</span>
+<span class="add">            if (args[0].equalsIgnoreCase("default")) {</span>
+<span class="add">                prefs.remove(GRID_LOCATION);</span>
+<span class="add">            } else {</span>
+<span class="add">                prefs.put(GRID_LOCATION, args[0]);</span>
+<span class="add">            }</span>
+<span class="add"></span>
+<span class="add">            return;</span>
+<span class="add">        } else {</span>
+<span class="add">            final String location = prefs.get(GRID_LOCATION,</span>
+<span class="add">                    DEFAULT_GRID_LOCATION);</span>
+<span class="add">            out.println(</span>
+<span class="add">                "Usage: java org.geotools.referencing.operation.transform.NADCONTransform "</span>
+<span class="add">                + "&lt;defalult grid file location (path)&gt;");</span>
+<span class="add">            out.print("Grid location: \"");</span>
+<span class="add">            out.print(location);</span>
+<span class="add">            out.println('"');</span>
+<span class="add"></span>
+<span class="add">            return;</span>
+<span class="add">        }</span>
+<span class="add">    }</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Inverse of a {@link NADCONTransform}.</span>
+<span class="add">     *</span>
+<span class="add">     * @version $Id$</span>
+<span class="add">     * @author Rueben Schulz</span>
+<span class="add">     */</span>
+<span class="add">    private final class Inverse extends AbstractMathTransform.Inverse implements Serializable {</span>
+<span class="add">        /** Serial number for interoperability with different versions. */</span>
+<span class="add">        private static final long serialVersionUID = -4707304160205218546L;</span>
+<span class="add"></span>
+<span class="add">        /**</span>
+<span class="add">         * Default constructor.</span>
+<span class="add">         */</span>
+<span class="add">        public Inverse() {</span>
+<span class="add">            NADCONTransform.this.super();</span>
+<span class="add">        }</span>
+<span class="add"></span>
+<span class="add">        /**</span>
+<span class="add">         * Returns the parameter values for this math transform.</span>
+<span class="add">         *</span>
+<span class="add">         * @return A copy of the parameter values for this math transform.</span>
+<span class="add">         */</span>
+<span class="add">        public ParameterValueGroup getParameterValues() {</span>
+<span class="add">            return null;</span>
+<span class="add">        }</span>
+<span class="add"></span>
+<span class="add">        /**</span>
+<span class="add">         * Inverse transform an array of points.</span>
+<span class="add">         *</span>
+<span class="add">         * @param source</span>
+<span class="add">         * @param srcOffset</span>
+<span class="add">         * @param dest</span>
+<span class="add">         * @param dstOffset</span>
+<span class="add">         * @param length</span>
+<span class="add">         *</span>
+<span class="add">         * @throws TransformException if the input point is outside the area</span>
+<span class="add">         *         covered by this grid.</span>
+<span class="add">         */</span>
+<span class="add">        public void transform(final double[] source, final int srcOffset,</span>
+<span class="add">            final double[] dest, final int dstOffset, final int length)</span>
+<span class="add">            throws TransformException {</span>
+<span class="add">            NADCONTransform.this.inverseTransform(source, srcOffset, dest,</span>
+<span class="add">                dstOffset, length);</span>
+<span class="add">        }</span>
+<span class="add"></span>
+<span class="add">        /**</span>
+<span class="add">         * Restore reference to this object after deserialization.</span>
+<span class="add">         *</span>
+<span class="add">         * @param in DOCUMENT ME!</span>
+<span class="add">         * @throws IOException DOCUMENT ME!</span>
+<span class="add">         * @throws ClassNotFoundException DOCUMENT ME!</span>
+<span class="add">         */</span>
+<span class="add">        private void readObject(ObjectInputStream in)</span>
+<span class="add">            throws IOException, ClassNotFoundException {</span>
+<span class="add">            in.defaultReadObject();</span>
+<span class="add">            NADCONTransform.this.inverse = this;</span>
+<span class="add">        }</span>
+<span class="add">    }</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * The provider for {@link NADCONTransform}. This provider will construct</span>
+<span class="add">     * transforms from {@linkPlain org.geotools.referencing.crs.GeographicCRS</span>
+<span class="add">     * geographic} to {@linkPlain org.geotools.referencing.crs.GeographicCRS</span>
+<span class="add">     * geographic} coordinate reference systems.</span>
+<span class="add">     *</span>
+<span class="add">     * @version $Id$</span>
+<span class="add">     * @author Rueben Schulz</span>
+<span class="add">     */</span>
+<span class="add">    public static class Provider extends MathTransformProvider {</span>
+<span class="add">        /** Serial number for interoperability with different versions. */</span>
+<span class="add">        private static final long serialVersionUID = -4707304160205218546L;</span>
+<span class="add"></span>
+<span class="add">        /**</span>
+<span class="add">         * The operation parameter descriptor for the "Latitude_difference_file"</span>
+<span class="add">         * parameter value. The default value is "conus.las".</span>
+<span class="add">         */</span>
+<span class="add">        public static final ParameterDescriptor LAT_DIFF_FILE</span>
+<span class="add">            = new org.geotools.parameter.ParameterDescriptor(</span>
+<span class="add">                "Latitude_difference_file", "".getClass(), null, "conus.las");</span>
+<span class="add"></span>
+<span class="add">        /**</span>
+<span class="add">         * The operation parameter descriptor for the "Longitude_difference_file"</span>
+<span class="add">         * parameter value. The default value is "conus.los".</span>
+<span class="add">         */</span>
+<span class="add">        public static final ParameterDescriptor LONG_DIFF_FILE</span>
+<span class="add">            = new org.geotools.parameter.ParameterDescriptor(</span>
+<span class="add">                "Longitude_difference_file", new String().getClass(), null, "conus.los");</span>
+<span class="add"></span>
+<span class="add">        /** The parameters group. */</span>
+<span class="add">        static final ParameterDescriptorGroup PARAMETERS = group(new Identifier[] {</span>
+<span class="add">                    new Identifier(Citation.OPEN_GIS, null, "NADCON"),</span>
+<span class="add">                    new Identifier(Citation.EPSG, "EPSG", "9613")</span>
+<span class="add">                }, new ParameterDescriptor[] { LAT_DIFF_FILE, LONG_DIFF_FILE });</span>
+<span class="add"></span>
+<span class="add">        /**</span>
+<span class="add">         * Constructs a provider.</span>
+<span class="add">         */</span>
+<span class="add">        public Provider() {</span>
+<span class="add">            super(2, 2, PARAMETERS);</span>
+<span class="add">        }</span>
+<span class="add"></span>
+<span class="add">        /**</span>
+<span class="add">         * Returns the resources key for {@linkPlain #getName localized name}.</span>
+<span class="add">         * This method is for internal purpose by Geotools implementation</span>
+<span class="add">         * only.</span>
+<span class="add">         *</span>
+<span class="add">         * @return the resource key for this math transform</span>
+<span class="add">         */</span>
+<span class="add">        protected int getLocalizationKey() {</span>
+<span class="add">            return ResourceKeys.NADCON_TRANSFORM;</span>
+<span class="add">        }</span>
+<span class="add"></span>
+<span class="add">        /**</span>
+<span class="add">         * Creates a math transform from the specified group of parameter</span>
+<span class="add">         * values.</span>
+<span class="add">         *</span>
+<span class="add">         * @param values The group of parameter values.</span>
+<span class="add">         * @return The created math transform.</span>
+<span class="add">         * @throws ParameterNotFoundException if a required parameter was not</span>
+<span class="add">         *         found.</span>
+<span class="add">         * @throws FactoryException if there is a problem creating this</span>
+<span class="add">         *         math transform.</span>
+<span class="add">         */</span>
+<span class="add">        protected MathTransform createMathTransform(ParameterValueGroup values)</span>
+<span class="add">            throws ParameterNotFoundException, FactoryException {</span>
+<span class="add">            return new NADCONTransform(</span>
+<span class="add">                stringValue(values, LAT_DIFF_FILE),</span>
+<span class="add">                stringValue(values, LONG_DIFF_FILE));</span>
+<span class="add">        }</span>
+<span class="add">    }</span>
+<span class="add">}</span></pre></td></tr>
+</table>
+    </div>
+  </body>
+</html>

Propchange: sis/ip-review/rev/07843/NADCON.xhtml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/ip-review/rev/07843/NADCON.xhtml
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: sis/ip-review/rev/09131/NADCON.xhtml
URL: http://svn.apache.org/viewvc/sis/ip-review/rev/09131/NADCON.xhtml?rev=1717746&view=auto
==============================================================================
--- sis/ip-review/rev/09131/NADCON.xhtml (added)
+++ sis/ip-review/rev/09131/NADCON.xhtml Thu Dec  3 12:11:45 2015
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta charset="UTF-8"/>
+    <title>NADCON changes for revisions 9130:9131</title>
+    <style type="text/css" media="all">
+      @import url("../../reports.css");
+    </style>
+  </head>
+  <body>
+    <div>
+      <h1>NADCON changes for revisions 9130:9131</h1>
+      <p>The same information has been fetched independently from the EPSG database.</p>
+
+<p><b>Command line:</b></p>
+<blockquote><code>svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r9130:9131 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/operation/transform/NADCONTransform.java</code></blockquote>
+<table class="changes">
+<tr><th>Revision 9130</th><th>Revision 9131</th></tr>
+<tr><td><pre> */
+static final ParameterDescriptorGroup PARAMETERS = createDescriptorGroup(new Identifier[] {
+        new Identifier(Citation.OPEN_GIS, "NADCON"),
+        new Identifier(Citation.EPSG,     "9613"),
+        new Identifier(Citation.GEOTOOLS, Resources.formatInternational(
+                                          ResourceKeys.NADCON_TRANSFORM))</pre></td>
+<td><pre> */
+static final ParameterDescriptorGroup PARAMETERS = createDescriptorGroup(new Identifier[] {
+        new Identifier(Citation.OPEN_GIS, "NADCON"),
+<span class="add">        new Identifier(Citation.EPSG,     "NADCON"),</span>
+        new Identifier(Citation.EPSG,     "9613"),
+        new Identifier(Citation.GEOTOOLS, Resources.formatInternational(
+                                          ResourceKeys.NADCON_TRANSFORM))</pre></td></tr>
+</table>
+    </div>
+  </body>
+</html>

Propchange: sis/ip-review/rev/09131/NADCON.xhtml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/ip-review/rev/09131/NADCON.xhtml
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: sis/ip-review/rev/10796/NADCON.xhtml
URL: http://svn.apache.org/viewvc/sis/ip-review/rev/10796/NADCON.xhtml?rev=1717746&view=auto
==============================================================================
--- sis/ip-review/rev/10796/NADCON.xhtml (added)
+++ sis/ip-review/rev/10796/NADCON.xhtml Thu Dec  3 12:11:45 2015
@@ -0,0 +1,85 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta charset="UTF-8"/>
+    <title>NADCON changes for revisions 10795:10796</title>
+    <style type="text/css" media="all">
+      @import url("../../reports.css");
+    </style>
+  </head>
+  <body>
+    <div>
+      <h1>NADCON changes for revisions 10795:10796</h1>
+<p>Changes in this commit seem to be the result of some <cite>"auto reformat"</cite> tool execution.
+The <cite>Java</cite> - <cite>GeoAPI</cite> - <cite>GeoTools</cite> import ordering is altered,
+imports used only in Javadoc are lost and the encoding of non-ASCII characters is broken.
+This commit has been reverted, except for the removal of really unused imports which are keep removed.</p>
+<p><b>Command line:</b></p>
+<blockquote><code>svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r10795:10796 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/operation/transform/NADCONTransform.java</code></blockquote>
+<table class="changes">
+<tr><th>Revision 10795</th><th>Revision 10796</th></tr>
+<tr><td><pre>package org.geotools.referencing.operation.transform;
+
+// Geotools dependencies
+<span class="del">import org.geotools.metadata.citation.Citation;</span>
+<span class="del">import org.geotools.referencing.Identifier;</span>
+<span class="del">import org.geotools.referencing.operation.MathTransformProvider;</span>
+<span class="del">import org.geotools.resources.Arguments;</span>
+<span class="del">import org.geotools.resources.cts.ResourceKeys;</span>
+<span class="del">import org.geotools.resources.cts.Resources;</span>
+<span class="del">import org.opengis.parameter.GeneralParameterValue;</span>
+<span class="del">import org.opengis.parameter.ParameterDescriptor;</span>
+<span class="del">import org.opengis.parameter.ParameterDescriptorGroup;</span>
+<span class="del">import org.opengis.parameter.ParameterNotFoundException;</span>
+<span class="del"></span>
+<span class="del">// OpenGIS dependencies</span>
+<span class="del">import org.opengis.parameter.ParameterValue;</span>
+<span class="del">import org.opengis.parameter.ParameterValueGroup;</span>
+<span class="del">import org.opengis.referencing.FactoryException;</span>
+<span class="del">import org.opengis.referencing.operation.MathTransform;</span>
+<span class="del">import org.opengis.referencing.operation.TransformException;</span>
+<span class="del"></span>
+<span class="del">// J2SE dependencies</span>
+import java.io.BufferedReader;
+import java.io.EOFException;
+import java.io.File;</pre></td>
+<td><pre>package org.geotools.referencing.operation.transform;
+
+// Geotools dependencies
+import java.io.BufferedReader;
+import java.io.EOFException;
+import java.io.File;</pre></td></tr>
+<tr><td><pre>import java.util.StringTokenizer;
+import java.util.prefs.Preferences;
+
+
+/**
+ * The North American Datum Conversion (NADCON) Transform (EPSG code 9613) is a
+ * two dimentional datum shift method, created by the National Geodetic Survey</pre></td>
+<td><pre>import java.util.StringTokenizer;
+import java.util.prefs.Preferences;
+
+<span class="add">import org.geotools.metadata.citation.Citation;</span>
+<span class="add">import org.geotools.referencing.Identifier;</span>
+<span class="add">import org.geotools.referencing.operation.MathTransformProvider;</span>
+<span class="add">import org.geotools.resources.Arguments;</span>
+<span class="add">import org.geotools.resources.cts.ResourceKeys;</span>
+<span class="add">import org.geotools.resources.cts.Resources;</span>
+<span class="add">import org.opengis.parameter.GeneralParameterValue;</span>
+<span class="add">import org.opengis.parameter.ParameterDescriptor;</span>
+<span class="add">import org.opengis.parameter.ParameterDescriptorGroup;</span>
+<span class="add">import org.opengis.parameter.ParameterNotFoundException;</span>
+<span class="add">import org.opengis.parameter.ParameterValue;</span>
+<span class="add">import org.opengis.parameter.ParameterValueGroup;</span>
+<span class="add">import org.opengis.referencing.FactoryException;</span>
+<span class="add">import org.opengis.referencing.operation.MathTransform;</span>
+<span class="add">import org.opengis.referencing.operation.TransformException;</span>
+
+<span class="add"></span>
+/**
+ * The North American Datum Conversion (NADCON) Transform (EPSG code 9613) is a
+ * two dimentional datum shift method, created by the National Geodetic Survey</pre></td></tr>
+</table>
+    </div>
+  </body>
+</html>

Propchange: sis/ip-review/rev/10796/NADCON.xhtml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/ip-review/rev/10796/NADCON.xhtml
------------------------------------------------------------------------------
    svn:mime-type = text/html



Mime
View raw message