sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1673222 [4/5] - in /sis/ip-review: ./ rev/09215/ rev/10796/ rev/11372/ rev/20874/
Date Mon, 13 Apr 2015 15:20:45 GMT
Added: sis/ip-review/rev/10796/LambertConformal.xhtml
URL: http://svn.apache.org/viewvc/sis/ip-review/rev/10796/LambertConformal.xhtml?rev=1673222&view=auto
==============================================================================
--- sis/ip-review/rev/10796/LambertConformal.xhtml (added)
+++ sis/ip-review/rev/10796/LambertConformal.xhtml Mon Apr 13 15:20:44 2015
@@ -0,0 +1,414 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta charset="UTF-8"/>
+    <title>LambertConformal changes for revisions 9356:10796</title>
+    <style type="text/css" media="all">
+      @import url("../../reports.css");
+    </style>
+  </head>
+  <body>
+    <div>
+      <h1>LambertConformal changes for revisions 9356:10796</h1>
+<p>
+  Documentation and formatting 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.
+  Those changes have been reverted.
+</p><p>
+  Code changes are addition of new <code>esri</code> and <code>belgium</code> fields for handling special cases.
+  Those changes have been omitted from Apache SIS, which use a different way to handle those special cases
+  (by altering the coefficients of normalization and denormalisation affine transforms).
+</p><p>
+  Addition of ESRI provider has been omitted, since Apache SIS tries to handle both cases with a single
+  <code>LambertConformal2SP</code> provider.
+</p>
+<p><b>Command line:</b></p>
+<blockquote><code>svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r9356:10796 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/operation/projection/LambertConformal.java</code></blockquote>
+<table class="changes">
+<tr><th>Revision 9356</th><th>Revision 10796</th></tr>
+<tr><td><pre>/*
+ * Geotools - OpenSource mapping toolkit
+ * (C) 2003, 2004 Geotools Project Managment Committee (PMC)
+<span class="del"> * (C) 2001, Institut de Recherche pour le Développement</span>
+ * (C) 1999, Fisheries and Oceans Canada
+ *
+ *    This library is free software; you can redistribute it and/or</pre></td>
+<td><pre>/*
+ * Geotools - OpenSource mapping toolkit
+ * (C) 2003, 2004 Geotools Project Managment Committee (PMC)
+<span class="add"> * (C) 2001, Institut de Recherche pour le D�veloppement</span>
+ * (C) 1999, Fisheries and Oceans Canada
+ *
+ *    This library is free software; you can redistribute it and/or</pre></td></tr>
+<tr><td><pre>package org.geotools.referencing.operation.projection;
+
+// J2SE dependencies and extensions
+import java.util.Collection;
+<span class="del">import java.awt.geom.Point2D;</span>
+import javax.units.NonSI;
+
+<span class="del">// OpenGIS dependencies</span>
+import org.opengis.parameter.ParameterDescriptor;
+<span class="del">import org.opengis.parameter.ParameterValueGroup;</span>
+import org.opengis.parameter.ParameterDescriptorGroup;
+import org.opengis.parameter.ParameterNotFoundException;
+import org.opengis.referencing.operation.MathTransform;
+
+<span class="del">// Geotools dependencies</span>
+<span class="del">import org.geotools.measure.Latitude;</span>
+<span class="del">import org.geotools.referencing.Identifier;</span>
+<span class="del">import org.geotools.metadata.citation.Citation;</span>
+<span class="del">import org.geotools.resources.cts.ResourceKeys;</span>
+<span class="del">import org.geotools.resources.cts.Resources;</span>
+
+<span class="del"></span>
+/**
+ * Lambert Conical Conformal Projection.  Areas and shapes are deformed
+ * as one moves away from standard parallels.  The angles are true in
+ * a limited area.  This projection is used for the charts of North America.
+<span class="del"> * It uses a default central latitude of 40°N.</span>
+ * &lt;br&gt;&lt;br&gt;
+ *
+ * This implementation provides transforms for three cases of the lambert conic</pre></td>
+<td><pre>package org.geotools.referencing.operation.projection;
+
+// J2SE dependencies and extensions
+<span class="add">import java.awt.geom.Point2D;</span>
+import java.util.Collection;
+<span class="add"></span>
+import javax.units.NonSI;
+
+<span class="add">import org.geotools.measure.Latitude;</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.resources.cts.ResourceKeys;</span>
+<span class="add">import org.geotools.resources.cts.Resources;</span>
+import org.opengis.parameter.ParameterDescriptor;
+import org.opengis.parameter.ParameterDescriptorGroup;
+import org.opengis.parameter.ParameterNotFoundException;
+<span class="add">import org.opengis.parameter.ParameterValueGroup;</span>
+import org.opengis.referencing.operation.MathTransform;
+
+
+/**
+ * Lambert Conical Conformal Projection.  Areas and shapes are deformed
+ * as one moves away from standard parallels.  The angles are true in
+ * a limited area.  This projection is used for the charts of North America.
+<span class="add"> * It uses a default central latitude of 40�N.</span>
+ * &lt;br&gt;&lt;br&gt;
+ *
+ * This implementation provides transforms for three cases of the lambert conic</pre></td></tr>
+<tr><td><pre>*   &lt;li&gt;&lt;code&gt;Lambert_Conformal_Conic_1SP&lt;/code&gt; (EPSG code 9801)&lt;/li&gt;
+*   &lt;li&gt;&lt;code&gt;Lambert_Conformal_Conic_2SP&lt;/code&gt; (EPSG code 9802)&lt;/li&gt;
+*   &lt;li&gt;&lt;code&gt;Lambert_Conic_Conformal_2SP_Belgium&lt;/code&gt; (EPSG code 9803)&lt;/li&gt;
+* &lt;/ul&gt;
+*
+* For the 1SP case the latitude of origin is used as the standard parallel (SP).
+* To use a 1SP with a latitude of origin different from the SP, use the 2SP
+<span class="del">* and set both the SP1 and SP2 to the single SP.</span>
+* &lt;br&gt;&lt;br&gt;
+*
+* &lt;strong&gt;References:&lt;/strong&gt;&lt;ul&gt;
+*   &lt;li&gt;John P. Snyder (Map Projections - A Working Manual,&lt;br&gt;
+*       U.S. Geological Survey Professional Paper 1395, 1987)&lt;/li&gt;</pre></td>
+<td><pre>*   &lt;li&gt;&lt;code&gt;Lambert_Conformal_Conic_1SP&lt;/code&gt; (EPSG code 9801)&lt;/li&gt;
+*   &lt;li&gt;&lt;code&gt;Lambert_Conformal_Conic_2SP&lt;/code&gt; (EPSG code 9802)&lt;/li&gt;
+*   &lt;li&gt;&lt;code&gt;Lambert_Conic_Conformal_2SP_Belgium&lt;/code&gt; (EPSG code 9803)&lt;/li&gt;
+<span class="add">*   &lt;li&gt;&lt;code&gt;Lambert_Conformal_Conic&lt;/code&gt;&lt;/li&gt;</span>
+* &lt;/ul&gt;
+*
+* For the 1SP case the latitude of origin is used as the standard parallel (SP).
+* To use a 1SP with a latitude of origin different from the SP, use the 2SP
+<span class="add">* and set both the SP1 and SP2 to the single SP. Alternatively, the "standard_parallel_2"</span>
+<span class="add">* parameter is optional and will be given the same value as "standard_parallel_1"</span>
+<span class="add">* if not set (creating a 1 standard parallel projection).</span>
+* &lt;br&gt;&lt;br&gt;
+*
+<span class="add">* The &lt;code&gt;Lambert_Conformal_Conic&lt;/code&gt; is a 2SP case that includes a</span>
+<span class="add">* scale_factor code that ESRI specifies.</span>
+<span class="add">* &lt;br&gt;&lt;br&gt;</span>
+<span class="add">*</span>
+* &lt;strong&gt;References:&lt;/strong&gt;&lt;ul&gt;
+*   &lt;li&gt;John P. Snyder (Map Projections - A Working Manual,&lt;br&gt;
+*       U.S. Geological Survey Professional Paper 1395, 1987)&lt;/li&gt;</pre></td></tr>
+<tr><td><pre>* @see &lt;A HREF="http://www.remotesensing.org/geotiff/proj_list/lambert_conic_conformal_2sp_belgium.html"&gt;lambert_conic_conformal_2sp_belgium&lt;/A&gt;
+*
+* @version $Id$
+<span class="del">* @author André Gosselin</span>
+* @author Martin Desruisseaux
+* @author Rueben Schulz
+*/</pre></td>
+<td><pre>* @see &lt;A HREF="http://www.remotesensing.org/geotiff/proj_list/lambert_conic_conformal_2sp_belgium.html"&gt;lambert_conic_conformal_2sp_belgium&lt;/A&gt;
+*
+* @version $Id$
+<span class="add">* @author Andr� Gosselin</span>
+* @author Martin Desruisseaux
+* @author Rueben Schulz
+*/</pre></td></tr>
+<tr><td><pre>private static final double BELGE_A = 0.00014204313635987700;
+
+/**
+<span class="del"> * Standards parallels in radians, for {@link #getParameterValues} implementation.</span>
+ */
+<span class="del">protected final double phi1, phi2;</span>
+
+/**
+ * Internal variables for computation.
+ */
+private final double n,F,rho0;</pre></td>
+<td><pre>private static final double BELGE_A = 0.00014204313635987700;
+
+/**
+<span class="add"> * Standards parallel 1 in radians, for {@link #getParameterValues} implementation.</span>
+ */
+<span class="add">private final double phi1;</span>
+
+/**
+<span class="add"> * Standards parallel 2 in radians, for {@link #getParameterValues} implementation.</span>
+<span class="add"> */</span>
+<span class="add">private double phi2;</span>
+<span class="add"></span>
+<span class="add">/**</span>
+ * Internal variables for computation.
+ */
+private final double n,F,rho0;</pre></td></tr>
+<tr><td><pre> */
+private final boolean belgium;
+
+
+/**
+ * The {@link org.geotools.referencing.operation.MathTransformProvider}</pre></td>
+<td><pre> */
+private final boolean belgium;
+
+<span class="add">/**</span>
+<span class="add"> * &lt;code&gt;true&lt;/code&gt; for ESRI 2SP parameters.</span>
+<span class="add"> */</span>
+<span class="add">private final boolean esri;</span>
+
+/**
+ * The {@link org.geotools.referencing.operation.MathTransformProvider}</pre></td></tr>
+<tr><td><pre>            throws ParameterNotFoundException
+    {
+        final Collection descriptors = PARAMETERS.descriptors();
+<span class="del">        return new LambertConformal(parameters, descriptors, false, false);</span>
+    }
+}</pre></td>
+<td><pre>            throws ParameterNotFoundException
+    {
+        final Collection descriptors = PARAMETERS.descriptors();
+<span class="add">        return new LambertConformal(parameters, descriptors, false, false, false);</span>
+    }
+}</pre></td></tr>
+<tr><td><pre>public static class Provider2SP extends Provider {
+    /**
+     * The operation parameter descriptor for the {@link #phi1 standard parallel 1}
+<span class="del">     * parameter value. Valid values range is from -90 to 90°. Default value is 0.</span>
+     */
+    public static final ParameterDescriptor STANDARD_PARALLEL_1 = createDescriptor(
+            new Identifier[] {</pre></td>
+<td><pre>public static class Provider2SP extends Provider {
+    /**
+     * The operation parameter descriptor for the {@link #phi1 standard parallel 1}
+<span class="add">     * parameter value. Valid values range is from -90 to 90�. Default value is 0.</span>
+     */
+    public static final ParameterDescriptor STANDARD_PARALLEL_1 = createDescriptor(
+            new Identifier[] {</pre></td></tr>
+<tr><td><pre>/**
+ * The operation parameter descriptor for the {@link #phi2 standard parallel 2}
+<span class="del"> * parameter value. Valid values range is from -90 to 90°. Default value is 0.</span>
+ */
+public static final ParameterDescriptor STANDARD_PARALLEL_2 = createDescriptor(
+        new Identifier[] {</pre></td>
+<td><pre>/**
+ * The operation parameter descriptor for the {@link #phi2 standard parallel 2}
+<span class="add"> * parameter value. Valid values range is from -90 to 90�. Default value is 0.</span>
+ */
+public static final ParameterDescriptor STANDARD_PARALLEL_2 = createDescriptor(
+        new Identifier[] {</pre></td></tr>
+<tr><td><pre>            new Identifier(Citation.EPSG,     "Latitude of 2nd standard parallel"),
+            new Identifier(Citation.GEOTIFF,  "StdParallel2")
+        },
+<span class="del">        0, -90, 90, NonSI.DEGREE_ANGLE);</span>
+
+/**
+ * The parameters group.
+<span class="del"> * @task REVISIT: ESRI also included the scale factor as a parameter</span>
+ */
+static final ParameterDescriptorGroup PARAMETERS = createDescriptorGroup(new Identifier[] {
+        new Identifier(Citation.OPEN_GIS, "Lambert_Conformal_Conic_2SP"),</pre></td>
+<td><pre>            new Identifier(Citation.EPSG,     "Latitude of 2nd standard parallel"),
+            new Identifier(Citation.GEOTIFF,  "StdParallel2")
+        },
+<span class="add">        Double.NaN, -90, 90, NonSI.DEGREE_ANGLE);</span>
+
+/**
+ * The parameters group.
+ */
+static final ParameterDescriptorGroup PARAMETERS = createDescriptorGroup(new Identifier[] {
+        new Identifier(Citation.OPEN_GIS, "Lambert_Conformal_Conic_2SP"),</pre></td></tr>
+<tr><td><pre>    new Identifier(Citation.EPSG,     "9802"),
+    new Identifier(Citation.GEOTIFF,  "CT_LambertConfConic_2SP"),
+    new Identifier(Citation.GEOTIFF,  "CT_LambertConfConic"),
+<span class="del">    new Identifier(Citation.ESRI,     "Lambert_Conformal_Conic"),</span>
+    new Identifier(Citation.GEOTOOLS, Resources.formatInternational(
+                                      ResourceKeys.LAMBERT_CONFORMAL_PROJECTION))
+}, new ParameterDescriptor[] {</pre></td>
+<td><pre>    new Identifier(Citation.EPSG,     "9802"),
+    new Identifier(Citation.GEOTIFF,  "CT_LambertConfConic_2SP"),
+    new Identifier(Citation.GEOTIFF,  "CT_LambertConfConic"),
+    new Identifier(Citation.GEOTOOLS, Resources.formatInternational(
+                                      ResourceKeys.LAMBERT_CONFORMAL_PROJECTION))
+}, new ParameterDescriptor[] {</pre></td></tr>
+<tr><td><pre>           throws ParameterNotFoundException
+   {
+       final Collection descriptors = PARAMETERS.descriptors();
+<span class="del">       return new LambertConformal(parameters, descriptors, true, false);</span>
+   }
+}</pre></td>
+<td><pre>           throws ParameterNotFoundException
+   {
+       final Collection descriptors = PARAMETERS.descriptors();
+<span class="add">       return new LambertConformal(parameters, descriptors, true, false, false);</span>
+   }
+}</pre></td></tr>
+<tr><td><pre>            throws ParameterNotFoundException
+    {
+        final Collection descriptors = PARAMETERS.descriptors();
+<span class="del">        return new LambertConformal(parameters, descriptors, true, true);</span>
+    }
+}
+
+
+/**
+ * Construct a new map projection from the supplied parameters.
+ *
+ * @param  parameters The parameter values in standard units.</pre></td>
+<td><pre>            throws ParameterNotFoundException
+    {
+        final Collection descriptors = PARAMETERS.descriptors();
+<span class="add">        return new LambertConformal(parameters, descriptors, true, true, false);</span>
+    }
+}
+
+<span class="add">/**</span>
+<span class="add"> * The {@link org.geotools.referencing.operation.MathTransformProvider}</span>
+<span class="add"> * for a {@link LambertConformal} 2SP projection, using ESRI parameters.</span>
+<span class="add"> * ESRI includes a scale_factor parameter.</span>
+<span class="add"> *</span>
+<span class="add"> * @see org.geotools.referencing.operation.MathTransformFactory</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 final class Provider2SP_ESRI extends Provider2SP {</span>
+<span class="add">    /**</span>
+<span class="add">     * The parameters group.</span>
+<span class="add">     */</span>
+<span class="add">    static final ParameterDescriptorGroup PARAMETERS = createDescriptorGroup(new Identifier[] {</span>
+<span class="add">            new Identifier(Citation.ESRI,     "Lambert_Conformal_Conic"),</span>
+<span class="add">            new Identifier(Citation.GEOTOOLS, Resources.formatInternational(</span>
+<span class="add">                                              ResourceKeys.LAMBERT_CONFORMAL_PROJECTION))</span>
+<span class="add">        }, new ParameterDescriptor[] {</span>
+<span class="add">            SEMI_MAJOR,          SEMI_MINOR,</span>
+<span class="add">            CENTRAL_MERIDIAN,    LATITUDE_OF_ORIGIN,</span>
+<span class="add">            STANDARD_PARALLEL_1, STANDARD_PARALLEL_2,</span>
+<span class="add">            SCALE_FACTOR,</span>
+<span class="add">            FALSE_EASTING,       FALSE_NORTHING</span>
+<span class="add">        });</span>
+
+/**
+<span class="add">     * Construct a new provider.</span>
+<span class="add">     */</span>
+<span class="add">    public Provider2SP_ESRI() {</span>
+<span class="add">        super(PARAMETERS);</span>
+<span class="add">    }</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Creates a transform from the specified group of parameter values.</span>
+<span class="add">     *</span>
+<span class="add">     * @param  parameters 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 found.</span>
+<span class="add">     */</span>
+<span class="add">    protected MathTransform createMathTransform(final ParameterValueGroup parameters)</span>
+<span class="add">            throws ParameterNotFoundException</span>
+<span class="add">    {</span>
+<span class="add">        final Collection descriptors = PARAMETERS.descriptors();</span>
+<span class="add">        return new LambertConformal(parameters, descriptors, true, false, true);</span>
+<span class="add">    }</span>
+<span class="add">}</span>
+<span class="add"></span>
+<span class="add"></span>
+<span class="add">/**</span>
+ * Construct a new map projection from the supplied parameters.
+ *
+ * @param  parameters The parameter values in standard units.</pre></td></tr>
+<tr><td><pre> * @param  sp2 &lt;code&gt;true&lt;/code&gt; for 2SP, or &lt;code&gt;false&lt;/code&gt; for 1SP.
+ * @param  belgium &lt;code&gt;true&lt;/code&gt; for the Belgium 2SP case.
+ * @throws ParameterNotFoundException if a mandatory parameter is missing.
+<span class="del"> *</span>
+<span class="del"> * @task REVISIT: set phi2 = phi1 if no SP2 value is given by user (an 1sp projection)</span>
+ */
+<span class="del">public LambertConformal(final ParameterValueGroup parameters, final Collection expected,</span>
+<span class="del">                        final boolean sp2, final boolean belgium)</span>
+{
+    //Fetch parameters
+    super(parameters, expected);
+    this.sp2         = sp2;
+    this.belgium     = belgium;
+    if (sp2) {
+        phi1 = doubleValue(expected, Provider2SP.STANDARD_PARALLEL_1, parameters);
+        phi2 = doubleValue(expected, Provider2SP.STANDARD_PARALLEL_2, parameters);
+    } else {
+        if (belgium) {
+            throw new IllegalArgumentException();</pre></td>
+<td><pre> * @param  sp2 &lt;code&gt;true&lt;/code&gt; for 2SP, or &lt;code&gt;false&lt;/code&gt; for 1SP.
+ * @param  belgium &lt;code&gt;true&lt;/code&gt; for the Belgium 2SP case.
+ * @throws ParameterNotFoundException if a mandatory parameter is missing.
+ */
+<span class="add">LambertConformal(final ParameterValueGroup parameters, final Collection expected,</span>
+<span class="add">                 final boolean sp2, final boolean belgium, final boolean esri)</span>
+<span class="add">        throws ParameterNotFoundException</span>
+{
+    //Fetch parameters
+    super(parameters, expected);
+    this.sp2         = sp2;
+    this.belgium     = belgium;
+<span class="add">    this.esri        = esri;</span>
+    if (sp2) {
+        phi1 = doubleValue(expected, Provider2SP.STANDARD_PARALLEL_1, parameters);
+<span class="add">        ensureLatitudeInRange(Provider2SP.STANDARD_PARALLEL_1, phi1, true);</span>
+        phi2 = doubleValue(expected, Provider2SP.STANDARD_PARALLEL_2, parameters);
+<span class="add">        if (Double.isNaN(phi2)) {</span>
+<span class="add">            phi2 = phi1;</span>
+<span class="add">        }</span>
+<span class="add">        ensureLatitudeInRange(Provider2SP.STANDARD_PARALLEL_2, phi2, true);</span>
+    } else {
+        if (belgium) {
+            throw new IllegalArgumentException();</pre></td></tr>
+<tr><td><pre> * {@inheritDoc}
+ */
+public ParameterDescriptorGroup getParameterDescriptors() {
+<span class="del">    return (belgium) ?</span>
+                Provider2SP_Belgium.PARAMETERS :
+<span class="del">                ((sp2) ? Provider2SP.PARAMETERS : Provider1SP.PARAMETERS);</span>
+}
+
+/**</pre></td>
+<td><pre> * {@inheritDoc}
+ */
+public ParameterDescriptorGroup getParameterDescriptors() {
+<span class="add">    return (esri) ?</span>
+<span class="add">                Provider2SP_ESRI.PARAMETERS :</span>
+<span class="add">                ((belgium) ?</span>
+                Provider2SP_Belgium.PARAMETERS :
+<span class="add">                    ((sp2) ? Provider2SP.PARAMETERS : Provider1SP.PARAMETERS));</span>
+}
+
+/**</pre></td></tr>
+</table>
+    </div>
+  </body>
+</html>

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

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

Added: sis/ip-review/rev/10796/LambertConformal1SP.xhtml
URL: http://svn.apache.org/viewvc/sis/ip-review/rev/10796/LambertConformal1SP.xhtml?rev=1673222&view=auto
==============================================================================
--- sis/ip-review/rev/10796/LambertConformal1SP.xhtml (added)
+++ sis/ip-review/rev/10796/LambertConformal1SP.xhtml Mon Apr 13 15:20:44 2015
@@ -0,0 +1,405 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta charset="UTF-8"/>
+    <title>LambertConformal1SP changes for revisions 9356:10796</title>
+    <style type="text/css" media="all">
+      @import url("../../reports.css");
+    </style>
+  </head>
+  <body>
+    <div>
+      <h1>LambertConformal1SP changes for revisions 9356:10796</h1>
+<p>
+  Those changes were applied to the <code>LambertConformal</code> class, but appear here as a side effect of SVN history.
+  See <code><a href="LambertConformal.xhtml">LambertConformal</a></code> for information on the actions taken.
+</p>
+<p><b>Command line:</b></p>
+<blockquote><code>svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r9356:10796 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/operation/projection/LambertConformal1SP.java</code></blockquote>
+<table class="changes">
+<tr><th>Revision 9356</th><th>Revision 10796</th></tr>
+<tr><td><pre>/*
+ * Geotools - OpenSource mapping toolkit
+ * (C) 2003, 2004 Geotools Project Managment Committee (PMC)
+<span class="del"> * (C) 2001, Institut de Recherche pour le Développement</span>
+ * (C) 1999, Fisheries and Oceans Canada
+ *
+ *    This library is free software; you can redistribute it and/or</pre></td>
+<td><pre>/*
+ * Geotools - OpenSource mapping toolkit
+ * (C) 2003, 2004 Geotools Project Managment Committee (PMC)
+<span class="add"> * (C) 2001, Institut de Recherche pour le D�veloppement</span>
+ * (C) 1999, Fisheries and Oceans Canada
+ *
+ *    This library is free software; you can redistribute it and/or</pre></td></tr>
+<tr><td><pre>package org.geotools.referencing.operation.projection;
+
+// J2SE dependencies and extensions
+import java.util.Collection;
+<span class="del">import java.awt.geom.Point2D;</span>
+import javax.units.NonSI;
+
+<span class="del">// OpenGIS dependencies</span>
+import org.opengis.parameter.ParameterDescriptor;
+<span class="del">import org.opengis.parameter.ParameterValueGroup;</span>
+import org.opengis.parameter.ParameterDescriptorGroup;
+import org.opengis.parameter.ParameterNotFoundException;
+import org.opengis.referencing.operation.MathTransform;
+
+<span class="del">// Geotools dependencies</span>
+<span class="del">import org.geotools.measure.Latitude;</span>
+<span class="del">import org.geotools.referencing.Identifier;</span>
+<span class="del">import org.geotools.metadata.citation.Citation;</span>
+<span class="del">import org.geotools.resources.cts.ResourceKeys;</span>
+<span class="del">import org.geotools.resources.cts.Resources;</span>
+
+<span class="del"></span>
+/**
+ * Lambert Conical Conformal Projection.  Areas and shapes are deformed
+ * as one moves away from standard parallels.  The angles are true in
+ * a limited area.  This projection is used for the charts of North America.
+<span class="del"> * It uses a default central latitude of 40°N.</span>
+ * &lt;br&gt;&lt;br&gt;
+ *
+ * This implementation provides transforms for three cases of the lambert conic</pre></td>
+<td><pre>package org.geotools.referencing.operation.projection;
+
+// J2SE dependencies and extensions
+<span class="add">import java.awt.geom.Point2D;</span>
+import java.util.Collection;
+<span class="add"></span>
+import javax.units.NonSI;
+
+<span class="add">import org.geotools.measure.Latitude;</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.resources.cts.ResourceKeys;</span>
+<span class="add">import org.geotools.resources.cts.Resources;</span>
+import org.opengis.parameter.ParameterDescriptor;
+import org.opengis.parameter.ParameterDescriptorGroup;
+import org.opengis.parameter.ParameterNotFoundException;
+<span class="add">import org.opengis.parameter.ParameterValueGroup;</span>
+import org.opengis.referencing.operation.MathTransform;
+
+
+/**
+ * Lambert Conical Conformal Projection.  Areas and shapes are deformed
+ * as one moves away from standard parallels.  The angles are true in
+ * a limited area.  This projection is used for the charts of North America.
+<span class="add"> * It uses a default central latitude of 40�N.</span>
+ * &lt;br&gt;&lt;br&gt;
+ *
+ * This implementation provides transforms for three cases of the lambert conic</pre></td></tr>
+<tr><td><pre>*   &lt;li&gt;&lt;code&gt;Lambert_Conformal_Conic_1SP&lt;/code&gt; (EPSG code 9801)&lt;/li&gt;
+*   &lt;li&gt;&lt;code&gt;Lambert_Conformal_Conic_2SP&lt;/code&gt; (EPSG code 9802)&lt;/li&gt;
+*   &lt;li&gt;&lt;code&gt;Lambert_Conic_Conformal_2SP_Belgium&lt;/code&gt; (EPSG code 9803)&lt;/li&gt;
+* &lt;/ul&gt;
+*
+* For the 1SP case the latitude of origin is used as the standard parallel (SP).
+* To use a 1SP with a latitude of origin different from the SP, use the 2SP
+<span class="del">* and set both the SP1 and SP2 to the single SP.</span>
+* &lt;br&gt;&lt;br&gt;
+*
+* &lt;strong&gt;References:&lt;/strong&gt;&lt;ul&gt;
+*   &lt;li&gt;John P. Snyder (Map Projections - A Working Manual,&lt;br&gt;
+*       U.S. Geological Survey Professional Paper 1395, 1987)&lt;/li&gt;</pre></td>
+<td><pre>*   &lt;li&gt;&lt;code&gt;Lambert_Conformal_Conic_1SP&lt;/code&gt; (EPSG code 9801)&lt;/li&gt;
+*   &lt;li&gt;&lt;code&gt;Lambert_Conformal_Conic_2SP&lt;/code&gt; (EPSG code 9802)&lt;/li&gt;
+*   &lt;li&gt;&lt;code&gt;Lambert_Conic_Conformal_2SP_Belgium&lt;/code&gt; (EPSG code 9803)&lt;/li&gt;
+<span class="add">*   &lt;li&gt;&lt;code&gt;Lambert_Conformal_Conic&lt;/code&gt;&lt;/li&gt;</span>
+* &lt;/ul&gt;
+*
+* For the 1SP case the latitude of origin is used as the standard parallel (SP).
+* To use a 1SP with a latitude of origin different from the SP, use the 2SP
+<span class="add">* and set both the SP1 and SP2 to the single SP. Alternatively, the "standard_parallel_2"</span>
+<span class="add">* parameter is optional and will be given the same value as "standard_parallel_1"</span>
+<span class="add">* if not set (creating a 1 standard parallel projection).</span>
+* &lt;br&gt;&lt;br&gt;
+*
+<span class="add">* The &lt;code&gt;Lambert_Conformal_Conic&lt;/code&gt; is a 2SP case that includes a</span>
+<span class="add">* scale_factor code that ESRI specifies.</span>
+<span class="add">* &lt;br&gt;&lt;br&gt;</span>
+<span class="add">*</span>
+* &lt;strong&gt;References:&lt;/strong&gt;&lt;ul&gt;
+*   &lt;li&gt;John P. Snyder (Map Projections - A Working Manual,&lt;br&gt;
+*       U.S. Geological Survey Professional Paper 1395, 1987)&lt;/li&gt;</pre></td></tr>
+<tr><td><pre>* @see &lt;A HREF="http://www.remotesensing.org/geotiff/proj_list/lambert_conic_conformal_2sp_belgium.html"&gt;lambert_conic_conformal_2sp_belgium&lt;/A&gt;
+*
+* @version $Id$
+<span class="del">* @author André Gosselin</span>
+* @author Martin Desruisseaux
+* @author Rueben Schulz
+*/</pre></td>
+<td><pre>* @see &lt;A HREF="http://www.remotesensing.org/geotiff/proj_list/lambert_conic_conformal_2sp_belgium.html"&gt;lambert_conic_conformal_2sp_belgium&lt;/A&gt;
+*
+* @version $Id$
+<span class="add">* @author Andr� Gosselin</span>
+* @author Martin Desruisseaux
+* @author Rueben Schulz
+*/</pre></td></tr>
+<tr><td><pre>private static final double BELGE_A = 0.00014204313635987700;
+
+/**
+<span class="del"> * Standards parallels in radians, for {@link #getParameterValues} implementation.</span>
+ */
+<span class="del">protected final double phi1, phi2;</span>
+
+/**
+ * Internal variables for computation.
+ */
+private final double n,F,rho0;</pre></td>
+<td><pre>private static final double BELGE_A = 0.00014204313635987700;
+
+/**
+<span class="add"> * Standards parallel 1 in radians, for {@link #getParameterValues} implementation.</span>
+ */
+<span class="add">private final double phi1;</span>
+
+/**
+<span class="add"> * Standards parallel 2 in radians, for {@link #getParameterValues} implementation.</span>
+<span class="add"> */</span>
+<span class="add">private double phi2;</span>
+<span class="add"></span>
+<span class="add">/**</span>
+ * Internal variables for computation.
+ */
+private final double n,F,rho0;</pre></td></tr>
+<tr><td><pre> */
+private final boolean belgium;
+
+
+/**
+ * The {@link org.geotools.referencing.operation.MathTransformProvider}</pre></td>
+<td><pre> */
+private final boolean belgium;
+
+<span class="add">/**</span>
+<span class="add"> * &lt;code&gt;true&lt;/code&gt; for ESRI 2SP parameters.</span>
+<span class="add"> */</span>
+<span class="add">private final boolean esri;</span>
+
+/**
+ * The {@link org.geotools.referencing.operation.MathTransformProvider}</pre></td></tr>
+<tr><td><pre>            throws ParameterNotFoundException
+    {
+        final Collection descriptors = PARAMETERS.descriptors();
+<span class="del">        return new LambertConformal(parameters, descriptors, false, false);</span>
+    }
+}</pre></td>
+<td><pre>            throws ParameterNotFoundException
+    {
+        final Collection descriptors = PARAMETERS.descriptors();
+<span class="add">        return new LambertConformal(parameters, descriptors, false, false, false);</span>
+    }
+}</pre></td></tr>
+<tr><td><pre>public static class Provider2SP extends Provider {
+    /**
+     * The operation parameter descriptor for the {@link #phi1 standard parallel 1}
+<span class="del">     * parameter value. Valid values range is from -90 to 90°. Default value is 0.</span>
+     */
+    public static final ParameterDescriptor STANDARD_PARALLEL_1 = createDescriptor(
+            new Identifier[] {</pre></td>
+<td><pre>public static class Provider2SP extends Provider {
+    /**
+     * The operation parameter descriptor for the {@link #phi1 standard parallel 1}
+<span class="add">     * parameter value. Valid values range is from -90 to 90�. Default value is 0.</span>
+     */
+    public static final ParameterDescriptor STANDARD_PARALLEL_1 = createDescriptor(
+            new Identifier[] {</pre></td></tr>
+<tr><td><pre>/**
+ * The operation parameter descriptor for the {@link #phi2 standard parallel 2}
+<span class="del"> * parameter value. Valid values range is from -90 to 90°. Default value is 0.</span>
+ */
+public static final ParameterDescriptor STANDARD_PARALLEL_2 = createDescriptor(
+        new Identifier[] {</pre></td>
+<td><pre>/**
+ * The operation parameter descriptor for the {@link #phi2 standard parallel 2}
+<span class="add"> * parameter value. Valid values range is from -90 to 90�. Default value is 0.</span>
+ */
+public static final ParameterDescriptor STANDARD_PARALLEL_2 = createDescriptor(
+        new Identifier[] {</pre></td></tr>
+<tr><td><pre>            new Identifier(Citation.EPSG,     "Latitude of 2nd standard parallel"),
+            new Identifier(Citation.GEOTIFF,  "StdParallel2")
+        },
+<span class="del">        0, -90, 90, NonSI.DEGREE_ANGLE);</span>
+
+/**
+ * The parameters group.
+<span class="del"> * @task REVISIT: ESRI also included the scale factor as a parameter</span>
+ */
+static final ParameterDescriptorGroup PARAMETERS = createDescriptorGroup(new Identifier[] {
+        new Identifier(Citation.OPEN_GIS, "Lambert_Conformal_Conic_2SP"),</pre></td>
+<td><pre>            new Identifier(Citation.EPSG,     "Latitude of 2nd standard parallel"),
+            new Identifier(Citation.GEOTIFF,  "StdParallel2")
+        },
+<span class="add">        Double.NaN, -90, 90, NonSI.DEGREE_ANGLE);</span>
+
+/**
+ * The parameters group.
+ */
+static final ParameterDescriptorGroup PARAMETERS = createDescriptorGroup(new Identifier[] {
+        new Identifier(Citation.OPEN_GIS, "Lambert_Conformal_Conic_2SP"),</pre></td></tr>
+<tr><td><pre>    new Identifier(Citation.EPSG,     "9802"),
+    new Identifier(Citation.GEOTIFF,  "CT_LambertConfConic_2SP"),
+    new Identifier(Citation.GEOTIFF,  "CT_LambertConfConic"),
+<span class="del">    new Identifier(Citation.ESRI,     "Lambert_Conformal_Conic"),</span>
+    new Identifier(Citation.GEOTOOLS, Resources.formatInternational(
+                                      ResourceKeys.LAMBERT_CONFORMAL_PROJECTION))
+}, new ParameterDescriptor[] {</pre></td>
+<td><pre>    new Identifier(Citation.EPSG,     "9802"),
+    new Identifier(Citation.GEOTIFF,  "CT_LambertConfConic_2SP"),
+    new Identifier(Citation.GEOTIFF,  "CT_LambertConfConic"),
+    new Identifier(Citation.GEOTOOLS, Resources.formatInternational(
+                                      ResourceKeys.LAMBERT_CONFORMAL_PROJECTION))
+}, new ParameterDescriptor[] {</pre></td></tr>
+<tr><td><pre>           throws ParameterNotFoundException
+   {
+       final Collection descriptors = PARAMETERS.descriptors();
+<span class="del">       return new LambertConformal(parameters, descriptors, true, false);</span>
+   }
+}</pre></td>
+<td><pre>           throws ParameterNotFoundException
+   {
+       final Collection descriptors = PARAMETERS.descriptors();
+<span class="add">       return new LambertConformal(parameters, descriptors, true, false, false);</span>
+   }
+}</pre></td></tr>
+<tr><td><pre>            throws ParameterNotFoundException
+    {
+        final Collection descriptors = PARAMETERS.descriptors();
+<span class="del">        return new LambertConformal(parameters, descriptors, true, true);</span>
+    }
+}
+
+
+/**
+ * Construct a new map projection from the supplied parameters.
+ *
+ * @param  parameters The parameter values in standard units.</pre></td>
+<td><pre>            throws ParameterNotFoundException
+    {
+        final Collection descriptors = PARAMETERS.descriptors();
+<span class="add">        return new LambertConformal(parameters, descriptors, true, true, false);</span>
+    }
+}
+
+<span class="add">/**</span>
+<span class="add"> * The {@link org.geotools.referencing.operation.MathTransformProvider}</span>
+<span class="add"> * for a {@link LambertConformal} 2SP projection, using ESRI parameters.</span>
+<span class="add"> * ESRI includes a scale_factor parameter.</span>
+<span class="add"> *</span>
+<span class="add"> * @see org.geotools.referencing.operation.MathTransformFactory</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 final class Provider2SP_ESRI extends Provider2SP {</span>
+<span class="add">    /**</span>
+<span class="add">     * The parameters group.</span>
+<span class="add">     */</span>
+<span class="add">    static final ParameterDescriptorGroup PARAMETERS = createDescriptorGroup(new Identifier[] {</span>
+<span class="add">            new Identifier(Citation.ESRI,     "Lambert_Conformal_Conic"),</span>
+<span class="add">            new Identifier(Citation.GEOTOOLS, Resources.formatInternational(</span>
+<span class="add">                                              ResourceKeys.LAMBERT_CONFORMAL_PROJECTION))</span>
+<span class="add">        }, new ParameterDescriptor[] {</span>
+<span class="add">            SEMI_MAJOR,          SEMI_MINOR,</span>
+<span class="add">            CENTRAL_MERIDIAN,    LATITUDE_OF_ORIGIN,</span>
+<span class="add">            STANDARD_PARALLEL_1, STANDARD_PARALLEL_2,</span>
+<span class="add">            SCALE_FACTOR,</span>
+<span class="add">            FALSE_EASTING,       FALSE_NORTHING</span>
+<span class="add">        });</span>
+
+/**
+<span class="add">     * Construct a new provider.</span>
+<span class="add">     */</span>
+<span class="add">    public Provider2SP_ESRI() {</span>
+<span class="add">        super(PARAMETERS);</span>
+<span class="add">    }</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Creates a transform from the specified group of parameter values.</span>
+<span class="add">     *</span>
+<span class="add">     * @param  parameters 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 found.</span>
+<span class="add">     */</span>
+<span class="add">    protected MathTransform createMathTransform(final ParameterValueGroup parameters)</span>
+<span class="add">            throws ParameterNotFoundException</span>
+<span class="add">    {</span>
+<span class="add">        final Collection descriptors = PARAMETERS.descriptors();</span>
+<span class="add">        return new LambertConformal(parameters, descriptors, true, false, true);</span>
+<span class="add">    }</span>
+<span class="add">}</span>
+<span class="add"></span>
+<span class="add"></span>
+<span class="add">/**</span>
+ * Construct a new map projection from the supplied parameters.
+ *
+ * @param  parameters The parameter values in standard units.</pre></td></tr>
+<tr><td><pre> * @param  sp2 &lt;code&gt;true&lt;/code&gt; for 2SP, or &lt;code&gt;false&lt;/code&gt; for 1SP.
+ * @param  belgium &lt;code&gt;true&lt;/code&gt; for the Belgium 2SP case.
+ * @throws ParameterNotFoundException if a mandatory parameter is missing.
+<span class="del"> *</span>
+<span class="del"> * @task REVISIT: set phi2 = phi1 if no SP2 value is given by user (an 1sp projection)</span>
+ */
+<span class="del">public LambertConformal(final ParameterValueGroup parameters, final Collection expected,</span>
+<span class="del">                        final boolean sp2, final boolean belgium)</span>
+{
+    //Fetch parameters
+    super(parameters, expected);
+    this.sp2         = sp2;
+    this.belgium     = belgium;
+    if (sp2) {
+        phi1 = doubleValue(expected, Provider2SP.STANDARD_PARALLEL_1, parameters);
+        phi2 = doubleValue(expected, Provider2SP.STANDARD_PARALLEL_2, parameters);
+    } else {
+        if (belgium) {
+            throw new IllegalArgumentException();</pre></td>
+<td><pre> * @param  sp2 &lt;code&gt;true&lt;/code&gt; for 2SP, or &lt;code&gt;false&lt;/code&gt; for 1SP.
+ * @param  belgium &lt;code&gt;true&lt;/code&gt; for the Belgium 2SP case.
+ * @throws ParameterNotFoundException if a mandatory parameter is missing.
+ */
+<span class="add">LambertConformal(final ParameterValueGroup parameters, final Collection expected,</span>
+<span class="add">                 final boolean sp2, final boolean belgium, final boolean esri)</span>
+<span class="add">        throws ParameterNotFoundException</span>
+{
+    //Fetch parameters
+    super(parameters, expected);
+    this.sp2         = sp2;
+    this.belgium     = belgium;
+<span class="add">    this.esri        = esri;</span>
+    if (sp2) {
+        phi1 = doubleValue(expected, Provider2SP.STANDARD_PARALLEL_1, parameters);
+<span class="add">        ensureLatitudeInRange(Provider2SP.STANDARD_PARALLEL_1, phi1, true);</span>
+        phi2 = doubleValue(expected, Provider2SP.STANDARD_PARALLEL_2, parameters);
+<span class="add">        if (Double.isNaN(phi2)) {</span>
+<span class="add">            phi2 = phi1;</span>
+<span class="add">        }</span>
+<span class="add">        ensureLatitudeInRange(Provider2SP.STANDARD_PARALLEL_2, phi2, true);</span>
+    } else {
+        if (belgium) {
+            throw new IllegalArgumentException();</pre></td></tr>
+<tr><td><pre> * {@inheritDoc}
+ */
+public ParameterDescriptorGroup getParameterDescriptors() {
+<span class="del">    return (belgium) ?</span>
+                Provider2SP_Belgium.PARAMETERS :
+<span class="del">                ((sp2) ? Provider2SP.PARAMETERS : Provider1SP.PARAMETERS);</span>
+}
+
+/**</pre></td>
+<td><pre> * {@inheritDoc}
+ */
+public ParameterDescriptorGroup getParameterDescriptors() {
+<span class="add">    return (esri) ?</span>
+<span class="add">                Provider2SP_ESRI.PARAMETERS :</span>
+<span class="add">                ((belgium) ?</span>
+                Provider2SP_Belgium.PARAMETERS :
+<span class="add">                    ((sp2) ? Provider2SP.PARAMETERS : Provider1SP.PARAMETERS));</span>
+}
+
+/**</pre></td></tr>
+</table>
+    </div>
+  </body>
+</html>

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

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

Added: sis/ip-review/rev/10796/LambertConformal2SP.xhtml
URL: http://svn.apache.org/viewvc/sis/ip-review/rev/10796/LambertConformal2SP.xhtml?rev=1673222&view=auto
==============================================================================
--- sis/ip-review/rev/10796/LambertConformal2SP.xhtml (added)
+++ sis/ip-review/rev/10796/LambertConformal2SP.xhtml Mon Apr 13 15:20:44 2015
@@ -0,0 +1,405 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta charset="UTF-8"/>
+    <title>LambertConformal2SP changes for revisions 9356:10796</title>
+    <style type="text/css" media="all">
+      @import url("../../reports.css");
+    </style>
+  </head>
+  <body>
+    <div>
+      <h1>LambertConformal2SP changes for revisions 9356:10796</h1>
+<p>
+  Those changes were applied to the <code>LambertConformal</code> class, but appear here as a side effect of SVN history.
+  See <code><a href="LambertConformal.xhtml">LambertConformal</a></code> for information on the actions taken.
+</p>
+<p><b>Command line:</b></p>
+<blockquote><code>svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r9356:10796 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/operation/projection/LambertConformal2SP.java</code></blockquote>
+<table class="changes">
+<tr><th>Revision 9356</th><th>Revision 10796</th></tr>
+<tr><td><pre>/*
+ * Geotools - OpenSource mapping toolkit
+ * (C) 2003, 2004 Geotools Project Managment Committee (PMC)
+<span class="del"> * (C) 2001, Institut de Recherche pour le Développement</span>
+ * (C) 1999, Fisheries and Oceans Canada
+ *
+ *    This library is free software; you can redistribute it and/or</pre></td>
+<td><pre>/*
+ * Geotools - OpenSource mapping toolkit
+ * (C) 2003, 2004 Geotools Project Managment Committee (PMC)
+<span class="add"> * (C) 2001, Institut de Recherche pour le D�veloppement</span>
+ * (C) 1999, Fisheries and Oceans Canada
+ *
+ *    This library is free software; you can redistribute it and/or</pre></td></tr>
+<tr><td><pre>package org.geotools.referencing.operation.projection;
+
+// J2SE dependencies and extensions
+import java.util.Collection;
+<span class="del">import java.awt.geom.Point2D;</span>
+import javax.units.NonSI;
+
+<span class="del">// OpenGIS dependencies</span>
+import org.opengis.parameter.ParameterDescriptor;
+<span class="del">import org.opengis.parameter.ParameterValueGroup;</span>
+import org.opengis.parameter.ParameterDescriptorGroup;
+import org.opengis.parameter.ParameterNotFoundException;
+import org.opengis.referencing.operation.MathTransform;
+
+<span class="del">// Geotools dependencies</span>
+<span class="del">import org.geotools.measure.Latitude;</span>
+<span class="del">import org.geotools.referencing.Identifier;</span>
+<span class="del">import org.geotools.metadata.citation.Citation;</span>
+<span class="del">import org.geotools.resources.cts.ResourceKeys;</span>
+<span class="del">import org.geotools.resources.cts.Resources;</span>
+
+<span class="del"></span>
+/**
+ * Lambert Conical Conformal Projection.  Areas and shapes are deformed
+ * as one moves away from standard parallels.  The angles are true in
+ * a limited area.  This projection is used for the charts of North America.
+<span class="del"> * It uses a default central latitude of 40°N.</span>
+ * &lt;br&gt;&lt;br&gt;
+ *
+ * This implementation provides transforms for three cases of the lambert conic</pre></td>
+<td><pre>package org.geotools.referencing.operation.projection;
+
+// J2SE dependencies and extensions
+<span class="add">import java.awt.geom.Point2D;</span>
+import java.util.Collection;
+<span class="add"></span>
+import javax.units.NonSI;
+
+<span class="add">import org.geotools.measure.Latitude;</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.resources.cts.ResourceKeys;</span>
+<span class="add">import org.geotools.resources.cts.Resources;</span>
+import org.opengis.parameter.ParameterDescriptor;
+import org.opengis.parameter.ParameterDescriptorGroup;
+import org.opengis.parameter.ParameterNotFoundException;
+<span class="add">import org.opengis.parameter.ParameterValueGroup;</span>
+import org.opengis.referencing.operation.MathTransform;
+
+
+/**
+ * Lambert Conical Conformal Projection.  Areas and shapes are deformed
+ * as one moves away from standard parallels.  The angles are true in
+ * a limited area.  This projection is used for the charts of North America.
+<span class="add"> * It uses a default central latitude of 40�N.</span>
+ * &lt;br&gt;&lt;br&gt;
+ *
+ * This implementation provides transforms for three cases of the lambert conic</pre></td></tr>
+<tr><td><pre>*   &lt;li&gt;&lt;code&gt;Lambert_Conformal_Conic_1SP&lt;/code&gt; (EPSG code 9801)&lt;/li&gt;
+*   &lt;li&gt;&lt;code&gt;Lambert_Conformal_Conic_2SP&lt;/code&gt; (EPSG code 9802)&lt;/li&gt;
+*   &lt;li&gt;&lt;code&gt;Lambert_Conic_Conformal_2SP_Belgium&lt;/code&gt; (EPSG code 9803)&lt;/li&gt;
+* &lt;/ul&gt;
+*
+* For the 1SP case the latitude of origin is used as the standard parallel (SP).
+* To use a 1SP with a latitude of origin different from the SP, use the 2SP
+<span class="del">* and set both the SP1 and SP2 to the single SP.</span>
+* &lt;br&gt;&lt;br&gt;
+*
+* &lt;strong&gt;References:&lt;/strong&gt;&lt;ul&gt;
+*   &lt;li&gt;John P. Snyder (Map Projections - A Working Manual,&lt;br&gt;
+*       U.S. Geological Survey Professional Paper 1395, 1987)&lt;/li&gt;</pre></td>
+<td><pre>*   &lt;li&gt;&lt;code&gt;Lambert_Conformal_Conic_1SP&lt;/code&gt; (EPSG code 9801)&lt;/li&gt;
+*   &lt;li&gt;&lt;code&gt;Lambert_Conformal_Conic_2SP&lt;/code&gt; (EPSG code 9802)&lt;/li&gt;
+*   &lt;li&gt;&lt;code&gt;Lambert_Conic_Conformal_2SP_Belgium&lt;/code&gt; (EPSG code 9803)&lt;/li&gt;
+<span class="add">*   &lt;li&gt;&lt;code&gt;Lambert_Conformal_Conic&lt;/code&gt;&lt;/li&gt;</span>
+* &lt;/ul&gt;
+*
+* For the 1SP case the latitude of origin is used as the standard parallel (SP).
+* To use a 1SP with a latitude of origin different from the SP, use the 2SP
+<span class="add">* and set both the SP1 and SP2 to the single SP. Alternatively, the "standard_parallel_2"</span>
+<span class="add">* parameter is optional and will be given the same value as "standard_parallel_1"</span>
+<span class="add">* if not set (creating a 1 standard parallel projection).</span>
+* &lt;br&gt;&lt;br&gt;
+*
+<span class="add">* The &lt;code&gt;Lambert_Conformal_Conic&lt;/code&gt; is a 2SP case that includes a</span>
+<span class="add">* scale_factor code that ESRI specifies.</span>
+<span class="add">* &lt;br&gt;&lt;br&gt;</span>
+<span class="add">*</span>
+* &lt;strong&gt;References:&lt;/strong&gt;&lt;ul&gt;
+*   &lt;li&gt;John P. Snyder (Map Projections - A Working Manual,&lt;br&gt;
+*       U.S. Geological Survey Professional Paper 1395, 1987)&lt;/li&gt;</pre></td></tr>
+<tr><td><pre>* @see &lt;A HREF="http://www.remotesensing.org/geotiff/proj_list/lambert_conic_conformal_2sp_belgium.html"&gt;lambert_conic_conformal_2sp_belgium&lt;/A&gt;
+*
+* @version $Id$
+<span class="del">* @author André Gosselin</span>
+* @author Martin Desruisseaux
+* @author Rueben Schulz
+*/</pre></td>
+<td><pre>* @see &lt;A HREF="http://www.remotesensing.org/geotiff/proj_list/lambert_conic_conformal_2sp_belgium.html"&gt;lambert_conic_conformal_2sp_belgium&lt;/A&gt;
+*
+* @version $Id$
+<span class="add">* @author Andr� Gosselin</span>
+* @author Martin Desruisseaux
+* @author Rueben Schulz
+*/</pre></td></tr>
+<tr><td><pre>private static final double BELGE_A = 0.00014204313635987700;
+
+/**
+<span class="del"> * Standards parallels in radians, for {@link #getParameterValues} implementation.</span>
+ */
+<span class="del">protected final double phi1, phi2;</span>
+
+/**
+ * Internal variables for computation.
+ */
+private final double n,F,rho0;</pre></td>
+<td><pre>private static final double BELGE_A = 0.00014204313635987700;
+
+/**
+<span class="add"> * Standards parallel 1 in radians, for {@link #getParameterValues} implementation.</span>
+ */
+<span class="add">private final double phi1;</span>
+
+/**
+<span class="add"> * Standards parallel 2 in radians, for {@link #getParameterValues} implementation.</span>
+<span class="add"> */</span>
+<span class="add">private double phi2;</span>
+<span class="add"></span>
+<span class="add">/**</span>
+ * Internal variables for computation.
+ */
+private final double n,F,rho0;</pre></td></tr>
+<tr><td><pre> */
+private final boolean belgium;
+
+
+/**
+ * The {@link org.geotools.referencing.operation.MathTransformProvider}</pre></td>
+<td><pre> */
+private final boolean belgium;
+
+<span class="add">/**</span>
+<span class="add"> * &lt;code&gt;true&lt;/code&gt; for ESRI 2SP parameters.</span>
+<span class="add"> */</span>
+<span class="add">private final boolean esri;</span>
+
+/**
+ * The {@link org.geotools.referencing.operation.MathTransformProvider}</pre></td></tr>
+<tr><td><pre>            throws ParameterNotFoundException
+    {
+        final Collection descriptors = PARAMETERS.descriptors();
+<span class="del">        return new LambertConformal(parameters, descriptors, false, false);</span>
+    }
+}</pre></td>
+<td><pre>            throws ParameterNotFoundException
+    {
+        final Collection descriptors = PARAMETERS.descriptors();
+<span class="add">        return new LambertConformal(parameters, descriptors, false, false, false);</span>
+    }
+}</pre></td></tr>
+<tr><td><pre>public static class Provider2SP extends Provider {
+    /**
+     * The operation parameter descriptor for the {@link #phi1 standard parallel 1}
+<span class="del">     * parameter value. Valid values range is from -90 to 90°. Default value is 0.</span>
+     */
+    public static final ParameterDescriptor STANDARD_PARALLEL_1 = createDescriptor(
+            new Identifier[] {</pre></td>
+<td><pre>public static class Provider2SP extends Provider {
+    /**
+     * The operation parameter descriptor for the {@link #phi1 standard parallel 1}
+<span class="add">     * parameter value. Valid values range is from -90 to 90�. Default value is 0.</span>
+     */
+    public static final ParameterDescriptor STANDARD_PARALLEL_1 = createDescriptor(
+            new Identifier[] {</pre></td></tr>
+<tr><td><pre>/**
+ * The operation parameter descriptor for the {@link #phi2 standard parallel 2}
+<span class="del"> * parameter value. Valid values range is from -90 to 90°. Default value is 0.</span>
+ */
+public static final ParameterDescriptor STANDARD_PARALLEL_2 = createDescriptor(
+        new Identifier[] {</pre></td>
+<td><pre>/**
+ * The operation parameter descriptor for the {@link #phi2 standard parallel 2}
+<span class="add"> * parameter value. Valid values range is from -90 to 90�. Default value is 0.</span>
+ */
+public static final ParameterDescriptor STANDARD_PARALLEL_2 = createDescriptor(
+        new Identifier[] {</pre></td></tr>
+<tr><td><pre>            new Identifier(Citation.EPSG,     "Latitude of 2nd standard parallel"),
+            new Identifier(Citation.GEOTIFF,  "StdParallel2")
+        },
+<span class="del">        0, -90, 90, NonSI.DEGREE_ANGLE);</span>
+
+/**
+ * The parameters group.
+<span class="del"> * @task REVISIT: ESRI also included the scale factor as a parameter</span>
+ */
+static final ParameterDescriptorGroup PARAMETERS = createDescriptorGroup(new Identifier[] {
+        new Identifier(Citation.OPEN_GIS, "Lambert_Conformal_Conic_2SP"),</pre></td>
+<td><pre>            new Identifier(Citation.EPSG,     "Latitude of 2nd standard parallel"),
+            new Identifier(Citation.GEOTIFF,  "StdParallel2")
+        },
+<span class="add">        Double.NaN, -90, 90, NonSI.DEGREE_ANGLE);</span>
+
+/**
+ * The parameters group.
+ */
+static final ParameterDescriptorGroup PARAMETERS = createDescriptorGroup(new Identifier[] {
+        new Identifier(Citation.OPEN_GIS, "Lambert_Conformal_Conic_2SP"),</pre></td></tr>
+<tr><td><pre>    new Identifier(Citation.EPSG,     "9802"),
+    new Identifier(Citation.GEOTIFF,  "CT_LambertConfConic_2SP"),
+    new Identifier(Citation.GEOTIFF,  "CT_LambertConfConic"),
+<span class="del">    new Identifier(Citation.ESRI,     "Lambert_Conformal_Conic"),</span>
+    new Identifier(Citation.GEOTOOLS, Resources.formatInternational(
+                                      ResourceKeys.LAMBERT_CONFORMAL_PROJECTION))
+}, new ParameterDescriptor[] {</pre></td>
+<td><pre>    new Identifier(Citation.EPSG,     "9802"),
+    new Identifier(Citation.GEOTIFF,  "CT_LambertConfConic_2SP"),
+    new Identifier(Citation.GEOTIFF,  "CT_LambertConfConic"),
+    new Identifier(Citation.GEOTOOLS, Resources.formatInternational(
+                                      ResourceKeys.LAMBERT_CONFORMAL_PROJECTION))
+}, new ParameterDescriptor[] {</pre></td></tr>
+<tr><td><pre>           throws ParameterNotFoundException
+   {
+       final Collection descriptors = PARAMETERS.descriptors();
+<span class="del">       return new LambertConformal(parameters, descriptors, true, false);</span>
+   }
+}</pre></td>
+<td><pre>           throws ParameterNotFoundException
+   {
+       final Collection descriptors = PARAMETERS.descriptors();
+<span class="add">       return new LambertConformal(parameters, descriptors, true, false, false);</span>
+   }
+}</pre></td></tr>
+<tr><td><pre>            throws ParameterNotFoundException
+    {
+        final Collection descriptors = PARAMETERS.descriptors();
+<span class="del">        return new LambertConformal(parameters, descriptors, true, true);</span>
+    }
+}
+
+
+/**
+ * Construct a new map projection from the supplied parameters.
+ *
+ * @param  parameters The parameter values in standard units.</pre></td>
+<td><pre>            throws ParameterNotFoundException
+    {
+        final Collection descriptors = PARAMETERS.descriptors();
+<span class="add">        return new LambertConformal(parameters, descriptors, true, true, false);</span>
+    }
+}
+
+<span class="add">/**</span>
+<span class="add"> * The {@link org.geotools.referencing.operation.MathTransformProvider}</span>
+<span class="add"> * for a {@link LambertConformal} 2SP projection, using ESRI parameters.</span>
+<span class="add"> * ESRI includes a scale_factor parameter.</span>
+<span class="add"> *</span>
+<span class="add"> * @see org.geotools.referencing.operation.MathTransformFactory</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 final class Provider2SP_ESRI extends Provider2SP {</span>
+<span class="add">    /**</span>
+<span class="add">     * The parameters group.</span>
+<span class="add">     */</span>
+<span class="add">    static final ParameterDescriptorGroup PARAMETERS = createDescriptorGroup(new Identifier[] {</span>
+<span class="add">            new Identifier(Citation.ESRI,     "Lambert_Conformal_Conic"),</span>
+<span class="add">            new Identifier(Citation.GEOTOOLS, Resources.formatInternational(</span>
+<span class="add">                                              ResourceKeys.LAMBERT_CONFORMAL_PROJECTION))</span>
+<span class="add">        }, new ParameterDescriptor[] {</span>
+<span class="add">            SEMI_MAJOR,          SEMI_MINOR,</span>
+<span class="add">            CENTRAL_MERIDIAN,    LATITUDE_OF_ORIGIN,</span>
+<span class="add">            STANDARD_PARALLEL_1, STANDARD_PARALLEL_2,</span>
+<span class="add">            SCALE_FACTOR,</span>
+<span class="add">            FALSE_EASTING,       FALSE_NORTHING</span>
+<span class="add">        });</span>
+
+/**
+<span class="add">     * Construct a new provider.</span>
+<span class="add">     */</span>
+<span class="add">    public Provider2SP_ESRI() {</span>
+<span class="add">        super(PARAMETERS);</span>
+<span class="add">    }</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Creates a transform from the specified group of parameter values.</span>
+<span class="add">     *</span>
+<span class="add">     * @param  parameters 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 found.</span>
+<span class="add">     */</span>
+<span class="add">    protected MathTransform createMathTransform(final ParameterValueGroup parameters)</span>
+<span class="add">            throws ParameterNotFoundException</span>
+<span class="add">    {</span>
+<span class="add">        final Collection descriptors = PARAMETERS.descriptors();</span>
+<span class="add">        return new LambertConformal(parameters, descriptors, true, false, true);</span>
+<span class="add">    }</span>
+<span class="add">}</span>
+<span class="add"></span>
+<span class="add"></span>
+<span class="add">/**</span>
+ * Construct a new map projection from the supplied parameters.
+ *
+ * @param  parameters The parameter values in standard units.</pre></td></tr>
+<tr><td><pre> * @param  sp2 &lt;code&gt;true&lt;/code&gt; for 2SP, or &lt;code&gt;false&lt;/code&gt; for 1SP.
+ * @param  belgium &lt;code&gt;true&lt;/code&gt; for the Belgium 2SP case.
+ * @throws ParameterNotFoundException if a mandatory parameter is missing.
+<span class="del"> *</span>
+<span class="del"> * @task REVISIT: set phi2 = phi1 if no SP2 value is given by user (an 1sp projection)</span>
+ */
+<span class="del">public LambertConformal(final ParameterValueGroup parameters, final Collection expected,</span>
+<span class="del">                        final boolean sp2, final boolean belgium)</span>
+{
+    //Fetch parameters
+    super(parameters, expected);
+    this.sp2         = sp2;
+    this.belgium     = belgium;
+    if (sp2) {
+        phi1 = doubleValue(expected, Provider2SP.STANDARD_PARALLEL_1, parameters);
+        phi2 = doubleValue(expected, Provider2SP.STANDARD_PARALLEL_2, parameters);
+    } else {
+        if (belgium) {
+            throw new IllegalArgumentException();</pre></td>
+<td><pre> * @param  sp2 &lt;code&gt;true&lt;/code&gt; for 2SP, or &lt;code&gt;false&lt;/code&gt; for 1SP.
+ * @param  belgium &lt;code&gt;true&lt;/code&gt; for the Belgium 2SP case.
+ * @throws ParameterNotFoundException if a mandatory parameter is missing.
+ */
+<span class="add">LambertConformal(final ParameterValueGroup parameters, final Collection expected,</span>
+<span class="add">                 final boolean sp2, final boolean belgium, final boolean esri)</span>
+<span class="add">        throws ParameterNotFoundException</span>
+{
+    //Fetch parameters
+    super(parameters, expected);
+    this.sp2         = sp2;
+    this.belgium     = belgium;
+<span class="add">    this.esri        = esri;</span>
+    if (sp2) {
+        phi1 = doubleValue(expected, Provider2SP.STANDARD_PARALLEL_1, parameters);
+<span class="add">        ensureLatitudeInRange(Provider2SP.STANDARD_PARALLEL_1, phi1, true);</span>
+        phi2 = doubleValue(expected, Provider2SP.STANDARD_PARALLEL_2, parameters);
+<span class="add">        if (Double.isNaN(phi2)) {</span>
+<span class="add">            phi2 = phi1;</span>
+<span class="add">        }</span>
+<span class="add">        ensureLatitudeInRange(Provider2SP.STANDARD_PARALLEL_2, phi2, true);</span>
+    } else {
+        if (belgium) {
+            throw new IllegalArgumentException();</pre></td></tr>
+<tr><td><pre> * {@inheritDoc}
+ */
+public ParameterDescriptorGroup getParameterDescriptors() {
+<span class="del">    return (belgium) ?</span>
+                Provider2SP_Belgium.PARAMETERS :
+<span class="del">                ((sp2) ? Provider2SP.PARAMETERS : Provider1SP.PARAMETERS);</span>
+}
+
+/**</pre></td>
+<td><pre> * {@inheritDoc}
+ */
+public ParameterDescriptorGroup getParameterDescriptors() {
+<span class="add">    return (esri) ?</span>
+<span class="add">                Provider2SP_ESRI.PARAMETERS :</span>
+<span class="add">                ((belgium) ?</span>
+                Provider2SP_Belgium.PARAMETERS :
+<span class="add">                    ((sp2) ? Provider2SP.PARAMETERS : Provider1SP.PARAMETERS));</span>
+}
+
+/**</pre></td></tr>
+</table>
+    </div>
+  </body>
+</html>

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

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

Added: sis/ip-review/rev/10796/LambertConformalBelgium.xhtml
URL: http://svn.apache.org/viewvc/sis/ip-review/rev/10796/LambertConformalBelgium.xhtml?rev=1673222&view=auto
==============================================================================
--- sis/ip-review/rev/10796/LambertConformalBelgium.xhtml (added)
+++ sis/ip-review/rev/10796/LambertConformalBelgium.xhtml Mon Apr 13 15:20:44 2015
@@ -0,0 +1,405 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta charset="UTF-8"/>
+    <title>LambertConformalBelgium changes for revisions 9356:10796</title>
+    <style type="text/css" media="all">
+      @import url("../../reports.css");
+    </style>
+  </head>
+  <body>
+    <div>
+      <h1>LambertConformalBelgium changes for revisions 9356:10796</h1>
+<p>
+  Those changes were applied to the <code>LambertConformal</code> class, but appear here as a side effect of SVN history.
+  See <code><a href="LambertConformal.xhtml">LambertConformal</a></code> for information on the actions taken.
+</p>
+<p><b>Command line:</b></p>
+<blockquote><code>svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r9356:10796 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/operation/projection/LambertConformalBelgium.java</code></blockquote>
+<table class="changes">
+<tr><th>Revision 9356</th><th>Revision 10796</th></tr>
+<tr><td><pre>/*
+ * Geotools - OpenSource mapping toolkit
+ * (C) 2003, 2004 Geotools Project Managment Committee (PMC)
+<span class="del"> * (C) 2001, Institut de Recherche pour le Développement</span>
+ * (C) 1999, Fisheries and Oceans Canada
+ *
+ *    This library is free software; you can redistribute it and/or</pre></td>
+<td><pre>/*
+ * Geotools - OpenSource mapping toolkit
+ * (C) 2003, 2004 Geotools Project Managment Committee (PMC)
+<span class="add"> * (C) 2001, Institut de Recherche pour le D�veloppement</span>
+ * (C) 1999, Fisheries and Oceans Canada
+ *
+ *    This library is free software; you can redistribute it and/or</pre></td></tr>
+<tr><td><pre>package org.geotools.referencing.operation.projection;
+
+// J2SE dependencies and extensions
+import java.util.Collection;
+<span class="del">import java.awt.geom.Point2D;</span>
+import javax.units.NonSI;
+
+<span class="del">// OpenGIS dependencies</span>
+import org.opengis.parameter.ParameterDescriptor;
+<span class="del">import org.opengis.parameter.ParameterValueGroup;</span>
+import org.opengis.parameter.ParameterDescriptorGroup;
+import org.opengis.parameter.ParameterNotFoundException;
+import org.opengis.referencing.operation.MathTransform;
+
+<span class="del">// Geotools dependencies</span>
+<span class="del">import org.geotools.measure.Latitude;</span>
+<span class="del">import org.geotools.referencing.Identifier;</span>
+<span class="del">import org.geotools.metadata.citation.Citation;</span>
+<span class="del">import org.geotools.resources.cts.ResourceKeys;</span>
+<span class="del">import org.geotools.resources.cts.Resources;</span>
+
+<span class="del"></span>
+/**
+ * Lambert Conical Conformal Projection.  Areas and shapes are deformed
+ * as one moves away from standard parallels.  The angles are true in
+ * a limited area.  This projection is used for the charts of North America.
+<span class="del"> * It uses a default central latitude of 40°N.</span>
+ * &lt;br&gt;&lt;br&gt;
+ *
+ * This implementation provides transforms for three cases of the lambert conic</pre></td>
+<td><pre>package org.geotools.referencing.operation.projection;
+
+// J2SE dependencies and extensions
+<span class="add">import java.awt.geom.Point2D;</span>
+import java.util.Collection;
+<span class="add"></span>
+import javax.units.NonSI;
+
+<span class="add">import org.geotools.measure.Latitude;</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.resources.cts.ResourceKeys;</span>
+<span class="add">import org.geotools.resources.cts.Resources;</span>
+import org.opengis.parameter.ParameterDescriptor;
+import org.opengis.parameter.ParameterDescriptorGroup;
+import org.opengis.parameter.ParameterNotFoundException;
+<span class="add">import org.opengis.parameter.ParameterValueGroup;</span>
+import org.opengis.referencing.operation.MathTransform;
+
+
+/**
+ * Lambert Conical Conformal Projection.  Areas and shapes are deformed
+ * as one moves away from standard parallels.  The angles are true in
+ * a limited area.  This projection is used for the charts of North America.
+<span class="add"> * It uses a default central latitude of 40�N.</span>
+ * &lt;br&gt;&lt;br&gt;
+ *
+ * This implementation provides transforms for three cases of the lambert conic</pre></td></tr>
+<tr><td><pre>*   &lt;li&gt;&lt;code&gt;Lambert_Conformal_Conic_1SP&lt;/code&gt; (EPSG code 9801)&lt;/li&gt;
+*   &lt;li&gt;&lt;code&gt;Lambert_Conformal_Conic_2SP&lt;/code&gt; (EPSG code 9802)&lt;/li&gt;
+*   &lt;li&gt;&lt;code&gt;Lambert_Conic_Conformal_2SP_Belgium&lt;/code&gt; (EPSG code 9803)&lt;/li&gt;
+* &lt;/ul&gt;
+*
+* For the 1SP case the latitude of origin is used as the standard parallel (SP).
+* To use a 1SP with a latitude of origin different from the SP, use the 2SP
+<span class="del">* and set both the SP1 and SP2 to the single SP.</span>
+* &lt;br&gt;&lt;br&gt;
+*
+* &lt;strong&gt;References:&lt;/strong&gt;&lt;ul&gt;
+*   &lt;li&gt;John P. Snyder (Map Projections - A Working Manual,&lt;br&gt;
+*       U.S. Geological Survey Professional Paper 1395, 1987)&lt;/li&gt;</pre></td>
+<td><pre>*   &lt;li&gt;&lt;code&gt;Lambert_Conformal_Conic_1SP&lt;/code&gt; (EPSG code 9801)&lt;/li&gt;
+*   &lt;li&gt;&lt;code&gt;Lambert_Conformal_Conic_2SP&lt;/code&gt; (EPSG code 9802)&lt;/li&gt;
+*   &lt;li&gt;&lt;code&gt;Lambert_Conic_Conformal_2SP_Belgium&lt;/code&gt; (EPSG code 9803)&lt;/li&gt;
+<span class="add">*   &lt;li&gt;&lt;code&gt;Lambert_Conformal_Conic&lt;/code&gt;&lt;/li&gt;</span>
+* &lt;/ul&gt;
+*
+* For the 1SP case the latitude of origin is used as the standard parallel (SP).
+* To use a 1SP with a latitude of origin different from the SP, use the 2SP
+<span class="add">* and set both the SP1 and SP2 to the single SP. Alternatively, the "standard_parallel_2"</span>
+<span class="add">* parameter is optional and will be given the same value as "standard_parallel_1"</span>
+<span class="add">* if not set (creating a 1 standard parallel projection).</span>
+* &lt;br&gt;&lt;br&gt;
+*
+<span class="add">* The &lt;code&gt;Lambert_Conformal_Conic&lt;/code&gt; is a 2SP case that includes a</span>
+<span class="add">* scale_factor code that ESRI specifies.</span>
+<span class="add">* &lt;br&gt;&lt;br&gt;</span>
+<span class="add">*</span>
+* &lt;strong&gt;References:&lt;/strong&gt;&lt;ul&gt;
+*   &lt;li&gt;John P. Snyder (Map Projections - A Working Manual,&lt;br&gt;
+*       U.S. Geological Survey Professional Paper 1395, 1987)&lt;/li&gt;</pre></td></tr>
+<tr><td><pre>* @see &lt;A HREF="http://www.remotesensing.org/geotiff/proj_list/lambert_conic_conformal_2sp_belgium.html"&gt;lambert_conic_conformal_2sp_belgium&lt;/A&gt;
+*
+* @version $Id$
+<span class="del">* @author André Gosselin</span>
+* @author Martin Desruisseaux
+* @author Rueben Schulz
+*/</pre></td>
+<td><pre>* @see &lt;A HREF="http://www.remotesensing.org/geotiff/proj_list/lambert_conic_conformal_2sp_belgium.html"&gt;lambert_conic_conformal_2sp_belgium&lt;/A&gt;
+*
+* @version $Id$
+<span class="add">* @author Andr� Gosselin</span>
+* @author Martin Desruisseaux
+* @author Rueben Schulz
+*/</pre></td></tr>
+<tr><td><pre>private static final double BELGE_A = 0.00014204313635987700;
+
+/**
+<span class="del"> * Standards parallels in radians, for {@link #getParameterValues} implementation.</span>
+ */
+<span class="del">protected final double phi1, phi2;</span>
+
+/**
+ * Internal variables for computation.
+ */
+private final double n,F,rho0;</pre></td>
+<td><pre>private static final double BELGE_A = 0.00014204313635987700;
+
+/**
+<span class="add"> * Standards parallel 1 in radians, for {@link #getParameterValues} implementation.</span>
+ */
+<span class="add">private final double phi1;</span>
+
+/**
+<span class="add"> * Standards parallel 2 in radians, for {@link #getParameterValues} implementation.</span>
+<span class="add"> */</span>
+<span class="add">private double phi2;</span>
+<span class="add"></span>
+<span class="add">/**</span>
+ * Internal variables for computation.
+ */
+private final double n,F,rho0;</pre></td></tr>
+<tr><td><pre> */
+private final boolean belgium;
+
+
+/**
+ * The {@link org.geotools.referencing.operation.MathTransformProvider}</pre></td>
+<td><pre> */
+private final boolean belgium;
+
+<span class="add">/**</span>
+<span class="add"> * &lt;code&gt;true&lt;/code&gt; for ESRI 2SP parameters.</span>
+<span class="add"> */</span>
+<span class="add">private final boolean esri;</span>
+
+/**
+ * The {@link org.geotools.referencing.operation.MathTransformProvider}</pre></td></tr>
+<tr><td><pre>            throws ParameterNotFoundException
+    {
+        final Collection descriptors = PARAMETERS.descriptors();
+<span class="del">        return new LambertConformal(parameters, descriptors, false, false);</span>
+    }
+}</pre></td>
+<td><pre>            throws ParameterNotFoundException
+    {
+        final Collection descriptors = PARAMETERS.descriptors();
+<span class="add">        return new LambertConformal(parameters, descriptors, false, false, false);</span>
+    }
+}</pre></td></tr>
+<tr><td><pre>public static class Provider2SP extends Provider {
+    /**
+     * The operation parameter descriptor for the {@link #phi1 standard parallel 1}
+<span class="del">     * parameter value. Valid values range is from -90 to 90°. Default value is 0.</span>
+     */
+    public static final ParameterDescriptor STANDARD_PARALLEL_1 = createDescriptor(
+            new Identifier[] {</pre></td>
+<td><pre>public static class Provider2SP extends Provider {
+    /**
+     * The operation parameter descriptor for the {@link #phi1 standard parallel 1}
+<span class="add">     * parameter value. Valid values range is from -90 to 90�. Default value is 0.</span>
+     */
+    public static final ParameterDescriptor STANDARD_PARALLEL_1 = createDescriptor(
+            new Identifier[] {</pre></td></tr>
+<tr><td><pre>/**
+ * The operation parameter descriptor for the {@link #phi2 standard parallel 2}
+<span class="del"> * parameter value. Valid values range is from -90 to 90°. Default value is 0.</span>
+ */
+public static final ParameterDescriptor STANDARD_PARALLEL_2 = createDescriptor(
+        new Identifier[] {</pre></td>
+<td><pre>/**
+ * The operation parameter descriptor for the {@link #phi2 standard parallel 2}
+<span class="add"> * parameter value. Valid values range is from -90 to 90�. Default value is 0.</span>
+ */
+public static final ParameterDescriptor STANDARD_PARALLEL_2 = createDescriptor(
+        new Identifier[] {</pre></td></tr>
+<tr><td><pre>            new Identifier(Citation.EPSG,     "Latitude of 2nd standard parallel"),
+            new Identifier(Citation.GEOTIFF,  "StdParallel2")
+        },
+<span class="del">        0, -90, 90, NonSI.DEGREE_ANGLE);</span>
+
+/**
+ * The parameters group.
+<span class="del"> * @task REVISIT: ESRI also included the scale factor as a parameter</span>
+ */
+static final ParameterDescriptorGroup PARAMETERS = createDescriptorGroup(new Identifier[] {
+        new Identifier(Citation.OPEN_GIS, "Lambert_Conformal_Conic_2SP"),</pre></td>
+<td><pre>            new Identifier(Citation.EPSG,     "Latitude of 2nd standard parallel"),
+            new Identifier(Citation.GEOTIFF,  "StdParallel2")
+        },
+<span class="add">        Double.NaN, -90, 90, NonSI.DEGREE_ANGLE);</span>
+
+/**
+ * The parameters group.
+ */
+static final ParameterDescriptorGroup PARAMETERS = createDescriptorGroup(new Identifier[] {
+        new Identifier(Citation.OPEN_GIS, "Lambert_Conformal_Conic_2SP"),</pre></td></tr>
+<tr><td><pre>    new Identifier(Citation.EPSG,     "9802"),
+    new Identifier(Citation.GEOTIFF,  "CT_LambertConfConic_2SP"),
+    new Identifier(Citation.GEOTIFF,  "CT_LambertConfConic"),
+<span class="del">    new Identifier(Citation.ESRI,     "Lambert_Conformal_Conic"),</span>
+    new Identifier(Citation.GEOTOOLS, Resources.formatInternational(
+                                      ResourceKeys.LAMBERT_CONFORMAL_PROJECTION))
+}, new ParameterDescriptor[] {</pre></td>
+<td><pre>    new Identifier(Citation.EPSG,     "9802"),
+    new Identifier(Citation.GEOTIFF,  "CT_LambertConfConic_2SP"),
+    new Identifier(Citation.GEOTIFF,  "CT_LambertConfConic"),
+    new Identifier(Citation.GEOTOOLS, Resources.formatInternational(
+                                      ResourceKeys.LAMBERT_CONFORMAL_PROJECTION))
+}, new ParameterDescriptor[] {</pre></td></tr>
+<tr><td><pre>           throws ParameterNotFoundException
+   {
+       final Collection descriptors = PARAMETERS.descriptors();
+<span class="del">       return new LambertConformal(parameters, descriptors, true, false);</span>
+   }
+}</pre></td>
+<td><pre>           throws ParameterNotFoundException
+   {
+       final Collection descriptors = PARAMETERS.descriptors();
+<span class="add">       return new LambertConformal(parameters, descriptors, true, false, false);</span>
+   }
+}</pre></td></tr>
+<tr><td><pre>            throws ParameterNotFoundException
+    {
+        final Collection descriptors = PARAMETERS.descriptors();
+<span class="del">        return new LambertConformal(parameters, descriptors, true, true);</span>
+    }
+}
+
+
+/**
+ * Construct a new map projection from the supplied parameters.
+ *
+ * @param  parameters The parameter values in standard units.</pre></td>
+<td><pre>            throws ParameterNotFoundException
+    {
+        final Collection descriptors = PARAMETERS.descriptors();
+<span class="add">        return new LambertConformal(parameters, descriptors, true, true, false);</span>
+    }
+}
+
+<span class="add">/**</span>
+<span class="add"> * The {@link org.geotools.referencing.operation.MathTransformProvider}</span>
+<span class="add"> * for a {@link LambertConformal} 2SP projection, using ESRI parameters.</span>
+<span class="add"> * ESRI includes a scale_factor parameter.</span>
+<span class="add"> *</span>
+<span class="add"> * @see org.geotools.referencing.operation.MathTransformFactory</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 final class Provider2SP_ESRI extends Provider2SP {</span>
+<span class="add">    /**</span>
+<span class="add">     * The parameters group.</span>
+<span class="add">     */</span>
+<span class="add">    static final ParameterDescriptorGroup PARAMETERS = createDescriptorGroup(new Identifier[] {</span>
+<span class="add">            new Identifier(Citation.ESRI,     "Lambert_Conformal_Conic"),</span>
+<span class="add">            new Identifier(Citation.GEOTOOLS, Resources.formatInternational(</span>
+<span class="add">                                              ResourceKeys.LAMBERT_CONFORMAL_PROJECTION))</span>
+<span class="add">        }, new ParameterDescriptor[] {</span>
+<span class="add">            SEMI_MAJOR,          SEMI_MINOR,</span>
+<span class="add">            CENTRAL_MERIDIAN,    LATITUDE_OF_ORIGIN,</span>
+<span class="add">            STANDARD_PARALLEL_1, STANDARD_PARALLEL_2,</span>
+<span class="add">            SCALE_FACTOR,</span>
+<span class="add">            FALSE_EASTING,       FALSE_NORTHING</span>
+<span class="add">        });</span>
+
+/**
+<span class="add">     * Construct a new provider.</span>
+<span class="add">     */</span>
+<span class="add">    public Provider2SP_ESRI() {</span>
+<span class="add">        super(PARAMETERS);</span>
+<span class="add">    }</span>
+<span class="add"></span>
+<span class="add">    /**</span>
+<span class="add">     * Creates a transform from the specified group of parameter values.</span>
+<span class="add">     *</span>
+<span class="add">     * @param  parameters 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 found.</span>
+<span class="add">     */</span>
+<span class="add">    protected MathTransform createMathTransform(final ParameterValueGroup parameters)</span>
+<span class="add">            throws ParameterNotFoundException</span>
+<span class="add">    {</span>
+<span class="add">        final Collection descriptors = PARAMETERS.descriptors();</span>
+<span class="add">        return new LambertConformal(parameters, descriptors, true, false, true);</span>
+<span class="add">    }</span>
+<span class="add">}</span>
+<span class="add"></span>
+<span class="add"></span>
+<span class="add">/**</span>
+ * Construct a new map projection from the supplied parameters.
+ *
+ * @param  parameters The parameter values in standard units.</pre></td></tr>
+<tr><td><pre> * @param  sp2 &lt;code&gt;true&lt;/code&gt; for 2SP, or &lt;code&gt;false&lt;/code&gt; for 1SP.
+ * @param  belgium &lt;code&gt;true&lt;/code&gt; for the Belgium 2SP case.
+ * @throws ParameterNotFoundException if a mandatory parameter is missing.
+<span class="del"> *</span>
+<span class="del"> * @task REVISIT: set phi2 = phi1 if no SP2 value is given by user (an 1sp projection)</span>
+ */
+<span class="del">public LambertConformal(final ParameterValueGroup parameters, final Collection expected,</span>
+<span class="del">                        final boolean sp2, final boolean belgium)</span>
+{
+    //Fetch parameters
+    super(parameters, expected);
+    this.sp2         = sp2;
+    this.belgium     = belgium;
+    if (sp2) {
+        phi1 = doubleValue(expected, Provider2SP.STANDARD_PARALLEL_1, parameters);
+        phi2 = doubleValue(expected, Provider2SP.STANDARD_PARALLEL_2, parameters);
+    } else {
+        if (belgium) {
+            throw new IllegalArgumentException();</pre></td>
+<td><pre> * @param  sp2 &lt;code&gt;true&lt;/code&gt; for 2SP, or &lt;code&gt;false&lt;/code&gt; for 1SP.
+ * @param  belgium &lt;code&gt;true&lt;/code&gt; for the Belgium 2SP case.
+ * @throws ParameterNotFoundException if a mandatory parameter is missing.
+ */
+<span class="add">LambertConformal(final ParameterValueGroup parameters, final Collection expected,</span>
+<span class="add">                 final boolean sp2, final boolean belgium, final boolean esri)</span>
+<span class="add">        throws ParameterNotFoundException</span>
+{
+    //Fetch parameters
+    super(parameters, expected);
+    this.sp2         = sp2;
+    this.belgium     = belgium;
+<span class="add">    this.esri        = esri;</span>
+    if (sp2) {
+        phi1 = doubleValue(expected, Provider2SP.STANDARD_PARALLEL_1, parameters);
+<span class="add">        ensureLatitudeInRange(Provider2SP.STANDARD_PARALLEL_1, phi1, true);</span>
+        phi2 = doubleValue(expected, Provider2SP.STANDARD_PARALLEL_2, parameters);
+<span class="add">        if (Double.isNaN(phi2)) {</span>
+<span class="add">            phi2 = phi1;</span>
+<span class="add">        }</span>
+<span class="add">        ensureLatitudeInRange(Provider2SP.STANDARD_PARALLEL_2, phi2, true);</span>
+    } else {
+        if (belgium) {
+            throw new IllegalArgumentException();</pre></td></tr>
+<tr><td><pre> * {@inheritDoc}
+ */
+public ParameterDescriptorGroup getParameterDescriptors() {
+<span class="del">    return (belgium) ?</span>
+                Provider2SP_Belgium.PARAMETERS :
+<span class="del">                ((sp2) ? Provider2SP.PARAMETERS : Provider1SP.PARAMETERS);</span>
+}
+
+/**</pre></td>
+<td><pre> * {@inheritDoc}
+ */
+public ParameterDescriptorGroup getParameterDescriptors() {
+<span class="add">    return (esri) ?</span>
+<span class="add">                Provider2SP_ESRI.PARAMETERS :</span>
+<span class="add">                ((belgium) ?</span>
+                Provider2SP_Belgium.PARAMETERS :
+<span class="add">                    ((sp2) ? Provider2SP.PARAMETERS : Provider1SP.PARAMETERS));</span>
+}
+
+/**</pre></td></tr>
+</table>
+    </div>
+  </body>
+</html>

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

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



Mime
View raw message